DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Common Object File Format (COFF)

Common Object File Format (COFF)

This chapter describes the Common Object File Format (COFF). COFF is the format of the output file produced by the assembler, as(CP), and the link editor, ld(CP).

The following are some key features of COFF:

The object file supports user-defined sections and contains extensive information for symbolic software testing. An object file contains:

``Object file format'' shows the overall structure.

Object file format

FILE HEADER
Optional Information
Section 1 Header
...
Section n Header
Raw Data for Section 1
...
Raw Data for Section n
Relocation Info for Sect. 1
...
Relocation Info for Sect. n
Line Numbers for Sect. 1
...
Line Numbers for Sect. n
SYMBOL TABLE
STRING TABLE

The last four sections (relocation, line numbers, symbol table, and the string table) may be missing if the program is linked with the -s option of the ld command, or if the line number information, symbol table, and string table are removed by the strip(CP) command. The line number information does not appear unless the program is compiled with cc -g. Also, if there are no unresolved external references after linking, the relocation information is no longer needed and is absent. The string table is also absent if the source file does not contain any symbols with names longer than eight characters.

An object file that contains no errors or unresolved references is considered executable.


Next topic: Definitions and conventions

© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003