mirror of git://sourceware.org/git/glibc.git
If an executable is static PIE and has a non-zero load address (compare to elf/tst-pie-address-static), it segfaults as elf_machine_load_address() returns 0x0 and elf_machine_dynamic() returns the run-time instead of link-time address of _DYNAMIC. Now rely on __ehdr_start and _DYNAMIC as also done on other architectures. Checked back to old arch-levels that this approach works fine: - 31bit: -march=g5 - 64bit: -march=z900 Note, that there is no static-PIE support on 31bit, but this approach cleans it also up. Furthermore this cleanup in glibc does not change anything regarding the first GOT-element as the s390 ABI (https://github.com/IBM/s390x-abi) explicitely defines: The doubleword at _GLOBAL_OFFSET_TABLE_[0] is set by the linkage editor to hold the address of the dynamic structure, referenced with the symbol _DYNAMIC. This allows a program, such as the dynamic linker, to find its own dynamic structure without having yet processed its relocation entries. This is especially important for the dynamic linker, because it must initialize itself without relying on other programs to relocate its memory image. |
||
---|---|---|
.. | ||
aarch64 | ||
alpha | ||
arc | ||
arm | ||
csky | ||
generic | ||
gnu | ||
hppa | ||
htl | ||
hurd | ||
i386 | ||
ieee754 | ||
loongarch | ||
m68k | ||
mach | ||
microblaze | ||
mips | ||
nptl | ||
or1k | ||
posix | ||
powerpc | ||
pthread | ||
riscv | ||
s390 | ||
sh | ||
sparc | ||
unix | ||
wordsize-32 | ||
wordsize-64 | ||
x86 | ||
x86_64 |