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 <keithp@keithp.com>
This commit is contained in:
Keith Packard 2022-04-08 12:38:49 -07:00 committed by Stephanos Ioannidis
commit 2aca7e5e0f

View file

@ -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()