diff options
author | Fangrui Song <maskray@google.com> | 2021-08-11 09:00:37 -0700 |
---|---|---|
committer | Fangrui Song <maskray@google.com> | 2021-08-11 09:00:38 -0700 |
commit | 43d06ed218fc8be58987bdfd00e21e5720f0b862 (patch) | |
tree | a0981530e58766ac0eaf0ce6c0ed3c41d24c1742 /sysdeps/aarch64/tlsdesc.sym | |
parent | 302247c89121e8d4c7629e589edbb4974fff6edb (diff) | |
download | glibc-43d06ed218fc8be58987bdfd00e21e5720f0b862.tar.gz glibc-43d06ed218fc8be58987bdfd00e21e5720f0b862.tar.xz glibc-43d06ed218fc8be58987bdfd00e21e5720f0b862.zip |
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>
Diffstat (limited to 'sysdeps/aarch64/tlsdesc.sym')
0 files changed, 0 insertions, 0 deletions