This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH] arm: Don't check _DYNAMIC in elf_machine_load_address
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: GNU C Library <libc-alpha at sourceware dot org>
- Date: Tue, 3 Oct 2017 15:48:47 -0700
- Subject: [PATCH] arm: Don't check _DYNAMIC in elf_machine_load_address
- Authentication-results: sourceware.org; auth=none
Since arm can't convert access _DYNAMIC via GOT, which needs dynamic
relocation, to PC-relative at link-time, don't check _DYNAMIC in
elf_machine_load_address.
I am checking it in.
H.J.
* sysdeps/arm/dl-machine.h (elf_machine_load_address): Don't
check _DYNAMIC.
---
sysdeps/arm/dl-machine.h | 3 ---
1 file changed, 3 deletions(-)
diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h
index efe2e1b3a3..7e2d73e3d4 100644
--- a/sysdeps/arm/dl-machine.h
+++ b/sysdeps/arm/dl-machine.h
@@ -59,9 +59,6 @@ elf_machine_load_address (void)
Elf32_Addr got_addr = (Elf32_Addr) &__dl_start;
asm ("adr %0, _dl_start" : "=r" (pcrel_addr));
#else
- extern Elf32_Dyn _DYNAMIC[] __attribute__((weak, visibility ("hidden")));
- if (!_DYNAMIC)
- return 0;
extern Elf32_Addr __dl_relocate_static_pie (void *)
asm ("_dl_relocate_static_pie") attribute_hidden;
Elf32_Addr got_addr = (Elf32_Addr) &__dl_relocate_static_pie;
--
2.13.6