@@ -467,25 +467,19 @@ run_ld_link_exec_tests [] $run_cxx_tests
if { [istarget *-*-linux*]
|| [istarget *-*-nacl*]
|| [istarget *-*-gnu*] } {
- run_cc_link_tests [list \
- [list \
- "Build libpr2404b.a with PIE" \
- "" \
- "-fPIE" \
- { pr2404b.c } \
- {} \
- "libpr2404b.a" \
- ] \
- ]
- run_ld_link_exec_tests [] [list \
- [list \
- "Run pr2404 with PIE" \
- "-pie tmpdir/pr2404b.o tmpdir/libpr2404a.so" \
- "" \
- { dummy.c } \
- "pr2404pie" \
- "pr2404.out" \
- "-fPIE" \
- ] \
- ]
+ set build_gnu_tests {
+ {"Build libpr2404b.a with PIE"
+ "" "-fPIE"
+ {pr2404b.c} {} "libpr2404b.a"}
+ {"Build tls-flag-static_tls.so"
+ "-shared" "-fPIC"
+ {tls-flag-static_tls.c} {{readelf {-d} tls-flag-static_tls.rd}} "tls-flag-static_tls.so"}
+ }
+ run_cc_link_tests $build_gnu_tests
+ set run_gnu_tests {
+ {"Run pr2404 with PIE"
+ "-pie tmpdir/pr2404b.o tmpdir/libpr2404a.so" ""
+ {dummy.c} "pr2404pie" "pr2404.out" "-fPIE"}
+ }
+ run_ld_link_exec_tests [] $run_gnu_tests
}
@@ -0,0 +1,2 @@
+__thread int tmp_ie __attribute__ ((tls_model ("initial-exec")));
+void *tmp_ie_func(void) { return &tmp_ie; }
@@ -0,0 +1,4 @@
+Dynamic section at offset 0x[0-9a-f]+ contains [0-9]+ entries:
+#...
+ +0x[0-9a-f]+ +\(FLAGS\) +STATIC_TLS
+#...