aboutsummaryrefslogtreecommitdiff
path: root/elf/dl-deps.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-08-19 07:17:09 +0000
committerUlrich Drepper <drepper@redhat.com>2000-08-19 07:17:09 +0000
commit752a2a50d4574791b2861653d4352c6b6e4b97ff (patch)
tree2cbe7eac254ad4e35b9dec0000d85bb6ea915a7e /elf/dl-deps.c
parent003715fa0da9048b8e1a30b5284013bcf2990257 (diff)
downloadglibc-752a2a50d4574791b2861653d4352c6b6e4b97ff.zip
glibc-752a2a50d4574791b2861653d4352c6b6e4b97ff.tar.gz
glibc-752a2a50d4574791b2861653d4352c6b6e4b97ff.tar.bz2
Update.
2000-08-19 Ulrich Drepper <drepper@redhat.com> * elf/Versions [ld] (GLIBC_2.2): Export _dl_check_map_versions. * elf/dl-deps.c (_dl_map_object_deps): If object was dependency of a dynamically loaded object remove old l_initfini list. * elf/dl-libc.c (free_mem): Used as __libc_subfreeres callback to remove some dynamically allocated memory blocks in the dynamic loading data structures. * elf/dl-load.c (add_name_to_object): Initialize dont_free to 0. * elf/dl-open.c (dl_open_workder): Don't call _dl_check_all_versions. Instead call _dl_check_map_versions only for the dependencies. * elf/rtld.c: Avoid unneccessary initializations. Mark l_libname information of initial objects as not free-able. * sysdeps/generic/ldsodefs.h (struct libname_list): Add dont_free element. * elf/filter.c: Call mtrace. * elf/restest1.c: Likewise. Close the objects. * elf/loadtest.c: Call mtrace. Check result of dlclose. Print more debug information. * elf/constload1.c: Add comment explaining not freed memory.
Diffstat (limited to 'elf/dl-deps.c')
-rw-r--r--elf/dl-deps.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/elf/dl-deps.c b/elf/dl-deps.c
index 4fc2943..44838d6 100644
--- a/elf/dl-deps.c
+++ b/elf/dl-deps.c
@@ -467,6 +467,14 @@ _dl_map_object_deps (struct link_map *map,
while (runp != NULL && runp->done);
}
+ if (map->l_initfini != NULL && map->l_type == lt_loaded)
+ {
+ /* This object was previously loaded as a dependency and we have
+ a separate l_initfini list. We don't need it anymore. */
+ assert (map->l_searchlist.r_list == NULL);
+ free (map->l_initfini);
+ }
+
/* Store the search list we built in the object. It will be used for
searches in the scope of this object. */
map->l_searchlist.r_list = malloc ((2 * nlist + 1