-
Notifications
You must be signed in to change notification settings - Fork 1
/
ldscript
66 lines (56 loc) · 1 KB
/
ldscript
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
TARGET("elf32-tradlittlemips")
ENTRY(_start)
MEMORY
{
boot (rx) : ORIGIN = 0x9fc00000, LENGTH = 5888
devcfg (r) : ORIGIN = 0x9fc01780, LENGTH = 16
prog (rx) : ORIGIN = 0x9d000000, LENGTH = 16K
sram (rw!x) : ORIGIN = 0xa0000000, LENGTH = 4K
}
SECTIONS
{
. = 0x9fc00000;
.start . : {
*start.o(.text)
} > boot
. = 0x9fc01780;
.devcfg : {
*(.config3)
*(.config2)
*(.config1)
*(.config0)
} > devcfg
. = 0x9d000000;
.exception : {
. = . + 0x180;
*exception.o(.text)
} > prog
.text : {
*(.text)
} > prog
.rodata : {
*(.rodata)
} > prog
.sysinit : {
__sysinit_start = ABSOLUTE(.);
*(.sysinit)
__sysinit_end = ABSOLUTE(.);
} > prog
/* Ensure _smem is associated with the next section */
. = .;
_smem = ABSOLUTE(.);
.data : {
_sdata = ABSOLUTE(.);
*(.data)
_edata = ABSOLUTE(.);
} > sram AT > prog
.sdata : {
_gp = .;
*(.sdata)
} > sram AT > prog
.bss : {
_sbss = ABSOLUTE(.);
*(.bss COMMON)
_ebss = ABSOLUTE(.);
} > sram
}