<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://gunkies.org/index.php?action=history&amp;feed=atom&amp;title=UNIX_a.out_file</id>
		<title>UNIX a.out file - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://gunkies.org/index.php?action=history&amp;feed=atom&amp;title=UNIX_a.out_file"/>
		<link rel="alternate" type="text/html" href="https://gunkies.org/w/index.php?title=UNIX_a.out_file&amp;action=history"/>
		<updated>2026-04-21T14:09:51Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.30.1</generator>

	<entry>
		<id>https://gunkies.org/w/index.php?title=UNIX_a.out_file&amp;diff=25489&amp;oldid=prev</id>
		<title>Jnc: /* External links */ forgot a cat</title>
		<link rel="alternate" type="text/html" href="https://gunkies.org/w/index.php?title=UNIX_a.out_file&amp;diff=25489&amp;oldid=prev"/>
				<updated>2022-04-06T18:00:41Z</updated>
		
		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;External links: &lt;/span&gt; forgot a cat&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 18:00, 6 April 2022&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l96&quot; &gt;Line 96:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 96:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category: UNIX]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category: UNIX]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category: PDP-11 File Formats]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key mediawiki-wiki_:diff:version:1.11a:oldid:25487:newid:25489 --&gt;
&lt;/table&gt;</summary>
		<author><name>Jnc</name></author>	</entry>

	<entry>
		<id>https://gunkies.org/w/index.php?title=UNIX_a.out_file&amp;diff=25487&amp;oldid=prev</id>
		<title>Jnc: Fairly complete</title>
		<link rel="alternate" type="text/html" href="https://gunkies.org/w/index.php?title=UNIX_a.out_file&amp;diff=25487&amp;oldid=prev"/>
				<updated>2022-04-06T17:56:31Z</updated>
		
		<summary type="html">&lt;p&gt;Fairly complete&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;'''UNIX a.out files''' are used to hold [[binary]] [[file]]s of various sorts, both [[relocatable binary]] and also [[object code|executable binary]] files (ready to be loaded into [[main memory]] and run).&lt;br /&gt;
&lt;br /&gt;
They generally hold, in order:&lt;br /&gt;
&lt;br /&gt;
* a header giving overall information about the contents&lt;br /&gt;
* [[object code]]&lt;br /&gt;
* initialized data&lt;br /&gt;
* relocation information&lt;br /&gt;
* a [[symbol table]]&lt;br /&gt;
&lt;br /&gt;
The relocation information is used during [[linking]] of relocatable binary files into an executable binary file; the last two may not exist in finalized executable binary files.&lt;br /&gt;
&lt;br /&gt;
==PDP-11 a.out format==&lt;br /&gt;
&lt;br /&gt;
The format of the a.out header on a [[PDP-11]] (always 8 words long) is:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Offset !! Contents&lt;br /&gt;
|-&lt;br /&gt;
| 0 || A magic number (below)&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Program text size&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Initialized data size&lt;br /&gt;
|-&lt;br /&gt;
| 6 || Uninitialized ([[BSS]]) data size&lt;br /&gt;
|-&lt;br /&gt;
| 010 || Symbol table size&lt;br /&gt;
|-&lt;br /&gt;
| 012 || Entry location&lt;br /&gt;
|-&lt;br /&gt;
| 014 || Unused&lt;br /&gt;
|-&lt;br /&gt;
| 016 || Flag indicating relocation information has been suppressed&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Magic number values are: 0407 (text is not write-protected and not shared), 0410 (text is write-protected, and one copy in [[main memory]] will be shared by all [[process]]es executing that file), or 0411 (as for 0410, but [[instruction]] and data space are separate, with both beginning at 0; i.e. 'split I&amp;amp;D'). The origin of the '0407' will be obvious to anyone familiar with PDP-11 object code; in the early days of UNIX, an executable binary file was loaded into memory without stripping off the header, and started at location '0'; the '0407' is a [[jump|BR]] instruction which skips over the header to the first location after it.&lt;br /&gt;
&lt;br /&gt;
The 'entry location' was always 0 on the PDP-11.&lt;br /&gt;
&lt;br /&gt;
The symbol table consists of an array of 6-word entries. The first four words contain the symbol in [[ASCII]], padded on the end with '0' bytes. The next word is a field indicating the type of symbol (below). The final word is the value (possibly not final in relocatable binary files). Symbol types are:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Value !! Symbol type&lt;br /&gt;
|- &lt;br /&gt;
| 00 || undefined&lt;br /&gt;
|-&lt;br /&gt;
| 01 || absolute&lt;br /&gt;
|-&lt;br /&gt;
| 02 || text&lt;br /&gt;
|-&lt;br /&gt;
| 03 || data&lt;br /&gt;
|-&lt;br /&gt;
| 04 || BSS&lt;br /&gt;
|-&lt;br /&gt;
| 24 || register assignment&lt;br /&gt;
|-&lt;br /&gt;
| 37 || file name (produced by the linker, 'ld')&lt;br /&gt;
|-&lt;br /&gt;
| 40 || undefined [[external]]&lt;br /&gt;
|-&lt;br /&gt;
| 41 || absolute external&lt;br /&gt;
|-&lt;br /&gt;
| 42 || text external&lt;br /&gt;
|-&lt;br /&gt;
| 43 || data external&lt;br /&gt;
|-&lt;br /&gt;
| 44 || BSS external&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If the symbol's type is un-defined external, and the value field is non-zero, the symbol names a [[common region]], of a size indicated by the value.&lt;br /&gt;
&lt;br /&gt;
If a word in the text or data section involves a reference to an un-defined external symbol (as indicated by the relocation bits for that word - below), the value of the word as stored in the file is an offset from the associated external symbol. When the file is bound into an object file by the [[linker]], the eventual value of the symbol will be added into the word.&lt;br /&gt;
&lt;br /&gt;
If relocation information is present, there is one word per word of text or initialized data. Bits 3-1 of a relocation word indicate the entity referred to by the word associated with the relocation word:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Value !! Reference type&lt;br /&gt;
|-&lt;br /&gt;
| 00 || the reference is absolute&lt;br /&gt;
|-&lt;br /&gt;
| 02 || the reference is to the text segment&lt;br /&gt;
|-&lt;br /&gt;
| 04 || the reference is to initialized data&lt;br /&gt;
|-&lt;br /&gt;
| 06 || the reference is to BSS&lt;br /&gt;
|-&lt;br /&gt;
| 10 || the reference is to an un-defined external symbol&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
For references to un-defined external symbols, he remaining bits of the relocation word (15-4) contain the index of the symbol's entry in the table (numbered sequentially from 0).&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
&lt;br /&gt;
* [https://minnie.tuhs.org/cgi-bin/utree.pl?file=V6/usr/man/man5/a.out.5 A.OUT - V] - [[UNIX Sixth Edition|UNIX V6]] man page&lt;br /&gt;
&lt;br /&gt;
[[Category: UNIX]]&lt;/div&gt;</summary>
		<author><name>Jnc</name></author>	</entry>

	</feed>