A.out

a.outFilename extension| `none, .o, .so, .out`

|

Magic number| `0407`, `0410`, `0413` (in octal); `0107`, `0108`, `010B` (in hexadecimal)
Developed by| AT&T
Type of format| Binary, executable, object, shared libraries

a.out is a file format used in older versions of Unix-like computer operating systems for executables, object code, and, in later systems, shared libraries. This is an abbreviated form of "assembler output", the filename of the output of Ken Thompson's PDP-7 assembler.[1] The term was subsequently applied to the format of the resulting file to contrast with other formats for object code.

"a.out" remains the default output file name for executables created by certain compilers and linkers when no output name is specified, even though the created files actually are not in the a.out format, but often in ELF.[2]

Support for the a.out format was deprecated in Linux kernel version 5.1, and support for the format was removed across the 5.18 and 5.19 kernel releases.[3][4][5]

## Contents

* 1 History
* 2 Debugging
* 3 See also
* 4 References
* 5 Further reading
* 6 External links

## History

An a.out format for the PDP-7, similar to the a.out format used on the PDP-11, appeared in the first edition of UNIX.[6] It was superseded by the COFF format in AT&T Unix System V, which was in turn superseded by the ELF format in System V Release 4. a.out files are identified by the magic numbers with octal codes 0407, 0410 or 0413.[7]

MINIX 3 switched to ELF in the 3.2.0 release of February 2012.

Linux also used a.out only until kernel 1.2 (Mar. 1995), when it was superseded by ELF for that platform as well.[8] ELF support was added in the experimental 1.1.52 kernel. Linux's transition to ELF was more or less forced due to the complex nature of building a.out shared libraries on that platform, which included the need to register the virtual address space at which the library was located with a central authority, as the a.out ld.so in Linux was unable to relocate shared libraries.[9]

Because modern compiler toolchains did not produce a.out files, and facilities for the format were suffering from bit rot, the a.out file format on Linux was deprecated with the release of the kernel version 5.1. Support for the format was removed from the DEC Alpha and Motorola 68000 architectures, which were the last architectures that used it, in version 5.18. Support for a.out in the x86 architecture was removed completely in version 5.19.[3][10][4][11][5][12]

Though Berkeley Unix continued using the a.out format for some time, modern BSD systems have since switched to ELF. NetBSD/i386 switched formally from a.out to ELF in its 1.5 release in December 2000. FreeBSD/i386 switched to ELF as a standard format during the 2.2 to 3.0 transition in 1998, however support for a.out remained in the system.[13] The various BSD flavors were able to continue using a.out binaries long after Linux was forced to switch to ELF, due to the somewhat more flexible nature of the BSD a.out format compared to that of Linux.[14][15]

## Debugging

The a.out support for debug information is done through the use of special entries in the symbol table called stabs. The stabs format has also been used in many COFF and ELF variations.

## See also

* Comparison of executable file formats
* Portable Executable
* Executable and Linkable Format

## References

