This PR fixes the symbols resolver for position-independent executables which have ET_DYN or ET_EXEC flags in the ELF header. In that case, virtual addresses need to be translated into physical addresses using the offsets information from ELF headers. For reference, see the BCC implementation.
I think it's also worth adding tests in this case. Please let me know if you want me to include them within this PR.
This PR fixes the symbols resolver for position-independent executables which have
ET_DYN
orET_EXEC
flags in the ELF header. In that case, virtual addresses need to be translated into physical addresses using the offsets information from ELF headers. For reference, see the BCC implementation.I think it's also worth adding tests in this case. Please let me know if you want me to include them within this PR.