projects
/
platform
/
upstream
/
linaro-glibc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f369623
)
(__elf_preferred_address): Prefer gaps below main executable.
author
Andreas Jaeger
<aj@suse.de>
Wed, 25 Jul 2001 06:36:52 +0000
(06:36 +0000)
committer
Andreas Jaeger
<aj@suse.de>
Wed, 25 Jul 2001 06:36:52 +0000
(06:36 +0000)
sysdeps/powerpc/dl-machine.c
patch
|
blob
|
history
diff --git
a/sysdeps/powerpc/dl-machine.c
b/sysdeps/powerpc/dl-machine.c
index
0fdf2a4
..
c9c4fe0
100644
(file)
--- a/
sysdeps/powerpc/dl-machine.c
+++ b/
sysdeps/powerpc/dl-machine.c
@@
-119,7
+119,11
@@
__elf_preferred_address(struct link_map *loader, size_t maplength,
mapend = l->l_map_end | (_dl_pagesize - 1);
assert (mapend > mapstart);
- if ((mapend >= high || l == _dl_loaded) && high >= mapstart)
+ /* Prefer gaps below the main executable, note that l ==
+ _dl_loaded does not work for static binaries loading
+ e.g. libnss_*.so. */
+ if ((mapend >= high || l->l_type == lt_executable)
+ && high >= mapstart)
high = mapstart;
else if (mapend >= low && low >= mapstart)
low = mapend;