Return to BSD News archive
Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!spool.mu.edu!usenet.eel.ufl.edu!news.mathworks.com!newsfeed.internetmci.com!uwm.edu!uwvax!tricia!news.sprintlink.net!news-chi-13.sprintlink.net!helena.MT.net!nate From: nate@trout.mt.sri.com (Nate Williams) Newsgroups: comp.unix.bsd.freebsd.misc Subject: Re: ld & PIC & bsd.lib.mk question Date: 20 Aug 1996 16:22:52 GMT Organization: SRI Intl. - Montana Operations Lines: 25 Message-ID: <4vcoos$ejf@helena.MT.net> References: <3219A9CD.41C67EA6@rockwell.cz> Reply-To: "Nate Williams" <nate@sneezy.sri.com> NNTP-Posting-Host: trout.mt.sri.com In article <3219A9CD.41C67EA6@rockwell.cz>, Petr Kodl <pecold@rockwell.cz> wrote: >Could anyone explain meaning of the following step in ><bsd.lib.mk> > >.cc.so .C.so: > ${CXX} ${PICFLAG} -DPIC ${CXXFLAGS} -c ${.IMPSRC} -o ${.TARGET} > @${LD} -x -r ${.TARGET} > @mv a.out ${.TARGET} This step removes out many un-necessary symbols such as the intermediate labels and statics which shouldn't be visible and only clutter up nm listings, and avoids the programmer getting multiple definition errors for symbols which really only exist locally and shouldn't be seen globally. Nate -- nate@sri.com | Research Engineer, SRI Intl. - Montana Operations nate@trout.mt.sri.com | Loving life in God's country, the great state of work #: (406) 449-7662 | Montana (all the crazies are now in jail 'cept us home #: (406) 443-7063 | natives). - Fly fishing fanatic!