Browse Source

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>
pull/72437/head
Pieter De Gendt 1 year ago committed by Anas Nashif
parent
commit
a2b866e6fd
  1. 7
      Kconfig.zephyr
  2. 6
      include/zephyr/linker/iterable_sections.h

7
Kconfig.zephyr

@ -316,6 +316,13 @@ config LINKER_USE_RELAX @@ -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)

6
include/zephyr/linker/iterable_sections.h

@ -32,11 +32,7 @@ @@ -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.

Loading…
Cancel
Save