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/dl-close.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/dl-close.c')
-rw-r--r-- | elf/dl-close.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/elf/dl-close.c b/elf/dl-close.c index 8426e73ec9..cb6b6fc381 100644 --- a/elf/dl-close.c +++ b/elf/dl-close.c @@ -61,6 +61,9 @@ _dl_close (void *_map) /* Acquire the lock. */ __libc_lock_lock (_dl_load_lock); + list = map->l_searchlist.r_list; + nsearchlist = map->l_searchlist.r_nlist; + /* Decrement the reference count. */ if (map->l_opencount > 1 || map->l_type != lt_loaded) { @@ -78,14 +81,14 @@ _dl_close (void *_map) "\n", NULL); } - --map->l_opencount; + for (i = 0; i < nsearchlist; ++i) + if (! (list[i]->l_flags_1 & DF_1_NODELETE)) + --list[i]->l_opencount; + __libc_lock_unlock (_dl_load_lock); return; } - list = map->l_searchlist.r_list; - nsearchlist = map->l_searchlist.r_nlist; - rellist = map->l_reldeps; nrellist = map->l_reldepsact; |