daily update
[external/binutils.git] / ld / testsuite / ld-elf / elf.exp
index dc6a3a6..b2c196a 100644 (file)
@@ -25,6 +25,7 @@ if ![is_elf_format] {
     return
 }
 
+set old_ldflags $LDFLAGS
 if { [istarget spu*-*-*] } {
     set LDFLAGS "$LDFLAGS --local-store 0:0"
 }
@@ -53,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