delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/10/05/04:20:41

Date: Tue, 5 Oct 1999 09:50:58 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Nate Eldredge <neldredge AT hmc DOT edu>
cc: djgpp AT delorie DOT com
Subject: Re: Linker trimming unused code/data
In-Reply-To: <37F91817.910DB5E4@hmc.edu>
Message-ID: <Pine.SUN.3.91.991005095039.2899G-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Mon, 4 Oct 1999, Nate Eldredge wrote:

> 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";

This method strictly speaking might break any time without notice,
since GCC already warns you that rcsid is defined but not used.  Given
the attitude of the present GCC maintainers, you can just wake up one
day and find out that the latest GCC release does that by default...

If you *really* want the string to appear in the binary, you need to
actually *reference* it from the program.  Then the suggested ld
feature won't do any harm.

- Raw text -


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