diff --git a/cmake/linker_script/common/thread-local-storage.cmake b/cmake/linker_script/common/thread-local-storage.cmake index 6eb8dd417af..127b7f93023 100644 --- a/cmake/linker_script/common/thread-local-storage.cmake +++ b/cmake/linker_script/common/thread-local-storage.cmake @@ -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 diff --git a/include/zephyr/linker/thread-local-storage.ld b/include/zephyr/linker/thread-local-storage.ld index d2bc2b2b334..c0eec73f4e1 100644 --- a/include/zephyr/linker/thread-local-storage.ld +++ b/include/zephyr/linker/thread-local-storage.ld @@ -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