forked from MicroSur/sur_myevic
-
Notifications
You must be signed in to change notification settings - Fork 0
/
linker.ld
116 lines (85 loc) · 1.58 KB
/
linker.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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
/* Memory regions */
MEMORY {
ROM (rx) : ORIGIN = 0x00000000, LENGTH = 0x19000 /* 102400 logo */
RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 32K
}
/* Library configurations */
/* GROUP(
armv7e-m/libnosys.a
armv7e-m/libgcc.a
armv7e-m/libc.a
armv7e-m/libm.a
)*/
GROUP(
thumb/v7e-m/libnosys.a
thumb/v7e-m/libgcc.a
thumb/v7e-m/libc.a
thumb/v7e-m/libm.a
)
ENTRY(Reset_Handler)
SECTIONS {
.text : {
KEEP(*(.isr_vectors))
LONG(0x5746594D)
LONG(images1_start)
LONG(images1_end)
LONG(images2_start)
LONG(images2_end)
LONG(Strings_Start)
LONG(Strings_End)
KEEP(*(.myPID))
. = ALIGN(4);
*(.text*)
. = ALIGN(4);
KEEP(*(.myevic*))
/* . = ALIGN(4); */
/* KEEP(*(.productid*)) */
. = ALIGN(4);
KEEP(*(.joyetech*))
. = ALIGN(4);
*(.rodata*)
. = ALIGN(4);
Strings_Start = .;
*(.strings*)
Strings_End = .;
. = ALIGN(4);
images1_start = .;
*(.imgblock1)
images1_end = .;
images2_start = .;
*(.imgblock2)
images2_end = .;
} > ROM
. = ALIGN(4);
Data_Start_ROM = .;
.data : AT (Data_Start_ROM) {
Data_Start_RAM = .;
*(vtable)
*(.data*)
. = ALIGN(4);
Data_End_RAM = .;
} > RAM
Data_Size = Data_End_RAM - Data_Start_RAM;
.sram : {
SRAMZ_Start = .;
. = ALIGN(4);
*(COMMON)
*(.bss*)
end = .;
. = ALIGN(8);
*(.stack)
SRAMZ_End = .;
} > RAM
SRAMZ_Size = SRAMZ_End - SRAMZ_Start;
.text : {
. = ALIGN(4);
RAMInitTable = .;
LONG(Data_Start_ROM)
LONG(Data_Start_RAM)
LONG(Data_Size)
LONG(SRAMZ_Start)
LONG(SRAMZ_Start)
LONG(SRAMZ_Size)
RAMInitEnd = .;
} > ROM
}