Executable and Linkable Format
Encyclopedia
In computing
Computing
Computing is usually defined as the activity of using and improving computer hardware and software. It is the computer-specific part of information technology...

, the Executable and Linkable Format (ELF, formerly called Extensible Linking Format) is a common standard file format
File format
A file format is a particular way that information is encoded for storage in a computer file.Since a disk drive, or indeed any computer storage, can store only bits, the computer must have some way of converting information to 0s and 1s and vice-versa. There are different kinds of formats for...

 for executable
Executable
In computing, an executable file causes a computer "to perform indicated tasks according to encoded instructions," as opposed to a data file that must be parsed by a program to be meaningful. These instructions are traditionally machine code instructions for a physical CPU...

s, object code
Object code
Object code, or sometimes object module, is what a computer compiler produces. In a general sense object code is a sequence of statements in a computer language, usually a machine code language....

, shared libraries, and core dump
Core dump
In computing, a core dump consists of the recorded state of the working memory of a computer program at a specific time, generally when the program has terminated abnormally...

s. First published in the System V Application Binary Interface
Application binary interface
In computer software, an application binary interface describes the low-level interface between an application program and the operating system or another application.- Description :...

 specification, and later in the Tool Interface Standard, it was quickly accepted among different vendors of Unix
Unix
Unix is a multitasking, multi-user computer operating system originally developed in 1969 by a group of AT&T employees at Bell Labs, including Ken Thompson, Dennis Ritchie, Brian Kernighan, Douglas McIlroy, and Joe Ossanna...

 systems. In 1999 it was chosen as the standard binary file format for Unix and Unix-like
Unix-like
A Unix-like 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 Single UNIX Specification....

 systems on x86 by the 86open project.

Unlike many 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 system
Operating system
An operating system is a set of programs that manage computer hardware resources and provide common services for application software. The operating system is the most important type of system software in a computer system...

s on many different platforms.

The ELF file format is also used as a generic object and executable format for binary images used with embedded processors like AVR
Atmel AVR
The AVR is a modified Harvard architecture 8-bit RISC single chip microcontroller which was developed by Atmel in 1996. The AVR was one of the first microcontroller families to use on-chip flash memory for program storage, as opposed to one-time programmable ROM, EPROM, or EEPROM used by other...

's.

ELF file layout

Each ELF file is made up of one ELF header, followed by file data. The file data can include:
  • Program header table, describing zero or more 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 necessary for runtime execution of the file, while sections contain important data for linking and relocation. Any byte in the entire file can be owned by at most one section, and there can be orphan bytes which are not owned by any section.

Tools

  • readelf is a Unix binary utility that displays information about one or more ELF files. An open-source implementation is provided by GNU Binutils.
  • elfdump is a command for viewing ELF information in an ELF file, available under Solaris and FreeBSD
    FreeBSD
    FreeBSD is a free Unix-like operating system descended from AT&T UNIX via BSD UNIX. Although for legal reasons FreeBSD cannot be called “UNIX”, as the direct descendant of BSD UNIX , FreeBSD’s internals and system APIs are UNIX-compliant...

    .
  • objdump
    Objdump
    objdump is a program for displaying various information about object files. For instance, it can be used as a disassembler to view executable in assembly form...

    provides a wide range of information about ELF files and other object formats. objdump uses the Binary File Descriptor library as a back-end to structure the ELF data.
  • The Unix file utility can display some information about ELF files, including the instruction set architecture for which the code in a relocatable, executable, or shared object file is intended, or on which an ELF core dump
    Core dump
    In computing, a core dump consists of the recorded state of the working memory of a computer program at a specific time, generally when the program has terminated abnormally...

     was produced.

Applications

The ELF format has replaced older executable formats in various environments.
It has replaced a.out and COFF
COFF
The Common Object File Format is a specification of a format for executable, object code, and shared library computer files used on Unix systems...

 formats in Unix-like
