ERET -> xRET; new memory map
[riscv-tests.git] / benchmarks / common / test.ld
index dda2a7f528ccd6e8b8ce964c03fefbf9995e4435..7ee56b6e0976f6d135a28be313232e6fd18d79c8 100644 (file)
 
 OUTPUT_ARCH( "riscv" )
 
-/* The ENTRY command specifies the entry point (ie. first instruction
-   to execute). The symbol _start should be defined in each test. */
-
-ENTRY( _start )
-
 /*----------------------------------------------------------------------*/
 /* Sections                                                             */
 /*----------------------------------------------------------------------*/
@@ -26,23 +21,42 @@ SECTIONS
 {
 
   /* text: test code section */
-  . = 0x00002000;
+  . = 0x80000000;
   .text : 
   {
     crt.o(.text)
     *(.text)
   }
 
-  /* data segmemt */
+  /* data segment */
   .data : { *(.data) }
+
+  .sdata : {
+    _gp = . + 0x800;
+    *(.srodata.cst16) *(.srodata.cst8) *(.srodata.cst4) *(.srodata.cst2) *(.srodata*)
+    *(.sdata .sdata.* .gnu.linkonce.s.*)
+  }
+
+  /* bss segment */
+  .sbss : {
+    *(.sbss .sbss.* .gnu.linkonce.sb.*)
+    *(.scommon)
+  }
   .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 = .;