]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Fix loading first object along a path when tracing.
authorUlrich Drepper <drepper@gmail.com>
Sun, 6 Mar 2011 05:01:50 +0000 (00:01 -0500)
committerPetr Baudis <pasky@suse.cz>
Thu, 26 May 2011 22:12:23 +0000 (00:12 +0200)
(cherry picked from commit 6a5ee1029b3966c5ae9adaaa881e255b2880f511)

ChangeLog
elf/dl-load.c

index a6fa7a9f962b2e3d42c04a452090e9850db55d20..c97afec487c7f04885a6858afa5ddb32ff9c5d68 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2011-03-06  Ulrich Drepper  <drepper@gmail.com>
+
+       * 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  <schwab@redhat.com>
 
        * libio/fmemopen.c (fmemopen): Don't read past end of buffer.
index 9e35dc43d92c35627e75b8ab18f4cbdc21a4f95c..8d4ad73b55814c536639c509bae86f5185852312 100644 (file)
@@ -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