linker: arc: add .rodata_in_data section to avoid unexpected placement
The .rodata_in_data section is produced by MWDT toolchain with -Hccm
option enabled. This option moves read-only data from the executable
memory (ICCM) to the data memory (DCCM), improving performance by
reducing conflicts between instruction fetches and data fetches.
Signed-off-by: Ilya Tagunov <Ilya.Tagunov@synopsys.com>
(cherry picked from commit 708c1dc4887a3a0a0ec3d6779f2311193ef90fac)
diff --git a/include/zephyr/arch/arc/v2/linker.ld b/include/zephyr/arch/arc/v2/linker.ld
index 0a4ae19..da43344 100644
--- a/include/zephyr/arch/arc/v2/linker.ld
+++ b/include/zephyr/arch/arc/v2/linker.ld
@@ -222,6 +222,10 @@
*(".data.*")
*(".kernel.*")
+/* This is an MWDT-specific section, created when -Hccm option is enabled */
+ *(".rodata_in_data")
+ *(".rodata_in_data.*")
+
/* Located in generated directory. This file is populated by the
* zephyr_linker_sources() Cmake function.
*/