about summary refs log tree commit diff
path: root/elf/dl-load.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@gmail.com>2011-08-12 13:20:11 -0400
committerUlrich Drepper <drepper@gmail.com>2011-08-12 13:20:11 -0400
commit9ac533d31bae9b814a0c84b279db422005d1c9fd (patch)
treef6764d12ed77300b7fc4a4314509738d4f23bd47 /elf/dl-load.c
parent8e999d29628b0d1fec3046722554e792c351450b (diff)
downloadglibc-9ac533d31bae9b814a0c84b279db422005d1c9fd.tar.gz
glibc-9ac533d31bae9b814a0c84b279db422005d1c9fd.tar.xz
glibc-9ac533d31bae9b814a0c84b279db422005d1c9fd.zip
Better debug information from ld.so
Differentiate between loading as a dependency and loading on request.
Diffstat (limited to 'elf/dl-load.c')
-rw-r--r--elf/dl-load.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/elf/dl-load.c b/elf/dl-load.c
index 18a83d2754..ec700c4251 100644
--- a/elf/dl-load.c
+++ b/elf/dl-load.c
@@ -2094,9 +2094,11 @@ _dl_map_object (struct link_map *loader, const char *name,
   /* Display information if we are debugging.  */
   if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_FILES, 0)
       && loader != NULL)
-    _dl_debug_printf ("\nfile=%s [%lu];  needed by %s [%lu]\n", name, nsid,
-			      loader->l_name[0]
-			      ? loader->l_name : rtld_progname, loader->l_ns);
+    _dl_debug_printf ((mode & __RTLD_DLOPEN) == 0
+		      ? "\nfile=%s [%lu];  needed by %s [%lu]\n"
+		      : "\nfile=%s [%lu];  dynamically loaded by %s [%lu]\n",
+		      name, nsid, loader->l_name[0]
+		      ? loader->l_name : rtld_progname, loader->l_ns);
 
 #ifdef SHARED
   /* Give the auditing libraries a chance to change the name before we