From 8edd9172533488545e7e088e0c3bc02f9ef36bee Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 24 Oct 2000 17:04:14 +0000 Subject: Update. 2000-10-24 Ulrich Drepper * elf/dl-close.c (_dl_close): Use correct list (l_initfini) when computing new opencounts. * elf/Makefile: Add rules to build and run neededtest3. * neededtest3.c: New file. * neededobj4.c: New file. * elf/neededtest.c (main): Correct tests for failing dlopen. --- elf/dl-close.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'elf/dl-close.c') diff --git a/elf/dl-close.c b/elf/dl-close.c index 21305402c0..4ee5c1b9bb 100644 --- a/elf/dl-close.c +++ b/elf/dl-close.c @@ -94,23 +94,23 @@ _dl_close (void *_map) * sizeof (unsigned int)); for (i = 0; i < nsearchlist; ++i) { - list[i]->l_idx = i; - new_opencount[i] = list[i]->l_opencount; + map->l_initfini[i]->l_idx = i; + new_opencount[i] = map->l_initfini[i]->l_opencount; } --new_opencount[0]; for (i = 1; i < nsearchlist; ++i) - if (! (list[i]->l_flags_1 & DF_1_NODELETE) + if (! (map->l_initfini[i]->l_flags_1 & DF_1_NODELETE) /* Decrement counter. */ && --new_opencount[i] == 0 /* Test whether this object was also loaded directly. */ - && list[i]->l_searchlist.r_list != NULL) + && map->l_initfini[i]->l_searchlist.r_list != NULL) { /* In this case we have the decrement all the dependencies of this object. They are all in MAP's dependency list. */ unsigned int j; - struct link_map **dep_list = list[i]->l_searchlist.r_list; + struct link_map **dep_list = map->l_initfini[i]->l_searchlist.r_list; - for (j = 1; j < list[i]->l_searchlist.r_nlist; ++j) + for (j = 1; j < map->l_initfini[i]->l_searchlist.r_nlist; ++j) if (! (dep_list[j]->l_flags_1 & DF_1_NODELETE)) { assert (dep_list[j]->l_idx < nsearchlist); @@ -238,7 +238,7 @@ _dl_close (void *_map) { if (imap->l_searchlist.r_list != NULL) free (imap->l_searchlist.r_list); - else if (imap->l_initfini != NULL) + else free (imap->l_initfini); } -- cgit v1.2.3