Xref: utzoo comp.unix.wizards:24519 comp.sys.3b1:871 Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!uwm.edu!uwvax!margay.cs.wisc.edu!dws From: dws@margay.cs.wisc.edu (DaviD W. Sanderson) Newsgroups: comp.unix.wizards,comp.sys.3b1 Subject: Re: Shared Libraries: Unique to Suns?? Keywords: static shared library history Message-ID: <1991Mar25.035710.27456@spool.cs.wisc.edu> Date: 25 Mar 91 03:57:10 GMT References: <1991Mar24.024830.8763@swbatl.sbc.com> <1991Mar24.152800.20651@cbnewsm.att.com> Sender: news@spool.cs.wisc.edu (The News) Organization: U of Wisconsin CS Dept Lines: 48 myamin@cbnewsm.att.com (m.yamin) writes: >In fact, the UnixPC may have had the first released UNIX implementation >of shared libraries. > M. Yamin my@syscad.att.com As far as I know, static shared libraries (as opposed to the dynamic shared libraries in SVR4 and SunOS) were introduced with the UNIX-PC to make UNIX workable (as opposed to possible) on the machine. There are two relevant useful properties of static shared libraries (and dynamic shared libraries, for that matter). 1. Executables linked with a static shared library occupy less disk space than executables linked with the corresponding ordinary archive library. 2. The text of a static shared library is present in memory at most once. Thus executables need less physical memory to run, provided there is at least one other executable using the same library already running. The UNIX-PC had relatively little disk and memory, so for performance (and space) reasons static shared libraries were introduced. Most of the noncritical OS programs were linked with the shared libc; this significantly reduced the overall disk space requirements (I don't remember how much). One advantage of static shared libraries over dynamic shared libraries is that programs using them start more quickly (no "runtime linking" overhead). The BIG disadvantage relative to dynamic shared libraries is that source code maintenance is a headache if you want to create a new version of the library that can be installed and used by programs already linked with an older version of the library. (e.g. creating a new /shlib/libc_s to be installed somewhere WITHOUT having to relink all the programs that use it.) In terms of flexibility and ease of source maintenance (e.g. maintaining one set of source for both the archive and the shared versions of a library), dynamic shared libraries are far superior to static shared libraries. Disclaimer: I worked on shared libraries when I was at AT&T. -- ___ / __\ U N S H I N E DaviD W. Sanderson | | | I N E dws@cs.wisc.edu _____| | |_____ ________ \ / \ |__/ /////__ Fusion Powered Locomotives Made to Order \____/ \__|_/ \\\\\______ (TARDIS model available at extra cost)