Unix-like
A Unix-like 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 Single UNIX Specification....

 operating systems:
  • Linux
    Linux
    Linux is a Unix-like computer operating system assembled under the model of free and open source software development and distribution. The defining component of any Linux system is the Linux kernel, an operating system kernel first released October 5, 1991 by Linus Torvalds...

  • Solaris
  • IRIX
    IRIX
    IRIX is a computer operating system developed by Silicon Graphics, Inc. to run natively on their 32- and 64-bit MIPS architecture workstations and servers. It was based on UNIX System V with BSD extensions. IRIX was the first operating system to include the XFS file system.The last major version...

  • FreeBSD
    FreeBSD
    FreeBSD is a free Unix-like operating system descended from AT&T UNIX via BSD UNIX. Although for legal reasons FreeBSD cannot be called “UNIX”, as the direct descendant of BSD UNIX , FreeBSD’s internals and system APIs are UNIX-compliant...

  • NetBSD
    NetBSD
    NetBSD is a freely available open source version of the Berkeley Software Distribution Unix operating system. It was the second open source BSD descendant to be formally released, after 386BSD, and continues to be actively developed. The NetBSD project is primarily focused on high quality design,...

  • OpenBSD
    OpenBSD
    OpenBSD is a Unix-like computer operating system descended from Berkeley Software Distribution , a Unix derivative developed at the University of California, Berkeley. It was forked from NetBSD by project leader Theo de Raadt in late 1995...

  • DragonFly BSD
    DragonFly BSD
    DragonFly BSD is a free Unix-like operating system created as a fork of FreeBSD 4.8. Matthew Dillon, an Amiga developer in the late 1980s and early 1990s and a FreeBSD developer between 1994 and 2003, began work on DragonFly BSD in June 2003 and announced it on the FreeBSD mailing lists on July...

  • Syllable
  • HP-UX
    HP-UX
    HP-UX is Hewlett-Packard's proprietary implementation of the Unix operating system, based on UNIX System V and first released in 1984...

     (except for 32-bit PA-RISC programs which continue to use SOM
    System Object Model (file format)
    In computing, the System Object Model is a proprietary executable file format developed by Hewlett-Packard for its HP-UX and MPE/ix operating systems....

    )
  • BeOS
    BeOS
    BeOS is an operating system for personal computers which began development by Be Inc. in 1991. It was first written to run on BeBox hardware. BeOS was optimized for digital media work and was written to take advantage of modern hardware facilities such as symmetric multiprocessing by utilizing...

     Revision 4 and later for x86 based computers (where it replaced the Portable Executable
    Portable Executable
    The Portable Executable format is a file format for executables, object code and DLLs, used in 32-bit and 64-bit versions of Windows operating systems. The term "portable" refers to the format's versatility in numerous environments of operating system software architecture...

     format; the PowerPC
    PowerPC
    PowerPC is a RISC architecture created by the 1991 Apple–IBM–Motorola alliance, known as AIM...

     version stayed with Preferred Executable Format
    Preferred Executable Format
    The Preferred Executable Format is a file format that specifies the format of executable files and other object code. PEF executables are also called Code Fragment Manager files ....

    )
  • Haiku
    Haiku (operating system)
    Haiku is a free and open source operating system compatible with BeOS. Its development began in 2001, and the operating system became self-hosting in 2008, with the first alpha release in September 2009, the second in May 2010 and the third in June 2011....



ELF has also seen some adoption in non-Unix operating systems, such as:
  • OpenVMS
    OpenVMS
    OpenVMS , previously known as VAX-11/VMS, VAX/VMS or VMS, is a computer server operating system that runs on VAX, Alpha and Itanium-based families of computers. Contrary to what its name suggests, OpenVMS is not open source software; however, the source listings are available for purchase...

    , in its Itanium version


Some game consoles also use ELF:
  • PlayStation Portable
    PlayStation Portable
    The is a handheld game console manufactured and marketed by Sony Corporation Development of the console was announced during E3 2003, and it was unveiled on , 2004, at a Sony press conference before E3 2004...

    , PlayStation 2
    PlayStation 2
    The PlayStation 2 is a sixth-generation video game console manufactured by Sony as part of the PlayStation series. Its development was announced in March 1999 and it was first released on March 4, 2000, in Japan...

    , PlayStation 3
    PlayStation 3
    The is the third home video game console produced by Sony Computer Entertainment and the successor to the PlayStation 2 as part of the PlayStation series. The PlayStation 3 competes with Microsoft's Xbox 360 and Nintendo's Wii as part of the seventh generation of video game consoles...

  • Wii
    Wii
    The Wii is a home video game console released by Nintendo on November 19, 2006. As a seventh-generation console, the Wii primarily competes with Microsoft's Xbox 360 and Sony's PlayStation 3. Nintendo states that its console targets a broader demographic than that of the two others...

  • GP2X
    GP2X
    The GP2X is an open-source, Linux-based handheld video game console and portable media player developed by South Korean company GamePark Holdings. It was released on November 10, 2005, in South Korea only....

    .
  • Dreamcast


