From 107198204c0edb0e5d5dc4d0d042f933e8e5c751 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Tue, 10 Jun 2025 21:27:42 -0700 Subject: [PATCH] zephyr/linker: Move .tbss section back to ROMABLE_REGION Placing this in RAMABLE_REGION messes up the TLS offsets computed by the linker, presumably because it's not adjacent to the .tdata section. In any case, it doesn't really matter as all we want the linker to do is compute offsets from the TLS base value for all .tdata and .tbss values. Signed-off-by: Keith Packard --- include/zephyr/linker/thread-local-storage.ld | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/zephyr/linker/thread-local-storage.ld b/include/zephyr/linker/thread-local-storage.ld index c0eec73f4e1..1214cc8817e 100644 --- a/include/zephyr/linker/thread-local-storage.ld +++ b/include/zephyr/linker/thread-local-storage.ld @@ -11,7 +11,7 @@ SECTION_DATA_PROLOGUE(tbss,(NOLOAD),) { *(.tbss .tbss.* .gnu.linkonce.tb.* .tcommon); - } GROUP_ROM_LINK_IN(RAMABLE_REGION, RAMABLE_REGION) + } GROUP_ROM_LINK_IN(RAMABLE_REGION, ROMABLE_REGION) /* * These needs to be outside of the tdata/tbss