]> oss.titaniummirror.com Git - msp430-binutils.git/blobdiff - ld/testsuite/ld-elf/elf.exp
Merge commit 'upstream/2.20'
[msp430-binutils.git] / ld / testsuite / ld-elf / elf.exp
index 20e998077d1823a62e1021aaf02d8bcd53c6dcdc..a94e96d8a4f04601181be6b264ccc5f65c89f253 100644 (file)
@@ -1,5 +1,5 @@
 # Expect script for various ELF tests.
-#   Copyright 2002, 2003, 2005, 2007 Free Software Foundation, Inc.
+#   Copyright 2002, 2003, 2005, 2007, 2009 Free Software Foundation, Inc.
 #
 # This file is part of the GNU Binutils.
 #
@@ -25,10 +25,15 @@ if ![is_elf_format] {
     return
 }
 
+set old_ldflags $LDFLAGS
 if { [istarget spu*-*-*] } {
     set LDFLAGS "$LDFLAGS --local-store 0:0"
 }
 
+if { [is_remote host] } then {
+    remote_download host merge.ld
+}
+
 set test_list [lsort [glob -nocomplain $srcdir/$subdir/*.d]]
 foreach t $test_list {
     # We need to strip the ".d", but can leave the dirname.
@@ -49,6 +54,15 @@ if { [istarget *-*-linux*] } {
     }
 }
 
+if { [check_gc_sections_available] } {
+    run_ld_link_tests {
+       {"--gc-sections on tls variable"
+           "--gc-section" "" {tls_gc.s} {} "tls_gc"}
+    }
+}
+
+set LDFLAGS $old_ldflags
+
 # The following tests require running the executable generated by ld.
 if ![isnative] {
     return