Skip to content
Commit 35ef089c authored by Luca Burelli's avatar Luca Burelli Committed by Fabio Baltieri
Browse files

llext: move basic ELF checks to llext_load_elf_data()



This patch moves the initial checks performed on the ELF file, that were
split between llext_load() and do_llext_load(), to the newly defined
llext_load_elf_data() function.

This way:

- only one function deals with ELF internal data checks;
- do_llext_load() is reduced to a list of tasks;
- llext_load() only focuses on the extension management.

One totally misplaced line initializing the number of symbols has been
moved to llext_count_export_syms().

No functional change except that the `struct llext` allocation may be
performed unnecessarily if the ELF file is not valid.

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