From 2aca7e5e0fe2e70bd3c48a4a22a22e920683a994 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Fri, 8 Apr 2022 12:38:49 -0700 Subject: [PATCH] ld_script: Add __tbss_align and __tdata_align to generated linker scripts Scripts generated with ld_script.cmake also need to have the _align symbols defined so that they work with TLS values. Signed-off-by: Keith Packard --- cmake/linker/ld/ld_script.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/cmake/linker/ld/ld_script.cmake b/cmake/linker/ld/ld_script.cmake index 20cfc02e019..795d3dee741 100644 --- a/cmake/linker/ld/ld_script.cmake +++ b/cmake/linker/ld/ld_script.cmake @@ -311,6 +311,7 @@ function(section_to_string) if(NOT nosymbols) set(TEMP "${TEMP}\n__${name_clean}_size = __${name_clean}_end - __${name_clean}_start;") + set(TEMP "${TEMP}\nPROVIDE(__${name_clean}_align = ALIGNOF(${name}));") set(TEMP "${TEMP}\n__${name_clean}_load_start = LOADADDR(${name});") endif()