https://sourceware.org/bugzilla/show_bug.cgi?id=19807
Bug ID: 19807
Summary: [2.26 regression] R_386_GOT32X optimization breaks
linux kernel
Product: binutils
Version: 2.27 (HEAD)
Status: NEW
Severity: critical
Priority: P2
Component: ld
Assignee: unassigned at sourceware dot org
Reporter: fvogt at suse dot com
Target Milestone: ---
Building the i386 linux kernel (tried the latest 4.5 rc7, but all are broken)
with compression causes booting to fail during the decompression stage:
"Failed to allocate space for phdrs".
The kernel decompressor stage is linked to a fixed address, but running at a
different location.
This isn't a problem as it relocates itself by adding the difference to the GOT
entries,
but the optimization "mov $GOTOFF(%ecx), %eax" (R_386_GOT32X) -> "lea $address,
%eax" (R_386_32) breaks this,
as the GOT is no longer referenced in the final ELF.
Result is that some global variables, like free_mem_ptr_end, are overwritten
during decompression, causing weird errors like
malloc returing NULL.
Workaround: specify "--disable-x86-relax-relocations" configure option or
"-mrelax-relocations=no" to as.
See also:
https://bugzilla.opensuse.org/show_bug.cgi?id=970239
https://bugzilla.redhat.com/show_bug.cgi?id=1302071
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
bug-binutils mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-binutils