Initialize static TLS for the benchmarks
[riscv-tests.git] / benchmarks / common / test.ld
index dda2a7f528ccd6e8b8ce964c03fefbf9995e4435..438581cb6b04d9b754b09840d7b4e60dd61d60c1 100644 (file)
@@ -38,11 +38,18 @@ SECTIONS
   .bss : { *(.bss) }
 
   /* thread-local data segment */
-  .tbss : { 
-    crt.o(.tbss) /* Make sure tls_start is the first TLS symbol */
+  .tdata :
+  {
+    _tls_data = .;
+    crt.o(.tdata.begin)
+    *(.tdata)
+    crt.o(.tdata.end)
+  }
+  .tbss :
+  {
     *(.tbss)
+    crt.o(.tbss.end)
   }
-  .tdata : { *(.tdata) }
 
   /* End of uninitalized data segement */
   _end = .;