[binutils-gdb] ld: Run PR ld/34570 tests only for ELF targets

H.J. Lu hjl@sourceware.org
Fri Aug 28 08:25:22 GMT 2026


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

commit a12d235cf42ba2383fda2cea2561f8ec3a8e2028
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Fri Aug 28 16:19:34 2026 +0800

    ld: Run PR ld/34570 tests only for ELF targets
    
    Since realdelf is used to check common symbol size in PR ld/34570 tests,
    run PR ld/34570 tests only for ELF targets.
    
            PR ld/34570
            * testsuite/ld-plugin/lto.exp: Run PR ld/34570 tests only for
            ELF targets.
    
    Signed-off-by: H.J. Lu <hjl.tools@gmail.com>

Diff:
---
 ld/testsuite/ld-plugin/lto.exp | 134 ++++++++++++++++++++---------------------
 1 file changed, 67 insertions(+), 67 deletions(-)

diff --git a/ld/testsuite/ld-plugin/lto.exp b/ld/testsuite/ld-plugin/lto.exp
index 8ad341293b5..00578a63791 100644
--- a/ld/testsuite/ld-plugin/lto.exp
+++ b/ld/testsuite/ld-plugin/lto.exp
@@ -275,73 +275,6 @@ set lto_link_tests [list \
    {} \
    "libcommon-2.a" \
   ] \
-  [list \
-   "Build pr34570a.exe" \
-   "-flto" \
-   "-flto -fcommon" \
-   {pr34570a.c pr34570b.c} \
-   {{readelf {-s --wide} pr34570a.d}} \
-   "pr34570a.exe" \
-  ] \
-  [list \
-   "Build pr34570b.exe" \
-   "-flto" \
-   "-flto -fcommon" \
-   {pr34570b.c pr34570a.c} \
-   {{readelf {-s --wide} pr34570a.d}} \
-   "pr34570b.exe" \
-  ] \
-  [list \
-   "Build pr34570a.o" \
-   "" \
-   "-O2 -fcommon -flto $lto_no_fat" \
-   {pr34570a.c} \
-   {} \
-   "" \
-   "c" \
-  ] \
-  [list \
-   "Build pr34570b.o" \
-   "" \
-   "-O2 -fcommon -fno-lto" \
-   {pr34570b.c} \
-   {} \
-   "" \
-   "c" \
-  ] \
-  [list \
-   "Build pr34570c.o" \
-   "" \
-   "-O2 -fcommon -flto $lto_no_fat" \
-   {pr34570c.c} \
-   {} \
-   "" \
-   "c" \
-  ] \
-  [list \
-   "Build pr34570c.exe" \
-   "-flto tmpdir/pr34570a.o tmpdir/pr34570b.o" \
-   "" \
-   {dummy.c} \
-   {{readelf {-s --wide} pr34570b.d}} \
-   "pr34570c.exe" \
-  ] \
-  [list \
-   "Build pr34570d.exe" \
-   "-flto tmpdir/pr34570b.o tmpdir/pr34570a.o" \
-   "" \
-   {dummy.c} \
-   {{readelf {-s --wide} pr34570b.d}} \
-   "pr34570d.exe" \
-  ] \
-  [list \
-   "Build pr34570e.exe" \
-   "-flto tmpdir/pr34570c.o tmpdir/pr34570b.o" \
-   "-flto -fcommon" \
-   {dummy.c} \
-   {{readelf {-s --wide} pr34570c.d}} \
-   "pr34570e.exe" \
-  ] \
 ]
 
 if { [at_least_gcc_version 10 0] && [check_lto_shared_available] } {
@@ -1278,6 +1211,73 @@ if { [is_elf_format] } {
 	     {readelf {--dyn-syms --wide} pr22983.4.d}} \
 	    "pr22983" \
 	] \
+	[list \
+	    "Build pr34570a.exe" \
+	    "-flto" \
+	    "-flto -fcommon" \
+	    {pr34570a.c pr34570b.c} \
+	    {{readelf {-s --wide} pr34570a.d}} \
+	    "pr34570a.exe" \
+	] \
+	[list \
+	    "Build pr34570b.exe" \
+	    "-flto" \
+	    "-flto -fcommon" \
+	    {pr34570b.c pr34570a.c} \
+	    {{readelf {-s --wide} pr34570a.d}} \
+	    "pr34570b.exe" \
+	] \
+	[list \
+	    "Build pr34570a.o" \
+	    "" \
+	    "-O2 -fcommon -flto $lto_no_fat" \
+	    {pr34570a.c} \
+	    {} \
+	    "" \
+	    "c" \
+	] \
+	[list \
+	    "Build pr34570b.o" \
+	    "" \
+	    "-O2 -fcommon -fno-lto" \
+	    {pr34570b.c} \
+	    {} \
+	    "" \
+	    "c" \
+	] \
+	[list \
+	    "Build pr34570c.o" \
+	    "" \
+	    "-O2 -fcommon -flto $lto_no_fat" \
+	    {pr34570c.c} \
+	    {} \
+	    "" \
+	    "c" \
+	] \
+	[list \
+	    "Build pr34570c.exe" \
+	    "-flto tmpdir/pr34570a.o tmpdir/pr34570b.o" \
+	    "" \
+	    {dummy.c} \
+	    {{readelf {-s --wide} pr34570b.d}} \
+	    "pr34570c.exe" \
+	] \
+	[list \
+	    "Build pr34570d.exe" \
+	    "-flto tmpdir/pr34570b.o tmpdir/pr34570a.o" \
+	    "" \
+	    {dummy.c} \
+	    {{readelf {-s --wide} pr34570b.d}} \
+	    "pr34570d.exe" \
+	] \
+	[list \
+	    "Build pr34570e.exe" \
+	    "-flto tmpdir/pr34570c.o tmpdir/pr34570b.o" \
+	    "-flto -fcommon" \
+	    {dummy.c} \
+	    {{readelf {-s --wide} pr34570c.d}} \
+	    "pr34570e.exe" \
+	] \
     ]
 
     if { [istarget "aarch64*-*-linux"]


More information about the Binutils-cvs mailing list