From c14e91352e26aa4e1622f08bb9a25a9527a8db2b Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 9 Aug 2004 06:41:04 +0000 Subject: [BZ #116] Update. * elf/dl-load.c (_dl_map_object): If __RTLD_CALLMAP flag is set, reset loader before the actual loading. * elf/dl-open.c (dl_open_worker): If file name contains no path element determine map of caller. Pass caller map in this case to _dl_map_object. Set __RTLD_CALLMAP in mode. * include/dlfcn.h (__RTLD_CALLMAP): Define. [BZ #116] Patch by Greg Wolodkin . --- elf/dl-load.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'elf/dl-load.c') diff --git a/elf/dl-load.c b/elf/dl-load.c index afbb06b9e5..cb0642a6d2 100644 --- a/elf/dl-load.c +++ b/elf/dl-load.c @@ -1914,6 +1914,12 @@ _dl_map_object (struct link_map *loader, const char *name, int preloaded, } } + /* In case the LOADER information has only been provided to get to + the appropriate RUNPATH/RPATH information we do not need it + anymore. */ + if (mode & __RTLD_CALLMAP) + loader = NULL; + if (__builtin_expect (fd, 0) == -1) { if (trace_mode -- cgit v1.2.3