Executable Formats
The standard Linux executable format is named Executable and Linking Format ( ELF). It was developed by Unix System Laboratories and is now the most widely used format in the Unix world. Several well-known Unix operating systems, such as System V Release 4 and Sun’s Solaris 2, have adopted ELF as their main executable format.
Older Linux versions supported another format named Assembler OUTput Format(a.out); actually, there were several versions of that format floating around the Unix world. It is seldom used now, because ELF is much more practical.
Linux supports many other different formats for executable files; in this way, it can run programs compiled for other operating systems, such as MS-DOS EXE programs or BSD Unix’s COFF executables. A few executable formats, such as Java or bash scripts, are platform-independent.
An executable format is described by an object of type linux_binfmt, which essentially provides three
methods:
load_binarySets up a new execution environment for the current process by reading the information stored in an executable file.
load_shlibDynamically binds a shared library to an already running process; it is activated by the
uselib( )system call.core_dumpStores the execution context of the current process in a file named
core. This file, whose format depends on the type of executable of the program being executed, is usually created when a process receives a signal whose default action is “dump” (see the section "Actions Performed ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access