]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - ld/testsuite/ld-scripts/script.exp
Update year range in copyright notice of binutils files
[thirdparty/binutils-gdb.git] / ld / testsuite / ld-scripts / script.exp
index 58d8b8b7cd87dfd631c1057f03495c7dbc1964af..222f930b470e46582267ce01309261c21a756a2d 100644 (file)
@@ -1,6 +1,6 @@
 # Test basic linker script functionality
 # By Ian Lance Taylor, Cygnus Support
-#   Copyright (C) 1999-2020 Free Software Foundation, Inc.
+#   Copyright (C) 1999-2021 Free Software Foundation, Inc.
 #
 # This file is part of the GNU Binutils.
 #
@@ -182,15 +182,13 @@ proc extract_symbol_test { testfile testname } {
 }
 
 # PE targets need to set the image base to 0 to avoid complications from nm.
-set flags ""
 set old_LDFLAGS $LDFLAGS
 if { [is_pecoff_format] } then {
-    set flags "--image-base 0"
-    set LDFLAGS "$LDFLAGS --image-base 0"
+    append LDFLAGS " --image-base 0"
 } elseif { [is_xcoff_format] } then {
-    set flags "-bnogc"
-    set LDFLAGS "$LDFLAGS -bnogc"
+    append LDFLAGS " -bnogc"
 }
+set flags $LDFLAGS
 
 if ![ld_link $ld tmpdir/script "$flags -T $srcdir/$subdir/script.t tmpdir/script.o"] {
     fail $testname