Re: RFC: Building libstdc++ with -frandom-seed=RepeatabilityConsideredGood

From: Colin Percival <colin.percival_at_wadham.ox.ac.uk>
Date: Tue, 09 Nov 2004 00:50:52 +0000
Kris Kennaway wrote:
> On Tue, Nov 09, 2004 at 12:31:34AM +0000, Colin Percival wrote:
>>CFLAGS+=	-frandom-seed=RepeatabilityConsideredGood
>>
>>This is a new option in gcc 3.4 which allows a string to be specified
>>(in this case, the string "RepeatabilityConsideredGood") which will be
>>used as a random number seed in place of the usual behaviour (obtaining
>>a seed from the clock).
> 
> Why does libstdc++ think it needs randomness in its' build?  i.e. what
> is the impact of making it not random?

As I understand it, gcc needs to construct a name from each object file 
which is guaranteed to be unique.  When there is an externally visible 
symbol, gcc uses that -- and almost all object files have at least one 
externally visible symbol.  Four files, however, which used to be part 
of libobjc, and are now part of libstdc++, don't have any externally 
visible symbols, so gcc generates one using the file name plus a random
string.  (This isn't entirely relevant, but if someone can explain how
an object file is useful when it doesn't have any externally visible
symbols... enquiring minds want to know!)

As far as I can see, the only impact would be possible confusing errors
if someone tried to link together multiple object files compiled from
source files sharing the same names (and paths).

Colin Percival
Received on Mon Nov 08 2004 - 23:50:55 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:21 UTC