[PATCH] ld: testsuite: xfail vers26b3 on Solaris/amd64
Rainer Orth
ro@CeBiTec.Uni-Bielefeld.DE
Tue Aug 19 07:52:49 GMT 2025
Hi H.J.,
> On Mon, Aug 18, 2025 at 7:12 AM Rainer Orth <ro@cebitec.uni-bielefeld.de> wrote:
>>
>> Hi H.J.,
>>
>> > Can you adjust it here?
>> >
>> > if { [istarget x86_64-*-linux*] \
>> > || [istarget arm*-*-*] \
>> > || ( [istarget mips*-*-linux*] && [at_least_gcc_version 4 3] ) } {
>> > # x86_64, ARM and newer MIPS toolchains do not like non-pic shared
>> > libraries set pic "yes"
>> > } else {
>> > set pic "no"
>> > }
>>
>> I tried that first, but unlike Linux/x86_64, where several of the vers*
>> tests XFAIL, on Solaris/amd64 it was only this single one, so all the
>> others would XPASS instead.
>>
>> The fact that the test links just fine with Solaris ld might point to a
>> gld issue, though.
>>
>
> R_X86_64_32 can't be used to access the external symbols in
> a shared library since 32-bit displacement may not reach the
> symbol definition. How can it work on Solaris?
No idea. However, when reenabling the test on Linux/x86_64, I get the
exact same error as on Solaris/amd64, so the issue is obviously the
same:
./ld-new: tmpdir/vers26b3.o: relocation R_X86_64_32 against symbol `foo' can not be used when making a shared object; recompile with -fPIC
Rainer
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University
More information about the Binutils
mailing list