-
Notifications
You must be signed in to change notification settings - Fork 147
Expand file tree
/
Copy pathAARCH64.ld
More file actions
66 lines (57 loc) · 1.51 KB
/
AARCH64.ld
File metadata and controls
66 lines (57 loc) · 1.51 KB
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
/* Memory region - address comes from WOLFBOOT_LOAD_ADDRESS, size from WOLFBOOT_TEST_APP_SIZE */
MEMORY
{
FLASH (rx) : ORIGIN = @WOLFBOOT_LOAD_ADDRESS@, LENGTH = @WOLFBOOT_TEST_APP_SIZE@
}
/* Use _start if boot_arm64_start.S is linked, otherwise fall back to main */
ENTRY(_start);
SECTIONS
{
.text :
{
_start_text = .;
KEEP(*(.text.startup)) /* Startup code (_start) if boot_arm64_start.S is used */
KEEP(*(.boot*)) /* Legacy boot section for compatibility */
*(.text*)
*(.rodata*)
*(.note.*)
. = ALIGN(4);
_end_text = .;
} > FLASH
.edidx :
{
. = ALIGN(4);
*(.ARM.exidx*)
} > FLASH
.data :
{
PROVIDE(_stored_data = .); /* For boot_arm64_start.S data copying */
_start_data = .;
KEEP(*(.data*))
. = ALIGN(4);
KEEP(*(.ramcode))
. = ALIGN(4);
_end_data = .;
} > FLASH
.bss (NOLOAD) :
{
_start_bss = .;
__bss_start__ = .;
*(.bss*)
*(COMMON)
. = ALIGN(4);
_end_bss = .;
__bss_end__ = .;
_end = .;
} > FLASH
.stack (NOLOAD) :
{
. = ALIGN(16);
. = . + 0x4000; /* 16KB stack */
_stack = .;
} > FLASH
. = ALIGN(4);
}
/* Stack pointer - use proper stack section if available, otherwise fall back to text start */
PROVIDE(__stack = _stack);
PROVIDE(END_STACK = _start_text); /* Legacy compatibility for platforms that don't use stack section */