Red Hat Bugzilla – Bug 194455
SCCS Ident strings stripped by over-zealous optimiser
Last modified: 2007-11-30 17:11:34 EST
Description of problem:
The SCCS-style ident strings have all been optimised out by the C compiler.
This makes it impossible to see what components are included in a binary
by doing the standard: strings <bin-file> | grep "@(#)" | sort | more
Version-Release number of selected component (if applicable):
gcc 4.0.2 20051125
100% - just include the line:
static char ident = "@(#) filename.c";
in a C source file and don't reference the string
Steps to Reproduce:
That's intentional, if you want the string kept in, either you need to compile
without optimizatins, or tell GCC you want to keep the variable eventhough
it is not used (add __attribute__((__used__)) to it).