*BSD News Article 48791


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!simtel!agis!gatech!news.mathworks.com!news.ultranet.com!news.sprintlink.net!in1.uu.net!manquehue.scc.puc.cl!news.puc.cl!cfs
From: cfs@numero1.mat.puc.cl (Cristian Ferretti)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: object files for shared libraries
Date: 16 Aug 1995 14:30:06 GMT
Organization: Pontificia Universidad Catolica de Chile
Lines: 30
Distribution: world
Message-ID: <CFS.95Aug16103006@numero1.mat.puc.cl>
NNTP-Posting-Host: numero1.mat.puc.cl


Hi all,
	I have been looking for shared libraries preparation in lib sources.
Seems like you should compile with -fpic and -DBSDSHLIB and later link with
ld -B shareable -o libfoo.so.M.M $(OBJECTS).
	But sometimes after compiling ld -x -r is run on each object file
(ld manual says its for striping unexported symbols).

May someone point why and when is this necesary (or if it exists point to the
documentation)?

Also if possible, may someone compare FreeBSD shared libraries with other
unixes implementation? At first they look like the ones in SunOS 4.

Thanx in advance,

-cristian

-------------------------------------------------------------------------------
Cristian Ferretti S.                                  email: cfs@numero1.puc.cl

Creating a framework within wich people can utilize diverse talents,
develop new skills, and contribute ideas is not just the only decent thing
to do but also makes practical and economical sense.
                -- Bjarne Stroustroup

``I feel that it is a mistake to use Pascal for anything much beyond its
original target. In its pure form, Pascal is a toy language, suitable for
teaching but not for real programming.''
                -- Brian Kernighan