https://sourceware.org/bugzilla/show_bug.cgi?id=33808
Bug ID: 33808
Summary: --gsframe=yes and --enable-default-sframe generate
different relocations
Product: binutils
Version: 2.46 (HEAD)
Status: NEW
Severity: normal
Priority: P2
Component: gas
Assignee: unassigned at sourceware dot org
Reporter: hjl.tools at gmail dot com
CC: indu.bhagat at oracle dot com, sam at gentoo dot org
Blocks: 33807
Target Milestone: ---
Target: x86-64
Created attachment 16582
--> https://sourceware.org/bugzilla/attachment.cgi?id=16582&action=edit
A test
With --enable-default-sframe:
[hjl@gnu-tgl-3 ld]$ ./tmpdir/ld/as --gsframe=yes -o simple.o /tmp/simple.s
[hjl@gnu-tgl-3 ld]$ readelf -rW simple.o | tail -5
0000000000000020 0000000200000002 R_X86_64_PC32 0000000000000000
.text + 0
Relocation section '.rela.sframe' at offset 0x5f8 contains 1 entry:
Offset Info Type Symbol's Value
Symbol's Name + Addend
000000000000001c 0000000200000002 R_X86_64_PC32 0000000000000000
.text + 0
[hjl@gnu-tgl-3 ld]$
With --enable-default-sframe:
[hjl@gnu-tgl-3 ld]$ ./tmpdir/ld/as -o simple.o /tmp/simple.s
[hjl@gnu-tgl-3 ld]$ readelf -rW simple.o | tail -5
0000000000000020 0000000200000002 R_X86_64_PC32 0000000000000000
.text + 0
Relocation section '.rela.sframe' at offset 0x600 contains 1 entry:
Offset Info Type Symbol's Value
Symbol's Name + Addend
000000000000001c 0000000200000018 R_X86_64_PC64 0000000000000000
.text + 0
[hjl@gnu-tgl-3 ld]$
It is R_X86_64_PC32 vs R_X86_64_PC64.
Referenced Bugs:
https://sourceware.org/bugzilla/show_bug.cgi?id=33807
[Bug 33807] Kernel build for x32 fails w/ default-enabled SFrames in ld
--
You are receiving this mail because:
You are on the CC list for the bug.