A.out

A.out

infobox file format
name = a.out
extension = none, .o, .so
owner = AT&T
genre = 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. The name stands for "assembler output".

"a.out" remains the default output file name for executables created by certain compilers/linkers when no output name is specified, even though these executables are no longer in the a.out format. [

Cite mailing list
title = What to do with a.out
author = Rupert Wood
date = 2002-04-08
mailinglist = gcc-help
url = http://gcc.gnu.org/ml/gcc-help/2002-04/msg00075.html
accessdate = 2007-04-28
]

Use

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. [cite manual
title = a.out — assembler and link editor output
date = 1971-11-03
url = http://cm.bell-labs.com/cm/cs/who/dmr/man51.pdf
publisher = Bell Labs
accessdate = 2006-11-24
] It was superseded by the COFF format in AT&T Unix System V, which was in turn superseded by ELF in System V Release 4.

Though Berkeley Unix kept using "a.out" 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. FreeBSD/i386 switched to ELF during the 2.2 to 3.0 transition.

The "a.out" format has no direct support for debug information, but can be used with stabs, which uses special symbol table entries to store data.

Linux also used "a.out" until kernel 1.2 (ELF support was added in the experimental 1.1.52), when it was superseded by ELF for that platform as well. [cite web
url=http://slackware.osuosl.org/slackware-3.6/docs/ELF-HOWTO]
title=The Linux ELF HOWTO (v1.29) |author=Daniel Barlow
date=14 July, 1996 |accessdate=2008-03-28
] 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. [cite paper
title = How To Write Shared Libraries
author = Ulrich Drepper
section = 1.1 A Little Bit of History
version = 4.0
date = 2006-08-20
url = http://people.redhat.com/drepper/dsohowto.pdf
accessdate = 2007-06-20
quote = 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.
] The various BSD flavours 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. [cite web
title = BSD Myths: BSD uses the a.out executable format, which is outdated technology
accessdate = 2007-04-10
url = http://people.freebsd.org/~nik/advocacy/myths.html#aout
]

Format

"a.out" executables typically came in one of several variants, OMAGIC, NMAGIC, QMAGIC, or ZMAGIC. The OMAGIC format had contiguous segments after the header, with no separation of text and data. The NMAGIC format was similar to OMAGIC, however the data segment was loaded on the immediate next page after the end of the text segment, and the text segment was marked read-only. The ZMAGIC format added support for demand paging, and QMAGIC allowed the "a.out" header to be merged with the first page of the text segment, typically saving a page worth of memory. QMAGIC binaries were typically loaded one page above the bottom of the virtual address space, in order to permit trapping of null pointer dereferences via a segmentation fault.

An "a.out" file consists of up to 7 sections. In order, these sections are:

; exec header: Contains parameters used by the kernel to load a binary file into memory and execute it, and by the link editor ld to combine a binary file with other binary files. This section is the only mandatory one.; text segment: Contains machine code and related data that are loaded into memory when a program executes. May be loaded read-only.; data segment: Contains initialized data; always loaded into writable memory.; text relocations: Contains records used by the link editor to update pointers in the text segment when combining binary files.; data relocations: Like the text relocation section, but for data segment pointers.; symbol table: Contains records used by the link editor to cross-reference the addresses of named variables and functions ("symbols") between binary files.; string table: Contains the character strings corresponding to the symbol names.

References

External links

