linker: Move iterable subalign value from header to kconfig

Add a Kconfig option for iterable section subalignment.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
This commit is contained in:
Pieter De Gendt 2024-05-06 16:29:43 +02:00 committed by Anas Nashif
commit a2b866e6fd
2 changed files with 8 additions and 5 deletions

View file

@ -316,6 +316,13 @@ config LINKER_USE_RELAX
endmenu # "Linker Sections"
config LINKER_ITERABLE_SUBALIGN
int
default 8 if 64BIT
default 4
help
Hidden option for the default subalignment of iterable sections.
config LINKER_DEVNULL_SUPPORT
bool
default y if CPU_CORTEX_M || (RISCV && !64BIT)

View file

@ -32,11 +32,7 @@
*(SORT_BY_NAME(._##struct_type.static.*)); \
_CONCAT(_##struct_type, _list_end) = .
#ifdef CONFIG_64BIT
#define Z_LINK_ITERABLE_SUBALIGN 8
#else
#define Z_LINK_ITERABLE_SUBALIGN 4
#endif
#define Z_LINK_ITERABLE_SUBALIGN CONFIG_LINKER_ITERABLE_SUBALIGN
/**
* @brief Define a read-only iterable section output.