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

Brian Walden tuhs at cuzuco.com
Sun Feb 26 06:14:51 AEST 2023


It was originaly 205. See A.OUT(V) (the first page) at https://www.bell-labs.com/usr/dmr/www/man51.pdf it was documented as to why.


     The header always contains 6 words:
          1 "br .+14" instruction (205(8))
          2 The size of the program text
          3 The size of the symbol table
          4 The size of the relocation bits area
          5 The size of a data area
          6 A zero word (unused at present)

I always found this so elegant in it's simplicity. Just load and start
execution at the start (simplifies exec(2) in the kernel) I always wondered
if this has done anywhere else before, or invenetd first in unix.

Theres was also a recent discussion of ar(1). That pdf also explains its magic
number a few pages later. It was simply choosen because it seemed unique.

     A file produced by ar has a "magic number" at the start,
     followed by the constituent files, each preceded by a file
     header. The magic number is -147(10), or 177555(8) (it was
     chosen to be unlikely to occur anywhere else).

-Brian

On Sat, 25 Feb 2023, Dave Horsfall wrote:

> On Thu, 23 Feb 2023, Paul Winalski wrote:
>
> > a.out was, as object file formats go, a throwback to the stone age from
> > the get-go.  Even the most primitive of IBM's link editors for
> > System/360 supported arbitrary naming of object file sections and the
> > ability for the programmer to arrange them in whatever order they
> > wished.  a.out's restriction to three sections (.text, .data, .bss) did
> > manage to get the job done, and even (with ZMAGIC) could support
> > demand-paged virtual memory, but only just.
>
> That may be so, but those guys didn't exactly have the resources of
> IBM behind them...
>
> And I wonder how many people here know the significance of the "407" magic
> number?
>
> -- Dave


More information about the TUHS mailing list