aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-elf
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2022-11-30 17:09:20 +1030
committerAlan Modra <amodra@gmail.com>2022-11-30 18:41:40 +1030
commit6bd454ca033dcb2e178721eb004d0c5f24415c4c (patch)
tree4325fa087ac0b3b43696ae02ad09c0b840b306ba /ld/testsuite/ld-elf
parenta7cca0b24c0fedd829a8923fe31dc1931b0bbd70 (diff)
downloadbinutils-6bd454ca033dcb2e178721eb004d0c5f24415c4c.zip
binutils-6bd454ca033dcb2e178721eb004d0c5f24415c4c.tar.gz
binutils-6bd454ca033dcb2e178721eb004d0c5f24415c4c.tar.bz2
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.
Diffstat (limited to 'ld/testsuite/ld-elf')
-rw-r--r--ld/testsuite/ld-elf/comm-data.exp39
1 files changed, 19 insertions, 20 deletions
diff --git a/ld/testsuite/ld-elf/comm-data.exp b/ld/testsuite/ld-elf/comm-data.exp
index cea03df..f46d693 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*"
@@ -122,6 +113,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" "" \
"$AFLAGS" \