ElfFile parser that reads the 16-byte identification block and the 64-bit ELF header, exposing each field in an annotated, interactive tree. The parser currently assumes a 64-bit x86-based architecture (Elf64_Ehdr), which is the most common case for modern Linux systems.
File Extensions
Registered byPluginDescriptorELF, which returns the following from getExtensions():
"Executable and Linkable Format (*.axf, *.bin, *.elf, *.o, *.prx, *.puff, *.so)".
What Is an ELF File?
ELF is defined by the System V ABI and extended by individual processor supplements. It serves four main file types:ELF Identification Block (e_ident, 16 bytes)
The first 16 bytes of every ELF file form the identification block, parsed by the Identification class. The magic number 0x7F454C46 (i.e., 0x7F followed by the ASCII characters E, L, F) must appear at offset 0.
EI_CLASS values
EI_DATA values (endianness)
EI_OSABI values
ELF64 Header (Elf64_Ehdr)
After the 16-byte identification block, the Elf64_Ehdr structure occupies the next 48 bytes. The parser reads each field in the endianness indicated by EI_DATA.
e_machine — Target Instruction Set Architecture
Thee_machine field identifies the target CPU. Binary Internals recognizes the following values via the ELF_Machine enum:
Parse Flow
For the full ELF specification, see the Executable and Linkable Format article on Wikipedia and the Linux kernel header
include/uapi/linux/elf.h.