Skip to content

Commit 08a1db6

Browse files
author
Cliff L. Biffle
committed
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.
1 parent 0672a1c commit 08a1db6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cortex-m-rt/link.x.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ SECTIONS
119119
__sidata = LOADADDR(.data);
120120

121121
/* ### .bss */
122-
.bss : ALIGN(4)
122+
.bss (NOLOAD) : ALIGN(4)
123123
{
124124
. = ALIGN(4);
125125
__sbss = .;

0 commit comments

Comments
 (0)