1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-08-08 17:42:12 +03:00

elf: Introduce is_rtld_link_map

Unconditionally define it to false for static builds.

This avoids the awkward use of weak_extern for _dl_rtld_map
in checks that cannot be possibly true on static builds.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
This commit is contained in:
Florian Weimer
2024-12-20 15:52:57 +01:00
parent 322e9d4e44
commit 2b1dba3eb3
10 changed files with 28 additions and 56 deletions

View File

@@ -192,7 +192,7 @@ elf_machine_lazy_rel (struct link_map *map, struct r_scope_elem *scope[],
do { \
int edr_lazy = elf_machine_runtime_setup ((map), (scope), (lazy), \
(consider_profile)); \
if (((map) != &GL(dl_rtld_map) || DO_RTLD_BOOTSTRAP)) \
if (!is_rtld_link_map (map) || DO_RTLD_BOOTSTRAP) \
ELF_DYNAMIC_DO_RELR (map); \
ELF_DYNAMIC_DO_REL ((map), (scope), edr_lazy, skip_ifunc); \
ELF_DYNAMIC_DO_RELA ((map), (scope), edr_lazy, skip_ifunc); \