public inbox for binutils-cvs@sourceware.org
 help / color / mirror / Atom feed
* [binutils-gdb/binutils-2_43-branch] ld: Add PR ld/32067 tests
@ 2024-08-13  0:57 H.J. Lu
  0 siblings, 0 replies; only message in thread
From: H.J. Lu @ 2024-08-13  0:57 UTC (permalink / raw)
  To: binutils-cvs

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

commit 2dc940272ab5b72bb5cfece8e210effc23213b0b
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Sat Aug 10 07:23:53 2024 -0700

    ld: Add PR ld/32067 tests
    
    Add PR ld/32067 tests with the compiler driver since the -plugin option
    is needed to trigger this --oformat binary bug.
    
            PR ld/32067
            * testsuite/ld-i386/i386.exp: Run PR ld/32067 test.
            * testsuite/ld-x86-64/x86-64.exp: Likewise.
            * testsuite/ld-i386/start.s: Add .note.GNU-stack section.
            * testsuite/ld-x86-64/pr32067.s: New file.
    
    Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
    (cherry picked from commit 602f5cf7e3a82229d75998a5f6eb13753f828bb3)

Diff:
---
 ld/testsuite/ld-i386/i386.exp     | 8 ++++++++
 ld/testsuite/ld-i386/start.s      | 1 +
 ld/testsuite/ld-x86-64/pr32067.s  | 5 +++++
 ld/testsuite/ld-x86-64/x86-64.exp | 8 ++++++++
 4 files changed, 22 insertions(+)

diff --git a/ld/testsuite/ld-i386/i386.exp b/ld/testsuite/ld-i386/i386.exp
index ad6ad2e725e..8dafb6261fb 100644
--- a/ld/testsuite/ld-i386/i386.exp
+++ b/ld/testsuite/ld-i386/i386.exp
@@ -1323,6 +1323,14 @@ if { [isnative]
 	    {{error_output "pr21997-1.err"}} \
 	    "pr21997-1" \
 	] \
+	[list \
+	    "Build pr32067" \
+	    "-Wl,--oformat,binary -nostdlib -nostartfiles" \
+	    "" \
+	    { start.s ../ld-x86-64/pr32067.s } \
+	    {} \
+	    "pr32067" \
+	] \
     ]
 
     # The musl C library does not support TEXTRELs.
diff --git a/ld/testsuite/ld-i386/start.s b/ld/testsuite/ld-i386/start.s
index 80301c6a7e4..4262a3380fa 100644
--- a/ld/testsuite/ld-i386/start.s
+++ b/ld/testsuite/ld-i386/start.s
@@ -1,3 +1,4 @@
 	.globl _start
 _start:
 	jmp foo
+	.section	.note.GNU-stack
diff --git a/ld/testsuite/ld-x86-64/pr32067.s b/ld/testsuite/ld-x86-64/pr32067.s
new file mode 100644
index 00000000000..40878a9f92a
--- /dev/null
+++ b/ld/testsuite/ld-x86-64/pr32067.s
@@ -0,0 +1,5 @@
+	.text
+	.globl foo
+foo:
+	ret
+	.section	.note.GNU-stack
diff --git a/ld/testsuite/ld-x86-64/x86-64.exp b/ld/testsuite/ld-x86-64/x86-64.exp
index 742823e6458..0697e67faf3 100644
--- a/ld/testsuite/ld-x86-64/x86-64.exp
+++ b/ld/testsuite/ld-x86-64/x86-64.exp
@@ -1405,6 +1405,14 @@ if { [isnative] && [check_compiler_available] } {
 	    {{readelf -n indirect-extern-access.rd}}  \
 	    "libprotected-data-2b.so" \
 	] \
+	[list \
+	    "Build pr32067" \
+	    "-Wl,--oformat,binary -nostdlib -nostartfiles" \
+	    "" \
+	    { start.s pr32067.s } \
+	    {} \
+	    "pr32067" \
+	] \
     ]
 
     if  {[istarget "x86_64-*-linux*-gnux32"]} {

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

only message in thread, other threads:[~2024-08-13  0:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-08-13  0:57 [binutils-gdb/binutils-2_43-branch] ld: Add PR ld/32067 tests H.J. Lu

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