Better debug information from ld.so

Differentiate between loading as a dependency and loading on request.
This commit is contained in:
Ulrich Drepper 2011-08-12 13:20:11 -04:00
parent 8e999d2962
commit 9ac533d31b
2 changed files with 10 additions and 3 deletions

View File

@ -1,3 +1,8 @@
2011-08-12 Ulrich Drepper <drepper@gmail.com>
* 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 <drepper@gmail.com> 2011-08-11 Ulrich Drepper <drepper@gmail.com>
* intl/l10nflist.c: Allow architecture-specific pop function. * intl/l10nflist.c: Allow architecture-specific pop function.

View File

@ -2094,8 +2094,10 @@ _dl_map_object (struct link_map *loader, const char *name,
/* Display information if we are debugging. */ /* Display information if we are debugging. */
if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_FILES, 0) if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_FILES, 0)
&& loader != NULL) && loader != NULL)
_dl_debug_printf ("\nfile=%s [%lu]; needed by %s [%lu]\n", name, nsid, _dl_debug_printf ((mode & __RTLD_DLOPEN) == 0
loader->l_name[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); ? loader->l_name : rtld_progname, loader->l_ns);
#ifdef SHARED #ifdef SHARED