mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-29 11:41:21 +03:00
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.
This commit is contained in:
@ -1,5 +1,11 @@
|
|||||||
2000-08-28 Ulrich Drepper <drepper@redhat.com>
|
2000-08-28 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
|
* 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.
|
||||||
|
|
||||||
* po/zh.po: Renamed to...
|
* po/zh.po: Renamed to...
|
||||||
* po/zh_TW.po: ...this.
|
* po/zh_TW.po: ...this.
|
||||||
|
|
||||||
|
@ -52,6 +52,8 @@ ld {
|
|||||||
_dl_dst_count; _dl_dst_substitute;
|
_dl_dst_count; _dl_dst_substitute;
|
||||||
}
|
}
|
||||||
GLIBC_2.2 {
|
GLIBC_2.2 {
|
||||||
|
_dl_debug_files;
|
||||||
|
|
||||||
_dl_init; _dl_load_lock; _dl_argv; _dl_nloaded; _dl_check_map_versions;
|
_dl_init; _dl_load_lock; _dl_argv; _dl_nloaded; _dl_check_map_versions;
|
||||||
|
|
||||||
# this is defined in ld.so and overridden by libc
|
# this is defined in ld.so and overridden by libc
|
||||||
|
@ -27,6 +27,8 @@
|
|||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/mman.h>
|
#include <sys/mman.h>
|
||||||
|
|
||||||
|
#include <stdio-common/_itoa.h>
|
||||||
|
|
||||||
|
|
||||||
/* Type of the constructor functions. */
|
/* Type of the constructor functions. */
|
||||||
typedef void (*fini_t) (void);
|
typedef void (*fini_t) (void);
|
||||||
@ -63,6 +65,19 @@ _dl_close (void *_map)
|
|||||||
if (map->l_opencount > 1 || map->l_type != lt_loaded)
|
if (map->l_opencount > 1 || map->l_type != lt_loaded)
|
||||||
{
|
{
|
||||||
/* There are still references to this object. Do nothing more. */
|
/* 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;
|
--map->l_opencount;
|
||||||
__libc_lock_unlock (_dl_load_lock);
|
__libc_lock_unlock (_dl_load_lock);
|
||||||
return;
|
return;
|
||||||
|
@ -31,6 +31,7 @@
|
|||||||
#include <bp-sym.h>
|
#include <bp-sym.h>
|
||||||
|
|
||||||
#include <dl-dst.h>
|
#include <dl-dst.h>
|
||||||
|
#include <stdio-common/_itoa.h>
|
||||||
|
|
||||||
|
|
||||||
extern ElfW(Addr) _dl_sysdep_start (void **start_argptr,
|
extern ElfW(Addr) _dl_sysdep_start (void **start_argptr,
|
||||||
@ -157,8 +158,23 @@ dl_open_worker (void *a)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (new->l_searchlist.r_list)
|
if (new->l_searchlist.r_list)
|
||||||
|
{
|
||||||
|
/* Let the user know about the opencount. */
|
||||||
|
if (__builtin_expect (_dl_debug_files, 0))
|
||||||
|
{
|
||||||
|
char buf[20];
|
||||||
|
|
||||||
|
buf[sizeof buf - 1] = '\0';
|
||||||
|
|
||||||
|
_dl_debug_message (1, "\nopening file=", new->l_name,
|
||||||
|
"; opencount == ",
|
||||||
|
_itoa_word (new->l_opencount,
|
||||||
|
buf + sizeof buf - 1, 10, 0),
|
||||||
|
"\n", NULL);
|
||||||
|
}
|
||||||
/* It was already open. */
|
/* It was already open. */
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/* Load that object's dependencies. */
|
/* Load that object's dependencies. */
|
||||||
_dl_map_object_deps (new, NULL, 0, 0);
|
_dl_map_object_deps (new, NULL, 0, 0);
|
||||||
@ -301,6 +317,20 @@ dl_open_worker (void *a)
|
|||||||
/* We must be the static _dl_open in libc.a. A static program that
|
/* We must be the static _dl_open in libc.a. A static program that
|
||||||
has loaded a dynamic object now has competition. */
|
has loaded a dynamic object now has competition. */
|
||||||
__libc_multiple_libcs = 1;
|
__libc_multiple_libcs = 1;
|
||||||
|
|
||||||
|
/* Let the user know about the opencount. */
|
||||||
|
if (__builtin_expect (_dl_debug_files, 0))
|
||||||
|
{
|
||||||
|
char buf[20];
|
||||||
|
|
||||||
|
buf[sizeof buf - 1] = '\0';
|
||||||
|
|
||||||
|
_dl_debug_message (1, "\nopening file=", new->l_name,
|
||||||
|
"; opencount == ",
|
||||||
|
_itoa_word (new->l_opencount,
|
||||||
|
buf + sizeof buf - 1, 10, 0),
|
||||||
|
"\n", NULL);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user