mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-10 05:03:06 +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:
@@ -1960,7 +1960,7 @@ dl_main (const ElfW(Phdr) *phdr,
|
||||
GL(dl_rtld_map).l_next->l_prev = GL(dl_rtld_map).l_prev;
|
||||
|
||||
for (i = 1; i < main_map->l_searchlist.r_nlist; ++i)
|
||||
if (main_map->l_searchlist.r_list[i] == &GL(dl_rtld_map))
|
||||
if (is_rtld_link_map (main_map->l_searchlist.r_list[i]))
|
||||
break;
|
||||
|
||||
/* Insert the link map for the dynamic loader into the chain in
|
||||
|
Reference in New Issue
Block a user