HOME

TheInfoList




In
computing Computing is any goal-oriented activity requiring, benefiting from, or creating computing machinery. It includes the study and experimentation of algorithmic processes and development of both computer hardware , hardware and software. It has sci ...

computing
, the Executable and Linkable FormatTool Interface Standard (TIS)
Portable Formats Specification
Version 1.1'' (October 1993)
(ELF, formerly named Extensible Linking Format), is a common standard
file format A file format is a standard Standard may refer to: Flags * Colours, standards and guidons * Standard (flag), a type of flag used for personal identification Norm, convention or requirement * Standard (metrology), an object that bears ...
for
executable In computing Computing is any goal-oriented activity requiring, benefiting from, or creating computing machinery. It includes the study and experimentation of algorithmic processes and development of both computer hardware , hardware and ...
files,
object code In computing Computing is any goal-oriented activity requiring, benefiting from, or creating computing machinery. It includes the study and experimentation of algorithmic processes and development of both computer hardware , hardware and sof ...
,
shared libraries In computer science Computer science deals with the theoretical foundations of information, algorithms and the architectures of its computation as well as practical techniques for their application. Computer science is the study of ...
, and
core dump In computing Computing is any goal-oriented activity requiring, benefiting from, or creating computing machinery. It includes the study and experimentation of algorithmic processes and development of both computer hardware , hardware and softwa ...
s. First published in the specification for the
application binary interface In computer software Software is a collection of instructions Instruction or instructions may refer to: Computing * Instruction, one operation of a processor within a computer architecture instruction set * Computer program, a collection ...
(ABI) of the
Unix Unix (; trademarked as UNIX) is a family of multitasking, multiuser Multi-user software is computer software Software is a collection of Instruction (computer science), instructions that tell a computer how to work. This is in contrast t ...

Unix
operating system version named
System V Release 4 Unix System V (pronounced: "System Five") is one of the first commercial versions of the Unix Unix (; trademarked as UNIX) is a family of multitasking, multiuser Multi-user software is computer software Software is a collection of I ...
(SVR4), and later in the Tool Interface Standard,Tool Interface Standard (TIS)
Executable and Linking Format (ELF) Specification
Version 1.2'' (May 1995)
it was quickly accepted among different vendors of
Unix Unix (; trademarked as UNIX) is a family of multitasking, multiuser Multi-user software is computer software Software is a collection of Instruction (computer science), instructions that tell a computer how to work. This is in contrast t ...

Unix
systems. In 1999, it was chosen as the standard binary file format for Unix and
Unix-like A Unix-like (sometimes referred to as UN*X or *nix) operating system An operating system (OS) is system software System software is software designed to provide a platform for other software. Examples of system software include operating s ...
systems on
x86 x86 is a family of instruction set architecture In computer science Computer science deals with the theoretical foundations of information, algorithms and the architectures of its computation as well as practical techniques for th ...

x86
processors by the
86open In computing Computing is any goal-oriented activity requiring, benefiting from, or creating computing machinery. It includes the study and experimentation of algorithmic processes and development of both computer hardware , hardware and so ...
project. By design, the ELF format is flexible, extensible, and
cross-platform In computing Computing is any goal-oriented activity requiring, benefiting from, or creating computing machinery. It includes the study and experimentation of algorithmic processes and development of both computer hardware , hardware and soft ...

cross-platform
. For instance it supports different
endiannesses In computing, endianness is the order or sequence of bytes of a word (data type), word of digital data in computer memory. Endianness is primarily expressed as big-endian (BE) or little-endian (LE). A big-endian system stores the most significant ...
and address sizes so it does not exclude any particular
central processing unit A central processing unit (CPU), also called a central processor, main processor or just processor, is the electronic circuit 200px, A circuit built on a printed circuit board (PCB). An electronic circuit is composed of individual electroni ...

central processing unit
(CPU) or
instruction set architecture In computer science Computer science deals with the theoretical foundations of information, algorithms and the architectures of its computation as well as practical techniques for their application. Computer science is the study of , ...
. This has allowed it to be adopted by many different
operating system An operating system (OS) is system software System software is software designed to provide a platform for other software. Examples of system software include operating systems (OS) like macOS, Linux, Android (operating system), Android and Mi ...

