blob: abbd61799345aa63ec010e8444aa277e0d02e38f [file] [log] [blame]
swissChili56cf8172022-07-30 18:47:48 -07001OUTPUT_ARCH( "riscv" )
2
3ENTRY( _start )
4
5MEMORY
6{
7 ram (rw) : ORIGIN = 0x80000000, LENGTH = 128M
8}
9
10PHDRS
11{
12 text PT_LOAD;
13 data PT_LOAD;
14 bss PT_LOAD;
15}
16
17SECTIONS
18{
19 .text : {
20 PROVIDE(_text_start = .);
21 *(.text.init) *(.text .text.*)
22 PROVIDE(_text_end = .);
23 } >ram AT>ram :text
24
25 .rodata : {
26 PROVIDE(_rodata_start = .);
27 *(.rodata .rodata.*)
28 PROVIDE(_rodata_end = .);
29 } >ram AT>ram :text
30
31 .data : {
32 . = ALIGN(4096);
33 PROVIDE(_data_start = .);
34 *(.sdata .sdata.*) *(.data .data.*)
35 PROVIDE(_data_end = .);
36 } >ram AT>ram :data
37
38 .bss :{
39 PROVIDE(_bss_start = .);
40 *(.sbss .sbss.*) *(.bss .bss.*)
41 PROVIDE(_bss_end = .);
42 } >ram AT>ram :bss
43
44 PROVIDE(_memory_start = ORIGIN(ram));
45 PROVIDE(_memory_end = ORIGIN(ram) + LENGTH(ram));
46}