x86-64: always use unsigned 32-bit reloc for 32-bit addressing w/o base reg
authorJan Beulich <jbeulich@novell.com>
Thu, 23 Nov 2017 10:02:30 +0000 (11:02 +0100)
committerJan Beulich <jbeulich@suse.com>
Thu, 23 Nov 2017 10:02:30 +0000 (11:02 +0100)
commit43083a502b8d658b8d096111e54afcc73b0215a4
tree0695c73e2bf6e60e243e0afcc023c7ef8fb96359
parent9bb129e82f0506fe78d61670ea2b4140388955dd
x86-64: always use unsigned 32-bit reloc for 32-bit addressing w/o base reg

Except for %eip-relative addressing, where we don't have a suitable
relocation type silently wrapping at the 4G boundary, consistently
force use of R_X86_64_32 (in ELF terms) instead of its sign-extending
counterpart. This wasn't right in case there was no base register in
the addressing expression.
gas/ChangeLog
gas/config/tc-i386.c
gas/testsuite/gas/i386/reloc64.d
gas/testsuite/gas/i386/reloc64.s
ld/ChangeLog
ld/testsuite/ld-x86-64/apic.d [new file with mode: 0644]
ld/testsuite/ld-x86-64/apic.s [new file with mode: 0644]
ld/testsuite/ld-x86-64/x86-64.exp