operating system
s on many different hardware platforms.


File layout

Each ELF file is made up of one ELF header, followed by file data. The data can include: * Program header table, describing zero or more memory segments * Section header table, describing zero or more sections * Data referred to by entries in the program header table or section header table The segments contain information that is needed for run time execution of the file, while sections contain important data for linking and relocation. Any
byte The byte is a unit of digital information that most commonly consists of eight bit The bit is a basic unit of information in computing Computing is any goal-oriented activity requiring, benefiting from, or creating computing machinery. It ...
in the entire file can be owned by one section at most, and orphan bytes can occur which are unowned by any section.


File header

The ELF header defines whether to use 32- or
64-bit In computer architecture, 64-bit Integer (computer science), integers, Memory address, memory addresses, or other Data#Uses%20of%20data%20in%20computing, data units are those that are 64 bits (8 Octet (computing), octets) wide. Also, 64-bit cent ...
addresses. The header contains three fields that are affected by this setting and offset other fields that follow them. The ELF header is 52 or 64 bytes long for 32-bit and 64-bit binaries respectively.


Program header

The program header table tells the system how to create a process image. It is found at file offset , and consists of entries, each with size . The layout is slightly different in
32-bit 32-bit microcomputer A microcomputer is a small, relatively inexpensive computer with a microprocessor as its central processing unit (CPU). It includes a microprocessor, Computer memory, memory and minimal input/output (I/O) circuitry mount ...
ELF vs
64-bit In computer architecture, 64-bit Integer (computer science), integers, Memory address, memory addresses, or other Data#Uses%20of%20data%20in%20computing, data units are those that are 64 bits (8 Octet (computing), octets) wide. Also, 64-bit cent ...
ELF, because the are in a different structure location for alignment reasons. Each entry is structured as:


Section header


Tools

*
readelf readelf is a program for displaying various information about object file An object file is a computer file containing object code, that is, machine code output of an assembler or compiler In computing, a compiler is a computer program that ...
is a Unix binary utility that displays information about one or more ELF files. A
free software Free software (or libre software) is computer software distributed under terms that allow users to run the software for any purpose as well as to study, change, and distribute it and any adapted versions. Free software is a matter of liberty ...

free software
implementation is provided by
GNU Binutils The GNU Binary Utilities, or , are a set of programming tool A programming tool or software development tool is a computer program A computer program is a collection of instructions that can be executed by a computer to perform a specific t ...
. * elfutils provides alternative tools to
GNU Binutils The GNU Binary Utilities, or , are a set of programming tool A programming tool or software development tool is a computer program A computer program is a collection of instructions that can be executed by a computer to perform a specific t ...
purely for Linux. * elfdump is a command for viewing ELF information in an ELF file, available under Solaris and
FreeBSD FreeBSD is a free and open-source Free and open-source software (FOSS) is software that is both free software and open-source software where anyone is free software license, freely licensed to use, copy, study, and change the software in any ...

FreeBSD
. *
objdump objdump is a command-line program for displaying various information about object files on Unix-like A Unix-like (sometimes referred to as UN*X or *nix) operating system is one that behaves in a manner similar to a Unix system, while not neces ...
provides a wide range of information about ELF files and other object formats. objdump uses the
Binary File Descriptor library The Binary File Descriptor library (BFD) is the GNU Project's main mechanism for the software portability, portable manipulation of object files in a variety of object file format, formats. , it supports approximately 50 file formats for some 25 ...
as a back-end to structure the ELF data. * The Unix
file File or filing may refer to: Mechanical tools and processes * File (tool) A file is a tool used to remove fine amounts of material from a workpiece. It is common in woodworking, metalworking, and other similar trade and hobby tasks. Most are ...
utility can display some information about ELF files, including the
instruction set architecture In computer science Computer science deals with the theoretical foundations of information, algorithms and the architectures of its computation as well as practical techniques for their application. Computer science is the study of , ...
for which the code in a relocatable, executable, or shared object file is intended, or on which an ELF
core dump In computing Computing is any goal-oriented activity requiring, benefiting from, or creating computing machinery. It includes the study and experimentation of algorithmic processes and development of both computer hardware , hardware and softwa ...
was produced.


