public inbox for binutils-cvs@sourceware.org
 help / color / mirror / Atom feed
* [binutils-gdb] Fix: ld testsuite: pr22001-1 test segfaults on musl/x86
@ 2023-10-05 11:39 Nick Clifton
  0 siblings, 0 replies; only message in thread
From: Nick Clifton @ 2023-10-05 11:39 UTC (permalink / raw)
  To: bfd-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=693ac69b4d41453f8876512780c35ba485f7c4a1

commit 693ac69b4d41453f8876512780c35ba485f7c4a1
Author: A. Wilcox <awilfox@adelielinux.org>
Date:   Thu Oct 5 12:38:40 2023 +0100

    Fix: ld testsuite: pr22001-1 test segfaults on musl/x86
    
      PR 30925
      PR 22001
      * testsuite/ld-i386/i386.exp: Skip the pr22001 test with TEXTREL relocations enabled on configurations using the MUSL library.

Diff:
---
 ld/ChangeLog                  |  9 ++++++++-
 ld/testsuite/ld-i386/i386.exp | 26 ++++++++++++++++----------
 2 files changed, 24 insertions(+), 11 deletions(-)

diff --git a/ld/ChangeLog b/ld/ChangeLog
index d402b59e8f2..8ff8511bc6b 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,4 +1,11 @@
-2023-10-05  A. Wilcox  <awilfox@adelielinux.org>
+2023-10-05  A. Wilcox  <awilfox@adelielinux.org>w
+
+	PR 30925
+	PR 22001
+	* testsuite/ld-i386/i386.exp: Skip the pr22001 test with TEXTREL
+	relocations enabled on configurations using the MUSL library.
+
+2023-10-05  A. Wilcox  <awilfox@adelielinux.org>w
 
 	PR 30924
 	* testsuite/ld-elfvers/vers.exp (objdump_emptyverstuff): Handle
diff --git a/ld/testsuite/ld-i386/i386.exp b/ld/testsuite/ld-i386/i386.exp
index e8ad973eb36..98175d9d39c 100644
--- a/ld/testsuite/ld-i386/i386.exp
+++ b/ld/testsuite/ld-i386/i386.exp
@@ -1319,6 +1319,21 @@ if { [isnative]
 	] \
     ]
 
+    # The musl C library does not support TEXTRELs.
+    if { ![istarget i?86-*-musl] } {
+	run_ld_link_exec_tests [list \
+	    [list \
+		"Run pr22001-1" \
+		"$NOPIE_LDFLAGS -Wl,-z,nocopyreloc,--no-as-needed,-z,notext tmpdir/pr22001-1.so" \
+		"-Wa,-mx86-used-note=yes" \
+		{ pr22001-1b.c } \
+		"pr22001-1" \
+		"pass.out" \
+		"$NOPIE_CFLAGS" \
+	    ] \
+	]
+    }
+
     run_ld_link_exec_tests [list \
 	[list \
 	    "Run weakundef1 without PIE" \
@@ -1329,16 +1344,7 @@ if { [isnative]
 	    "pass.out" \
 	    "$NOPIE_CFLAGS" \
 	] \
-	[list \
-	    "Run pr22001-1" \
-	    "$NOPIE_LDFLAGS -Wl,-z,nocopyreloc,--no-as-needed,-z,notext tmpdir/pr22001-1.so" \
-	    "-Wa,-mx86-used-note=yes" \
-	    { pr22001-1b.c } \
-	    "pr22001-1" \
-	    "pass.out" \
-	    "$NOPIE_CFLAGS" \
-	] \
-	[list \
+ 	[list \
 	    "Run pr22001-1 (PIE 1)" \
 	    "$NOPIE_LDFLAGS -Wl,-z,nocopyreloc,--no-as-needed tmpdir/pr22001-1.so" \
 	    "-Wa,-mx86-used-note=yes" \

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-10-05 11:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-05 11:39 [binutils-gdb] Fix: ld testsuite: pr22001-1 test segfaults on musl/x86 Nick Clifton

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).