diff --git a/cmake/modules/extensions.cmake b/cmake/modules/extensions.cmake index 411398b0ae8..c63412cd16e 100644 --- a/cmake/modules/extensions.cmake +++ b/cmake/modules/extensions.cmake @@ -5202,7 +5202,11 @@ function(zephyr_iterable_section) endif() if(SECTION_NUMERIC) - set(INPUT "._${SECTION_NAME}.static.*_?_*;._${SECTION_NAME}.static.*_??_*") + set(INPUT "._${SECTION_NAME}.static.*_?_*;" + "._${SECTION_NAME}.static.*_??_*;" + "._${SECTION_NAME}.static.*_???_*;" + "._${SECTION_NAME}.static.*_????_*;" + "._${SECTION_NAME}.static.*_?????_*") else() set(INPUT "._${SECTION_NAME}.static.*") endif() diff --git a/include/zephyr/linker/iterable_sections.h b/include/zephyr/linker/iterable_sections.h index 3eb4e9527b8..d61d73c89d0 100644 --- a/include/zephyr/linker/iterable_sections.h +++ b/include/zephyr/linker/iterable_sections.h @@ -21,6 +21,9 @@ _CONCAT(_##struct_type, _list_start) = .; \ KEEP(*(SORT(._##struct_type.static.*_?_*))); \ KEEP(*(SORT(._##struct_type.static.*_??_*))); \ + KEEP(*(SORT(._##struct_type.static.*_???_*))); \ + KEEP(*(SORT(._##struct_type.static.*_????_*))); \ + KEEP(*(SORT(._##struct_type.static.*_?????_*))); \ _CONCAT(_##struct_type, _list_end) = . #define Z_LINK_ITERABLE_ALIGNED(struct_type, align) \