Skip to content

Commit b58f280

Browse files
bors[bot]Cliff L. Biffle
and
Cliff L. Biffle
authored
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 <[email protected]>
2 parents 0672a1c + 08a1db6 commit b58f280

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)