Link standalone programs at 0x80010000.
[riscv-isa-sim.git] / tests / standalone.lds
1 OUTPUT_ARCH( "riscv" )
2
3 ENTRY( _start )
4
5 SECTIONS
6 {
7
8 /*--------------------------------------------------------------------*/
9 /* Code and read-only segment */
10 /*--------------------------------------------------------------------*/
11
12 /* Begining of code and text segment */
13 /* Leave some space for pk's data structures, which includes tohost/fromhost
14 * which are special addresses we ought to leave alone. */
15 . = 0x80010000;
16 _ftext = .;
17 PROVIDE( eprol = . );
18
19 .text :
20 {
21 *(.text.init)
22 }
23
24 /* text: Program code section */
25 .text :
26 {
27 *(.text)
28 *(.text.*)
29 *(.gnu.linkonce.t.*)
30 }
31
32 /* rodata: Read-only data */
33 .rodata :
34 {
35 *(.rdata)
36 *(.rodata)
37 *(.rodata.*)
38 *(.gnu.linkonce.r.*)
39 }
40
41 /* End of code and read-only segment */
42 PROVIDE( etext = . );
43 _etext = .;
44
45 /*--------------------------------------------------------------------*/
46 /* Initialized data segment */
47 /*--------------------------------------------------------------------*/
48
49 /* Start of initialized data segment */
50 . = ALIGN(16);
51 _fdata = .;
52
53 /* data: Writable data */
54 .data :
55 {
56 *(.data)
57 *(.data.*)
58 *(.srodata*)
59 *(.gnu.linkonce.d.*)
60 *(.comment)
61 }
62
63 /* End of initialized data segment */
64 . = ALIGN(4);
65 PROVIDE( edata = . );
66 _edata = .;
67
68 /*--------------------------------------------------------------------*/
69 /* Uninitialized data segment */
70 /*--------------------------------------------------------------------*/
71
72 /* Start of uninitialized data segment */
73 . = .;
74 _fbss = .;
75
76 /* sbss: Uninitialized writeable small data section */
77 . = .;
78
79 /* bss: Uninitialized writeable data section */
80 . = .;
81 _bss_start = .;
82 .bss :
83 {
84 *(.bss)
85 *(.bss.*)
86 *(.sbss*)
87 *(.gnu.linkonce.b.*)
88 *(COMMON)
89 }
90
91 _end = .;
92 }