[Unix-jun72] Early a.out headers

Warren Toomey wkt at tuhs.org
Fri May 2 08:23:55 AEST 2008

On Thu, May 01, 2008 at 01:47:33PM -0400, Brad Parker wrote:
> yes, I think 0405 and 0407 a.out's are different.

I managed to scan in the 2nd Edition manuals, and they are available as a PDF
here: http://minnie.tuhs.org/Z/2ndEdManuals/unix_2nd_edition_manual.pdf
[ That URL is guaranteed to be ephemeral; Al, could you copy it to bitsavers? ]
The skew on some of the pages comes from the photocopy that I have. Apologies.

1st Edition a.out headers were 0405, 12 bytes long. 2nd Edition a.out headers
were 0407, 14 bytes long. In terms of the userland binaries we have from
this era (on the s2 tape at
http://www.tuhs.org/Archive/PDP-11/Distributions/research/1972_stuff/s2-bits.tar.gz), some binaries are 0405 and others are 0407. Here are the 0405 ones:

        bin/:           bin/mv
        bin/ar          bin/od
        bin/bas         bin/pr
        bin/cat         bin/rew
        bin/chball      bin/rmdir
        bin/check       bin/roff
        bin/chown       bin/sh
        bin/cmp         bin/skip
        bin/cp          bin/sort
        bin/date        bin/stat
        bin/db          bin/stty
        bin/dc          bin/su
        bin/df          bin/sum
        bin/du          bin/tap
        bin/echo        bin/tm
        bin/ed          bin/tty
        bin/exit        bin/wc
        bin/form        bin/who
        bin/goto        bin/write
        bin/if          etc/getty
        bin/login       etc/glob
        bin/ls          etc/init
        bin/mail        etc/msh
        bin/mesg        etc/suftab

Here are the 0407 ones:

    bin/as                  usr/fort/fc1
    bin/cc                  usr/fort/fc2
    bin/ds                  usr/fort/fc3
    bin/fc                  usr/fort/fc4
    bin/find                usr/jack/a.out
    bin/ld                  usr/jack/x.o
    bin/maki                usr/lib/c0
    bin/nm                  usr/lib/c1
    bin/size                usr/lib/crt0.o
    bin/strip               usr/lib/fr0.o
    bin/un                  usr/sys/a.out

As you can see, as and as2 are 0407, hence they are V2 binaries, and so
would be likely to output the V2 header.

I haven't read the the OCR'd kernel source fully yet; in the section for
exec(), there must be code to parse an a.out header. Does it only know
about 0405, or 0407, or both?

Hope this helps,

> I believe the V7 headers are 16 bytes and the text section starts at zero.
> (heh, memory management)
> The v1 headers are 12 bytes and the text section starts at 014 (i.e. the
> header is part of the text section and *it* begins at zero, not the code)
> So, if we assemble with the v7 as we need to adjust things a bit.
> -brad
> _______________________________________________
> Unix-jun72 mailing list
> Unix-jun72 at minnie.tuhs.org
> https://minnie.tuhs.org/mailman/listinfo/unix-jun72

More information about the TUHS mailing list