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 */
/*----------------------------------------------------------------------*/
{
/* text: test code section */
- . = 0x00002000;
+ . = 0;
.text :
{
crt.o(.text)
*(.text)
}
- /* data: Initialized data segment */
- .data :
+ /* 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 */
+ .tdata :
+ {
+ _tls_data = .;
+ crt.o(.tdata.begin)
+ *(.tdata)
+ crt.o(.tdata.end)
+ }
+ .tbss :
{
- *(.data)
+ *(.tbss)
+ crt.o(.tbss.end)
}
/* End of uninitalized data segement */