Set ELF entry point correctly
[riscv-tests.git] / benchmarks / common / test.ld
1 /*======================================================================*/
2 /* Proxy kernel linker script */
3 /*======================================================================*/
4 /* This is the linker script used when building the proxy kernel. */
5
6 /*----------------------------------------------------------------------*/
7 /* Setup */
8 /*----------------------------------------------------------------------*/
9
10 /* The OUTPUT_ARCH command specifies the machine architecture where the
11 argument is one of the names used in the BFD library. More
12 specifically one of the entires in bfd/cpu-mips.c */
13
14 OUTPUT_ARCH( "riscv" )
15 ENTRY(_start)
16
17 /*----------------------------------------------------------------------*/
18 /* Sections */
19 /*----------------------------------------------------------------------*/
20
21 SECTIONS
22 {
23
24 /* text: test code section */
25 . = 0x80000000;
26 .text.init : { *(.text.init) }
27
28 .tohost ALIGN(0x1000) : { *(.tohost) }
29
30 .text : { *(.text) }
31
32 /* data segment */
33 .data : { *(.data) }
34
35 .sdata : {
36 __global_pointer$ = . + 0x800;
37 *(.srodata.cst16) *(.srodata.cst8) *(.srodata.cst4) *(.srodata.cst2) *(.srodata*)
38 *(.sdata .sdata.* .gnu.linkonce.s.*)
39 }
40
41 /* bss segment */
42 .sbss : {
43 *(.sbss .sbss.* .gnu.linkonce.sb.*)
44 *(.scommon)
45 }
46 .bss : { *(.bss) }
47
48 /* thread-local data segment */
49 .tdata :
50 {
51 _tls_data = .;
52 *(.tdata.begin)
53 *(.tdata)
54 *(.tdata.end)
55 }
56 .tbss :
57 {
58 *(.tbss)
59 *(.tbss.end)
60 }
61
62 /* End of uninitalized data segement */
63 _end = .;
64 }
65