diff options
author | Ulrich Drepper <drepper@redhat.com> | 2000-08-28 08:32:23 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2000-08-28 08:32:23 +0000 |
commit | b35e21f43f6aa514fddabc8f4a7cfdc9042e4c6f (patch) | |
tree | 3d816bce8a5c0d968e4be46a7467eb85e8624c12 /elf/dl-close.c | |
parent | b9672e718e4c01d7ceaf9ba5cca0f38e313b7c1c (diff) | |
download | glibc-b35e21f43f6aa514fddabc8f4a7cfdc9042e4c6f.tar.gz glibc-b35e21f43f6aa514fddabc8f4a7cfdc9042e4c6f.tar.xz glibc-b35e21f43f6aa514fddabc8f4a7cfdc9042e4c6f.zip |
Update.
* elf/Versions [ld] (GLIBC_2.2): Export _dl_debug_files. * elf/dl-close.c (_dl_close): Print debug message if object is not unloaded. * elf/dl-open.c (dl_open_worked): Print message about opencount before returning to caller.
Diffstat (limited to 'elf/dl-close.c')
-rw-r--r-- | elf/dl-close.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/elf/dl-close.c b/elf/dl-close.c index 58a84b5bfc..70fcb1b719 100644 --- a/elf/dl-close.c +++ b/elf/dl-close.c @@ -27,6 +27,8 @@ #include <sys/types.h> #include <sys/mman.h> +#include <stdio-common/_itoa.h> + /* Type of the constructor functions. */ typedef void (*fini_t) (void); @@ -63,6 +65,19 @@ _dl_close (void *_map) if (map->l_opencount > 1 || map->l_type != lt_loaded) { /* There are still references to this object. Do nothing more. */ + if (__builtin_expect (_dl_debug_files, 0)) + { + char buf[20]; + + buf[sizeof buf - 1] = '\0'; + + _dl_debug_message (1, "\nclosing file=", map->l_name, + "; opencount == ", + _itoa_word (map->l_opencount, + buf + sizeof buf - 1, 10, 0), + "\n", NULL); + } + --map->l_opencount; __libc_lock_unlock (_dl_load_lock); return; |