Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ a.out(4) — 4D1 2.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

as(1)

ld(1)

nm(1)

dbx(1)

stab(5)

strip(1)



     A.OUT(4)                                                 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
          references.  The debugger uses the a.out file to provide
          symbolic information to the user.

          MIPS machines use a file format that is similar to standard
          AT&T System V COFF (common object file format).  For more
          information, see the MIPS Assembly Language Programmer's
          Guide.

          The MIPS File Header definition is based on the System V
          header file filehdr.h with the following changes:


               ⊕    For the File Header Definition, the symbol table
                    file pointer and the number of symbol table
                    entries now specify the file pointer and the size
                    of the Symbolic 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
          System V header file aouthdr.h (the standard 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
          System V header file scnhdr.h, except the line number fields
          (s_Innoptr and s_ninno) aren't used.

          The MIPS relocation information definition is similar to 4.3
          BSD, which has "local" relocation types; however, you should
          read the topic Section Relocation Information in the MIPS
          Assembly Programmer's Guide for more information.

          For more information about System V COFF, refer to the UNIX
          System V Support Tools Guide.

          The MIPS file format follows this scheme:


               ⊕    File Header



     Page 1                                        (last mod. 8/20/87)





     A.OUT(4)                                                 A.OUT(4)



               ⊕    Optional Headers

               ⊕    Section Headers

               ⊕    Section Data-includes text, read-only data, large
                    data, small data, small bss (0 size), and large
                    bss (0 size).

               ⊕    Section Relocation Information-includes text,
                    read-only data, large data, and small data.

               ⊕    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.

               ⊕    Relative File Descriptor-missing if stripped of
                    non-globals or if fully stripped.

               ⊕    External Symbols-missing is fully stripped.



          The File Header Magic Field

          The magic number in the f_magic entry in the File Header
          specifies the target machine on which an object file can
          execute.  The header file filehdr.h contains the
          preprocessor macro definitions. The magic numbers these
          values and mnemonics:

          MIPSEBMAGIC    0x0160    MIPS big-endian target (headers and tables have the



     Page 2                                        (last mod. 8/20/87)





     A.OUT(4)                                                 A.OUT(4)



                         same byte sex as host machine)
          MIPSELMAGIC    0x0162    MIPS little-endian target (headers and tables
                         have the same byte sex as host machine)
          SMIPSEBMAGIC   0x6001    MIPS big-endian target (headers and tables
                         have opposite byte sex as host machine)
          SMIPSELMAGIC   0x6201    MIPS little-endian target (headers and tables
                         have opposite byte sex as host machine)

          The Section Data

          MIPS files are represented in six sections:  storage), and
          .bss (block started by storage).  The .text section contains
          the machine instructions that are to be executed; the
          .rdata, .data, and .sdata sections contain initialized data;
          the .sbss and .bss sections reserve space for ininitialized
          data that is created by the kernel loader for the program
          before execution and filled with zeros.

     SEE ALSO
          as(1), ld(1), nm(1), dbx(1), stab(5), strip(1)

     ORIGIN
          MIPS Computer Systems
































     Page 3                                        (last mod. 8/20/87)



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026