*BSD News Article 16240


Return to BSD News archive

Newsgroups: comp.os.386bsd.development
Path: sserve!newshost.anu.edu.au!munnari.oz.au!constellation!convex!convex!convex!darwin.sura.net!howland.reston.ans.net!torn!nott!bnrgate!bnr.co.uk!uknet!pavo.csi.cam.ac.uk!camcus!pc123
From: pc123@cus.cam.ac.uk (Pete Chown)
Subject: Re: Shared libraries
In-Reply-To: tdphette@mke.ab.com's message of 18 May 1993 15:08:36 GMT
Message-ID: <PC123.93May18174806@bootes.cus.cam.ac.uk>
Sender: news@infodev.cam.ac.uk (USENET news)
Nntp-Posting-Host: bootes.cus.cam.ac.uk
Organization: U of Cambridge, England
References: <PC123.93May14232156@bootes.cus.cam.ac.uk> <1tau5kINNq52@scarecrow.mke.ab.com>
Date: Tue, 18 May 1993 16:48:10 GMT
Lines: 24

In article <1tau5kINNq52@scarecrow.mke.ab.com> tdphette@mke.ab.com (Thad Phetteplace x4461) writes:

   One quick question.  Does your implementation used static or dynamic
   entry points?  One thing I look for in a shared library is not having
   to recompile all my apps when the library changes slightly.

It uses a mixture.  You only have to recompile in the following cases:

1.  The data symbols exported from the library change.
2.  A completely new procedure is exported from the library.
3.  A procedure is removed that used to be exported.

Thus minor bug fixes are unlikely to need any recompilation, but major
rethinks are.

The reason is that procedure calls into the library are indirected
through a jump table.  So if a procedure is added or removed the jump
offsets will move around, breaking things.  On the other hand, the
data symbols are not indirected, so no changes can be made there
without breaking things.
--
---------------------------------------------+ "A tight hat can be stretched.
Pete Chown, pc123@phx.cam.ac.uk (Internet)   |  First damp the head with steam
            pc123@uk.ac.cam.phx (Janet :-)  -+  from a boiling kettle."