aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Cliff L. Biffle <cliff@oxidecomputer.com> 2020-04-28 11:51:29 -0700
committerGravatar Cliff L. Biffle <cliff@oxidecomputer.com> 2020-04-28 11:51:29 -0700
commit08a1db6952db50fa4263b5fc0f2f138b691de640 (patch)
tree1a2fcf8240d1a43776dcdf0a8b27ee661d284848
parent0672a1c2bdb11ba90d54794ce2389f98cb7a3060 (diff)
downloadcortex-m-08a1db6952db50fa4263b5fc0f2f138b691de640.tar.gz
cortex-m-08a1db6952db50fa4263b5fc0f2f138b691de640.tar.zst
cortex-m-08a1db6952db50fa4263b5fc0f2f138b691de640.zip
link.x: .bss should be NOLOAD
Previously, this linker script was producing an ELF PHDR marked LOAD for the .bss section, which suggested to tools like OpenOCD that something needed to be copied into RAM during flashing. This section happened to have filesz=0 in practice, so only extra bookkeeping work was done and not extra transfers. We noticed this when tracking down an odd behavior in one of our ELF post-processing tools. With this change, the linker script no longer emits a LOAD PHDR.
-rw-r--r--cortex-m-rt/link.x.in2
1 files changed, 1 insertions, 1 deletions
diff --git a/cortex-m-rt/link.x.in b/cortex-m-rt/link.x.in
index 4db25fa..a502a03 100644
--- a/cortex-m-rt/link.x.in
+++ b/cortex-m-rt/link.x.in
@@ -119,7 +119,7 @@ SECTIONS
__sidata = LOADADDR(.data);
/* ### .bss */
- .bss : ALIGN(4)
+ .bss (NOLOAD) : ALIGN(4)
{
. = ALIGN(4);
__sbss = .;