diff --git a/include/zephyr/llext/llext.h b/include/zephyr/llext/llext.h index 17030334717..0f5ff8c8f88 100644 --- a/include/zephyr/llext/llext.h +++ b/include/zephyr/llext/llext.h @@ -400,35 +400,6 @@ ssize_t llext_find_section(struct llext_loader *loader, const char *search_name) int llext_get_section_header(struct llext_loader *loader, struct llext *ext, const char *search_name, elf_shdr_t *shdr); -/** - * @brief Architecture specific function for local binding relocations - * - * @param[in] loader Extension loader data and context - * @param[in] ext Extension to call function in - * @param[in] rel Relocation data provided by elf - * @param[in] sym Corresponding symbol table entry - * @param[in] rel_addr Address where relocation should be performed - * @param[in] ldr_parm Loader parameters - * @returns 0 on success or a negative error code - */ -int arch_elf_relocate_local(struct llext_loader *loader, struct llext *ext, const elf_rela_t *rel, - const elf_sym_t *sym, uint8_t *rel_addr, - const struct llext_load_param *ldr_parm); - -/** - * @brief Architecture specific function for global binding relocations - * - * @param[in] loader Extension loader data and context - * @param[in] ext Extension to call function in - * @param[in] rel Relocation data provided by elf - * @param[in] sym Corresponding symbol table entry - * @param[in] rel_addr Address where relocation should be performed - * @param[in] link_addr target address for table-based relocations - * @returns 0 on success or a negative error code - */ -int arch_elf_relocate_global(struct llext_loader *loader, struct llext *ext, const elf_rela_t *rel, - const elf_sym_t *sym, uint8_t *rel_addr, const void *link_addr); - /** * @brief Initialize LLEXT heap dynamically * diff --git a/include/zephyr/llext/llext_internal.h b/include/zephyr/llext/llext_internal.h index c920c261ea6..3a0306f16e5 100644 --- a/include/zephyr/llext/llext_internal.h +++ b/include/zephyr/llext/llext_internal.h @@ -76,6 +76,35 @@ int llext_read_symbol(struct llext_loader *ldr, struct llext *ext, const elf_rel /** @endcond */ +/** + * @brief Architecture specific function for local binding relocations + * + * @param[in] loader Extension loader data and context + * @param[in] ext Extension to call function in + * @param[in] rel Relocation data provided by elf + * @param[in] sym Corresponding symbol table entry + * @param[in] rel_addr Address where relocation should be performed + * @param[in] ldr_parm Loader parameters + * @returns 0 on success or a negative error code + */ +int arch_elf_relocate_local(struct llext_loader *loader, struct llext *ext, const elf_rela_t *rel, + const elf_sym_t *sym, uint8_t *rel_addr, + const struct llext_load_param *ldr_parm); + +/** + * @brief Architecture specific function for global binding relocations + * + * @param[in] loader Extension loader data and context + * @param[in] ext Extension to call function in + * @param[in] rel Relocation data provided by elf + * @param[in] sym Corresponding symbol table entry + * @param[in] rel_addr Address where relocation should be performed + * @param[in] link_addr target address for table-based relocations + * @returns 0 on success or a negative error code + */ +int arch_elf_relocate_global(struct llext_loader *loader, struct llext *ext, const elf_rela_t *rel, + const elf_sym_t *sym, uint8_t *rel_addr, const void *link_addr); + #ifdef __cplusplus } #endif