]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - ld/testsuite/ld-scripts/provide.exp
Update year range in copyright notice of binutils files
[thirdparty/binutils-gdb.git] / ld / testsuite / ld-scripts / provide.exp
index 6db399f6a7fedb64b0026e7b993e5b1d8554d6a6..04a55a2e5cd533093bd74a777212c3ad1530d676 100644 (file)
@@ -1,7 +1,6 @@
 # Test PROVIDE in a linker script.
 # By Nathan Sidwell, CodeSourcery LLC
-#   Copyright 2004, 2005, 2006, 2007
-#   Free Software Foundation, Inc.
+#   Copyright (C) 2004-2022 Free Software Foundation, Inc.
 #
 # This file is part of the GNU Binutils.
 #
 # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
 # MA 02110-1301, USA.
 
-# AIX maps .text and .data to other sections.
 # a.out objdump displays the file header inside the text segment,
 # confusing run_dump_test.
 
-if {[istarget "rs6000-*-aix*"] || [is_aout_format]} {
+if { [is_aout_format] } {
     unsupported provide-1
     unsupported provide-2
     unsupported provide-3
     return
 }
 
-global LDFLAGS
 set saved_LDFLAGS "$LDFLAGS"
-if [istarget "x86_64-*-mingw*"] then {
-  set LDFLAGS "$LDFLAGS --image-base 0"
+if { [is_pecoff_format] } then {
+    set LDFLAGS "$LDFLAGS --image-base 0"
+} elseif { [is_xcoff_format] } then {
+    set LDFLAGS "$LDFLAGS -bnogc"
 }
 
-run_dump_test provide-1
-run_dump_test provide-2
-setup_xfail *-*-*
-run_dump_test provide-3
+set test_list [lsort [glob -nocomplain $srcdir/$subdir/provide-*.d]]
+foreach test_file $test_list {
+    set test_name [file rootname $test_file]
+    verbose $test_name
+    run_dump_test $test_name
+}
 
 set LDFLAGS "$saved_LDFLAGS"