* ld: xfail several shared (non PIC) tests on Solaris
@ 2020-04-09 14:33 Rainer Orth
2020-04-09 14:45 ` Nick Clifton
2020-04-10 2:00 ` [ld] Default to -z text (was: ld: xfail several shared (non PIC) tests on Solaris) Fangrui Song
0 siblings, 2 replies; 3+ messages in thread
From: Rainer Orth @ 2020-04-09 14:33 UTC (permalink / raw)
To: binutils
[-- Attachment #1: Type: text/plain, Size: 1035 bytes --]
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.
The failures don't happen on Solaris/x86 which should have the same
issue. However, shared.exp is guarded by an explicit target list which
includes Solaris/SPARC but not x86. I mean to revisit such needless
asymmetries once I've cut down the current failures a bit.
Tested on sparc-sun-solaris2.11 and sparcv9-sun-solaris2.11.
Ok for master?
Rainer
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University
2020-04-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* testsuite/ld-shared/shared.exp: Remove dangling comments.
xfail shared non PIC tests on Solaris.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: ld-sol2-shared-non-pic-xfail.patch --]
[-- Type: text/x-patch, Size: 1585 bytes --]
# HG changeset patch
# Parent e6e60586a85d5bcd0a92aeb6267c8933ffaa8b9f
ld: xfail several shared (non PIC) tests on Solaris
diff --git a/ld/testsuite/ld-shared/shared.exp b/ld/testsuite/ld-shared/shared.exp
--- a/ld/testsuite/ld-shared/shared.exp
+++ b/ld/testsuite/ld-shared/shared.exp
@@ -222,8 +222,8 @@ if ![ld_compile "$CC $CFLAGS $SHCFLAG" $
} 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" $
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 $p
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*-*-*"
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: ld: xfail several shared (non PIC) tests on Solaris
2020-04-09 14:33 ld: xfail several shared (non PIC) tests on Solaris Rainer Orth
@ 2020-04-09 14:45 ` Nick Clifton
2020-04-10 2:00 ` [ld] Default to -z text (was: ld: xfail several shared (non PIC) tests on Solaris) Fangrui Song
1 sibling, 0 replies; 3+ messages in thread
From: Nick Clifton @ 2020-04-09 14:45 UTC (permalink / raw)
To: Rainer Orth, binutils
Hi Rainer,
> Tested on sparc-sun-solaris2.11 and sparcv9-sun-solaris2.11.
>
> Ok for master?
Approved - please apply.
Cheers
Nick
^ permalink raw reply [flat|nested] 3+ messages in thread
* [ld] Default to -z text (was: ld: xfail several shared (non PIC) tests on Solaris)
2020-04-09 14:33 ld: xfail several shared (non PIC) tests on Solaris Rainer Orth
2020-04-09 14:45 ` Nick Clifton
@ 2020-04-10 2:00 ` Fangrui Song
1 sibling, 0 replies; 3+ messages in thread
From: Fangrui Song @ 2020-04-10 2:00 UTC (permalink / raw)
To: Rainer Orth; +Cc: binutils
On 2020-04-09, Rainer Orth wrote:
>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.
https://sourceware.org/bugzilla/show_bug.cgi?id=25694#c3
I think we can simply default to -z text for every platform.
If a text relocation is required, emit a friendly diagnostic
"... recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output"
>The failures don't happen on Solaris/x86 which should have the same
>issue. However, shared.exp is guarded by an explicit target list which
>includes Solaris/SPARC but not x86. I mean to revisit such needless
>asymmetries once I've cut down the current failures a bit.
>
>Tested on sparc-sun-solaris2.11 and sparcv9-sun-solaris2.11.
>
>Ok for master?
>
> Rainer
>
>--
>-----------------------------------------------------------------------------
>Rainer Orth, Center for Biotechnology, Bielefeld University
>
>
>2020-04-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
>
> * testsuite/ld-shared/shared.exp: Remove dangling comments.
> xfail shared non PIC tests on Solaris.
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-04-10 2:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-09 14:33 ld: xfail several shared (non PIC) tests on Solaris Rainer Orth
2020-04-09 14:45 ` Nick Clifton
2020-04-10 2:00 ` [ld] Default to -z text (was: ld: xfail several shared (non PIC) tests on Solaris) Fangrui Song
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).