aboutsummaryrefslogtreecommitdiff
path: root/elf/dl-lookup.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2001-09-08 17:45:32 +0000
committerUlrich Drepper <drepper@redhat.com>2001-09-08 17:45:32 +0000
commit84aafa9199e43623f55800898f9364e839525cdf (patch)
tree767e4b24a42ee58d7f7f69e5471464f28d4a0398 /elf/dl-lookup.c
parentc4bb124a75b23d1a82cee232005dc7e8c43a4276 (diff)
downloadglibc-84aafa9199e43623f55800898f9364e839525cdf.tar
glibc-84aafa9199e43623f55800898f9364e839525cdf.tar.gz
glibc-84aafa9199e43623f55800898f9364e839525cdf.tar.bz2
glibc-84aafa9199e43623f55800898f9364e839525cdf.zip
Update.
2001-09-07 Tom Rix <trix@redhat.com> * sysdeps/unix/sysv/aix/sysv_termio.h: New file. 2001-08-26 Tom Rix <trix@redhat.com> * sysdeps/unix/sysv/aix/Makefile (aix-syscalls.o): More linker command line options. * sysdeps/unix/sysv/aix/start.s: New file, rework of start.c * sysdeps/unix/sysv/aix/start.c: Removed. * sysdeps/unix/sysv/aix/start-libc.c: New file. * sysdeps/unix/sysv/aix/init-first.c: New file. * sysdeps/unix/sysv/aix/fcntl.c: Alias __libc_fcntl to __fcntl. 2001-09-08 Ben Collins <bcollins@debian.org> * sysdeps/arm/dl-machine.h: Fix usage of new _dl_signal_error() format. * sysdeps/generic/dl-machine.h: Likewise. * sysdeps/hppa/dl-fptr.c: Likewise. * sysdeps/ia64/dl-fptr.c: Likewise. * sysdeps/mach/hurd/dl-sysdep.c: Likewise. * sysdeps/mips/dl-machine.h: Likewise. * sysdeps/mips/mips64/dl-machine.h: Likewise. * sysdeps/powerpc/dl-machine.c: Likewise. 2001-09-07 Ben Collins <bcollins@debian.org> * sysdeps/sparc/sparc32/dl-machine.h: Fix typo. * sysdeps/hppa/dl-lookupcfg.h: Forward declare struct link_map. * elf/dl-lookup.c (add_dependency): Bump l_opencount of all dependencies if necessary.
Diffstat (limited to 'elf/dl-lookup.c')
-rw-r--r--elf/dl-lookup.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/elf/dl-lookup.c b/elf/dl-lookup.c
index 26c839caa7..5fa50fc457 100644
--- a/elf/dl-lookup.c
+++ b/elf/dl-lookup.c
@@ -151,8 +151,15 @@ add_dependency (struct link_map *undef_map, struct link_map *map)
if (__builtin_expect (act < undef_map->l_reldepsmax, 1))
undef_map->l_reldeps[undef_map->l_reldepsact++] = map;
- /* And increment the counter in the referenced object. */
- ++map->l_opencount;
+ if (map->l_searchlist.r_list != NULL)
+ /* And increment the counter in the referenced object. */
+ ++map->l_opencount;
+ else
+ /* We have to bump the counts for all dependencies since so far
+ this object was only a normal or transitive dependency.
+ Now it might be closed with _dl_close() directly. */
+ for (list = map->l_initfini; *list != NULL; ++list)
+ ++(*list)->l_opencount;
/* Display information if we are debugging. */
if (__builtin_expect (_dl_debug_mask & DL_DEBUG_FILES, 0))