-
Notifications
You must be signed in to change notification settings - Fork 9
/
linkscript.ld
49 lines (41 loc) · 967 Bytes
/
linkscript.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
/*
* Unified Cortex Startup - GNU ld linker script file
*
* This file is in public domain
*
* Put together by Paul Sokolovsky based on article by Vanya Sergeev
* http://dev.frozeneskimo.com/notes/cortex_cmsis/ , GNU ld documentation
* and numerous other public resources.
*
*/
ENTRY(Reset_Handler)
SECTIONS {
.text :
{
KEEP(*(.vectors))
KEEP(*(.cortex_vectors))
KEEP(*(.vendor_vectors))
*(.text*)
*(.rodata*)
_end_text = .;
} >flash
/* http://sourceware.org/binutils/docs/ld/Output-Section-LMA.html */
.data :
{
_start_data = .;
*(.data*)
_end_data = .;
} >sram AT >flash
.bss :
{
_start_bss = .;
*(.bss*)
*(COMMON)
_end_bss = .;
} >sram
. = ALIGN(4);
_start_stack = .;
/* http://sourceware.org/binutils/docs/ld/MEMORY.html */
PROVIDE(_end_stack = ORIGIN(sram) + LENGTH(sram));
}
_end = .;