[PATCH] gas: Fix -mrelax-relocations detection on Solaris/x86 [PR19520]

Rainer Orth ro@CeBiTec.Uni-Bielefeld.DE
Sun Oct 19 13:11:41 GMT 2025


Hi H.J.,

>>> For the case at hand, I don't mind since I'd prefer to remove
>>> -mrelax-relocations for good since it was only ever created for the
>>> benefit of Solaris 12/11.4, but has been unused/disabled for at least 7
>>> years.
>>
>> Remove --enable-x86-relax-relocations is OK.  But -mrelax-relocations=[no|yes]
>> should stay since it is used in binutils tests.    I don't see any
>> issues for cross binutils.
>
> fine with me.  While the tests could be ripped out as I wrote, keeping
> them has the undeniable advantage that the -mrelax-relocations=no case
> is tested on all x86 ELF targets, apart from creating far less work for
> me.

while creating such as patch was easy, attempting to create a testcase
to ascertain that gas --32 doesn't create R_386_GOT32X proved to be a
can of worms:

	PR gas/33552
	gas --32 -mrelax-relocations=no sometimes generates R_386_GOT32X

Will post the Solaris/x86 -mrelax-relocations=no patch shortly.

> On top of that, GCC trunk will soon require binutils 2.30+ on Solaris.
> This way, one can unconditionally use -mrelax-relocations=yes with gas
> since Solaris 11.4 is the only OS version supported there.  This way the
> gotx relocs are also tested natively.

When doing so I found two further issues:

	GCC PR target/122331
        gcc/configure.ac HAVE_AS_IX86_GOT32X test is partially dubious

	PR binutils/33553
        objdump -d sometimes fails to disassemble

	Rainer

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


More information about the Binutils mailing list