-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlink.ld
56 lines (48 loc) · 903 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
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
MEMORY {
FLASH(rx) : ORIGIN = 0x0, LENGTH = 128K
RAM(rwx) : ORIGIN = 0x20000000, LENGTH = 8K
}
ENTRY(init)
SECTIONS {
.isr_vector : {
KEEP(*(.isr_vector_stack_val*))
KEEP(*(.isr_vector*))
. = ALIGN(4);
} > FLASH
.text : {
. = ALIGN(4);
*(.text)
*(.text*)
*(.rodata)
*(.rodata*)
. = ALIGN(4);
__text_end = .;
}
.bss : {
. = ALIGN(4);
__bss_start = .;
*(.bss)
*(.bss*)
*(COMMON)
. = ALIGN(4);
__bss_end = .;
} > RAM
.ARM.extab : {
*(.ARM.extab* .gnu.linkonce.armextab.*)
} > FLASH
.ARM.exidx :
{
__exidx_start = .;
*(.ARM.exidx* .gnu.linkonce.armexidx.*)
__exidx_end = .;
} > FLASH
.data : AT ( __text_end ) {
. = ALIGN(4);
__data_start = .;
__data_load = LOADADDR(.data);
*(.data);
*(.data*);
__data_end = .;
} > RAM
__stack = ORIGIN(RAM) + LENGTH(RAM);
}