linker: tweak link iterable with padding

This adds a new Z_LINK_ITERABLE_ALIGNED option that includes
alignment.

Main reason is to avoid repeting ALIGN() calls for every
iterable needed on ESP32 linker script.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
This commit is contained in:
Sylvio Alves 2021-06-01 12:09:02 -03:00 committed by Anas Nashif
commit 98108d9d71

View file

@ -42,6 +42,10 @@
KEEP(*(SORT_BY_NAME(._##struct_type.static.*))); \
_CONCAT(_##struct_type, _list_end) = .
#define Z_LINK_ITERABLE_ALIGNED(struct_type, align) \
. = ALIGN(align); \
Z_LINK_ITERABLE(struct_type);
#define Z_LINK_ITERABLE_GC_ALLOWED(struct_type) \
_CONCAT(_##struct_type, _list_start) = .; \
*(SORT_BY_NAME(._##struct_type.static.*)); \