diff options
author | Ulrich Drepper <drepper@redhat.com> | 2000-10-21 06:02:49 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2000-10-21 06:02:49 +0000 |
commit | 8699e7b1daa5d250b8bc69e1ecffae80170277e5 (patch) | |
tree | 6ee2841f9875e4bf2d1f73f1539b0ad3bd9b5406 /elf/loadtest.c | |
parent | f6de2239e2cb1af87b36dbd8712bd27f42ae7d54 (diff) | |
download | glibc-8699e7b1daa5d250b8bc69e1ecffae80170277e5.tar.gz glibc-8699e7b1daa5d250b8bc69e1ecffae80170277e5.tar.xz glibc-8699e7b1daa5d250b8bc69e1ecffae80170277e5.zip |
Update.
* elf/dl-close.c: Decrement opencount for all dependencies which can be removed even if the object is not yet unloaded. * elf/dl-deps.c (_dl_map_object_deps): If dependency is already in the list decrement opencount of all dependencies. * elf/dl-load.c (_dl_map_object_from_fd): Increment object of object and all dependencies. (_dl_map_object): Likewise. * elf/dl-lookup.c (add_dependency): Likewise. * elf/loadtest.c: Add debug when with more output.
Diffstat (limited to 'elf/loadtest.c')
-rw-r--r-- | elf/loadtest.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/elf/loadtest.c b/elf/loadtest.c index 80f99607ec..4a3c4c08be 100644 --- a/elf/loadtest.c +++ b/elf/loadtest.c @@ -69,10 +69,18 @@ static const struct #include <include/link.h> +#define OUT \ + for (map = _r_debug.r_map; map != NULL; map = map->l_next) \ + if (map->l_type == lt_loaded) \ + printf ("name = \"%s\", opencount = %d\n", \ + map->l_name, (int) map->l_opencount); \ + fflush (stdout) + int -main (void) +main (int argc, char *argv[]) { + int debug = argc > 1 && argv[1][0] != '\0'; int count = TEST_ROUNDS; int result = 0; @@ -85,6 +93,7 @@ main (void) { int nr = random () % NTESTS; int index = tests[nr].index; + struct link_map *map; printf ("%4d: %4d: ", count + 1, nr); fflush (stdout); @@ -125,6 +134,9 @@ main (void) testobjs[index].handle = NULL; } + + if (debug) + OUT; } /* Unload all loaded modules. */ |