*BSD News Article 16247


Return to BSD News archive

Path: sserve!newshost.anu.edu.au!munnari.oz.au!constellation!aardvark.ucs.uoknor.edu!ns1.nodak.edu!netnews.nwnet.net!serval!hlu
Newsgroups: comp.os.386bsd.development
Subject: Re: Shared libraries
Message-ID: <1993May18.182936.2924@serval.net.wsu.edu>
From: hlu@eecs.wsu.edu (HJ Lu)
Date: Tue, 18 May 93 18:29:36 GMT
Sender: news@serval.net.wsu.edu (USENET News System)
References: <PC123.93May14232156@bootes.cus.cam.ac.uk> <1tau5kINNq52@scarecrow.mke.ab.com> <PC123.93May18174806@bootes.cus.cam.ac.uk>
Organization: School of EECS, Washington State University
Lines: 38

In article <PC123.93May18174806@bootes.cus.cam.ac.uk>, pc123@cus.cam.ac.uk (Pete Chown) writes:
|> 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.

What do you mean by `change'? If I move the data symbols to other files,
do I have to recompile the old apps?

|> 2.  A completely new procedure is exported from the library.

Does that mean if I add a new function to the library, I have to
recompile the old apps?. If it was true, it would be ridiculous.

|> 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.

That is too bad. I won't be able to use the new shared libraries compiled
with new gcc 2.4 with the old apps which are linked to the shared libraries
compiled with gcc 1.39. It may happen only thing you need to fix a bug
in an application is to fix the shared library. I have done that. I think
it should be fixed first.


H.J.