[comp.unix.questions] Dynamic Linking In Unix

mukherje@paul.rutgers.edu (Sanjoy Mukherjee) (03/12/91)

hi,
	The link editor of SunOS (ld) provides a dynamic link facility with
shared library objects (*.so). Though the "man" deals with it, it doesnot
say ,as for example, how to create/maintain such shared objects.
It will be of great help if someone can give me more information on this
matter.
	Thanx in advance
	Sanjoy

mouse@thunder.mcrcim.mcgill.edu (der Mouse) (03/15/91)

In article <Mar.11.11.48.43.1991.16658@paul.rutgers.edu>, mukherje@paul.rutgers.edu (Sanjoy Mukherjee) writes:
> The link editor of SunOS (ld) provides a dynamic link facility with
> shared library objects (*.so).

Only relatively recent versions of SunOS.  Definitely not before
release 4.*, and possibly not before 4.1* (not sure about 4.0.3).

> Though the "man" deals with it, it doesnot say ,as for example, how
> to create/maintain such shared objects.

You simply use ld to load a bunch of .o files together.  You probably
want to use -assert pure-text.  Apparently, the most critical thing is
the .so or .so.<major>.<minor> on the resulting file.

(You want to compile with -pic, and build the .so file with -assert
pure-text, because otherwise all the fixups that have to go on destroy
many of the advantages of shared "libraries".)

					der Mouse

			old: mcgill-vision!mouse
			new: mouse@larry.mcrcim.mcgill.edu