delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/10/04/23:27:02

Message-ID: <37F957D1.43BA@ns.sympatico.ca>
From: Klaas <klaas AT ns DOT sympatico DOT ca>
X-Mailer: Mozilla 3.04 (Win95; I)
MIME-Version: 1.0
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Linker trimming unused code/data
References: <Pine DOT SUN DOT 3 DOT 91 DOT 991004171251 DOT 25603D-100000 AT is> <37F91817 DOT 910DB5E4 AT hmc DOT edu>
Lines: 30
Date: Tue, 05 Oct 1999 01:44:16 GMT
NNTP-Posting-Host: 142.177.95.67
X-Complaints-To: abuse AT ns DOT sympatico DOT ca
X-Trace: sapphire.mtt.net 939087856 142.177.95.67 (Mon, 04 Oct 1999 22:44:16 ADT)
NNTP-Posting-Date: Mon, 04 Oct 1999 22:44:16 ADT
Organization: Sympatico-Subscriber
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Nate Eldredge wrote:
> 
> Eli Zaretskii wrote:
> >
> > On Mon, 4 Oct 1999, Gautier wrote:
> >
> > > > What you need to do is to divide a single module into several smaller
> > > > modules.  Then the linker will only link in those modules which you
> > > > actually need in your program.
> > >
> > > Of course - but in fact (after some inquiry etc.) the `ld' linker is almost
> > > the only that can't do it itself!
> >
> > If you think GNU ld should support this feature, I suggest posting to
> > gnu.utils.bug (or write to its e-mail gateway, bug-gnu-utils AT gnu DOT org)
> > where it will be seen by Binutils maintainer(s).
> 
> Note that some people might expect this behavior.  For instance, many
> RCS-controlled projects insert a version string in each file like:
> 
> static char rcsid[] = "$$RCS$43278$foo$bar$baz";
> 
> Since this is compiled in to the binary, one can tell what version of
> each source file went into a given binary.  If ld removed it, this would
> break.

Of course the unused code-trimming could be implemented via commandline
switch(es).

-Mike

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019