mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-29 11:41:21 +03:00
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.
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user