From: ericy@hal.gnu.ai.mit.edu (Eric Youngdale)
Newsgroups: comp.unix.bsd
Subject: Re: Shared lib benchmarks, and experiences
Date: 12 Dec 1992 22:10:03 GMT
Organization: /etc/organization
Distribution: usa
NNTP-Posting-Host: hal.gnu.ai.mit.edu

In article <veit.724064215@du9ds3> veit@du9ds3.fb9dv.uni-duisburg.de writes:
>You see this from the Linux hacker's aspect only. There are many people
>who cannot afford recompiling anything from scratch any time, but want
>to have binaries. This is crucial in particular for X11. We already have
>different versions of X11 out (without shared libraries), what we certainly
>do not need are different versions of applications and libraries, such that
>every new program brings in its special set of shared libs. You may distribute
>object files, to be linked at the local system, but there are even people
>out there who do not have the space of ~7MB for kernel sources and objects
>available; they run into problems with for instance a XServer Link kit as well.

	Perhaps you do not understand.  The way our libraries are made, you can
just drop a new version into the /lib directory, and add a symlink, and you are
ready to run the same binaries with the new sharable library.  There is no need
to relink, and you can delete the old version of the sharable library any time
you wish.

>>FYI, we have been doing
>
>>cp xxxx.so.x.y /lib
>>cd /lib
>>ln -sf xxxx.so.x.y xxxx.so.x
>
>>for quite a while under linux.
>
>This means three patches in the libc, and you have three versions of it on
>the disk (for the really old, the middle old, and the new applications). 
>If you play this game with the X libraries,...
>I thought you wanted to reduce your disk space requirements :-)

	This was true for older versions, but H.J was trying to say that we
have come up with a way of making "plug compatible" libraries, so you can drop
in a new library and delete the old version.  We use jump tables to ensure that
an entry point for each function is always located at the same address, and we
have tools to ensure that each global data item also remains at a fixed
address.  We have recently overcome the obstacles that had prevented us from
preparing the sharable X libraries in a similar way, and I expect that the next
X release for linux will also be of a plug compatible variety.  These will be
made *without* source code modifications to the X library source code, btw. 
The worst case would be that you might have to patch each X Makefile, and it is
unclear if that would even be needed.

>>It is not impossible under Linux. But that belongs to another story.
>
>It is not impossible under 386bsd as well. But in contrast to Linux, we do
>not recommend hacking to the hell for the casual user, and it won't be
>necessary in the next future.

	Where did that come from?  I don't think that anyone recommends a lot
of hacking for the casual user.  It is true that the first sharable libraries
under linux were done so that everything needed to be relinked with a new
version, but as you might imagine, that got old real fast.  Even hackers don't
get off on something quite so mundane.  The plug compatible libraries were
developed in response to this, and so far I think that most people have been
quite satisfied with how it turned out.

-Eric