Other operating systems running on PowerPC
PowerPC
PowerPC is a RISC architecture created by the 1991 Apple–IBM–Motorola alliance, known as AIM...

 using ELF:
  • AmigaOS 4
    AmigaOS 4
    AmigaOS 4, , is a line of Amiga operating systems which runs on PowerPC microprocessors. It is mainly based on AmigaOS 3.1 source code, and partially on version 3.9 developed by Haage & Partner...

    , the ELF executable has replaced the previous EHF (Extended Hunk Format) which was used on Amigas equipped with PPC processor expansion cards.
  • MorphOS
    MorphOS
    MorphOS is an Amiga-compatible computer operating system. It is a mixed proprietary and open source OS produced for the Pegasos PowerPC processor based computer, PowerUP accelerator equipped Amiga computers, and a series of Freescale development boards that use the Genesi firmware, including the...



Some operating systems for mobile phones and mobile devices use ELF:
  • Symbian OS v9 uses E32Image format that is based on the ELF file format;
  • Sony Ericsson
    Sony Ericsson
    Sony Ericsson Mobile Communications AB is a joint venture established on October 1, 2001 by the Japanese consumer electronics company Sony Corporation and the Swedish telecommunications company Ericsson to manufacture mobile phones....

    , for example, the W800i
    Sony Ericsson W800
    The W800 Walkman, released in 2005 , was the first Sony Ericsson phone to use the Walkman brand. The phone features Bluetooth v1.2 , Infrared and USB connectivity....

    , W610
    Sony Ericsson W610i
    The Sony Ericsson W610i phone is based on the Sony Ericsson K550 and Sony Ericsson K610i. It is a quad-band GSM phone, but it does not offer 3G . The W610i has colour options similar to the Sony Ericsson W880i...

    , W300, etc.
  • Siemens
    Siemens
    Siemens may refer toSiemens, a German family name carried by generations of telecommunications industrialists, including:* Werner von Siemens , inventor, founder of Siemens AG...

    , the SGOLD and SGOLD2 platforms: from Siemens C65
    Siemens C65
    The Siemens C65 is a mobile phone announced by Siemens in March 2004. It weighs 86 g and its dimensions are 100 x 45 x 16 mm . Its display is a 130x130 pixels, 65K colors CSTN LCD....

     to S75 and BenQ-Siemens E71/EL71
    BenQ-Siemens EL71
    The BenQ-Siemens EL71 is a slider-type GSM triband mobile phone. Its name came about because of BenQ's acquisition of Siemens' mobile communication division at the end of 2005; the Benq-Siemens brand is meant to be transitory, before all phones are produced under the BenQ brand.The phone supports...

    );
  • Motorola
    Motorola
    Motorola, Inc. was an American multinational telecommunications company based in Schaumburg, Illinois, which was eventually divided into two independent public companies, Motorola Mobility and Motorola Solutions on January 4, 2011, after losing $4.3 billion from 2007 to 2009...

    , for example, the E398, SLVR L7, v360, v3i (and all phone LTE2 which has the patch applied)
  • Bada (operating system)
    Bada (operating system)
    Bada is an operating system for mobile devices such as smartphones and tablet computers. It is developed by the Samsung Electronics. Its name is derived from " ", meaning "ocean" or "sea" in Korean...

    , for example, the Samsung Wave S8500
    Samsung Wave S8500
    The Samsung Wave GT-S8500 is the first touchscreen smartphone running the new bada operating system designed by Samsung, which was commercially released on June 1, 2010...

    .

Some phones can run ELF files through the use of a patch
Patch (computing)
A patch is a piece of software designed to fix problems with, or update a computer program or its supporting data. This includes fixing security vulnerabilities and other bugs, and improving the usability or performance...

 that adds assembly code
Assembly language
An assembly language is a low-level programming language for computers, microprocessors, microcontrollers, and other programmable devices. It implements a symbolic representation of the machine codes and other constants needed to program a given CPU architecture...

 to the main firmware
Firmware
In electronic systems and computing, firmware is a term often used to denote the fixed, usually rather small, programs and/or data structures that internally control various electronic devices...

 (known as the ELFPack, in the underground modding
Modding
Modding is a slang expression that is derived from the verb "modify". Modding refers to the act of modifying a piece of hardware or software or anything else for that matter, to perform a function not originally conceived or intended by the designer...

 culture).

Also, Dolphin Emulator can open ELF files.

Specifications


86open

86open was a project to form consensus on a common binary file
Binary file
A binary file is a computer file which may contain any type of data, encoded in binary form for computer storage and processing purposes; for example, computer document files containing formatted text...

 format for Unix
