daily update
[external/binutils.git] / ld / testsuite / ld-elf / elf.exp
index 20e9980..b2c196a 100644 (file)
@@ -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