Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cmake/compiler/xt-clang/target.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,6 @@ set(LLEXT_APPEND_FLAGS ${LLEXT_APPEND_FLAGS}
else()
set(LLEXT_APPEND_FLAGS ${LLEXT_APPEND_FLAGS}
-ffreestanding
-mno-generate-flix
)
endif()
5 changes: 1 addition & 4 deletions subsys/llext/llext_link.c
Original file line number Diff line number Diff line change
Expand Up @@ -259,10 +259,7 @@ static void llext_link_plt(struct llext_loader *ldr, struct llext *ext, elf_shdr
arch_elf_relocate_global(ldr, ext, &rela, &sym, got_offset, link_addr);
break;
case STB_LOCAL:
if (ldr_parm->relocate_local) {
arch_elf_relocate_local(ldr, ext, &rela, &sym, got_offset,
ldr_parm);
}
arch_elf_relocate_local(ldr, ext, &rela, &sym, got_offset, ldr_parm);
}

LOG_DBG("symbol %s offset %#zx r-offset %#zx .text offset %#zx stb %u",
Expand Down
12 changes: 7 additions & 5 deletions subsys/llext/llext_load.c
Original file line number Diff line number Diff line change
Expand Up @@ -712,11 +712,13 @@ int do_llext_load(struct llext_loader *ldr, struct llext *ext,
goto out;
}

LOG_DBG("Linking ELF...");
ret = llext_link(ldr, ext, ldr_parm);
if (ret != 0) {
LOG_ERR("Failed to link, ret %d", ret);
goto out;
if (ldr_parm->relocate_local) {
LOG_DBG("Linking ELF...");
ret = llext_link(ldr, ext, ldr_parm);
if (ret != 0) {
LOG_ERR("Failed to link, ret %d", ret);
goto out;
}
}

ret = llext_export_symbols(ldr, ext);
Expand Down
Loading