This is the mail archive of the
mailing list for the GCC project.
Re: Numeric suffixes on symbols
- From: Nicholas Sherlock <n dot sherlock at gmail dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Thu, 01 Oct 2009 17:04:52 +1300
- Subject: Re: Numeric suffixes on symbols
- References: <email@example.com>
Michael Morrell wrote:
I'm building some code that I want to make sure produces the same bits each
time. I ran into a case where the only difference between the result from
two different compilation is the names of some of the symbols.
For example, I may see the symbol name:
in the first build, and then:
in the second build.
I'm not sure if it will solve your problem, but GCC has a command-line
option for setting the random seed it uses to generate at least some
This option provides a seed that GCC uses when it would otherwise
use random numbers. It is used to generate certain symbol names that
have to be different in every compiled file. It is also used to place
unique stamps in coverage data files and the object files that produce
them. You can use the -frandom-seed option to produce reproducibly
identical object files.
The string should be different for every file you compile.