Expand description
Minimal ELF probing shared by the packer and the runtime.
Only what both sides need to locate a program header, kept in one place so a hardened parse cannot drift back into an unchecked duplicate.
Functions§
- pt_
interp_ slot - Locate the PT_INTERP program header in
data(which must contain the ELF header and program-header table) and return the interpreter string’s(file offset, size-in-file). Little-endian 32- and 64-bit ELF; every read is bounds-checked againstdata. The interp bytes themselves may lie beyonddata(the caller reads them, possibly re-reading the file).