]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Disable R_X86_64_PLT32 generation as branch marker on Solaris/x86
authorRainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
Wed, 10 Apr 2019 07:48:43 +0000 (09:48 +0200)
committerRainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
Wed, 10 Apr 2019 07:48:43 +0000 (09:48 +0200)
commita5def729be2596496aec225e843903b25c672e01
treef2dad6eb6492e65e11062ef65956f6a2b51f8a15
parente6aded7c34054a2eea55ec56ca3b997ddd0197cf
Disable R_X86_64_PLT32 generation as branch marker on Solaris/x86

The fix H.J. implemented for PR gas/22791 in the thread starting at

[PATCH] x86-64: Treat PC32 relocation with branch as PLT32
https://sourceware.org/ml/binutils/2018-02/msg00065.html

is causing problems on Solaris/x86.  The native linker is strongly
preferred there, and there's no intention of implementing the linker
optimization he plans there.  Besides, the kernel runtime linker,
otherwise has no need to deal with that reloc at all, and instead of
adding (possibly even more) workarounds with no benefit, it seems
appropriate to disable the R_X86_64_PLT32 generation as branch marker on
Solaris/x86 in the first place.

The patch itself is trivial, the only complication is adapting the
testsuite.  Since I've found no way to have conditional sections in the
.d files, I've instead used the solution already found elsewhere of
having separate .d files for the affected tests in an i386/solaris
subdirectory and skipping the original ones.

Tested on amd64-pc-solaris2.11 and x86_64-pc-linux-gnu without
regressions.

* config/tc-i386.c (need_plt32_p) [TE_SOLARIS]: Return FALSE.
* testsuite/gas/i386/solaris/solaris.exp: New driver.
* testsuite/gas/i386/solaris/reloc64.d,
testsuite/gas/i386/solaris/x86-64-jump.d,
testsuite/gas/i386/solaris/x86-64-mpx-branch-1.d,
testsuite/gas/i386/solaris/x86-64-mpx-branch-2.d,
testsuite/gas/i386/solaris/x86-64-nop-3.d,
testsuite/gas/i386/solaris/x86-64-nop-4.d,
testsuite/gas/i386/solaris/x86-64-nop-5.d,
testsuite/gas/i386/solaris/x86-64-relax-2.d,
testsuite/gas/i386/solaris/x86-64-relax-3.d: New tests.
* testsuite/gas/i386/reloc64.d,
testsuite/gas/i386/x86-64-jump.d,
testsuite/gas/i386/x86-64-mpx-branch-1.d,
testsuite/gas/i386/x86-64-mpx-branch-2.d,
testsuite/gas/i386/x86-64-nop-3.d,
testsuite/gas/i386/x86-64-nop-4.d,
testsuite/gas/i386/x86-64-nop-5.d,
testsuite/gas/i386/x86-64-relax-2.d,
testsuite/gas/i386/x86-64-relax-3.d: Skip on *-*-solaris*.
21 files changed:
gas/ChangeLog
gas/config/tc-i386.c
gas/testsuite/gas/i386/reloc64.d
gas/testsuite/gas/i386/solaris/reloc64.d [new file with mode: 0644]
gas/testsuite/gas/i386/solaris/solaris.exp [new file with mode: 0644]
gas/testsuite/gas/i386/solaris/x86-64-jump.d [new file with mode: 0644]
gas/testsuite/gas/i386/solaris/x86-64-mpx-branch-1.d [new file with mode: 0644]
gas/testsuite/gas/i386/solaris/x86-64-mpx-branch-2.d [new file with mode: 0644]
gas/testsuite/gas/i386/solaris/x86-64-nop-3.d [new file with mode: 0644]
gas/testsuite/gas/i386/solaris/x86-64-nop-4.d [new file with mode: 0644]
gas/testsuite/gas/i386/solaris/x86-64-nop-5.d [new file with mode: 0644]
gas/testsuite/gas/i386/solaris/x86-64-relax-2.d [new file with mode: 0644]
gas/testsuite/gas/i386/solaris/x86-64-relax-3.d [new file with mode: 0644]
gas/testsuite/gas/i386/x86-64-jump.d
gas/testsuite/gas/i386/x86-64-mpx-branch-1.d
gas/testsuite/gas/i386/x86-64-mpx-branch-2.d
gas/testsuite/gas/i386/x86-64-nop-3.d
gas/testsuite/gas/i386/x86-64-nop-4.d
gas/testsuite/gas/i386/x86-64-nop-5.d
gas/testsuite/gas/i386/x86-64-relax-2.d
gas/testsuite/gas/i386/x86-64-relax-3.d