public inbox for binutils-cvs@sourceware.org
 help / color / mirror / Atom feed
* [binutils-gdb] Correct ordering problem in comm-data.exp
@ 2022-11-30  8:12 Alan Modra
  0 siblings, 0 replies; only message in thread
From: Alan Modra @ 2022-11-30  8:12 UTC (permalink / raw)
  To: bfd-cvs

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

commit 6bd454ca033dcb2e178721eb004d0c5f24415c4c
Author: Alan Modra <amodra@gmail.com>
Date:   Wed Nov 30 17:09:20 2022 +1030

    Correct ordering problem in comm-data.exp
    
            * testsuite/ld-elf/comm-data.exp: Build libcomm-data.so before
            attempting to read it to set ELF64.

Diff:
---
 ld/testsuite/ld-elf/comm-data.exp | 39 +++++++++++++++++++--------------------
 1 file changed, 19 insertions(+), 20 deletions(-)

diff --git a/ld/testsuite/ld-elf/comm-data.exp b/ld/testsuite/ld-elf/comm-data.exp
index cea03df2366..f46d69350b6 100644
--- a/ld/testsuite/ld-elf/comm-data.exp
+++ b/ld/testsuite/ld-elf/comm-data.exp
@@ -48,19 +48,8 @@ if { [istarget "mips*vr4100*-*-elf*"] \
     append LFLAGS " -call_shared"
 }
 
-# Set the pointer size according to the ELF flavor.
-set AFLAGS ""
-if [is_elf64 "tmpdir/libcomm-data.so"] {
-    append AFLAGS " --defsym ELF64=1"
-}
-# HPUX targets use a different .comm syntax.
-if [istarget "*-*-hpux*"] {
-    append AFLAGS " --defsym HPUX=1"
-}
-
-set testname "Common symbol override test"
-
 # Define a global symbol.
+set testname "Common symbol override test"
 run_ld_link_tests [list \
     [list \
 	"$testname (auxiliary shared object build)" \
@@ -72,16 +61,18 @@ run_ld_link_tests [list \
 	} \
 	"libcomm-data.so" \
     ] \
-    [list \
-	"libpr26580-1.so" \
-	"$LFLAGS -shared" "" \
-	"$AFLAGS_PIC $AFLAGS" \
-	{ pr26580-b.s } \
-	{ } \
-	"libpr26580-1.so" \
-    ] \
 ]
 
+# Set the pointer size according to the ELF flavor.
+set AFLAGS ""
+if [is_elf64 "tmpdir/libcomm-data.so"] {
+    append AFLAGS " --defsym ELF64=1"
+}
+# HPUX targets use a different .comm syntax.
+if [istarget "*-*-hpux*"] {
+    append AFLAGS " --defsym HPUX=1"
+}
+
 # bfin-elf does not currently support copy relocs.
 setup_xfail "bfin-*-*"
 clear_xfail "bfin-*-linux-uclibc*"
@@ -121,6 +112,14 @@ run_ld_link_tests [list \
 	} \
 	"comm-data3b" \
     ] \
+    [list \
+	"libpr26580-1.so" \
+	"$LFLAGS -shared" "" \
+	"$AFLAGS_PIC $AFLAGS" \
+	{ pr26580-b.s } \
+	{ } \
+	"libpr26580-1.so" \
+    ] \
     [list \
 	"pr26580-1" \
 	"$LFLAGS --as-needed -Ltmpdir -lpr26580-1" "" \

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

only message in thread, other threads:[~2022-11-30  8:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-30  8:12 [binutils-gdb] Correct ordering problem in comm-data.exp Alan Modra

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