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