From c2c299fd24e87b83c63191ff979d41a86b37d714 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Tue, 7 Nov 2017 15:24:19 +0100 Subject: Consolidate link map sorting Combine the four places where link maps are sorted into a single function. This also moves the logic to skip the first map (representing the main binary) to the callers. --- sysdeps/generic/ldsodefs.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sysdeps/generic/ldsodefs.h') diff --git a/sysdeps/generic/ldsodefs.h b/sysdeps/generic/ldsodefs.h index 52a792a597..7a65dc641c 100644 --- a/sysdeps/generic/ldsodefs.h +++ b/sysdeps/generic/ldsodefs.h @@ -960,8 +960,8 @@ extern void _dl_init (struct link_map *main_map, int argc, char **argv, extern void _dl_fini (void) attribute_hidden; /* Sort array MAPS according to dependencies of the contained objects. */ -extern void _dl_sort_fini (struct link_map **maps, size_t nmaps, char *used, - Lmid_t ns) attribute_hidden; +extern void _dl_sort_maps (struct link_map **maps, unsigned int nmaps, + char *used, bool for_fini) attribute_hidden; /* The dynamic linker calls this function before and having changing any shared object mappings. The `r_state' member of `struct r_debug' -- cgit v1.2.3