Unix
Unix is a multitasking, multi-user computer operating system originally developed in 1969 by a group of AT&T employees at Bell Labs, including Ken Thompson, Dennis Ritchie, Brian Kernighan, Douglas McIlroy, and Joe Ossanna...

 and Unix-like
Unix-like
A Unix-like 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 Single UNIX Specification....

 operating system
Operating system
An operating system is a set of programs that manage computer hardware resources and provide common services for application software. The operating system is the most important type of system software in a computer system...

s on the common PC compatible x86 architecture, so as to encourage software developers to port to the architecture. The initial idea was to standardize on a small subset of Spec 1170, a predecessor of the Single UNIX Specification
Single UNIX Specification
The Single UNIX Specification is the collective name of a family of standards for computer operating systems to qualify for the name "Unix"...

, and the GNU C Library (glibc) to enable unmodified binaries to run on the x86 UNIX-like operating systems. The project was originally referred to as "Spec 150".

The format eventually chosen was ELF, specifically the Linux implementation of ELF, after it had turned out to be a de facto standard
De facto standard
A de facto standard is a custom, convention, product, or system that has achieved a dominant position by public acceptance or market forces...

 supported by all involved vendors and operating systems.

The group started email discussions in 1997 and first met in person at the Santa Cruz Operation offices on 1997-08-22.

The steering committee was Marc Ewing
Marc Ewing
Marc Ewing is the creator and originator of the Red Hat brand of software, most notably the Red Hat range of Linux operating system distributions. He was involved in the 86open project in the mid-90s....

, Dion Johnson, Evan Leibovitch, Bruce Perens
Bruce Perens
Bruce Perens is a computer programmer and advocate in the open source community. He created the Open Source Definition and published the first formal announcement and manifesto of open source. He co-founded the Open Source Initiative with Eric S...

, Andrew Roach, Bryan Sparks and Linus Torvalds
Linus Torvalds
Linus Benedict Torvalds is a Finnish software engineer and hacker, best known for having initiated the development of the open source Linux kernel. He later became the chief architect of the Linux kernel, and now acts as the project's coordinator...

. Other people on the project were Tim Bird, Keith Bostic
Keith Bostic
Keith Bostic is a computer programmer from the United States.In 1986, Bostic joined the Computer Systems Research Group at the University of California, Berkeley. He was one of the principal architects of the Berkeley 4.4BSD and 4.4BSD-Lite releases...

, Chuck Cranor, Michael Davidson, Chris G. Demetriou, Ulrich Drepper, Don Dugger, Steve Ginzburg, Jon "maddog" Hall, Ron Holt, Jordan Hubbard
Jordan Hubbard
Jordan K. Hubbard is a long-time open source developer, authoring software like the Ardent Window Manager and various other open source tools and libraries before finally co-founding the FreeBSD project. He started the FreeBSD project in 1993 with Nate Williams and Rodney W. Grimes, also creating...

, Dave Jensen, Kean Johnston, Andrew Josey, Robert Lipe, Bela Lubkin, Tim Marsland, Greg Page, Ronald Joe Record, Tim Ruckle, Joel Silverstein, Chia-pi Tien and Erik Troan. Operating systems and companies represented were BeOS
BeOS
BeOS is an operating system for personal computers which began development by Be Inc. in 1991. It was first written to run on BeBox hardware. BeOS was optimized for digital media work and was written to take advantage of modern hardware facilities such as symmetric multiprocessing by utilizing...

, BSDI, FreeBSD
FreeBSD
FreeBSD is a free Unix-like operating system descended from AT&T UNIX via BSD UNIX. Although for legal reasons FreeBSD cannot be called “UNIX”, as the direct descendant of BSD UNIX , FreeBSD’s internals and system APIs are UNIX-compliant...

, Intel, Linux
Linux
Linux is a Unix-like computer operating system assembled under the model of free and open source software development and distribution. The defining component of any Linux system is the Linux kernel, an operating system kernel first released October 5, 1991 by Linus Torvalds...

, NetBSD
NetBSD
NetBSD is a freely available open source version of the Berkeley Software Distribution Unix operating system. It was the second open source BSD descendant to be formally released, after 386BSD, and continues to be actively developed. The NetBSD project is primarily focused on high quality design,...

, SCO and SunSoft, Inc..

The project progressed and in mid-1998, SCO began developing lxrun
Lxrun
In Unix computing, lxrun is a compatibility layer to allow Linux binaries to run on UnixWare, SCO OpenServer and Solaris without recompilation. It was created by Mike Davidson. It has been an open source software project since 1997, and is available under the Mozilla Public License...

