aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar bors[bot] <26634292+bors[bot]@users.noreply.github.com> 2020-04-28 19:23:08 +0000
committerGravatar GitHub <noreply@github.com> 2020-04-28 19:23:08 +0000
commitb58f280f8b5e7e8b4a1ebde18f65f2e5bbc58b4f (patch)
tree1a2fcf8240d1a43776dcdf0a8b27ee661d284848
parent0672a1c2bdb11ba90d54794ce2389f98cb7a3060 (diff)
parent08a1db6952db50fa4263b5fc0f2f138b691de640 (diff)
downloadcortex-m-b58f280f8b5e7e8b4a1ebde18f65f2e5bbc58b4f.tar.gz
cortex-m-b58f280f8b5e7e8b4a1ebde18f65f2e5bbc58b4f.tar.zst
cortex-m-b58f280f8b5e7e8b4a1ebde18f65f2e5bbc58b4f.zip
Merge #265
265: link.x: .bss should be NOLOAD r=japaric a=cbiffle 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. Co-authored-by: Cliff L. Biffle <cliff@oxidecomputer.com>
-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 = .;