Skip to main content
ELF (Executable and Linkable Format) is the standard binary format for executables, shared libraries, object files, and core dumps on Linux and other Unix-like operating systems. It is used across a wide range of CPU architectures including x86, x86-64, ARM, AArch64, RISC-V, MIPS, PowerPC, and SPARC. Binary Internals includes an 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.
The ELF parser is still in active development. Currently, only the 16-byte identification block (e_ident) and the ELF64 header (Elf64_Ehdr) are parsed. Program headers, section headers, and the section content (.text, .data, symbol tables, etc.) are not yet exposed in the tree.

File Extensions

Registered by PluginDescriptorELF, which returns the following from getExtensions():
The full description string is: "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

The e_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.