From c3381f3eb21b3660c8854e9bada5e7bd201a40af Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 19 Mar 2005 07:22:23 +0000 Subject: * 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 | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'sysdeps') diff --git a/sysdeps/generic/ldsodefs.h b/sysdeps/generic/ldsodefs.h index a3cef20..dd1b2c8 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 -- cgit v1.1