[TUHS] Origins of the SGS (System Generation Software) and COFF (Common Object File Format)

Paul Winalski paul.winalski at gmail.com
Fri Feb 24 06:40:30 AEST 2023


One property of a.out is that the format of an executable image is
identical to that of an object file.  One could write an assembly
program that was self-contained and did not need to be linked to any
other modules, run that through as(1).  The resulting a.out file would
be executable.  No need to involve ld(1).

MACH-O retained this concept of supporting self-contained object files
as executables.  COFF departed from that tradition.  A COFF (or
PECOFF) executable requires a data structure in the file called the
optional header that contains important instructions to the program
loader.  This second header is "optional" only in the sense that
non-executable object files do not have one.  The optional header is
created by ld(1).  I'm almost certain that versions of as(1) that
generate COFF output do not generate an optional header.

In ELF, executable images have several sections such as the program
header table section that contain the information present in COFF's
optional header.

Traditionally, operating systems such as IBM's OS for System/360/370/Z
and DEC's VMS have very different formats for object files and
executable programs.  OpenVMS for Itanium and x86-64 use ELF for both
objects and executables--a departure from the practice used on VAX and
Alpha.

-Paul W.


More information about the TUHS mailing list