[PATCH] ld: testsuite: xfail vers26b3 on Solaris/amd64
H.J. Lu
hjl.tools@gmail.com
Mon Aug 18 12:27:34 GMT 2025
On Fri, Aug 15, 2025 at 1:28 AM Rainer Orth <ro@cebitec.uni-bielefeld.de> wrote:
>
> After enabling the ld-elfvers tests on Solaris/x86, one of them FAILs on
> Solaris/amd64 only:
>
> FAIL: vers26b3
>
> /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
> ./ld-new: failed to set dynamic section sizes: bad value
>
> The error is wrong: vers26b3.o *was* compiled with -fPIC and repeating
> the link with /bin/ld just works.
>
> Also, the test is already xfail'ed for Linux/x86_64, so this patch does
> the same on Solaris/amd64.
>
> Tested on {amd64,i386}-pc-solaris2.11 and {x86_64,i686}-pc-linux-gnu.
>
> Ok for trunk?
>
> Rainer
>
> --
> -----------------------------------------------------------------------------
> Rainer Orth, Center for Biotechnology, Bielefeld University
>
>
> 2025-07-31 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
>
> ld:
> * testsuite/ld-elfvers/vers.exp (vers26b3): xfail on 64-bit
> Solaris/x86.
>
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"
}
--
H.J.
More information about the Binutils
mailing list