[PATCH] gas: Fix some x86_64 testcases for Solaris not using R_X86_64_PLT32 [PR25732]

Rainer Orth ro@CeBiTec.Uni-Bielefeld.DE
Thu Apr 2 13:07:39 GMT 2020


Hi Fangrui,

> On 2020-04-01, H.J. Lu via Binutils wrote:
>>On Wed, Apr 1, 2020 at 3:47 AM Rainer Orth <ro@cebitec.uni-bielefeld.de> wrote:
>>>
>>> As reported in PR gas/25732, some testcases currently FAIL on
>>> Solaris/x86:
>>>
>>> FAIL: x86-64 branch 2
>>> FAIL: x86-64 branch 3
>>> FAIL: x86-64 MPX branch
>>> FAIL: x86-64 branch with BND prefix
>>> FAIL: x86-64 jump
>>>
>>> Since https://sourceware.org/ml/binutils/2019-03/msg00163.html, gas
>>> doesn't emit R_X86_64_PLT32 as branch marker on Solaris.  Since the
>>> testsuite lacks a way to preprocess dump files, adjusted copies of the
>>> affected dumps are now used on Solaris.  Unfortunately, those dumps
>>> weren't adapted when the original testcases were changed or other
>>> testcases started to differ between non-Solaris and Solaris targets.
>>>
>>> The following patch fixes that, re-syncing the affected dump files or
>>> creating new Solaris-specific ones.
>>>
>>> Tested on i386-pc-solaris2.11, x86_64-pc-solaris2.11,
>>> x86_64-pc-linux-gnu, and i686-pc-linux-gnu.
>>>
>>> Ok for master?
>>>
>>
>>OK.
>>
>>BTW, please watch out for future adjustments similar to this.
>>
>>Thanks.
>
> Why doesn't Solaris x86 use R_X86_64_PLT32?

it does, it just doesn't want to implement support for HJ's branch
marker optimization referred to in the patch linked above.  Some of that
is explained in my patch submission, buf if you want to know all the
gory details, ask Ali ;-)

> Disclosure: I know close to zero about Solaris.

That can be changed :-)  For one, there's the Linkers and Libraries Guide

	https://docs.oracle.com/cd/E37838_01/html/E36783/index.html

written by the linker engineers themselves.  And for even more
background, you can check out their blog

	http://www.linker-aliens.org/

Both make for quite interesting reading for anyone interested in ELF in
general and Solaris innovations in particular.

	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University



More information about the Binutils mailing list