Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!zaphod.mps.ohio-state.edu!usc!cs.utexas.edu!uunet!mtndew!friedl From: friedl@mtndew.UUCP (Steve Friedl) Newsgroups: comp.unix.questions Subject: Re: Shared libraries Summary: static libraries don't have runtime linking Message-ID: <323@mtndew.UUCP> Date: 9 Jan 90 22:39:09 GMT References: <941@targon.UUCP> <1990Jan9.003208.6061@virtech.uucp> Organization: Steve's Barnburner 386 Lines: 31 Ruud Harmsen writes: > Is it [shared libraries] any slower or faster than the normal way? Conor P. Cahill writes: > Slower link and program initialization, but from then on execution time > should be the same. I don't know about SunOS with dynamic shared libaries, but the static shared libraries provided with System V don't have any kind of linking operation at runtime. The functions in the shared library live at fixed addresses within the virtual address space, and the locations of same are set to absolute values within the program using them. At runtime, the executable is loaded normally, and calls to the shared library routines depend on the routines living where they are supposed to (they *better* be there). The sizes of a traditional "hello, world" example on my 386 running Sys V Rel 3.2: Shared: 460 + 1788 + 2552 = 4800 Nonshared: 10720 + 3044 + 2552 = 16316 Sys V Release 4.0 will probably have dynamic libraries. Steve -- Stephen J. Friedl, KA8CMY / Software Consultant / Tustin, CA / 3B2-kind-of-guy 714 544 6561 voice / 714 544 6496 fax / uunet!mtndew!friedl / friedl@vsi.com "PostScript wizard in training." - me