Skip to content

Rename .bssnz to .noinit to fix linker wildcard conflicts#3685

Open
wiktorkwiatkowski wants to merge 1 commit into
apache:masterfrom
wiktorkwiatkowski:section_noinit
Open

Rename .bssnz to .noinit to fix linker wildcard conflicts#3685
wiktorkwiatkowski wants to merge 1 commit into
apache:masterfrom
wiktorkwiatkowski:section_noinit

Conversation

@wiktorkwiatkowski

Copy link
Copy Markdown
Contributor

Previously, the .bss.core.nz section was placed before .bss to avoid the (.bss) linker wildcard. This placement assigned it a low RAM address, causing the bootloader to accidentally overwrite these variables during startup. Moving the section after .bss was not an option because the wildcard would still catch it. Renaming the section to .noinit solves this problem. It allows the section to be safely placed after .bss at a higher memory address, ensuring the variables survive system resets.

@sjanc sjanc requested a review from kasjer June 26, 2026 06:54

@kasjer kasjer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, I will check some boards to see if it builds.

Some alignment is strange

@sjanc sjanc self-requested a review June 26, 2026 07:24
@wiktorkwiatkowski wiktorkwiatkowski force-pushed the section_noinit branch 3 times, most recently from dba1c14 to bfc1297 Compare June 26, 2026 08:33
Previously, the .bss.core.nz section was placed before .bss to
avoid the *(.bss*) linker wildcard. This placement assigned it
a low RAM address, causing the bootloader to accidentally overwrite
these variables during startup. Moving the section after .bss
was not an option because the wildcard would still catch it.
Renaming the section to .noinit solves this problem.
It allows the section to be safely placed after .bss at a higher
memory address, ensuring the variables survive system resets.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

BSP Nordic Nordic related size/l STM STM32 related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants