diff options
author | Jakub Jelinek <jakub@redhat.com> | 2007-07-07 17:31:45 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2007-07-07 17:31:45 +0000 |
commit | a1ce84f35f28616163778cd63878e12e65ddb97b (patch) | |
tree | 5d20132d84a9af620f21126320f44126b4d4c742 /elf/dl-load.c | |
parent | 5daa0615659c5651d48e39ba7c17db769bbe10d4 (diff) | |
download | glibc-a1ce84f35f28616163778cd63878e12e65ddb97b.tar glibc-a1ce84f35f28616163778cd63878e12e65ddb97b.tar.gz glibc-a1ce84f35f28616163778cd63878e12e65ddb97b.tar.bz2 glibc-a1ce84f35f28616163778cd63878e12e65ddb97b.zip |
* sysdeps/generic/ldsodefs.h (rtld_global): Reorder some elements
to fill in holes
(rtld_global_ro): Likewise.
* elf/dl-addr.c (_dl_addr): Skip PT_LOAD checking if l_contiguous.
Move PT_LOAD checking to...
(_dl_addr_inside_object): ... here, new function.
* elf/dl-sym.c (do_sym): If not l_contiguous,
call _dl_addr_inside_object.
* elf/dl-iteratephdr.c (__dl_iterate_phdr): Likewise.
* dlfcn/dlinfo.c (dlinfo_doit): Likewise.
* elf/dl-open.c (dl_open_worker): Likewise.
(_dl_addr_inside_object): New function if IS_IN_rtld.
* elf/dl-load.c (_dl_map_object_from_fd): Set l_contiguous if no
holes are present or are PROT_NONE protected.
* include/link.h (struct link_map): Add l_contiguous field.
* sysdeps/generic/ldsodefs.h (_dl_addr_inside_object): New prototype.
Diffstat (limited to 'elf/dl-load.c')
-rw-r--r-- | elf/dl-load.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/elf/dl-load.c b/elf/dl-load.c index 1650ef953a..0301b425a9 100644 --- a/elf/dl-load.c +++ b/elf/dl-load.c @@ -1223,6 +1223,8 @@ cannot allocate TLS data structures for initial thread"); loadcmds[nloadcmds - 1].mapstart - c->mapend, PROT_NONE); + l->l_contiguous = 1; + goto postmap; } @@ -1242,6 +1244,7 @@ cannot allocate TLS data structures for initial thread"); /* Remember which part of the address space this object uses. */ l->l_map_start = c->mapstart + l->l_addr; l->l_map_end = l->l_map_start + maplength; + l->l_contiguous = !has_holes; while (c < &loadcmds[nloadcmds]) { |