linker: Fix handling of log_backend iterable section
The log_backed section is now using the iterable section macros so
we should be using zephyr_iterable_section() in common-rom.cmake
so the generation of the linker script is correct for arm clang
compiles.
Fixes #56440
Signed-off-by: Kumar Gala <kumar.gala@intel.com>
(cherry picked from commit 9a77f3d4a0941045f2378e69aae54942de200185)
diff --git a/cmake/linker_script/common/common-rom.cmake b/cmake/linker_script/common/common-rom.cmake
index 00e4b26..b2c04ff 100644
--- a/cmake/linker_script/common/common-rom.cmake
+++ b/cmake/linker_script/common/common-rom.cmake
@@ -162,9 +162,6 @@
zephyr_linker_section(NAME log_const KVMA RAM_REGION GROUP RODATA_REGION NOINPUT ${XIP_ALIGN_WITH_INPUT})
zephyr_linker_section_configure(SECTION log_const INPUT ".log_const_*" KEEP SORT NAME)
-zephyr_linker_section(NAME log_backends KVMA RAM_REGION GROUP RODATA_REGION NOINPUT ${XIP_ALIGN_WITH_INPUT})
-zephyr_linker_section_configure(SECTION log_backends INPUT ".log_backends.*" KEEP)
-
zephyr_iterable_section(NAME shell KVMA RAM_REGION GROUP RODATA_REGION SUBALIGN 4)
zephyr_linker_section(NAME shell_root_cmds KVMA RAM_REGION GROUP RODATA_REGION NOINPUT ${XIP_ALIGN_WITH_INPUT})
@@ -190,4 +187,5 @@
if (CONFIG_LOG)
zephyr_iterable_section(NAME log_link KVMA RAM_REGION GROUP RODATA_REGION SUBALIGN 4)
+ zephyr_iterable_section(NAME log_backend KVMA RAM_REGION GROUP RODATA_REGION SUBALIGN 4)
endif()