1. ↑ (Ritchie 1993): "Thompson's PDP-7 assembler outdid even DEC's in simplicity; it evaluated expressions and emitted the corresponding bits. There were no libraries, no loader or link editor: the entire source of a program was presented to the assembler, and the output file—with a fixed name—that emerged was directly executable. (This name, a.out, explains a bit of Unix etymology; it is the output of the assembler. Even after the system gained a linker and a means of specifying another name explicitly, it was retained as the default executable result of a compilation.)"
2. ↑ Wood, Rupert (8 April 2002). "What to do with a.out". gcc-help (Mailing list). Retrieved 2007-04-28.
3. ↑ 3.0 3.1 "Linux Kernel Finally Deprecating A.out Support". https://www.phoronix.com/scan.php?page=news_item&px=Linux-Dropping-A.Out.
4. ↑ 4.0 4.1 "Linux Plans To Stop Building a.out Support On Alpha & M68k To See If Anyone Cares - Phoronix". https://www.phoronix.com/news/Linux-a.out-M68k-Alpha.
5. ↑ 5.0 5.1 "Linux 5.19 Finally Removes Obsolete x86 a.out support - Phoronix". https://www.phoronix.com/news/Linux-5.19-Drops-x86-a.out.
6. ↑ Ritchie, Dennis (3 November 1971). a.out – assembler and link editor output. Bell Labs. https://www.bell-labs.com/usr/dmr/www/man51.pdf. Retrieved 2006-11-24.
7. ↑ "a.out page from Section 5 of the unix 8th manual". http://man.cat-v.org/unix_8th/5/a.out.
8. ↑ Barlow, Daniel (14 July 1996). "The Linux ELF HOWTO (v1.29)". http://www.ibiblio.org/pub/historic-linux/distributions/slackware/3.9/docs/ELF-HOWTO.
9. ↑ Drepper, Ulrich (20 August 2006). How To Write Shared Libraries (PDF) (Technical report). 4.0. Section 1.1 (A Little Bit of History). Archived (PDF) from the original on 16 June 2007. Retrieved 2007-06-20. "When introducing shared libraries certain design decisions had to be made to work in the limitations of a.out. (...) For all these reasons and more, Linux converted early on to using ELF (Executable Linkage Format) as the binary format."
10. ↑ Petkov, Borislav (5 March 2019). "x86: Deprecate a.out support". https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=eac616557050737a8d6ef6fe0322d0980ff0ffde. "Linux supports ELF binaries for ~25 years now. a.out coredumping has bitrotten quite significantly and would need some fixing to get it into shape again but considering how even the toolchains cannot create a.out executables in its default configuration, let's deprecate a.out support and remove it a couple of releases later, instead."
11. ↑ Biederman, Eric W. (9 March 2022). "a.out: Stop building a.out/osf1 support on alpha and m68k". https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=19e8b701e258701b52b1e6aea99572518d69a2fb. "Let's see if anyone cares about a.out support on the last two architectures that build it, by disabling the build of the support in Kconfig."
12. ↑ Petkov, Borislav (11 April 2022). "x86: Remove a.out support". https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c7bda0dca98cca351a9bc852b3df8b9b99ffd400. "Commit eac616557050 ("x86: Deprecate a.out support") deprecated a.out support with the promise to remove it a couple of releases later. That commit landed in v5.1. Now it is more than a couple of releases later, no one has complained so remove it."
13. ↑ Lucas, Michael W. (2019). Absolute FreeBSD : the complete guide to FreeBSD (3rd ed.). San Francisco. p. 408. ISBN 9781593278922. https://books.google.com/books?id=9Vv6DwAAQBAJ&dq=freebsd+"a.out"&pg=PA408.
14. ↑ Youngdale, Eric (1 April 1995). "The ELF Object File Format: Introduction". http://www.linuxjournal.com/article/1059. "(...) it is not impossible to design shared library implementations that work with a.out. The current Linux shared libraries are certainly one example; another example is SunOS-style shared libraries which are currently used by BSD-du-jour. SunOS-style shared libraries contain a lot of the same concepts as ELF shared libraries (...)"
15. ↑ "BSD Myths". http://people.freebsd.org/~nik/advocacy/myths.html#aout. "There were no pressing reasons to switch earlier. In particular, FreeBSD did not (and does not) have the problems building shared libraries that spurred the Linux conversion from a.out to ELF."

## Further reading

* Ritchie, Dennis M. (20–23 April 1993). "The development of the C language". The second ACM SIGPLAN conference on History of programming languages. Cambridge, MA: ACM. pp. 201–208. doi:10.1145/154766.155580. ISBN 0-89791-570-4. http://www.bell-labs.com/usr/dmr/www/chist.html.

## External links

* a.out manual page for Version 6 Unix
* a.out manual page for 2.11BSD
* a.out manual page for FreeBSD
* a.out manual page for NetBSD

* v
* t
* e

Executable and object file formats

* a.out
* AIF
* COFF
* CMD
* COM
* ECOFF
* ELF
* GOFF
* Hunk
* Mach-O
* MZ
* NE
* OMF
* OS/360
* PE
* PEF
* XCOFF

* Comparison of formats
* .exe

0.00

(0 votes)

Original source: https://en.wikipedia.org/wiki/A.out. Read more

|

Retrieved from "https://handwiki.org/wiki/index.php?title=A.out&oldid=4227014"
*[v]: View this template
*[t]: Discuss this template
*[e]: Edit this template