From 1fc074913b0d1f0d57afb585daa41df47ea1ac31 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 23 Sep 2004 07:45:38 +0000 Subject: Update. 2004-09-23 Ulrich Drepper * sysdeps/generic/bits/dlfcn.h: Add RTLD_DEEPBIND. * elf/dl-object.c (_dl_new_object): Add new parameter mode. If mode has RTLD_DEEPBIND set add local searchlist before global scope. * sysdeps/generic/ldsodefs.h (_dl_new_object): Adjust prototype. * elf/rtld.c: Adjust callers of _dl_new_object. * elf/dl-load.c: Likewise. (_dl_map_object_from_fd): If RTLD_DEEPBIND is used, don't do anything for DF_SYMBOLIC. * elf/dl-open.c (dl_open_writer): Pass RTLD_DEEPBIND flag on to _dl_map_object_deps. * elf/tst-deep1.c: New file. * elf/tst-deep1mod1.c: New file. * elf/tst-deep1mod2.c: New file. * elf/tst-deep1mod3.c: New file. * elf/Makefile: Add rules to build and run new tests. * elf/dl-deps.c: Pretty printing. --- elf/rtld.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'elf/rtld.c') diff --git a/elf/rtld.c b/elf/rtld.c index 2daf05a6d6..1ee875a088 100644 --- a/elf/rtld.c +++ b/elf/rtld.c @@ -879,7 +879,7 @@ of this helper program; chances are you did not intend to run this program.\n\ { /* Create a link_map for the executable itself. This will be what dlopen on "" returns. */ - _dl_new_object ((char *) "", "", lt_executable, NULL); + _dl_new_object ((char *) "", "", lt_executable, NULL, 0); if (GL(dl_loaded) == NULL) _dl_fatal_printf ("cannot allocate memory for link map\n"); GL(dl_loaded)->l_phdr = phdr; @@ -1271,7 +1271,8 @@ ERROR: ld.so: object '%s' from %s cannot be preloaded: ignored.\n", better be, since it's read-only and so we couldn't relocate it). We just want our data structures to describe it as if we had just mapped and relocated it normally. */ - struct link_map *l = _dl_new_object ((char *) "", "", lt_library, NULL); + struct link_map *l = _dl_new_object ((char *) "", "", lt_library, NULL, + 0); if (__builtin_expect (l != NULL, 1)) { static ElfW(Dyn) dyn_temp[DL_RO_DYN_TEMP_CNT] attribute_relro; -- cgit v1.2.3