Skip to content
Commit ee6074a3 authored by Luca Burelli's avatar Luca Burelli Committed by Anas Nashif
Browse files

llext: calculate offsets for ELF sections in memory areas



The recent changes to the loader code merged related sections together,
making sure the merged sections are self-coherent. This, however, did
not take into account that the original ELF sections are now a _subset_
of the merged section - and might not start from the beginning of the
merged section.

This patch converts the `sect_map` member of `struct llext_loader` to a
structure with two fields:
- mem_idx: the memory area index where the ELF section is mapped
- offset: the offset of the ELF section inside the memory area

The offset is calculated after all sections are merged and the final
groups are defined. This will allow the loader to correctly calculate
the address of symbols and relocations in the merged sections.

Signed-off-by: default avatarLuca Burelli <l.burelli@arduino.cc>
parent e42549c6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment