llext: use elf_rela_t instead of elf_rel_t

elf_rela_t contains elf_rel_t exactly and contains an additional
field at the end. Therefore pointers of that type can be used for
both types, making the code generic.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
This commit is contained in:
Guennadi Liakhovetski 2023-09-22 15:40:26 +02:00 committed by Carles Cufí
commit a9a82d557c
4 changed files with 18 additions and 4 deletions

View file

@ -403,7 +403,7 @@ out:
return ret;
}
__weak void arch_elf_relocate(elf_rel_t *rel, uintptr_t opaddr, uintptr_t opval)
__weak void arch_elf_relocate(elf_rela_t *rel, uintptr_t opaddr, uintptr_t opval)
{
}
@ -412,7 +412,7 @@ static int llext_link(struct llext_loader *ldr, struct llext *ext)
int ret = 0;
uintptr_t loc = 0;
elf_shdr_t shdr;
elf_rel_t rel;
elf_rela_t rel;
elf_sym_t sym;
size_t pos = ldr->hdr.e_shoff;
elf_word rel_cnt = 0;