*BSD News Article 8761


Return to BSD News archive

Path: sserve!manuel.anu.edu.au!munnari.oz.au!hp9000.csc.cuhk.hk!saimiri.primate.wisc.edu!ames!agate!spool.mu.edu!sol.ctr.columbia.edu!ira.uka.de!math.fu-berlin.de!unidui!du9ds3!veit
From: veit@du9ds3 (Holger Veit)
Newsgroups: comp.unix.bsd
Subject: Re: Questions on Joerg Shared lib
Date: 9 Dec 92 08:23:52 GMT
Organization: Uni-Duisburg FB9 Datenverarbeitung
Lines: 52
Message-ID: <veit.723889432@du9ds3>
References: <1992Dec2.043206.23671@ntuix.ntu.ac.sg>
Reply-To: veit@du9ds3.fb9dv.uni-duisburg.de
NNTP-Posting-Host: du9ds3.fb9dv.uni-duisburg.de

In <1992Dec2.043206.23671@ntuix.ntu.ac.sg> othman@ntrc25.ntrc.ntu.ac.sg (othman (EEE/Div 4)) writes:


>1) What are the limitations of this shared lib, apart from having to convert
>the current libs.

Some object files in the libraries are "not compatible" with sharing, they
must be linked seperately. "Getopt" is one of the known ones, some of
the X11 libraries have a rich set of incompatibilities. Also the README
says that executables that modify themselves, such as undumping their
data segment, etc. do no longer work. "sendmail" and "emacs" are prominent
examples.

>2) How does the conversion work? Do we have to recompile all the libs? From
>the first analysis of the Makefiles, it appears as though it does not have to?

The existing libraries have to be unpacked and linked to a large image. Also
a stub lib has to be built which is linked with the application. The libraries
do not have to be recompiled (but should, e.g. with a gcc2).

>3) Do I have to recompile all utilities in order to exploit this shared lib?

Yes. And you have to repeat this again if you change any library.

>4) Is the patches to gcc and g++ really necessary? We can use command line
>options to select alternative crt and libc, can't we?

Do you want to change any Makefile around, or only the ones under <mk> ?

>I've deleted a lot of large sources but it is the small programs that benefit
>the most from shared libs, don't they?

The large libraries like X11, Xt, etc. are reduced most (in absolute size),
of course the shrinking effect of the small ones is considerable.
Be careful that you don't make everything that looks like an executable
shared. There are essential binaries that must remain static. "mount" for
instance is an example.


>--
>Othman bin Ahmad, School of EEE,
>Nanyang Technological University, Singapore 2263.
>Internet Email: eoahmad@ntuix.ntu.ac.sg

(Forgot the flaming sword for sharedlibs at home :-))

Holger
-- 
|  |   / Dr. Holger Veit         | INTERNET: veit@du9ds3.fb9dv.uni-duisburg.de
|__|  /  University of Duisburg  | "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|  | /   Dept. of Electr. Eng.   |   Sorry, the above really good fortune has
|  |/    Inst. f. Dataprocessing |      been CENSORED because of obscenity"