-
-
Notifications
You must be signed in to change notification settings - Fork 10
/
custom.ld
63 lines (55 loc) · 1.05 KB
/
custom.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
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
GROUP("libgcc.a")
MEMORY
{
sram (rwx) : ORIGIN = BASE_ADDRESS, LENGTH = 31M
rom (r) : ORIGIN = BASE_ADDRESS + 0x1F00000, LENGTH = 1M
}
SECTIONS
{
/* first section is .text which is used for code */
.text :
{
*(.text .text.*) /* remaining code */
*(.rodata) /* read-only data (constants) */
*(.rodata*)
*(.rdata*)
. = ALIGN(4);
} > sram
/* .data section which is used for initialized data */
.data :
{
*(.got.plt) *(.got)
*(.shdata)
*(.data .data.* .gnu.linkonce.d.*)
. = ALIGN(16);
*(.lit8)
*(.lit4)
*(.sdata .sdata.* .gnu.linkonce.s.*)
. = ALIGN (8);
*(.ram)
. = ALIGN (8);
_edata = .;
} > sram
.bss :
{
. = ALIGN(4);
_bss_start = . ;
*(.bss*)
*(.sbss*)
*(COMMON)
/* Allocate room for stack */
. = ALIGN(8) ;
. += 4096 ;
_sp = . - 16;
} > sram
. = ALIGN(4);
_end = . ;
.payload :
{
*(.payload)
}
.dtb :
{
*(.dtb)
} > rom
}