Applications


Unix-like systems

The ELF format has replaced older executable formats in various environments. It has replaced
a.out a.out is a file format A file format is a standard Standard may refer to: Flags * Colours, standards and guidons * Standard (flag), a type of flag used for personal identification Norm, convention or requirement * Standard (metro ...
and
COFF The Common Object File Format (COFF) is a format for executable In computing Computing is any goal-oriented activity requiring, benefiting from, or creating computing machinery. It includes the study and experimentation of algorithmi ...
formats in
Unix-like A Unix-like (sometimes referred to as UN*X or *nix) operating system An operating system (OS) is system software System software is software designed to provide a platform for other software. Examples of system software include operating s ...
operating systems: *
Linux Linux ( or ) is a family of open-source Open source is source code that is made freely available for possible modification and redistribution. Products include permission to use the source code, design documents, or content of the product ...

Linux
* Solaris /
Illumos Illumos (stylized as illumos) is a partly free and open-source Free and open-source software (FOSS) is software Software is a collection of instructions Instruction or instructions may refer to: Computing * Instruction, one operation ...
*
IRIX IRIX ( ) is a discontinued operating system An operating system (OS) is system software System software is software designed to provide a platform for other software. Examples of system software include operating systems like macOS ...
*
FreeBSD FreeBSD is a free and open-source Free and open-source software (FOSS) is software that is both free software and open-source software where anyone is free software license, freely licensed to use, copy, study, and change the software in any ...

FreeBSD
*
NetBSD NetBSD is a free and open-source Free and open-source software (FOSS) is software that is both free software and open-source software where anyone is free software license, freely licensed to use, copy, study, and change the software in any ...

NetBSD
*
OpenBSD OpenBSD is a security-focused operating system, security-focused, free and open-source, Unix-like operating system based on the Berkeley Software Distribution (BSD). Theo de Raadt created OpenBSD in 1995 by fork (software development), forking N ...
*
Redox Redox (reduction–oxidation, pronunciation: or ) is a type of chemical reaction A chemical reaction is a process that leads to the chemical transformation of one set of chemical substance A chemical substance is a form of matter ...
*
DragonFly BSD DragonFly BSD is a free and open-source Free and open-source software (FOSS) is software Software is a collection of instructions Instruction or instructions may refer to: Computing * Instruction, one operation of a processor within ...
*
Syllable A syllable is a unit of organization for a sequence of speech sounds. It is typically made up of a syllable nucleus (most often a vowel A vowel is a Syllable, syllabic speech sound pronounced without any stricture in the vocal tract. Vowels a ...
*
HP-UX HP-UX (from "Hewlett Packard Unix") is Hewlett Packard Enterprise's proprietary software, proprietary implementation of the Unix operating system, based on Unix System V (initially Unix System III, System III) and first released in 1984. Rec ...
(except for 32-bit PA-RISC programs which continue to use SOM) *
QNX QNX ( or ) is a commercial Unix-like A Unix-like (sometimes referred to as UN*X or *nix) operating system is one that behaves in a manner similar to a Unix system, while not necessarily conforming to or being certified to any version of the Sing ...
Neutrino *
MINIX #REDIRECT Minix#REDIRECT Minix Minix (from "mini-Unix Unix (; trademarked as UNIX) is a family of Computer multitasking, multitasking, multiuser computer operating systems that derive from the original AT&T Corporation, AT&T Unix, whose devel ...


Non-Unix adoption

ELF has also seen some adoption in non-Unix operating systems, such as: *
OpenVMS OpenVMS, often referred to as just VMS, is a multi-user Multi-user software is software, computer software that allows access by multiple User (computing), users of a computer. Time-sharing systems are multi-user systems. Most batch processing s ...
, in its
Itanium Itanium ( ) is a discontinued family of 64-bit In computer architecture, 64-bit Integer (computer science), integers, Memory address, memory addresses, or other Data#Uses%20of%20data%20in%20computing, data units are those that are 64 bits (8 ...

Itanium
and
amd64
amd64
versions *
BeOS BeOS is an operating system for personal computers first developed by Be Inc. in 1990. It was first written to run on BeBox hardware. BeOS was positioned as a multimedia platform that could be used by a substantial population of desktop users an ...
Revision 4 and later for
x86 x86 is a family of instruction set architecture In computer science Computer science deals with the theoretical foundations of information, algorithms and the architectures of its computation as well as practical techniques for th ...

x86
based computers (where it replaced the
Portable Executable The Portable Executable (PE) format is a file format A file format is a standard Standard may refer to: Flags * Colours, standards and guidons * Standard (flag), a type of flag used for personal identification Norm, convention or re ...
format; the
PowerPC PowerPC (with the backronym A backronym, or bacronym, is an acronym formed from a word that existed prior to the invention of the backronym. Unlike a typical acronym, in which a new word is constructed from a phrase, the phrase corresponding t ...

PowerPC
version stayed with
Preferred Executable Format The Preferred Executable Format is a file format ogg-file: 154 kilobytes. A file format is a standard way that information is encoded for storage in a computer file. It specifies how bits are used to encode information in a digital storage m ...
) *
Haiku is a type of short form poetry Poetry (derived from the Greek language, Greek ''poiesis'', "making") is a form of literature that uses aesthetics, aesthetic and often rhythmic qualities of language—such as phonaesthetics, sound symbol ...
, an open source reimplementation of BeOS *
RISC OS RISC OS is a computer operating system An operating system (OS) is system software that manages computer hardware, computer software, software resources, and provides common daemon (computing), services for computer programs. Time-sharing ...

RISC OS
*
Stratus VOS Stratus VOS (Virtual Operating System) is a proprietary operating system An operating system (OS) is system software System software is software designed to provide a platform for other software. Examples of system software include operating ...
, in PA-RISC and x86 versions *
Windows 10 Anniversary Update The Windows 10 Anniversary Update (also known as version 1607 and codenamed "Redstone 1") is the second major update to Windows 10 and the first in a series of updates under the Redstone codenames. It carries the build number 10.0.14393. PC versio ...
using the
Windows Subsystem for Linux Microsoft Windows, commonly referred to as Windows, is a group of several proprietary {{Short pages monitor">https://archive.today/20200114224817/https://linker.iecc.com/ 2020-01-14 -->
* *
An unsung hero: The hardworking ELF
' by Peter Seebach, December 20, 2005, archived from the original on February 24, 2007 * *
The ELF Object File Format: Introduction
',
The ELF Object File Format by Dissection
' by Eric Youngdale (1995-05-01) *

' by Brian Raiter

by Julien Vanegue (2003-08-13)

by the ELFsh team (2005-08-01) *

' by Pat Beirne (1999-08-03)


External links



(archived version)
FreeBSD manual page





Oracle Solaris Linker and Libraries Guide

The ERESI project : reverse engineering on ELF-based operating systems

Linux Today article on 86open
July 26, 1999

October 10, 1997,
Bruce Perens Bruce Perens (born around 1958) is an American computer programmer A computer programmer, sometimes called a software developer, a programmer or more recently a coder (especially in more informal contexts), is a person who creates computer ...

Declaration of Ulrich Drepper (PDF)
in
The SCO Group SCO, The SCO Group, and The TSG Group are the various names of an American software company in existence from 2002 to 2012 that became known for owning Unix operating system assets that had belonged to the Santa Cruz Operation (original SCO), i ...
vs
IBM International Business Machines Corporation (IBM) is an American multinational technology company headquartered in Armonk, New York, with operations in over 170 countries. The company began in 1911, founded in Endicott, New York, as the C ...

IBM
, September 19, 2006
86open and ELF discussion
on
Groklaw ''Groklaw'' was a website that covered legal news of interest to the free Free may refer to: Concept * Freedom, having the ability to act or change without constraint * Emancipate, to procure political rights, as for a disenfranchised group * ...
, August 13, 2006 {{Executables Executable file formats