From 9dca9832d8600356d9d2fa8025be8e6197584c83 Mon Sep 17 00:00:00 2001 From: Guennadi Liakhovetski Date: Wed, 10 Apr 2024 15:13:36 +0200 Subject: [PATCH] llext: use data size from Zephyr Some image formats, notably relocatable objects, don't create ELF segments. To work around this use the object data size, calculated by Zephyr. Signed-off-by: Guennadi Liakhovetski --- src/library_manager/llext_manager.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/library_manager/llext_manager.c b/src/library_manager/llext_manager.c index 0c45a0155..c1e4b6208 100644 --- a/src/library_manager/llext_manager.c +++ b/src/library_manager/llext_manager.c @@ -200,8 +200,7 @@ static int llext_manager_link(struct sof_man_fw_desc *desc, struct sof_man_modul mod->segment[SOF_MAN_SEGMENT_RODATA].file_offset = (uintptr_t)md->llext->mem[LLEXT_MEM_RODATA] - (uintptr_t)desc + SOF_MAN_ELF_TEXT_OFFSET; - ctx->segment_size[SOF_MAN_SEGMENT_RODATA] = mod_size - - ebl.loader.sects[LLEXT_MEM_TEXT].sh_size; + ctx->segment_size[SOF_MAN_SEGMENT_RODATA] = ebl.loader.prog_data_size; tr_dbg(&lib_manager_tr, ".data: start: %#x size %#x offset %#x", mod->segment[SOF_MAN_SEGMENT_RODATA].v_base_addr,