From: Rainer Orth Date: Fri, 10 Apr 2020 09:18:10 +0000 (+0200) Subject: ld: xfail several shared (non PIC) tests on Solaris X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a5d214978ffff7d4b3df9b89706c1df4f0ecd64e;p=binutils-gdb.git ld: xfail several shared (non PIC) tests on Solaris Three ld tests currently FAIL on Solaris/SPARC: FAIL: shared (non PIC) FAIL: shared (non PIC, load offset) FAIL: shared (PIC main, non PIC so) all of them in the same way: /var/gcc/binutils/sparcv7/obj/binutils/ld/tmpdir/ld/collect-ld: read-only segment has dynamic relocations Given that Solaris defaults to -z text, this is to be expected, thus this patch xfail's them. Tested on sparc-sun-solaris2.11 and sparcv9-sun-solaris2.11. * testsuite/ld-shared/shared.exp: Remove dangling comments. xfail shared non PIC tests on Solaris. --- diff --git a/ld/ChangeLog b/ld/ChangeLog index 0a8842eebb4..06e7f5de2aa 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,8 @@ +2020-04-10 Rainer Orth + + * testsuite/ld-shared/shared.exp: Remove dangling comments. + xfail shared non PIC tests on Solaris. + 2020-04-09 Rainer Orth * testsuite/ld-elf/shared.exp: Add -Av9 to AFLAGS_PIC on sparc*-*-*. diff --git a/ld/testsuite/ld-shared/shared.exp b/ld/testsuite/ld-shared/shared.exp index 93ca11b33b3..32cdbe8a417 100644 --- a/ld/testsuite/ld-shared/shared.exp +++ b/ld/testsuite/ld-shared/shared.exp @@ -222,8 +222,8 @@ if ![ld_compile "$CC $CFLAGS $SHCFLAG" $srcdir/$subdir/main.c $tmpdir/mainnp.o] } else { if { [istarget rs6000*-*-aix*] || [istarget powerpc*-*-aix*] } { shared_test shnp "shared (nonPIC)" mainnp.o sh1np.o sh2np.o xcoff } else { - # SunOS non PIC shared libraries don't permit some cases of - # overriding. + # Solaris defaults to -z text. + setup_xfail "*-*-solaris2*" setup_xfail "ia64-*-linux*" setup_xfail "alpha*-*-linux*" setup_xfail "powerpc64*-*-*" @@ -268,6 +268,8 @@ if ![ld_compile "$CC $CFLAGS $SHCFLAG" $srcdir/$subdir/main.c $tmpdir/mainnp.o] setup_xfail "arm*-*-linux*" } setup_xfail "aarch64*-*-linux*" + # Solaris defaults to -z text. + setup_xfail "*-*-solaris2*" shared_test shnp "shared (non PIC, load offset)" \ mainnp.o sh1np.o sh2np.o shared \ "-Wl,-T,$srcdir/$subdir/elf-offset.ld,--hash-style=sysv" @@ -301,8 +303,8 @@ if ![ld_compile "$CC $CFLAGS $SHCFLAG $picflag" $srcdir/$subdir/main.c $tmpdir/m if { [istarget rs6000*-*-aix*] || [istarget powerpc*-*-aix*] } { shared_test shmpnp "shared (PIC main, non PIC so)" mainp.o sh1np.o sh2np.o xcoff } else { - # SunOS non PIC shared libraries don't permit some cases of - # overriding. + # Solaris defaults to -z text. + setup_xfail "*-*-solaris2*" setup_xfail "ia64-*-linux*" setup_xfail "alpha*-*-linux*" setup_xfail "powerpc64*-*-*"