llext: add STT_OBJECT relocation
Adds STT_OBJECT relocation. Fixes #67701. Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
This commit is contained in:
parent
b839f41161
commit
33c6bdab9a
1 changed files with 3 additions and 1 deletions
|
@ -768,7 +768,8 @@ static int llext_link(struct llext_loader *ldr, struct llext *ext, bool do_local
|
||||||
return -ENODATA;
|
return -ENODATA;
|
||||||
}
|
}
|
||||||
} else if (ELF_ST_TYPE(sym.st_info) == STT_SECTION ||
|
} 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 address is relative to the start of the section */
|
||||||
link_addr = (uintptr_t)ext->mem[ldr->sect_map[sym.st_shndx]]
|
link_addr = (uintptr_t)ext->mem[ldr->sect_map[sym.st_shndx]]
|
||||||
+ sym.st_value;
|
+ 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);
|
LOG_INF("found section symbol %s addr 0x%lx", name, link_addr);
|
||||||
} else {
|
} else {
|
||||||
/* Nothing to relocate here */
|
/* Nothing to relocate here */
|
||||||
|
LOG_DBG("not relocated");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue