Disable R_X86_64_PLT32 generation as branch marker on Solaris/x86
Rainer Orth
ro@CeBiTec.Uni-Bielefeld.DE
Wed Mar 27 16:51:00 GMT 2019
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 on Solaris and selecting
the right one in i386/i386.exp.
Tested on amd64-pc-solaris2.11 and x86_64-pc-linux-gnu without
regressions. Ok for master (and perhaps the 2.32 branch)?
Thanks.
Rainer
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University
2019-03-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* config/tc-i386.c (need_plt32_p) [TE_SOLARIS]: Return FALSE.
* testsuite/gas/i386/reloc64-solaris.d,
testsuite/gas/i386/x86-64-jump-solaris.d,
testsuite/gas/i386/x86-64-mpx-branch-1-solaris.d,
testsuite/gas/i386/x86-64-mpx-branch-2-solaris.d,
testsuite/gas/i386/x86-64-nop-3-solaris.d,
testsuite/gas/i386/x86-64-nop-4-solaris.d,
testsuite/gas/i386/x86-64-nop-5-solaris.d,
testsuite/gas/i386/x86-64-relax-2-solaris.d,
testsuite/gas/i386/x86-64-relax-3-solaris.d: New tests.
* testsuite/gas/i386/i386.exp: Use non-R_X86_64_PLT32 variants on
Solaris.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gas-solx64-no-r_amd64_plt32.patch
Type: text/x-patch
Size: 17255 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20190327/bdad0b77/attachment.bin>
More information about the Binutils
mailing list