about summary refs log tree commit diff
path: root/sysdeps/generic
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2005-03-19 07:22:23 +0000
committerUlrich Drepper <drepper@redhat.com>2005-03-19 07:22:23 +0000
commitc3381f3eb21b3660c8854e9bada5e7bd201a40af (patch)
treef6611e40528d1538584411b0cdc94855c0e09b38 /sysdeps/generic
parentbb4bb82b13533eee4dfe09e21a23a150d0d3ee8a (diff)
downloadglibc-c3381f3eb21b3660c8854e9bada5e7bd201a40af.tar.gz
glibc-c3381f3eb21b3660c8854e9bada5e7bd201a40af.tar.xz
glibc-c3381f3eb21b3660c8854e9bada5e7bd201a40af.zip
* 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.
Diffstat (limited to 'sysdeps/generic')
-rw-r--r--sysdeps/generic/ldsodefs.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/sysdeps/generic/ldsodefs.h b/sysdeps/generic/ldsodefs.h
index a3cef20251..dd1b2c8345 100644
--- a/sysdeps/generic/ldsodefs.h
+++ b/sysdeps/generic/ldsodefs.h
@@ -892,6 +892,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