diff options
author | Ulrich Drepper <drepper@redhat.com> | 2005-03-07 07:04:35 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2005-03-07 07:04:35 +0000 |
commit | ac53c9c64be744177d4005eea1dede0b82397f55 (patch) | |
tree | 2cd5d64dfa890dd517f745a066464b7f7afea5b6 | |
parent | b6cc1a62178d0a8442da2ed464244a9f5f60e2f1 (diff) | |
download | glibc-ac53c9c64be744177d4005eea1dede0b82397f55.tar.gz glibc-ac53c9c64be744177d4005eea1dede0b82397f55.tar.xz glibc-ac53c9c64be744177d4005eea1dede0b82397f55.zip |
* elf/dl-close.c (_dl_close): Print debug message just before
destroying a link map.
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | elf/dl-close.c | 16 |
2 files changed, 14 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog index 5c74e28445..e914f7e64a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2005-03-06 Ulrich Drepper <drepper@redhat.com> + * elf/dl-close.c (_dl_close): Print debug message just before + destroying a link map. + * elf/do-lookup.h (do_lookup_x): Add namespace info to debug output. * elf/dl-version.c (match_symbol): Likewise. diff --git a/elf/dl-close.c b/elf/dl-close.c index 7ad486a5a2..0176e8449e 100644 --- a/elf/dl-close.c +++ b/elf/dl-close.c @@ -279,15 +279,16 @@ _dl_close (void *_map) if (new_opencount[i] == 0 && imap->l_type == lt_loaded && (imap->l_flags_1 & DF_1_NODELETE) == 0) { - /* When debugging print a message first. */ - if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_IMPCALLS, 0)) - _dl_debug_printf ("\ncalling fini: %s [%lu]\n\n", - imap->l_name, ns); - /* Call its termination function. Do not do it for half-cooked objects. */ if (imap->l_init_called) { + /* When debugging print a message first. */ + if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_IMPCALLS, + 0)) + _dl_debug_printf ("\ncalling fini: %s [%lu]\n\n", + imap->l_name, ns); + if (imap->l_info[DT_FINI_ARRAY] != NULL) { ElfW(Addr) *array = @@ -555,6 +556,11 @@ _dl_close (void *_map) reldeps = newrel; } + /* Print debugging message. */ + if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_FILES, 0)) + _dl_debug_printf ("\nfile=%s [%lu]; destroying link map\n", + imap->l_name, imap->l_ns); + /* This name always is allocated. */ free (imap->l_name); /* Remove the list with all the names of the shared object. */ |