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-deps.c | |
parent | f6de2239e2cb1af87b36dbd8712bd27f42ae7d54 (diff) | |
download | glibc-8699e7b1daa5d250b8bc69e1ecffae80170277e5.zip glibc-8699e7b1daa5d250b8bc69e1ecffae80170277e5.tar.gz glibc-8699e7b1daa5d250b8bc69e1ecffae80170277e5.tar.bz2 |
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-deps.c')
-rw-r--r-- | elf/dl-deps.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/elf/dl-deps.c b/elf/dl-deps.c index 44838d6..566073e 100644 --- a/elf/dl-deps.c +++ b/elf/dl-deps.c @@ -244,11 +244,16 @@ _dl_map_object_deps (struct link_map *map, ++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. */ - --dep->l_opencount; + { + /* 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 { /* Append DEP to the unique list. */ @@ -360,6 +365,9 @@ _dl_map_object_deps (struct link_map *map, 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; for (late = newp; late->unique; late = late->unique) |