Executable and Linkable Format
|
In computing, the Executable and Linkable Format (ELF) is a common standard in computing for executables and object code. First published in the Tool Interface Standard and the System V Application Binary Interface, it was quickly accepted among different vendors of UNIX systems.
Today the ELF format has replaced the proprietary (or sometimes just platform-specific) and less extensible executable formats (primarily COFF) in the Linux, Solaris, Irix, and almost all modern BSD operating systems, with the exception of Mac OS X.
Other object code file formats are a.out, COFF, and Mach-O; ELF could be considered a "competitor" to those, although it is generally considered to outperform them.
ELF file layout
Each ELF file is made up of one ELF header, followed by zero or more segments and zero or more sections. 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. The segments and sections of the file are listed in a program header table and section header table respectively.
On many UNIX systems the command
man elf
may provide some more details.
Tools
readelf
is a UNIX binary utility that displays information about one or more ELF files. A GPL implementation is provided by GNU Binutilselfdump
is a Solaris command for viewing ELF information in an elf file.
External links
- Tool Interface Standard (TIS) Executable and Linking Format (ELF) Specification Version 1.2 (http://x86.ddj.com/ftp/manuals/tools/elf.pdf)
- Description of the ELF binary format (http://www.cs.ucdavis.edu/~haungs/paper/node10.html)
- Article "LibElf and GElf - A Library to Manipulate ELF Files (http://developers.sun.com/solaris/articles/elf.html)" by Neelakanth Nadgir
- free ELF object file access library (http://www.stud.uni-hannover.de/~michael/software/english.html)
- manual page (http://www.dac.neu.edu/cgi-bin/man-cgi?libelf)
- Elf library routines (http://ou800doc.caldera.com/en/man/html.3elf/CONTENTS.html)
- ELFIO: a C++ library for reading and generating files in the ELF binary format. (http://elfio.sourceforge.net/)de:Executable and Linking Format