diff options
Diffstat (limited to 'benchmarks/common')
-rw-r--r-- | benchmarks/common/crt.S | 3 | ||||
-rw-r--r-- | benchmarks/common/test.ld | 14 |
2 files changed, 16 insertions, 1 deletions
diff --git a/benchmarks/common/crt.S b/benchmarks/common/crt.S index 0c99c4a..97b90d5 100644 --- a/benchmarks/common/crt.S +++ b/benchmarks/common/crt.S @@ -131,6 +131,9 @@ _start: fmv.s.x f31,x0 1: + # initialize global pointer + la gp, _gp + la tp, _end + 63 and tp, tp, -64 diff --git a/benchmarks/common/test.ld b/benchmarks/common/test.ld index 816c948..082891c 100644 --- a/benchmarks/common/test.ld +++ b/benchmarks/common/test.ld @@ -28,8 +28,20 @@ SECTIONS *(.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 */ |