The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: Paul Winalski <paul.winalski@gmail.com>
To: Clem Cole <clemc@ccc.com>
Cc: The Eunuchs Hysterical Society <tuhs@tuhs.org>
Subject: [TUHS] Re: Origins of the SGS (System Generation Software) and COFF (Common Object File Format)
Date: Sat, 25 Feb 2023 12:29:15 -0500	[thread overview]
Message-ID: <CABH=_VTKMZ2w4emhTm2Bnc5no-5OdAdpSOYkMdM14Ciav9KAyQ@mail.gmail.com> (raw)
In-Reply-To: <CAC20D2NO7fnzV5Ux2cTfD6-9y+BZ30458Pd9_V+rEnZ3zC4WwQ@mail.gmail.com>

On 2/25/23, Clem Cole <clemc@ccc.com> wrote:
>
> The IBM link
> editors needed all that back in the day.

One of the complications of executable images was the address space
layout for OS/360.  There was no virtual memory.  The low part of the
address space was where the operating system kernel (supervisor, in
IBM-speak) lived.  Each of what we now call processes was assigned a
contiguous portion of the remaining address space (this was called a
partition).  As executable program retained the relocations that had
been applied by the linker so that the program loader could adjust the
addresses in the executable depending on which partition it was being
loaded into.  This made things more complicated for the link editor.

The OS/360 link editor also doubled as a patch tool.  The link editor
was capable of taking an executable and a set of new versions for some
object modules, un-linking those modules, and replacing them with the
new versions, adjusting all relocations accordingly.

> Please correct me if I'm misinformed, but Paul, of course, had to support
> the DEC language tools on Unix, which had come from systems that had a more
> flexible format (the solution for Ultrix IICR was to move a flavor of the
> VMS linker to UNIX for object file and just a.out for execution).

VAX Fortran for Ultrix was a port of the VAX/VMS Fortran compiler and
runtime to Ultrix.  There were two big problems, object-file-wise.
First, VAX Fortran used many of the advanced features of the VMS
object language.  To generate a.out directly, those chores would have
to be done in the compiler's code generator.  The runtime library had
an even worse problem.  One innovative feature of VMS was that it had
a very robust ABI that could support every programming language then
known, and the compiler development teams were required to adhere to
this ABI and to provide language extensions were necessary to support
all of the ABI's features.  The result was that calling subroutines
written in a different language was dead easy.  It didn't matter which
programming language you used.  The developers of the Fortran runtime
took full advantage of that, and it contained routines written in
several languages.  This meant that we would either need to add a.out
support to the code generators of all of those compilers (there was no
common back end in those days) or write a VMS .obj-to-a.out
translator.  In the end we decided that the easiest solution to both
problems was to add a.out support to the VMS linker and to port it to
Ultrix.  The result was lk(1), a linker that accepted either VMS .obj
or a.out as input and generated an a.out executable.

> My point, the UNIX developers built what they needed and built that well.

Amen to that.  That observation applies to a lot of the design of Unix.

> Their format worked with their development primary language/tool (a.k.a. C)
> and they even made it work with an f77 implementation. So it is a little
> hard to knock them too much -- it was not part of the original design spec.

They did what was right given their circumstances and resources.  I
know of two major operating system development efforts at DEC, OFIS
and MICA, that illustrate what happens if you try to take the opposite
tack.  Their thinking was, "Gee, we have a lot to do and a short
schedule.  I know--let's invent a new programming language and write a
compiler for it."  Both ended up being disastrous examples of Second
System Syndrome.

> And I wonder how many people here know the significance of the "407" magic
>> number?
>>
> Today, few and fewer I fear.  For those do not, please see page 4-33 of the
> 1975/76 DEC PDP-11 Processor Handbook and think about boot blocks.  🍺
> ᐧ
Cute.

-Paul W.

  reply	other threads:[~2023-02-25 17:29 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-22 20:16 [TUHS] " segaloco via TUHS
2023-02-22 22:20 ` [TUHS] " Clem Cole
2023-02-23  0:17   ` segaloco via TUHS
2023-02-23  6:30   ` Lars Brinkhoff
2023-02-23 14:25     ` KenUnix
2023-02-23 19:37     ` Warner Losh
2023-02-24 17:01       ` Rich Salz
2023-02-23 16:49   ` Paul Winalski
2023-02-23 18:38     ` segaloco via TUHS
2023-02-23 20:40       ` Paul Winalski
2023-02-24 12:45     ` arnold
2023-02-24 13:13       ` Arno Griffioen via TUHS
2023-02-25 19:28         ` arnold
2023-02-25 19:34           ` Steffen Nurpmeso
2023-02-24 14:01       ` Harald Arnesen
2023-02-25  2:07     ` Dave Horsfall
2023-02-25 15:30       ` Clem Cole
2023-02-25 17:29         ` Paul Winalski [this message]
2023-02-23 15:13 Noel Chiappa
2023-02-23 21:37 Paul Ruizendaal
2023-02-23 22:11 ` segaloco via TUHS
2023-02-24  0:07   ` segaloco via TUHS
2023-02-25 20:14 Brian Walden
2023-02-26 15:51 Paul Winalski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CABH=_VTKMZ2w4emhTm2Bnc5no-5OdAdpSOYkMdM14Ciav9KAyQ@mail.gmail.com' \
    --to=paul.winalski@gmail.com \
    --cc=clemc@ccc.com \
    --cc=tuhs@tuhs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).