This repository was archived by the owner on Nov 28, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathlink.ld
More file actions
71 lines (61 loc) · 1.22 KB
/
link.ld
File metadata and controls
71 lines (61 loc) · 1.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/* not needed, but we need separate linker scripts anyway */
OUTPUT_ARCH(riscv)
SEARCH_DIR(.)
__DYNAMIC = 0;
MEMORY
{
ROM : ORIGIN = 0x1A000000, LENGTH = 0x2000
L2 : ORIGIN = 0x1C000000, LENGTH = 0x4000
}
/* We have to align each sector to word boundaries as our current s19->slm
* conversion scripts are not able to handle non-word aligned sections. */
SECTIONS
{
.text : {
. = ALIGN(4);
KEEP(*(.vectors))
_stext = .;
*(.text)
*(.text.*)
_etext = .;
*(.lit)
*(.shdata)
*(.boot)
*(.boot.data)
*(.rodata);
*(.rodata.*)
*(.eh_frame*)
*(.data);
*(.data.*)
*(.bss)
*(.bss.*)
*(.sbss)
*(.sbss.*)
*(COMMON)
. = ALIGN(4);
_bss_start = .;
. = ALIGN(4);
_bss_end = .;
*(.boot)
*(.boot.data)
_endtext = .;
} > ROM
.heapl2ram :
{
*(.ram)
*(.heapl2ram)
} > L2
.stack :
{
. = ALIGN(4);
stack = . + 1024;
} > L2
.stab 0 (NOLOAD) :
{
[ .stab ]
}
.stabstr 0 (NOLOAD) :
{
[ .stabstr ]
}
}