[PATCH] x86-64: Never make R_X86_64_GOT64 section relative

H.J. Lu hjl.tools@gmail.com
Thu Sep 19 23:21:23 GMT 2024


On Fri, Sep 20, 2024 at 5:43 AM H.J. Lu <hjl.tools@gmail.com> wrote:
>
> R_X86_64_GOT64 relocation should never be made section relative.  Change
> tc_i386_fix_adjustable to return 0 for BFD_RELOC_X86_64_GOT64.
>
> gas/
>
> PR gas/32189
> * config/tc-i386.c (tc_i386_fix_adjustable): Return 0 for
> BFD_RELOC_X86_64_GOT64.
> * testsuite/gas/i386/reloc64.d: Updated.
> * testsuite/gas/i386/reloc64.s: Add more tests for R_X86_64_GOT64
> and R_X86_64_GOTOFF64.
>
> ld/
>
> PR gas/32189
> * testsuite/ld-x86-64/x86-64.exp: Run PR gas/32189 test.
> * testsuite/ld-x86-64/pr32189.s: New file.
>
> Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
> --
> H.J.

I checked in this patch to disable PIE on PR gas/32189 test, which
contains the non-PIE assembly source, to support GCC defaulted to PIE.


-- 
H.J.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-x86-64-Disable-PIE-on-PR-gas-32189-test.patch
Type: text/x-patch
Size: 1017 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20240920/27e4fc76/attachment.bin>


More information about the Binutils mailing list