From owner-freebsd-current@FreeBSD.ORG Tue Nov 9 00:50:55 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7BA8216A4CE for ; Tue, 9 Nov 2004 00:50:55 +0000 (GMT) Received: from tx1.mail.ox.ac.uk (tx1.mail.ox.ac.uk [129.67.1.167]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0FD4143D45 for ; Tue, 9 Nov 2004 00:50:55 +0000 (GMT) (envelope-from colin.percival@wadham.ox.ac.uk) Received: from scan1.mail.ox.ac.uk ([129.67.1.166] helo=localhost) by tx1.mail.ox.ac.uk with esmtp (Exim 4.42) id 1CRKDm-0006Qj-3d for current@freebsd.org; Tue, 09 Nov 2004 00:50:54 +0000 Received: from rx1.mail.ox.ac.uk ([129.67.1.165]) by localhost (scan1.mail.ox.ac.uk [129.67.1.166]) (amavisd-new, port 25) with ESMTP id 24061-08 for ; Tue, 9 Nov 2004 00:50:52 +0000 (GMT) Received: from gateway.wadham.ox.ac.uk ([163.1.161.253]) by rx1.mail.ox.ac.uk with smtp (Exim 4.42) id 1CRKDk-0006QY-6J for current@freebsd.org; Tue, 09 Nov 2004 00:50:52 +0000 Received: (qmail 11776 invoked by uid 1004); 9 Nov 2004 00:50:52 -0000 Received: from colin.percival@wadham.ox.ac.uk by gateway by uid 71 with qmail-scanner-1.20 (clamscan: 0.67. sweep: 2.18/3.79. Clear:RC:1(163.1.161.203):. Processed in 0.016091 secs); 09 Nov 2004 00:50:52 -0000 Received: from dhcp1203.wadham.ox.ac.uk (HELO ?163.1.161.203?) (163.1.161.203) by gateway.wadham.ox.ac.uk with SMTP; 9 Nov 2004 00:50:52 -0000 Message-ID: <4190146C.4080204@wadham.ox.ac.uk> Date: Tue, 09 Nov 2004 00:50:52 +0000 From: Colin Percival User-Agent: Mozilla Thunderbird 0.9 (X11/20041107) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Kris Kennaway References: <41900FE6.1060602@wadham.ox.ac.uk> <20041109004016.GA75212@xor.obsecurity.org> In-Reply-To: <20041109004016.GA75212@xor.obsecurity.org> X-Enigmail-Version: 0.86.1.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit cc: kan@freebsd.org cc: current@freebsd.org Subject: Re: RFC: Building libstdc++ with -frandom-seed=RepeatabilityConsideredGood X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Nov 2004 00:50:55 -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