Skip to content

Conversation

@mrjimenez
Copy link
Contributor

zephyr_code_relocate() was not working for .noinit sections. In particular, it was not relocating network buffers to other RAM areas.

The __noinit macro was using quoted strings in the created section names like: .noinit."WEST_TOPDIR/path/file.c".symbol with embedded quotes.

GNU ld's KEEP() directive parses quoted strings as separate tokens, causing pattern matching to fail and preventing .noinit sections from being relocated to the target memory region.

The solution was to change the __noinit macro to avoid using double quotes to generate clean section names like .noinit.WEST_TOPDIR/path/file.c.symbol.

This patch just formats the section_tags.h file before the real
patch, otherwise the changes would be hard to read.

Signed-off-by: Marcelo Roberto Jimenez <marcelo.jimenez@gmail.com>
zephyr_code_relocate() was not working for .noinit sections. In
particular, it was not relocating network buffers to other RAM
areas.

The __noinit macro was using quoted strings in the created section
names like:

.noinit."WEST_TOPDIR/path/file.c".symbol

with embedded quotes.

GNU ld's KEEP() directive parses quoted strings as separate tokens,
causing pattern matching to fail and preventing .noinit sections
from being relocated to the target memory region.

The solution was to change the __noinit macro to avoid using double
quotes to generate clean section names like:

.noinit.WEST_TOPDIR/path/file.c.symbol

Signed-off-by: Marcelo Roberto Jimenez <marcelo.jimenez@gmail.com>
@sonarqubecloud
Copy link

@pdgendt pdgendt requested a review from tejlmand November 30, 2025 15:45
@pdgendt
Copy link
Contributor

pdgendt commented Dec 1, 2025

Possibly related #100221

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants