]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - ld/testsuite/ld-elf/comm-data.exp
Re: PR13802, referred common symbol not UNDefined
[thirdparty/binutils-gdb.git] / ld / testsuite / ld-elf / comm-data.exp
index b6150740ef4a6b2163a12c8eeb2be4dba625c102..87ae3b299124e615e5b876e4570165a5b79619e8 100644 (file)
@@ -1,6 +1,6 @@
 # Expect script for common symbol override.
 #
-# Copyright (C) 2011-2018 Free Software Foundation, Inc.
+# Copyright (C) 2011-2020 Free Software Foundation, Inc.
 #
 # This file is part of the GNU Binutils.
 #
@@ -41,6 +41,12 @@ set LFLAGS ""
 if [istarget "tic6x-*-*"] {
     append LFLAGS " -melf32_tic6x_le"
 }
+# These targets do not default to linking with shared libraries.
+if { [istarget "mips*vr4100*-*-elf*"] \
+     || [istarget "mips*vr4300*-*-elf*"] \
+     || [istarget "mips*vr5000*-*-elf*"] } {
+    append LFLAGS " -call_shared"
+}
 
 set testname "Common symbol override test"
 
@@ -68,16 +74,9 @@ if [istarget "*-*-hpux*"] {
     append AFLAGS " --defsym HPUX=1"
 }
 
-# bfin does not currently support copy relocs.
+# bfin-elf does not currently support copy relocs.
 setup_xfail "bfin-*-*"
-
-setup_xfail "arm*-*-*" "ld/13802"
-
-# List targets here that keep copy relocs rather than eliminating
-# them where possible in favour to dynamic relocs in the relevant
-# loadable sections; see also the "-z nocopyreloc" command-line
-# option and the ELIMINATE_COPY_RELOCS macro some backends use.
-set copy_reloc [expr [istarget mn10300-*-*] || [istarget vax-*-*]]
+clear_xfail "bfin-*-linux-uclibc*"
 
 # Verify that a common symbol has been converted to an undefined
 # reference to the global symbol of the same name defined above
@@ -89,12 +88,9 @@ run_ld_link_tests [list \
        "$AFLAGS" \
        { comm-data2.s } \
        [list \
-           [list readelf -s \
-               [expr { $copy_reloc ? "comm-data2r.sd" : "comm-data2.sd"}]] \
-           [list readelf -r \
-               [expr { $copy_reloc ? "comm-data2r.rd" : "comm-data2.rd"}]] \
-           [list readelf "-x .debug_foo" \
-               [expr { $copy_reloc ? "comm-data2r.xd" : "comm-data2.xd"}]]] \
+           [list readelf -s comm-data2.sd] \
+           [list readelf -r comm-data2.rd] \
+           [list readelf "-x .debug_foo" comm-data2.xd]] \
        "comm-data" \
     ] \
     [list \