from Wikipedia, the free encyclopedia

a.out is the original file format for executable files and object files of Unix-like operating systems . In practice, this format has been largely superseded by its successors, Common Object File Format (COFF) and Executable and Linking Format (ELF) , although it is still partially supported today. The format from version 1.1.52 (August 1994) up to and including version 5.0 (March 2019) was supported by the Linux kernel .


Many Unix-like C - compiler or these normally automatically downstream assembler generate executable output file with the default file name a.out (short for assembler output ), unless the user explicitly selects a different name; The initially nameless format was given its name from this as soon as it became necessary to differentiate between several different formats. With the further development of UNIX, the shortcomings of a.out became more and more obvious, as the format neither supports debugging information (which therefore had to be placed in the symbol table) nor dynamic libraries . With the introduction of Unix System V Release 3, it was therefore replaced by the new, more flexible Common Object File Format (COFF).

Under Linux , a.out was the standard format until 1995 . Due to the limitations of the format, it became increasingly difficult to use modern technologies such as B. To support dynamic linking . This is why support for the Executable and Linking Format (ELF) was introduced with the release of the kernel version 1.2 . The Linux loader ld.so supports the a.out format to this day. Since BSD implemented a more flexible variant of a.out , the change was not so urgent. FreeBSD switched to ELF with version 3.0 in 1998 .

Confusingly, the output file of a Unix compiler or assembler has the file name a.out by default even if it is not created in the file format a.out but in one of the newer file formats.


A program in a.out format consists of several parts:

  • The header data area contains meta information about the file, such as the size of the following segments.
  • Text : The actual program as machine code (not to be confused with the source code of the program)
  • Data : Initialized data such as constants and variables that already have a defined initial value when the program is started.
  • BSS : uninitialized data. The acronym BSS stands for Block Started by Symbol and can be traced back to the pseudo-operator of the same name, which was used toreserve storage space for uninitialized datain the assembly language of the mainframe IBM 7090 . While the text and data segments are copied from the file to the memory, the BSS segment is only available as a size specification in the header data of the file. The program loader creates the segment in the desired size and usually initializes it byte by byte with the value 0.
  • Further optional information such as a symbol table and, if necessary, a relocation table .


Individual evidence

  1. ↑ Binary Formats ( September 24, 2015 memento on the Internet Archive ), The FreeBSD Handbook, accessed April 4, 2019
  2. LKML: a.out coredumping: fix or delete?
  3. LKML: x86: Deprecate a.out support (Linus Torvalds)
  4. a.out - assembler and link editor output Dennis Ritchie, Bell Labs, November 3, 1971. Accessed March 11, 2014
  5. Gintaras Gircys: Understanding and Using COFF , 1988
  6. How to write shared libraries , Ulrich Drepper, accessed on March 12, 2014
  7. Linux 1.2 and 1.3 Uni Wuppertal, accessed on March 12, 2014
  8. Manpage of ld.so Linux Programmer's Manual, accessed on March 12, 2014
  9. FreeBSD 3.0 Release Notes , FreeBSD Project, Retrieved March 11, 2014
  10. ^ Maurice J. Bach: The Design of the UNIX Operating System , Prentice-Hall International, Englewood Cliffs, NJ 1986, ISBN 0-13-201757-1 . Page 25