-
Notifications
You must be signed in to change notification settings - Fork 1
/
link.ld
88 lines (75 loc) · 1.71 KB
/
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
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
INCLUDE memory.x
ENTRY(reset);
SECTIONS
{
. = ALIGN(4);
.text : {
_stext = .;
*(.text); /* Place .text section first so that the reset vector is always placed at the load address */
*(.text.*); /* Place other code sections next */
*(.rodata) /* read-only data (constants) */
*(.rodata*)
. = ALIGN(4);
*(.glue_7)
. = ALIGN(4);
*(.eh_frame)
. = ALIGN(4);
_etext = . ;
} > DDR_MEM
. = ALIGN(4);
.dummy : {
_edummy = .;
} > DDR_MEM
.data : AT (LOADADDR(.dummy)) {
_sdata = .;
*(.vectors)
*(.data)
*(.data.*)
_edata = .;
} > DDR_MEM
/* collect all uninitialized .bss sections */
.bss (NOLOAD) : {
. = ALIGN(4);
_sbss = .;
*(.bss)
*(.bss.*)
_ebss = .;
} > DDR_MEM
/* ## .got */
/* Dynamic relocations are unsupported. This section is only used to detect relocatable code in
the input files and raise an error if relocatable code is found */
.got (NOLOAD) :
{
KEEP(*(.got .got.*));
}
/* ## Discarded sections */
/DISCARD/ :
{
/* Unused exception related info that only wastes space */
*(.ARM.exidx);
*(.ARM.exidx.*);
*(.ARM.extab.*);
}
. = ALIGN(8);
.stack (NOLOAD) :
{
. += IRQ_STACK_SIZE;
. = ALIGN(8);
_irqstack = .;
. += FIQ_STACK_SIZE;
. = ALIGN(8);
_fiqstack = .;
. += ABT_STACK_SIZE;
. = ALIGN(8);
_abtstack = .;
. += UND_STACK_SIZE;
. = ALIGN(8);
_undstack = .;
. += SYS_STACK_SIZE;
. = ALIGN(8);
_sysstack = .;
} >DDR_MEM
}
_romsize = _edata - _stext;
_sramsize = _ebss - _stext;
end = .; /* define a global symbol marking the end of application */