Skip to content

Commit

Permalink
PrgCode section names.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
flit committed Jan 30, 2021
1 parent 97150dd commit 55dedd8
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion link.x
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
SECTIONS {
. = 0x0;

.text : {
/*
* 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.*))

Expand Down

0 comments on commit 55dedd8

Please sign in to comment.