From aeaad1b07dbb7af1eea863e0d5f91d0bb8d85ec1 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Tue, 12 Apr 2022 16:59:01 -0700 Subject: [PATCH] cmake: Add .tdata and .tbss to generated TLS linker sections The linker_script generating tool needs to ensure that .tdata gets added to the TLS data section while .tbss is added to the TLS BSS section. Signed-off-by: Keith Packard --- cmake/linker_script/common/thread-local-storage.cmake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmake/linker_script/common/thread-local-storage.cmake b/cmake/linker_script/common/thread-local-storage.cmake index 96d09d6a04a..229fc0900d1 100644 --- a/cmake/linker_script/common/thread-local-storage.cmake +++ b/cmake/linker_script/common/thread-local-storage.cmake @@ -2,10 +2,14 @@ if(CONFIG_THREAD_LOCAL_STORAGE) zephyr_linker_section(NAME .tdata LMA FLASH NOINPUT) + zephyr_linker_section_configure(SECTION .tdata INPUT ".tdata") + zephyr_linker_section_configure(SECTION .tdata INPUT ".tdata.*") zephyr_linker_section_configure(SECTION .tdata INPUT ".gnu.linkonce.td.*") # GROUP_ROM_LINK_IN(RAMABLE_REGION, ROMABLE_REGION) zephyr_linker_section(NAME .tbss LMA FLASH NOINPUT) + zephyr_linker_section_configure(SECTION .tbss INPUT ".tbss") + 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)