🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.modula2
Article #764

Re: How to make libraries smaller?

#764
From: RCAPENER
Date: Sun, 03 Jun 1990 01:06
35 lines
1897 bytes
In article <6608.2664C206@puddle.fidonet.org>,
> Peter.M..Perchansky@f101.n273.z1.fidonet.org (Peter M. Perchansky) writes:
> Hello:
> 
>     TopSpeed Modula-2's linker is smart, and will only include procedures,
>     constants, and variables used within a given module.  Turbo Pascal and
>     Turbo C spout the same features.
> 
>     Most linkers, as you are already aware of, do not boast such an ability.

Well, I wouldn't know about MOST linkers.  Most FORTRAN linkers
bring it all in whether you need it or not.  If you have seen
one that doesn't display this behavior let me know.

On the other hand, I have yet to see a C linker bring in anything
more than is absolutely needed, but this assumes you specify the
proper options on UNIX systems.  For example, the NeXT requires
the -lsys_s flag to link in the shared libraries, whereas most
SYSV or BSD machines link shared libs by default.  Regardless,
they do NOT link in unused functions or vars!  If you have a
C system in mind that contradicts my experience with the following
C compilers please let me know.  I KNOW the following systems
will NOT bring in unused functions or variables.

Aztec C			Lattice C		MicroSoft C
C86-C			Turbo-C			High-C
pcc (portable cc)	gcc (Gnu cc)		vcc (VAX-ULTRIX CC)
						    (also VMS)

The VAX C compiler will produce huge files if you don't link in
the shared library, otherwise they are about 10-20% larger in
size than what pcc produces on an Ultrix (MicroVAX-II hardware
for both VMS and ULTRIX for a fair comparison).

C' ya later
Technical Details
Message-ID: <67437@cc.utah.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!hellgate.utah.edu!cc.utah.edu!rcapener
References: <6608.2664C206@puddle.fidonet.org>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!hellgate.utah.edu!cc.utah.edu!rcapener
From: RCAPENER@cc.utah.edu
Newsgroups: comp.lang.modula2
Subject: Re: How to make libraries smaller?
Message-ID: <67437@cc.utah.edu>
Date: 3 Jun 90 01:06:33 GMT
References: <6608.2664C206@puddle.fidonet.org>
Lines: 35