From: Ulrich Drepper Date: Mon, 8 May 2000 15:29:32 +0000 (+0000) Subject: Update. X-Git-Tag: cvs/glibc_2-1-91~436 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3b3938c9f4cbc473ba598690710465d6e115b30f;p=thirdparty%2Fglibc.git Update. 2000-05-08 Jakub Jelinek * elf/dl-fini.c (_dl_fini): Bump l_opencount of all objects so that they are not dlclose'd from underneath us. --- diff --git a/ChangeLog b/ChangeLog index afdb9a7ca40..72f8238979b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2000-05-08 Jakub Jelinek + + * elf/dl-fini.c (_dl_fini): Bump l_opencount of all objects so that + they are not dlclose'd from underneath us. + 2000-05-08 Andreas Schwab * posix/execle.c: Fix size parameter of memcpy. diff --git a/elf/dl-fini.c b/elf/dl-fini.c index f2186896285..9b103aeb7e3 100644 --- a/elf/dl-fini.c +++ b/elf/dl-fini.c @@ -58,7 +58,13 @@ _dl_fini (void) the pointers in. */ maps = (struct link_map **) alloca (nloaded * sizeof (struct link_map *)); for (l = _dl_loaded, nloaded = 0; l != NULL; l = l->l_next) - maps[nloaded++] = l; + { + maps[nloaded++] = l; + + /* Bump l_opencount of all objects so that they are not dlclose()ed + from underneath us. */ + ++l->l_opencount; + } /* Now we have to do the sorting. */ for (l = _dl_loaded->l_next; l != NULL; l = l->l_next)