Real-Time Systems Development

17.10: Executable and Linking Format (ELF)

17.10 Executable and Linking Format (ELF)

The object file format produced by the gcc compiler will conform to either 'COFF' (Common Object File Format) or more currently 'ELF' (Executable and Linking Format). Most recent compilers have switched to ELF as default because of its increased flexibility. ELF was originally developed by Unix System Laboratories and has become the standard compiler output because it supports more facilities than the previous a.out and COFF formats, notably in the area of dynamic, shared libraries. So it now appears as the default binary format on Linux and Solaris because it offers dynamic loading, dynamic linking, run-time control, and improved support for shared libraries (DLLs). The ELF file format is platform independent and permits object files to be identified, parsed, and interpreted uniformly, making the object files 'portable' across platforms of similar architectures.

ELF defines three principal formats for executable, relocatable and shared object files. These hold the code, data, and information which the operating system and linker need to access in order to take appropriate action. An executable file has to contain machine code but also all the information needed for the operating system to create and run a task. A relocatable file describes how it can be linked with other object files to create an executable file, or a shared library. A shared object file contains information needed for both static and dynamic linking. An ELF object file will be divided into several sections: status header, code, data, symbol table, relocation...

UNLIMITED FREE
ACCESS
TO THE WORLD'S BEST IDEAS

SUBMIT
Already a GlobalSpec user? Log in.

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.

Customize Your GlobalSpec Experience

Category: Microprocessor and IC Programmers, Compilers, and Debuggers
Finish!
Privacy Policy

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.