[comp.arch] Unix with dynamic loading

kent@xanth.UUCP (01/01/70)

In article <376e654f.1201@apollo.uucp> labo@apollo.UUCP (Dale Labossiere) writes:
>In article <2067@sfsup.UUCP> shap@sfsup.UUCP (J.S.Shapiro) writes:
>>In article <2501@xanth.UUCP>, kyle@xanth.UUCP (Kyle Jones) writes:
>>> In <14888@topaz.rutgers.edu>, hedrick@topaz.rutgers.edu (Charles Hedrick)
>>> sez:
>>> Please explain more about shared libraries.
[good stuff from Kyle about shared libraries omitted]
>>This scheme is referred to as "dynamic loading."
>This "dynamic loading" scheme is in fact what Apollo systems use.  The
>compilers generate position independent code, and the libraries can be
>mapped anywhere in the process's address space.
>
>Rather than have a monolithic jump table for a shared library, shared
>libraries "register" their global addresses in a "Known Global Table"
>(KGT). Programs which invoke shared library functions do so via an
>indirect address linkage variable in their data space (the slight
>difference being that there are only linkage variables for those
>shared functions that are invoked, not a complete table for all of the
>libraries functions).
>
>Object files are tagged and when executed, the system loader (not UNIX
>ld(1)) resolves the undefined global's addresses using the KGT and
>patches up the program's linkage variables.

Well, ring my chimes!  If this is possible in Unix, it would sure help
the commercial success of Unix if it became common practice.

(Sample-of-one argument follows - add salt!)  I worked at a heavy
industry manufacturing company with 6.5 million source code lines of
production COBOL and FORTRAN running in a three shift, seven day per
week operation.  (To give you an idea, twice a week they unloaded a
_semitrailer_ full of laser printer paper into the computer center.)
When I became aware (and enamored) of Unix, I asked "Why aren't we
using this _great_ operating system here for our 200 programmers?  It
sure would boost productivity."  The answer was: "Unix doesn't do
dynamic loading; we could never maintain our software base if we had
to relink every routine each time a subroutine was recompiled for
changes to meet our changing manufacturing requirements."

What these folks did was test a modified routine on a representative
sample of the programs that called it, then add it into the production
dynamic load library, without ever recompiling or relinking the
calling routines.  You can see that, with hundreds of programmers and
thousands or tens of thousands of code modules, dynamic loading
becomes a big, big configuration management win.

Now, were these folks unique, or is there really an opportunity here
to expand the customer base of Unix by adding dynamic loading to more
Unix versions?  

Kent, the man from xanth.  "His expression lit up.  'Hey, you wouldn't
be a dope smuggler, would you?'  Rail looked confused.  'Why would
anyone wish to smuggle stupidity when there is so much of it readily
available?'" -- Alan Dean Foster, GLORY LANE