From: Ulrich Drepper Date: Sun, 6 Mar 2011 05:01:50 +0000 (-0500) Subject: Fix loading first object along a path when tracing. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=957a75e60be98088738b5b5640164e8dfffc4f4e;p=thirdparty%2Fglibc.git Fix loading first object along a path when tracing. (cherry picked from commit 6a5ee1029b3966c5ae9adaaa881e255b2880f511) --- diff --git a/ChangeLog b/ChangeLog index a6fa7a9f962..c97afec487c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2011-03-06 Ulrich Drepper + + * elf/dl-load.c (_dl_map_object): If we are looking for the first + to-be-loaded object along a path to loader is ld.so. + 2011-03-03 Andreas Schwab * libio/fmemopen.c (fmemopen): Don't read past end of buffer. diff --git a/elf/dl-load.c b/elf/dl-load.c index 9e35dc43d92..8d4ad73b558 100644 --- a/elf/dl-load.c +++ b/elf/dl-load.c @@ -2102,7 +2102,9 @@ _dl_map_object (struct link_map *loader, const char *name, { #ifdef SHARED // XXX Correct to unconditionally default to namespace 0? - l = loader ?: GL(dl_ns)[LM_ID_BASE]._ns_loaded; + l = (loader + ?: GL(dl_ns)[LM_ID_BASE]._ns_loaded + ?: &GL(dl_rtld_map)); #else l = loader; #endif