From 8a07ed0887c1bc3e6b5b817248852a917f13de24 Mon Sep 17 00:00:00 2001 From: drepper Date: Tue, 24 Oct 2000 07:33:19 +0000 Subject: [PATCH] (add_dependency): Only increment reference counter of the object itself and not also its dependencies. --- elf/dl-lookup.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/elf/dl-lookup.c b/elf/dl-lookup.c index d9476817c3..1284e2b3dc 100644 --- a/elf/dl-lookup.c +++ b/elf/dl-lookup.c @@ -160,11 +160,7 @@ add_dependency (struct link_map *undef_map, struct link_map *map) if (__builtin_expect (act < undef_map->l_reldepsmax, 1)) undef_map->l_reldeps[undef_map->l_reldepsact++] = map; - /* And increment the counter in the referenced object - and its dependencies. */ - if (map->l_initfini != NULL) - for (j = 1; map->l_initfini[j] != NULL; ++j) - ++map->l_initfini[j]->l_opencount; + /* And increment the counter in the referenced object. */ ++map->l_opencount; /* Display information if we are debugging. */ -- 2.11.0