-
Notifications
You must be signed in to change notification settings - Fork 1
/
loader.x
50 lines (40 loc) · 1.15 KB
/
loader.x
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
SECTIONS {
. = 0x0;
/* Section for code and readonly data, specified by flashloader standard. */
PrgCode : {
. = ALIGN(4);
/* The KEEP is necessary to ensure that the
* sections don't get garbage collected by the linker.
*
* Because this is not a normal binary with an entry point,
* the linker would just discard all the code without the
* KEEP statement here.
*/
KEEP(*(.text))
KEEP(*(.text.*))
KEEP(*(.rodata))
KEEP(*(.rodata.*))
. = ALIGN(4);
}
/* Section for data, specified by flashloader standard. */
PrgData : {
*(.data .data.*)
*(.sdata .sdata.*)
}
PrgData : {
/* Zero-initialized data */
*(.bss .bss.*)
*(.sbss .sbss.*)
*(COMMON)
KEEP(*(PrgData))
}
/* Description of the flash algorithm */
DevDscr . : {
/* The device data content is only for external tools,
* and usually not referenced by the code.
*
* The KEEP statement ensures it's not removed by accident.
*/
KEEP(*(DeviceData))
}
}