A.OUT(4) RISC/os Reference Manual A.OUT(4)
NAME
a.out - assembler and link editor output
SYNOPSIS
#include <a.out.h>
DESCRIPTION
a.out is the output file format of the assembler as(1) and
the link editor ld(1). Both programs make a.out executable
if there were no errors and no unresolved external refer-
ences. The debugger uses the a.out file to provide symbolic
information to the user.
The MIPS compilers and operating systems use a file format
that is similar to standard AT&T System V COFF (common
object file format) and ELF (execution and linking format).
For more information, see the MIPS Assembly Language
Programmer's Guide.
In -systype svr3 and -systype bsd43 COFF is the only format
available. In -systype svr4 both ELF and COFF formats are
available. The -elf and -coff compiler flags determine
which format ld will use when making the binary (ELF being
the default).
The MIPS File Header definition is based on the AT&T System
V header file filehdr.h with the following changes (also see
filehdr(4)):
⊕ The symbol table file pointer, f_symptr, and the
number of symbol table entries, f_nsyms, now
specify the file pointer and the size of the Sym-
bolic Header respectively.
⊕ All tables that specify symbolic information have
their file pointers and number of entries in the
Symbolic Header.
The Optional Header definition has the same format as the
AT&T System V header file aouthdr.h (the ``standard'' (pre-
COFF) UNIX system a.out header) except the following fields
have been added: bss_start, gprmask, cprmask, and gp_value.
The Section Header definition has the same format as the
AT&T System V header file scnhdr.h, except the line number
fields (s_lnnoptr and s_nlnno) are used for gp tables (see
scnhdr(4)).
The MIPS relocation information definition is similar to
that in Berkeley 4.3 UNIX, which has ``local'' relocation
types (see reloc(4)). Also see the section entitled ``Sec-
tion Relocation Information'' in the chapter 10 of the MIPS
Printed 11/19/92 Page 1
A.OUT(4) RISC/os Reference Manual A.OUT(4)
Assembly Language Programmer's Guide for the most detailed
information.
For more information about AT&T System V COFF, refer to the
AT&T UNIX System V Support Tools Guide.
The MIPS file format follows this scheme:
⊕ File Header
⊕ Optional Header
⊕ Section Headers
⊕ Section Data-includes text, read-only data, large
data, 8 and 4 byte literal pools, small data,
small bss (0 size), and large bss (0 size). As
well as the shared library information.
⊕ Section Relocation Information-includes informa-
tion for text, read-only data, large data, 8 and 4
byte literal pools, and small data.
⊕ Gp tables-missing if relocation information is not
saved.
⊕ Symbolic Header-missing if fully stripped.
⊕ Line Numbers-created only if debugging is on, and
missing if stripped of non-globals or fully
stripped.
⊕ Procedure Descriptor Table-missing if fully
stripped.
⊕ Local Symbols-missing if stripped of non-globals
or if fully stripped.
⊕ Optimization Symbols-created only if debugging is
on, and missing if stripped of nonglobals or fully
stripped.
⊕ Auxiliary Symbols-created only if debugging is on,
and missing if stripped of nonglobals or fully
stripped.
⊕ Local Strings-missing if stripped of non-globals
or if fully stripped.
⊕ External Strings-missing if fully stripped.
Page 2 Printed 11/19/92
A.OUT(4) RISC/os Reference Manual A.OUT(4)
⊕ Relative File Descriptors-missing if stripped of
non-globals or if fully stripped.
⊕ File Descriptors-missing if stripped of non-
globals or if fully stripped.
⊕ External Symbols-missing is fully stripped.
SEE ALSO
linenum(4), filehdr(4), reloc(4), scnhdr(4), syms(4).
as(1), dbx(1), ld(1), nm(1), strip(1) in the User's Refer-
ence Manual.
Printed 11/19/92 Page 3