* [http://www.osxfaq.com/man/5/a.out.ws a.out format]
* [http://fuse4bsd.creo.hu/localcgi/man-cgi.cgi?a.out+5 Unix man page for a.out format]


Wikimedia Foundation. 2010.

Игры ⚽ Нужно решить контрольную?

Look at other dictionaries:

  • Out of Line Music — Out of Line Music  немецкий звукозаписывающий лейбл, который выпускает различные музыкальные стили, включая электро, EBM, синти поп. Содержание 1 Группы 2 Дискография …   Википедия

  • Out — (out), adv. [OE. out, ut, oute, ute, AS. [=u]t, and [=u]te, [=u]tan, fr. [=u]t; akin to D. uit, OS. [=u]t, G. aus, OHG. [=u]z, Icel. [=u]t, Sw. ut, Dan. ud, Goth. ut, Skr. ud. [root]198. Cf. {About}, {But}, prep., {Carouse}, {Utter}, a.] In its… …   The Collaborative International Dictionary of English

  • Out at — Out Out (out), adv. [OE. out, ut, oute, ute, AS. [=u]t, and [=u]te, [=u]tan, fr. [=u]t; akin to D. uit, OS. [=u]t, G. aus, OHG. [=u]z, Icel. [=u]t, Sw. ut, Dan. ud, Goth. ut, Skr. ud. [root]198. Cf. {About}, {But}, prep., {Carouse}, {Utter}, a.]… …   The Collaborative International Dictionary of English

  • Out from — Out Out (out), adv. [OE. out, ut, oute, ute, AS. [=u]t, and [=u]te, [=u]tan, fr. [=u]t; akin to D. uit, OS. [=u]t, G. aus, OHG. [=u]z, Icel. [=u]t, Sw. ut, Dan. ud, Goth. ut, Skr. ud. [root]198. Cf. {About}, {But}, prep., {Carouse}, {Utter}, a.]… …   The Collaborative International Dictionary of English

  • Out in — Out Out (out), adv. [OE. out, ut, oute, ute, AS. [=u]t, and [=u]te, [=u]tan, fr. [=u]t; akin to D. uit, OS. [=u]t, G. aus, OHG. [=u]z, Icel. [=u]t, Sw. ut, Dan. ud, Goth. ut, Skr. ud. [root]198. Cf. {About}, {But}, prep., {Carouse}, {Utter}, a.]… …   The Collaborative International Dictionary of English

  • Out of — Out Out (out), adv. [OE. out, ut, oute, ute, AS. [=u]t, and [=u]te, [=u]tan, fr. [=u]t; akin to D. uit, OS. [=u]t, G. aus, OHG. [=u]z, Icel. [=u]t, Sw. ut, Dan. ud, Goth. ut, Skr. ud. [root]198. Cf. {About}, {But}, prep., {Carouse}, {Utter}, a.]… …   The Collaborative International Dictionary of English

  • Out of cess — Out Out (out), adv. [OE. out, ut, oute, ute, AS. [=u]t, and [=u]te, [=u]tan, fr. [=u]t; akin to D. uit, OS. [=u]t, G. aus, OHG. [=u]z, Icel. [=u]t, Sw. ut, Dan. ud, Goth. ut, Skr. ud. [root]198. Cf. {About}, {But}, prep., {Carouse}, {Utter}, a.]… …   The Collaborative International Dictionary of English

  • Out of character — Out Out (out), adv. [OE. out, ut, oute, ute, AS. [=u]t, and [=u]te, [=u]tan, fr. [=u]t; akin to D. uit, OS. [=u]t, G. aus, OHG. [=u]z, Icel. [=u]t, Sw. ut, Dan. ud, Goth. ut, Skr. ud. [root]198. Cf. {About}, {But}, prep., {Carouse}, {Utter}, a.]… …   The Collaborative International Dictionary of English

  • Out of conceit with — Out Out (out), adv. [OE. out, ut, oute, ute, AS. [=u]t, and [=u]te, [=u]tan, fr. [=u]t; akin to D. uit, OS. [=u]t, G. aus, OHG. [=u]z, Icel. [=u]t, Sw. ut, Dan. ud, Goth. ut, Skr. ud. [root]198. Cf. {About}, {But}, prep., {Carouse}, {Utter}, a.]… …   The Collaborative International Dictionary of English

  • Out of date — Out Out (out), adv. [OE. out, ut, oute, ute, AS. [=u]t, and [=u]te, [=u]tan, fr. [=u]t; akin to D. uit, OS. [=u]t, G. aus, OHG. [=u]z, Icel. [=u]t, Sw. ut, Dan. ud, Goth. ut, Skr. ud. [root]198. Cf. {About}, {But}, prep., {Carouse}, {Utter}, a.]… …   The Collaborative International Dictionary of English

  • Out of door — Out Out (out), adv. [OE. out, ut, oute, ute, AS. [=u]t, and [=u]te, [=u]tan, fr. [=u]t; akin to D. uit, OS. [=u]t, G. aus, OHG. [=u]z, Icel. [=u]t, Sw. ut, Dan. ud, Goth. ut, Skr. ud. [root]198. Cf. {About}, {But}, prep., {Carouse}, {Utter}, a.]… …   The Collaborative International Dictionary of English

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”