Shared libraries

Steve Friedl friedl at mtndew.UUCP
Wed Jan 10 09:39:09 AEST 1990


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 at vsi.com

"PostScript wizard in training." - me



More information about the Comp.unix.questions mailing list