glibc/sysdeps
Szabolcs Nagy a68ba2f3cd [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.
2017-10-18 17:35:16 +01:00
..
aarch64 [AARCH64] Rewrite elf_machine_load_address using _DYNAMIC symbol 2017-10-18 17:35:16 +01:00
alpha Use libm_alias_double for dbl-64 fma. 2017-10-04 20:32:48 +00:00
arm Update ARM libm-test-ulps. 2017-10-05 22:17:30 +00:00
generic Add common ifunc-init.h header 2017-10-17 12:01:22 -02:00
gnu hurd: Fix getifaddrs' and freeifaddrs' symbol exposition 2017-09-28 01:05:18 +02:00
hppa ld.so: Replace (&bootstrap_map) with BOOTSTRAP_MAP 2017-10-03 01:55:12 -07:00
i386 Don't use hidden visibility in libc.a with PIE on i386 2017-10-04 17:18:42 -07:00
ia64 ld.so: Replace (&bootstrap_map) with BOOTSTRAP_MAP 2017-10-03 01:55:12 -07:00
ieee754 Move some float128 symbol version definitions. 2017-10-16 22:04:42 +00:00
init_array Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
m68k Do not wrap logf, log2f and powf 2017-10-02 14:39:38 +01:00
mach Introduce NO_RTLD_HIDDEN, make hurd use it instead of NO_HIDDEN 2017-10-03 01:33:38 +02:00
microblaze Obsolete pow10 functions. 2017-09-01 21:13:18 +00:00
mips mips: Don't check _DYNAMIC in elf_machine_load_address 2017-10-03 17:47:51 -07:00
nios2 Enable unwind info in libc-start.c and backtrace.c 2017-09-19 15:07:58 +01:00
nptl Remove add-ons mechanism. 2017-10-05 15:58:13 +00:00
posix Hide internal idna functions [BZ #18822] 2017-10-01 17:33:22 -07:00
powerpc powerpc: fix check-before-set in SET_RESTORE_ROUND 2017-10-18 12:08:28 -02:00
pthread aio: Remove internal_function function attribute 2017-08-31 15:59:06 +02:00
s390 S390: Regenerate ULPs 2017-10-05 12:50:49 +02:00
sh Enable unwind info in libc-start.c and backtrace.c 2017-09-19 15:07:58 +01:00
sparc Fix TLS relocations against local symbols on powerpc32, sparc32 and sparc64 2017-10-13 16:14:16 -03:00
tile Remove ancient __signbit inlines 2017-09-28 19:52:13 +01:00
unix posix: Add p{readv,writev}2 flags to generic uio-ext.h 2017-10-17 17:52:04 -02:00
wordsize-32 Build divdi3 only for architecture that required it 2017-04-06 15:14:34 -03:00
wordsize-64 posix: Consolidate Linux glob implementation 2017-09-08 16:34:02 +02:00
x86 Add common ifunc-init.h header 2017-10-17 12:01:22 -02:00
x86_64 Revert x86: Allow undefined _DYNAMIC in static executable 2017-10-03 17:49:09 -07:00