public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Alan Modra <amodra@gmail.com>
To: binutils@sourceware.org
Subject: Correct ordering problem in comm-data.exp
Date: Wed, 30 Nov 2022 18:40:42 +1030	[thread overview]
Message-ID: <Y4cQAk+8VjJUNcAS@squeak.grove.modra.org> (raw)

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

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" "" \

-- 
Alan Modra
Australia Development Lab, IBM

                 reply	other threads:[~2022-11-30  8:10 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Y4cQAk+8VjJUNcAS@squeak.grove.modra.org \
    --to=amodra@gmail.com \
    --cc=binutils@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).