You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your enhancement proposal related to a problem? Please describe.
Currently llext assumes a non-addressable source of an ELF, e.g. i2c flash, which may be copied from given a specific location. This causes a lot of unnecessary allocations for addressable ELF data.
Describe the solution you'd like
While sections themselves have different requirements and perhaps could be seen in #63535 for
getting elf metadata perhaps some function pointers would suffice.
structllext_loader {
int (*get_ehdr)(structllext_loader*ldr, elf_ehdr_t**ehdr);
int (*get_shdr)(structllext_loader*ldr, size_tidx, elf_shdr_t**shdr);
}
This way each loader can decide how to best get a reference to some particular metadata rather than
forcing a file I/O like API on top of a buffer, we can assign the pointer value to where it is in the buffer. For non-addressable elf loaders custom logic can copy and cache and return a pointer as is done now.
Describe alternatives you've considered
A peek function like #62433 also works, but I think having metadata accessors is nicer for the elf portion and hopefully creates single functions for things like looking up a section or symbol name. I could be wrong though and need to experiment a bit.
The text was updated successfully, but these errors were encountered:
Is your enhancement proposal related to a problem? Please describe.
Currently llext assumes a non-addressable source of an ELF, e.g. i2c flash, which may be copied from given a specific location. This causes a lot of unnecessary allocations for addressable ELF data.
Describe the solution you'd like
While sections themselves have different requirements and perhaps could be seen in #63535 for
getting elf metadata perhaps some function pointers would suffice.
This way each loader can decide how to best get a reference to some particular metadata rather than
forcing a file I/O like API on top of a buffer, we can assign the pointer value to where it is in the buffer. For non-addressable elf loaders custom logic can copy and cache and return a pointer as is done now.
Describe alternatives you've considered
A peek function like #62433 also works, but I think having metadata accessors is nicer for the elf portion and hopefully creates single functions for things like looking up a section or symbol name. I could be wrong though and need to experiment a bit.
The text was updated successfully, but these errors were encountered: