[TUHS] Early shared library implementations

Rob Gingell gingell at computer.org
Mon Oct 11 16:43:45 AEST 2021


On 9/30/2021 2:01 AM, Paul Ruizendaal via TUHS wrote:
> So far, I have not come across any shared library implementations or
> precursors in early Unix prior to SunOS 4.

On 9/30/2021 3:39 AM, arnold at skeeve.com wrote:
> In more or less the same time frame, the AT&T UnixPC / 3B1, which was
> OEM'ed from Convergent, had shared libraries.  This was ~ 1986.

On 9/30/2021 7:12 AM, Charles H Sauer wrote:
> ... A more > sophisticated shared library design was one of the additions in AIX 3.

There was also SVR3 (which I believe was the basis for the referenced 
AIX 3 shared library work). SVR3 shipped in 1987, SunOS 4 in May 1988.

There was a swarm of UNIX shared library projects during the 1980s. Some 
of those preceded or were occurring contemporaneously with SunOS 4. Many 
reached at least a running prototype stage, perhaps deployed as specials 
for customers, and some reached product status.

Some of the projects had papers published and there are a few old 
manuals available through bitsavers.org.

To fill out the history a bit, here are three (including SVR3) that had 
papers published. They also serve to illustrate the different approaches 
being taken. I can not find on-line copies of the papers, but others may 
have better luck or will have access to paper copies of the conference 
proceedings. SVR3 has extensive documentation on bitsavers.org, as does 
some older editions of UTek.

The three projects are:

1. a 68000-based 7th Edition port;
2. UTek: Tektronix's version of 4BSD for their workstations; and
3. System V Release 3.

The first project had a paper published as part of the USEnix track of a 
UniForum Conference in January 1984 and was titled "Transparent 
Implementation of Shared Libraries" and authored by C.B. Downing and F. 
Farance.

The other two had papers published in the 1986 Atlanta Summer USEnix 
proceedings and were: "A New Virtual-Memory Implementation for UNIX" by 
E. W. Sznyter, P. Clancy, and J. Crossland (UTek); and "Shared Libraries 
on UNIX System V" by J. Q. Arnold.

A very thorough description of the SVR3 shared library mechanism is 
available at:

http://bitsavers.org/pdf/att/unix/System_V_Release_3/308-139_UNIX_System_V_Release_3_Programmers_Guide_1987.pdf

Some UTek documentation, including their mmap specification but 
appearing to pre-date their shared libraries work, is available at:

http://bitsavers.org/pdf/tektronix/6130_4132/

For the "Transparent Implementation..." paper, the "transparent" 
referred to a goal that an application's source code not be modified to 
link with shared libraries. That, and sharing, were about the only goals 
common to all the projects of the era. Nearly every other design choice 
varied across the projects as determined by the approach taken or the 
constraints under which the project operated.

On the subject of mmap's origins: UTek used mmap, but specified mmap to 
take a pid instead of a file descriptor for the source of the mapping. 
It appears they contemplated an fmap to map from a file. So for sharing 
to occur, there was to be a daemon that scooped up and relocated in its 
address space all the libraries to be shared and then advertise what it 
had. Client processes would rendezvous with the daemon at runtime and 
map the portions of that process they required to accomplish the sharing.

A common characteristic of these 3 projects was that symbols were 
resolved at ld-time, necessitating some external coordination about how 
address spaces were to be laid out but minimizing run-time overheads. 
The referenced SVR3 documentation provides a good description of the 
considerations involved.


More information about the TUHS mailing list