llext: xtensa: (cosmetic) simplify a calculation
To obtain a section header reference we don't need to calculate its location in the ELF image, we already have a pointer to all section headers, just use them. Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
This commit is contained in:
parent
024f43b1f0
commit
92287c4e8e
1 changed files with 1 additions and 2 deletions
|
|
@ -123,8 +123,7 @@ void arch_elf_relocate_local(struct llext_loader *ldr, struct llext *ext, const
|
|||
uintptr_t sh_addr;
|
||||
|
||||
if (ELF_ST_TYPE(sym->st_info) == STT_SECTION) {
|
||||
elf_shdr_t *shdr = llext_peek(ldr, ldr->hdr.e_shoff +
|
||||
sym->st_shndx * ldr->hdr.e_shentsize);
|
||||
elf_shdr_t *shdr = ext->sect_hdrs + sym->st_shndx;
|
||||
|
||||
/* shdr->sh_addr is NULL when not built for a specific address */
|
||||
sh_addr = shdr->sh_addr &&
|
||||
|
|
|
|||
Loading…
Reference in a new issue