aboutsummaryrefslogtreecommitdiff
path: root/elf/dl-deps.c
diff options
context:
space:
mode:
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 4fc2943c14..44838d6208 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