https://sourceware.org/bugzilla/show_bug.cgi?id=33141
Bug ID: 33141 Summary: unresolved relocations in -static-pie binaries on s390x (and probably others) Product: binutils Version: 2.44 Status: UNCONFIRMED Severity: normal Priority: P2 Component: ld Assignee: unassigned at sourceware dot org Reporter: sertonix at posteo dot net Target Milestone: --- When linking binaries with -static-pie for s390x some of the binaries segfault when executed. This seems to be caused by some relocations which haven't been resolved by the linker. This command returned some results even though it shouldn't: readelf -a ./a.out | grep R_390_64 This is essentially the same issue as https://sourceware.org/bugzilla/show_bug.cgi?id=25527 but for s390x. This has been previously patched for arm and riscv ( https://sourceware.org/git/?p=binutils-gdb.git;a=patch;h=1dcb9720d62cd053a72c31881b7724ce9f74332c and https://sourceware.org/git/?p=binutils-gdb.git;a=patch;h=39c7793ba8bef5aab358511b22764081959cb2ff ). Applying the same logic change as in the arm and riscv patch in elf64-s390.c results in a usable binary. I checked other arches and there seem to be a lot more that might be affected by the same issue (elf32-arc.c, elf32-cris.c, elf32-csky.c, elf32-hppa.c, elf32-m68k.c, elf32-s390.c, elf32-tic6x.c, elf32-tilepro.c, elfxx-sparc.c). Maybe it would be better to, instead of fixing this for each arch individually, find a fix that works for all arches (or at least patch the issue on all arches at once). For example SYMBOLIC_BIND seems to be used by most (all?) arches and could may be changed to fix this. -- You are receiving this mail because: You are on the CC list for the bug.