From: Ulrich Drepper Date: Fri, 12 Aug 2011 17:20:11 +0000 (-0400) Subject: Better debug information from ld.so X-Git-Tag: glibc-2.15~411 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9ac533d31bae9b814a0c84b279db422005d1c9fd;p=thirdparty%2Fglibc.git Better debug information from ld.so Differentiate between loading as a dependency and loading on request. --- diff --git a/ChangeLog b/ChangeLog index 83bee3f6e3d..a5ad9e36cfc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2011-08-12 Ulrich Drepper + + * elf/dl-load.c (_dl_map_object): Show in debug output whether a DSO + was a dependency or dynamically loaded. + 2011-08-11 Ulrich Drepper * intl/l10nflist.c: Allow architecture-specific pop function. diff --git a/elf/dl-load.c b/elf/dl-load.c index 18a83d27541..ec700c42519 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