summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@gmail.com>2011-03-06 00:01:50 -0500
committerPetr Baudis <pasky@suse.cz>2011-05-27 00:12:23 +0200
commit957a75e60be98088738b5b5640164e8dfffc4f4e (patch)
tree7dfa843674c2c32fcfede743494f745957edd024
parenta02af4f1aedc6e1db180b9568d85e6d40d8fb1f6 (diff)
downloadglibc-957a75e60be98088738b5b5640164e8dfffc4f4e.tar.gz
Fix loading first object along a path when tracing.
(cherry picked from commit 6a5ee1029b3966c5ae9adaaa881e255b2880f511)
-rw-r--r--ChangeLog5
-rw-r--r--elf/dl-load.c4
2 files changed, 8 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index a6fa7a9f96..c97afec487 100644
--- 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.
diff --git a/elf/dl-load.c b/elf/dl-load.c
index 9e35dc43d9..8d4ad73b55 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