]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
2005-03-18 Ulrich Drepper <drepper@redhat.com>
authorRoland McGrath <roland@gnu.org>
Wed, 6 Apr 2005 02:50:21 +0000 (02:50 +0000)
committerRoland McGrath <roland@gnu.org>
Wed, 6 Apr 2005 02:50:21 +0000 (02:50 +0000)
[BZ #821]
* elf/dl-fini.c (_dl_fini): Split sorting of the maps in separate
function _dl_sort_fini.
(_dl_sort_fini): New function.
* sysdeps/generic/ldsodefs.h: Declare _dl_sort_fini.
* elf/dl-close.c (_dl_close): Call _dl_sort_fini before running
destructors to call them in the right order.

sysdeps/generic/ldsodefs.h

index ec68e1a565781f7ae40a340d127d2d9abaceb3ef..ccd997cd89527ce7e1235c9bd6b397849399797d 100644 (file)
@@ -783,6 +783,11 @@ extern void _dl_init (struct link_map *main_map, int argc, char **argv,
    initializer functions have completed.  */
 extern void _dl_fini (void) internal_function;
 
+/* Sort array MAPS according to dependencies of the contained objects.  */
+extern void _dl_sort_fini (struct link_map *l, struct link_map **maps,
+                          size_t nmaps, char *used, Lmid_t ns)
+     internal_function;
+
 /* The dynamic linker calls this function before and having changing
    any shared object mappings.  The `r_state' member of `struct r_debug'
    says what change is taking place.  This function's address is