Elf Quest » Linux Magazine


Linux and other Unix-based systems use the ELF file format for executables, object code, and shared libraries. Take a peek inside to learn how an ELF file is organized.

An object file is a black box that you can never really see inside. You can’t just open it and read it. We all have some understanding that it contains instructions for the computer, coded in a format that only a computer can understand, but we’re used to thinking of compiled program code as something of a mystery. If you take a closer look, however, the structure is not as opaque as you might imagine.

Linux, like most other Unix-like operating systems, stores program code in the Executable and Linkable Format (ELF). ELF superseded the less-flexible a.out format and has been the standard in Linux since 1995 and in FreeBSD [1] since 1998. An ELF object file contains the processor-specific instructions that the CPU actually executes. It also contains other information relating to

  • how and where to load the object into memory
  • dynamic linking
  • any public functions exported (or imported) by the object
  • debugging


Use Express-Checkout link below to read the full article (PDF).

Source link