From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20160 invoked by alias); 16 Mar 2004 22:15:59 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 19902 invoked from network); 16 Mar 2004 22:15:58 -0000 Received: from unknown (HELO mail-out3.apple.com) (17.254.13.22) by sources.redhat.com with SMTP; 16 Mar 2004 22:15:58 -0000 Received: from mailgate1.apple.com (a17-128-100-225.apple.com [17.128.100.225]) by mail-out3.apple.com (8.12.11/8.12.11) with ESMTP id i2GMFvi2025291 for ; Tue, 16 Mar 2004 14:15:57 -0800 (PST) Received: from relay3.apple.com (relay3.apple.com) by mailgate1.apple.com (Content Technologies SMTPRS 4.3.6) with ESMTP id ; Tue, 16 Mar 2004 14:15:57 -0800 Received: from apple.com (mrs1.apple.com [17.201.24.248]) by relay3.apple.com (8.12.11/8.12.11) with ESMTP id i2GMFdm6025287; Tue, 16 Mar 2004 22:15:40 GMT Date: Tue, 16 Mar 2004 22:17:00 -0000 Subject: Re: PCH and exec-shield... Content-Type: text/plain; charset=US-ASCII; format=flowed Mime-Version: 1.0 (Apple Message framework v553) Cc: Mark Mitchell , Ian Lance Taylor , law@redhat.com, Eric Christopher , David Daney , gcc@gcc.gnu.org To: David Edelsohn From: Mike Stump In-Reply-To: <200403160414.i2G4EZT30916@makai.watson.ibm.com> Message-Id: <74DFCDDC-7797-11D8-86A0-003065A77310@apple.com> Content-Transfer-Encoding: 7bit X-SW-Source: 2004-03/txt/msg00866.txt.bz2 On Monday, March 15, 2004, at 08:14 PM, David Edelsohn wrote: > How does swizzling pointers on load only when the PCH file could > not be loaded at its original location slow down compilations and > serve no > purpose? If you accept as true that it could not be loaded at the desired address, then yes, swizzling is best, we can agree on this. On Monday, March 15, 2004, at 08:34 PM, Mark Mitchell wrote: > And, on some systems it's the only option; If it is, then, yes, swizzling is fine. I'm merely suggesting that it is best not to leap to swizzle on load prematurely. For example, on darwin, we had problems with this, and had to invent the host-darwin.c scheme to avoid adding the swizzle code. If we can, it is best to talk with the kernel and runtime people to find ways to get an address allocated, in all cases, adding OS or runtime features as necessary to achieve this. I'm merely trying to discourage swizzle on load as the first solution, when other solutions may exist. Take for example the OS feature of load at random address by default. This has the effect of making PCH unreliable otherwise. Now, suppose there is a bit that is inherited across exec that can turn the feature off, instead of SOL, we should instead just set that bit in gcc.c so that the invoked compilers are deterministic. Or, maybe there is a bit in the file-format somewhere that we can set to get determinism, if so, we should arrange to get that bit set. For OSes that have just added the feature, but have yet to provide the don't do this feature, we could politely ask them for such a feature. So, out of curiosity, on what system is it the only option?