Skip to content

Commit 55dedd8

Browse files
committed
PrgCode section names.
Change .text to PrgCode to match the section name expected by tools that work with the CMSIS-Pack Keil flash algo format. Added comment documenting this and why .data/.bss input sections are not separated.
1 parent 97150dd commit 55dedd8

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

link.x

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,16 @@
11
SECTIONS {
22
. = 0x0;
33

4-
.text : {
4+
/*
5+
* The PrgCode output section name comes from the CMSIS-Pack flash algo
6+
* templates and armlink. It is used here because several tools that work
7+
* with these flash algos expect this section name.
8+
*
9+
* All input sections are combined into PrgCode because RWPI using R9 is not
10+
* currently stable in Rust, thus having separate PrgData sections that the
11+
* debug host might locate at a different offset from PrgCode is not safe.
12+
*/
13+
PrgCode : {
514
KEEP(*(.entry))
615
KEEP(*(.entry.*))
716

0 commit comments

Comments
 (0)