-
Notifications
You must be signed in to change notification settings - Fork 8
/
link.x
64 lines (52 loc) · 1.45 KB
/
link.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
SECTIONS {
. = 0x0;
/*
* The PrgCode output section name comes from the CMSIS-Pack flash algo
* templates and armlink. It is used here because several tools that work
* with these flash algos expect this section name.
*
* All input sections are combined into PrgCode because RWPI using R9 is not
* currently stable in Rust, thus having separate PrgData sections that the
* debug host might locate at a different offset from PrgCode is not safe.
*/
PrgCode : {
KEEP(*(.entry))
KEEP(*(.entry.*))
*(.text)
*(.text.*)
*(.rodata)
*(.rodata.*)
*(.data)
*(.data.*)
*(.sdata)
*(.sdata.*)
*(.bss)
*(.bss.*)
*(.uninit)
*(.uninit.*)
. = ALIGN(4);
}
/*
* Adding PrgData section in order to satisfy tools that need it.
*/
PrgData : {
KEEP(*(.PrgData))
KEEP(*(.PrgData.*))
. = ALIGN(4);
}
/* Description of the flash algorithm */
DeviceData . : {
/* 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))
}
/DISCARD/ : {
/* Unused exception related info that only wastes space */
*(.ARM.exidx);
*(.ARM.exidx.*);
*(.ARM.extab.*);
}
}