glibc/sysdeps
Fangrui Song 43d06ed218 aarch64: Make elf_machine_{load_address,dynamic} robust [BZ #28203]
The AArch64 ABI is largely platform agnostic and does not specify
_GLOBAL_OFFSET_TABLE_[0] ([1]). glibc ld.so turns out to be probably the
only user of _GLOBAL_OFFSET_TABLE_[0] and GNU ld defines the value
to the link-time address _DYNAMIC. [2]

In 2012, __ehdr_start was implemented in GNU ld and gold in binutils
2.23.  Using adrp+add / (-mcmodel=tiny) adr to access
__ehdr_start/_DYNAMIC gives us a robust way to get the load address and
the link-time address of _DYNAMIC.

[1]: From a psABI maintainer, https://bugs.llvm.org/show_bug.cgi?id=49672#c2
[2]: LLD's aarch64 port does not set _GLOBAL_OFFSET_TABLE_[0] to the
link-time address _DYNAMIC.
LLD is widely used on aarch64 Android and ChromeOS devices.  Software
just works without the need for _GLOBAL_OFFSET_TABLE_[0].

Reviewed-by: Szabolcs Nagy <szabolcs.nagy@arm.com>
2021-08-11 09:00:38 -07:00
..
aarch64 aarch64: Make elf_machine_{load_address,dynamic} robust [BZ #28203] 2021-08-11 09:00:38 -07:00
alpha
arc ARC: elf: make type safe 2021-07-21 13:13:45 -07:00
arm
csky
generic mtrace: Wean away from malloc hooks 2021-07-22 18:38:06 +05:30
gnu hurd: Fix glob lstat compatibility 2021-07-22 20:31:52 +02:00
hppa
htl htl: Do not expose pthread hidden proto outside libpthread 2021-07-18 20:25:33 +00:00
hurd
i386 i386: Regenerate ulps 2021-07-25 22:29:27 +02:00
ia64
ieee754
m68k
mach hurd: _Fork: unlock malloc before calling fork child hooks 2021-07-27 02:03:01 +02:00
microblaze
mips Update MIPS libm-test-ulps 2021-07-07 15:50:18 +00:00
nios2
nptl Reduce <limits.h> pollution due to dynamic PTHREAD_STACK_MIN 2021-07-12 18:43:32 +02:00
posix gethosts: Remove unused argument _type 2021-08-04 02:23:43 +05:30
powerpc powerpc64: Add checks for Altivec and VSX in ifunc selection 2021-08-06 16:10:08 -03:00
pthread Move malloc hooks into a compat DSO 2021-07-22 18:37:59 +05:30
riscv RISC-V: Update rv64 ULPs 2021-07-21 08:44:09 +02:00
s390 s390: Fix MEMCHR_Z900_G5 ifunc-variant if n>=0x80000000 [BZ #28024] 2021-07-01 16:46:59 +02:00
sh
sparc Update sparc libm-test-ulps 2021-08-04 17:38:38 -03:00
unix Add PTRACE_GET_RSEQ_CONFIGURATION from Linux 5.13 to sys/ptrace.h 2021-08-09 16:51:38 +00:00
wordsize-32
wordsize-64
x86 x86-64: Add Avoid_Short_Distance_REP_MOVSB 2021-07-28 13:23:57 -07:00
x86_64 x86-64: Add Avoid_Short_Distance_REP_MOVSB 2021-07-28 13:23:57 -07:00