-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlink.ld
30 lines (25 loc) · 883 Bytes
/
link.ld
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
ENTRY(loader) /* the name of the entry label */
SECTIONS {
. = 0x500000; /* the code should be loaded at 5 MB */
.text ALIGN (0x1000) : /* align at 4 KB */
{
*(.text) /* all text sections from all files */
code = .; _code = .; __code = .;
}
.rodata ALIGN (0x1000) : /* align at 4 KB */
{
*(.rodata*) /* all read-only data sections from all files */
}
.data ALIGN (0x1000) : /* align at 4 KB */
{
*(.data) /* all data sections from all files */
data = .; _data = .; __data = .;
}
.bss ALIGN (0x1000) : /* align at 4 KB */
{
*(COMMON) /* all COMMON sections from all files */
*(.bss) /* all bss sections from all files */
bss = .; _bss = .; __bss = .;
}
end = .; _end = .; __end = .;
}