From bed12f78fab86b2349cab6e7f4c0e46bde5e9711 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 24 Jan 2004 20:12:10 +0000 Subject: Update. 2004-01-23 David Mosberger * sysdeps/generic/ldsodefs.h (struct rtld_global): Add members _dl_load_adds and _dl_load_subs. * elf/dl-support.c (_dl_load_adds): New variable. (_dl_load_subs): Likewise. * elf/dl-object.c (_dl_new_object): Increment dl_load_adds. * elf/dl-close.c (_dl_close): Increment dl_load_subs. * elf/link.h (struct dl_phdr_info): Add members dlpi_adds and dlpi_subs. * include/link.h: Likewise. * elf/dl-iteratephdr.c (__dl_iterate_phdr): Initialize dlpi_adds and dlpi_subs members. (dl_iterate_phdr): Likewise. * elf/tst-dlmodcount.c: New file. * elf/Makefile (distribute): Mention tst-dlmodcount.c. (tests): If build-shared, mention tst-dlmodcount. ($(objpfx)tst-dlmodcount): If build-shared, build and run tst-dlmodcount. --- elf/dl-support.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'elf/dl-support.c') diff --git a/elf/dl-support.c b/elf/dl-support.c index aa255b443b..8e5c905566 100644 --- a/elf/dl-support.c +++ b/elf/dl-support.c @@ -71,6 +71,11 @@ struct link_map *_dl_loaded; /* Number of object in the _dl_loaded list. */ unsigned int _dl_nloaded; +/* Incremented whenever something may have been added to dl_loaded. */ +unsigned long long _dl_load_adds; +/* Incremented whenever something may have been removed from dl_loaded. */ +unsigned long long _dl_load_subs; + /* Fake scope. In dynamically linked binaries this is the scope of the main application but here we don't have something like this. So create a fake scope containing nothing. */ -- cgit v1.2.3