https://sourceware.org/bugzilla/show_bug.cgi?id=21181
Bug ID: 21181 Summary: All executables segfault when linked with -z,now on Alpha. Product: binutils Version: 2.27 Status: UNCONFIRMED Severity: normal Priority: P2 Component: ld Assignee: unassigned at sourceware dot org Reporter: mcree at orcon dot net.nz Target Milestone: --- Target: alpha Recent regression seen first with binutils Debian version 2.27.90.20170124-2. All executables compiled with -z,now for Alpha target segfault when run. Debugging with gdb on a bad executable showed that the program entered _start, then jumped to _PROCEDURE_LINKAGE_TABLE, which loads CPU register t12 with the first entry of the GOT which is null, and jumps indirect via t12 which is null, hence segfault. Comparing an executable built with a working linker (Debian version 2.27-8) and one compiled with a recent broken linker revealed this difference in the dynamic section between the good and the bad executable: - RELA 0x0000000120000380 + RELA 0x00000001200003b0 objdump -s shows that for both executables the .rela.plt section is at 0x120000380 and the .init section is at 0x1200003b0, so we see in the bad executable the dynamic section RELA entry is not the address of a relocation table, but is pointing to the .init section. A simple edit of one byte in the bad executable (changing the RELA entry to be 0x0000000120000380) leads to a working executable. -- You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils