linker: Place .tbss section in RAM, not FLASH

If this section is placed in FLASH, the section gets marked
as writable even though .tbss values will never be stored there.

Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
Keith Packard 2025-05-06 19:30:09 -07:00 committed by Benjamin Cabé
commit 5890c73087
2 changed files with 3 additions and 3 deletions

View file

@ -13,7 +13,7 @@ if(CONFIG_THREAD_LOCAL_STORAGE)
zephyr_linker_section_configure(SECTION .tbss INPUT ".tbss.*")
zephyr_linker_section_configure(SECTION .tbss INPUT ".gnu.linkonce.tb.*")
zephyr_linker_section_configure(SECTION .tbss INPUT ".tcommon")
# GROUP_ROM_LINK_IN(RAMABLE_REGION, ROMABLE_REGION)
# GROUP_ROM_LINK_IN(RAMABLE_REGION, RAMABLE_REGION)
#
# These needs to be outside of the tdata/tbss

View file

@ -8,10 +8,10 @@
*(.tdata .tdata.* .gnu.linkonce.td.*);
} GROUP_ROM_LINK_IN(RAMABLE_REGION, ROMABLE_REGION)
SECTION_DATA_PROLOGUE(tbss,,)
SECTION_DATA_PROLOGUE(tbss,(NOLOAD),)
{
*(.tbss .tbss.* .gnu.linkonce.tb.* .tcommon);
} GROUP_ROM_LINK_IN(RAMABLE_REGION, ROMABLE_REGION)
} GROUP_ROM_LINK_IN(RAMABLE_REGION, RAMABLE_REGION)
/*
* These needs to be outside of the tdata/tbss