mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-08 17:42:12 +03:00
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.
This commit is contained in:
@@ -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'
|
||||
|
Reference in New Issue
Block a user