diff options
| author | Florian Weimer <fweimer@redhat.com> | 2024-12-20 15:52:57 +0100 |
|---|---|---|
| committer | Florian Weimer <fweimer@redhat.com> | 2024-12-20 15:52:57 +0100 |
| commit | 2b1dba3eb364aa65ce4ee947c39fb8d2d75e69b5 (patch) | |
| tree | 0036fd9611c8a9cda941c72ef80d16201380e24d /sysdeps/arm | |
| parent | 322e9d4e443084336ea41a8e7bf72456ab273b73 (diff) | |
| download | glibc-2b1dba3eb364aa65ce4ee947c39fb8d2d75e69b5.tar.xz glibc-2b1dba3eb364aa65ce4ee947c39fb8d2d75e69b5.zip | |
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>
Diffstat (limited to 'sysdeps/arm')
| -rw-r--r-- | sysdeps/arm/dl-machine.h | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h index 9186831be3..b328287a18 100644 --- a/sysdeps/arm/dl-machine.h +++ b/sysdeps/arm/dl-machine.h @@ -351,16 +351,7 @@ elf_machine_rel (struct link_map *map, struct r_scope_elem *scope[], { ElfW(Addr) tmp; # ifndef RTLD_BOOTSTRAP - /* This is defined in rtld.c, but nowhere in the static - libc.a; make the reference weak so static programs can - still link. This declaration cannot be done when - compiling rtld.c (i.e. #ifdef RTLD_BOOTSTRAP) because - rtld.c contains the common defn for _dl_rtld_map, which - is incompatible with a weak decl in the same file. */ -# ifndef SHARED - weak_extern (_dl_rtld_map); -# endif - if (map == &GL(dl_rtld_map)) + if (is_rtld_link_map (map)) /* Undo the relocation done here during bootstrapping. Now we will relocate it anew, possibly using a binding found in the user program or a loaded library |
