soc: mimx8ml8_m7: add .resource_table section to linker script

This is required to include the resource table in the build output. The
Linux remoteproc framework explicitly looks for this section while loading
the elf and may complain if the resource table is missing.

Signed-off-by: Matthias Fend <matthias.fend@emfend.at>
This commit is contained in:
Matthias Fend 2022-01-26 15:46:35 +01:00 committed by Carles Cufí
commit a3f7a01ac8
2 changed files with 15 additions and 0 deletions

View file

@ -10,3 +10,8 @@ zephyr_sources(
soc.c soc.c
mpu_regions.c mpu_regions.c
) )
if(CONFIG_OPENAMP_RSC_TABLE)
zephyr_linker_section(NAME .resource_table GROUP ROM_REGION NOINPUT)
zephyr_linker_section_configure(SECTION .resource_table KEEP INPUT ".resource_table*")
endif()

View file

@ -18,3 +18,13 @@ MEMORY
} }
#include <arch/arm/aarch32/cortex_m/scripts/linker.ld> #include <arch/arm/aarch32/cortex_m/scripts/linker.ld>
SECTIONS
{
#ifdef CONFIG_OPENAMP_RSC_TABLE
SECTION_PROLOGUE(.resource_table,, SUBALIGN(4))
{
KEEP(*(.resource_table*))
} GROUP_LINK_IN(ROMABLE_REGION)
#endif
}