diff options
author | Szabolcs Nagy <szabolcs.nagy@arm.com> | 2017-10-18 17:26:23 +0100 |
---|---|---|
committer | Szabolcs Nagy <szabolcs.nagy@arm.com> | 2017-10-18 17:35:16 +0100 |
commit | a68ba2f3cd3cbe32c1f31e13c20ed13487727b32 (patch) | |
tree | 41490ad1d5dd26a7fd4d4b0990c560158a3e9a44 /misc/tst-efgcvt.c | |
parent | 346729f66b905344e4ce24045489d189e5b4a9b8 (diff) | |
download | glibc-a68ba2f3cd3cbe32c1f31e13c20ed13487727b32.tar glibc-a68ba2f3cd3cbe32c1f31e13c20ed13487727b32.tar.gz glibc-a68ba2f3cd3cbe32c1f31e13c20ed13487727b32.tar.bz2 glibc-a68ba2f3cd3cbe32c1f31e13c20ed13487727b32.zip |
[AARCH64] Rewrite elf_machine_load_address using _DYNAMIC symbol
This patch rewrites aarch64 elf_machine_load_address to use special _DYNAMIC
symbol instead of _dl_start.
The static address of _DYNAMIC symbol is stored in the first GOT entry.
Here is the change which makes this solution work (part of binutils 2.24):
https://sourceware.org/ml/binutils/2013-06/msg00248.html
i386, x86_64 targets use the same method to do this as well.
The original implementation relies on a trick that R_AARCH64_ABS32 relocation
being resolved at link time and the static address fits in the 32bits.
However, in LP64, normally, the address is defined to be 64 bit.
Here is the C version one which should be portable in all cases.
* sysdeps/aarch64/dl-machine.h (elf_machine_load_address): Use
_DYNAMIC symbol to calculate load address.
Diffstat (limited to 'misc/tst-efgcvt.c')
0 files changed, 0 insertions, 0 deletions