Executable and Linking Format (ELF)

In computing, the Executable and Linking Format (ELF), formerly called Extensible Linking Format, is a common standard file format for executables, object code, shared libraries, and core dumps. First published in the System V Application Binary Interface specification, [1] and later in the Tool Interface Standard, [2] it was quickly accepted among different vendors of Unix systems. In 1999 it was chosen as the standard binary file format for Unix and Unix-like systems on x86 by the 86open project.

Unlike many other proprietary executable file formats, ELF is very flexible and extensible, and it is not bound to any particular processor or architecture. This has allowed it to be adopted by many different operating systems on many different platforms.

The ELF format has replaced older executable formats such as a.out and COFF in many Unix-like operating systems ELF has also seen some adoption in non-Unix operating systems. is used as a generic object and executable format for binary images used with embedded processors that use the GNU toolchain, including the Altera NiosII and Microchip PIC32 processors.

ELF Structure

An ELF file has two views: The program header shows the segments used at run-time, whereas the section header lists the set of sections of the binary.

Each ELF file is made up of one ELF header, followed by file data. The file data can include:

The segments contain information that is necessary for runtime execution of the file, while sections contain important data for linking and relocation. Each byte in the entire file is taken by no more than one section at a time, but there can be orphan bytes, which are not covered by a section. In the normal case of a Unix executable one or more sections are enclosed in one segment.


Several of the GNU tools report explicit information about the contents of a (binary) elf file.


We have taken one program (mem3.c) and used readelf, one option at a time, to display information about mem3.elf. The information file is very long, there are 100 sections, for exaxmple, including some 64 VECTOR sections. There are over 1200 defined symbols, many of which are hardware registers in the PIC32 processor chip. We, therefore, present two links - one to the full documentation from readelf and an abridged discussion of various aspects of the readelf documentation:


  1. System V Application Binary Interface Edition 4.1 (1997-03-18)
  2. Tool Interface Standard (TIS) Executable and Linking Format (ELF) Specification Version 1.2 (May 1995)


ELF article in Wikipedia.

Maintained by John Loomis, last updated 27 August 2008