aboutsummaryrefslogtreecommitdiff
path: root/elf/dl-deps.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-10-24 07:36:55 +0000
committerUlrich Drepper <drepper@redhat.com>2000-10-24 07:36:55 +0000
commit42c4f32a44c76d1f4e2b744bf80f495dc36caa87 (patch)
tree475224614ae3e30c27dc1889e86468080c48cf9c /elf/dl-deps.c
parent69c3325490f56db660b349d7c04daab6aaea1bf1 (diff)
downloadglibc-42c4f32a44c76d1f4e2b744bf80f495dc36caa87.tar
glibc-42c4f32a44c76d1f4e2b744bf80f495dc36caa87.tar.gz
glibc-42c4f32a44c76d1f4e2b744bf80f495dc36caa87.tar.bz2
glibc-42c4f32a44c76d1f4e2b744bf80f495dc36caa87.zip
Update.
2000-10-24 Ulrich Drepper <drepper@redhat.com> Complete revamp of the reference counter handling. * include/link.h (struct link_map): Add l_idx field. * elf/dl-close.c: Handle decrementing of reference counters more correctly. If necessary decrement reference counters of dependencies of dependencies. * elf/dl-lookup.c (add_dependency): Only increment reference counter of the object itself and not also its dependencies. * elf/dl-open.c: Increment reference counters here. * elf/dl-deps.c: Remove reference counter handling here. * elf/dl-load.c: Likewise. * elf/rtld.c: Adjust for _dl_map_deps not handling reference counters. * elf/loadtest.c: Print loaded objects at the beginning.
Diffstat (limited to 'elf/dl-deps.c')
-rw-r--r--elf/dl-deps.c21
1 files changed, 2 insertions, 19 deletions
diff --git a/elf/dl-deps.c b/elf/dl-deps.c
index c4582926b8..c3feb98270 100644
--- a/elf/dl-deps.c
+++ b/elf/dl-deps.c
@@ -243,18 +243,7 @@ _dl_map_object_deps (struct link_map *map,
dtail = newp;
++nduplist;
- if (dep->l_reserved)
- {
- /* This object is already in the search list we are
- building. Don't add a duplicate pointer.
- Release the reference just added by
- _dl_map_object. */
- if (dep->l_initfini != NULL)
- for (i = 1; dep->l_initfini[i] != NULL; ++i)
- --dep->l_initfini[i]->l_opencount;
- --dep->l_opencount;
- }
- else
+ if (! dep->l_reserved)
{
/* Append DEP to the unique list. */
newp->done = 0;
@@ -363,13 +352,7 @@ _dl_map_object_deps (struct link_map *map,
/* This object is already in the search list we
are building. Don't add a duplicate pointer.
- Release the reference just added by
- _dl_map_object. */
- if (args.aux->l_initfini != NULL)
- for (i = 1; args.aux->l_initfini[i] != NULL; ++i)
- --args.aux->l_initfini[i]->l_opencount;
- --args.aux->l_opencount;
-
+ Just added by _dl_map_object. */
for (late = newp; late->unique; late = late->unique)
if (late->unique->map == args.aux)
break;