From 33c6bdab9ad19d43f468d70f066810850de44463 Mon Sep 17 00:00:00 2001 From: Lauren Murphy Date: Sun, 25 Feb 2024 12:37:26 -0800 Subject: [PATCH] llext: add STT_OBJECT relocation Adds STT_OBJECT relocation. Fixes #67701. Signed-off-by: Lauren Murphy --- subsys/llext/llext.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/subsys/llext/llext.c b/subsys/llext/llext.c index 9af133d6757..aaafe578f14 100644 --- a/subsys/llext/llext.c +++ b/subsys/llext/llext.c @@ -768,7 +768,8 @@ static int llext_link(struct llext_loader *ldr, struct llext *ext, bool do_local return -ENODATA; } } else if (ELF_ST_TYPE(sym.st_info) == STT_SECTION || - ELF_ST_TYPE(sym.st_info) == STT_FUNC) { + ELF_ST_TYPE(sym.st_info) == STT_FUNC || + ELF_ST_TYPE(sym.st_info) == STT_OBJECT) { /* Link address is relative to the start of the section */ link_addr = (uintptr_t)ext->mem[ldr->sect_map[sym.st_shndx]] + sym.st_value; @@ -776,6 +777,7 @@ static int llext_link(struct llext_loader *ldr, struct llext *ext, bool do_local LOG_INF("found section symbol %s addr 0x%lx", name, link_addr); } else { /* Nothing to relocate here */ + LOG_DBG("not relocated"); continue; }