-
Notifications
You must be signed in to change notification settings - Fork 0
/
linking_M0.ld
51 lines (45 loc) · 1.23 KB
/
linking_M0.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
_vStackTop = ORIGIN(VirtDataM0) + LENGTH(VirtDataM0) - 1;
ENTRY(ResetISR)
SECTIONS
{
.M0_text : ALIGN(4096)
{
FILL(0xff)
__vectors_start__ = ABSOLUTE(.) ;
KEEP(*(.isr_vector))
. = ALIGN(4) ;
/* markers for initialising data and bss */
__bss_section_table_M0 = .;
LONG( ADDR(.M0_bss));
LONG( SIZEOF(.M0_bss));
__bss_section_table_end_M0 = .;
*(.after_vectors*)
*(.text*)
} > VirtTextM0 AT > LoadTextM0
.M0_data : ALIGN(4)
{
*(.data*)
*(.rodata .rodata.* .constdata .constdata.*)
. = ALIGN(4);
} > VirtDataM0 AT > LoadDataM0
/* for exception handling/unwind - some Newlib functions (in common with C++ and STDC++) use this */
.ARM.extab (NOLOAD) : ALIGN(4)
{
*(.ARM.extab* .gnu.linkonce.armextab.*)
} > LoadDataM0
__exidx_start = .;
.ARM.exidx (NOLOAD) : ALIGN(4)
{
*(.ARM.exidx* .gnu.linkonce.armexidx.*)
} > LoadDataM0
__exidx_end = .;
.M0_bss (NOLOAD) : ALIGN(4)
{
_bss = .;
*(.bss*)
*(COMMON)
. = ALIGN(4) ;
_ebss = .;
PROVIDE(end = .);
} > VirtDataM0
}