aboutsummaryrefslogtreecommitdiff
path: root/elf/dl-load.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2007-06-19 22:59:48 +0000
committerUlrich Drepper <drepper@redhat.com>2007-06-19 22:59:48 +0000
commit9be09e060fcb211d3e53fc93098f57b74df2cb67 (patch)
tree4abc7be287b872bf34a7a88453e31d5186e88b1a /elf/dl-load.c
parentae1ad3aebbc397212b4bb2eec92ff19f8c1f913a (diff)
downloadglibc-9be09e060fcb211d3e53fc93098f57b74df2cb67.tar
glibc-9be09e060fcb211d3e53fc93098f57b74df2cb67.tar.gz
glibc-9be09e060fcb211d3e53fc93098f57b74df2cb67.tar.bz2
glibc-9be09e060fcb211d3e53fc93098f57b74df2cb67.zip
* sysdeps/generic/ldsodefs.h (rtld_global): Reorder some elements
to fill in holes (rtld_global_ro): Likewise. 2007-06-18 Jakub Jelinek <jakub@redhat.com> * 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.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/elf/dl-load.c b/elf/dl-load.c
index 1650ef953a..025b9fd86b 100644
--- a/elf/dl-load.c
+++ b/elf/dl-load.c
@@ -1,5 +1,5 @@
/* Map in a shared object's segments from the file.
- Copyright (C) 1995-2005, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1995-2005, 2006, 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -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])
{