, an open-source compatibility layer
Compatibility layer
A compatibility layer is a term that refers to components that allow for non-native support of components.In software engineering, a compatibility layer allows binaries for a legacy or foreign system to run on a host system. This translates system calls for the foreign system into native system...

 capable of running Linux binaries on OpenServer, UnixWare
UnixWare
UnixWare is a Unix operating system maintained by The SCO Group . UnixWare is typically deployed as a server rather than desktop. Binary distributions of UnixWare are available for x86 architecture computers. It was originally released by Univel, a jointly owned venture of AT&T's Unix System...

, and Solaris. SCO announced official support of lxrun at LinuxWorld
LinuxWorld
LinuxWorld has various meanings:* LinuxWorld Conference and Expo - a series of Linux conferences worldwide that became OpenSource World in 2009.* LinuxWorld Magazine - a print publication produced from 2003 to 2006...

 in March 1999. Sun Microsystems
Sun Microsystems
Sun Microsystems, Inc. was a company that sold :computers, computer components, :computer software, and :information technology services. Sun was founded on February 24, 1982...

 began officially supporting lxrun
Lxrun
In Unix computing, lxrun is a compatibility layer to allow Linux binaries to run on UnixWare, SCO OpenServer and Solaris without recompilation. It was created by Mike Davidson. It has been an open source software project since 1997, and is available under the Mozilla Public License...

 for Solaris in early 1999, and has since moved to integrated support of the Linux binary format via Solaris Containers for Linux Applications.

With the BSDs having long supported Linux binaries (through a compatibility layer
Compatibility layer
A compatibility layer is a term that refers to components that allow for non-native support of components.In software engineering, a compatibility layer allows binaries for a legacy or foreign system to run on a host system. This translates system calls for the foreign system into native system...

) and the main x86 Unix vendors having added support for the format, the project decided that Linux ELF was the format chosen by the industry and "declare[d] itself dissolved" on July 25, 1999.

FatELF: Universal Binaries for Linux

FatELF is an ELF binary-format extension which adds Fat binary
Fat binary
A fat binary is a computer program with code native to multiple Instruction sets which can consequently be run on multiple processor types. The usual method of implementation is to include a version of the machine code for each instruction set, preceded by code compatible with all operating...

 capabilities. It is aimed for Linux
Linux
Linux is a Unix-like computer operating system assembled under the model of free and open source software development and distribution. The defining component of any Linux system is the Linux kernel, an operating system kernel first released October 5, 1991 by Linus Torvalds...

 and other Unix-like
Unix-like
A Unix-like 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 Single UNIX Specification....

 operations systems. Additionally to the CPU architecture abstraction (byte order, word size, CPU instruction set
Instruction set
An instruction set, or instruction set architecture , is the part of the computer architecture related to programming, including the native data types, instructions, registers, addressing modes, memory architecture, interrupt and exception handling, and external I/O...

 etc.), there is the potential advantage of software-platform abstraction e.g. binaries which support multiple kernel ABIs
Application binary interface
In computer software, an application binary interface describes the low-level interface between an application program and the operating system or another application.- Description :...

 versions.
A proof-of-concept Ubuntu 9.04
Ubuntu (operating system)
Ubuntu is a computer operating system based on the Debian Linux distribution and distributed as free and open source software. It is named after the Southern African philosophy of Ubuntu...

 image (VM image of Ubuntu 9.04 with Fat Binary support) and development tools are available. As of 2011, support for FatELF is not integrated in the kernel mainline.

See also

  • Comparison of executable file formats
    Comparison of executable file formats
    This is a comparison of executable file formats.Among the above formats, the ones in most common use are PE , ELF and Mach-O .- References :...

  • Portable Executable
    Portable Executable
    The Portable Executable format is a file format for executables, object code and DLLs, used in 32-bit and 64-bit versions of Windows operating systems. The term "portable" refers to the format's versatility in numerous environments of operating system software architecture...

  • DWARF
    DWARF
    DWARF is a widely used, standardized debugging data format. DWARF was originally designed along with Executable and Linkable Format , although it is independent of object file formats...

     - Debug With Attributed Record Format
  • Application binary interface
    Application binary interface
    In computer software, an application binary interface describes the low-level interface between an application program and the operating system or another application.- Description :...

  • VDSO
    VDSO
    VDSOs are a way to export kernel space routines to user space applications, using standard mechanisms for linking and loading VDSOs (Virtual Dynamically-linked Shared Objects) are a way to export kernel space routines to user space applications, using standard mechanisms for linking and loading...

     - Virtual DSO

Further reading


External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK