Date: Tue, 5 Oct 1999 09:50:58 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: Nate Eldredge cc: djgpp AT delorie DOT com Subject: Re: Linker trimming unused code/data In-Reply-To: <37F91817.910DB5E4@hmc.edu> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk 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.