From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26960 invoked by alias); 16 May 2011 00:15:47 -0000 Received: (qmail 26951 invoked by uid 22791); 16 May 2011 00:15:46 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST X-Spam-Check-By: sourceware.org Received: from mail-pw0-f41.google.com (HELO mail-pw0-f41.google.com) (209.85.160.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 16 May 2011 00:15:31 +0000 Received: by pwi12 with SMTP id 12so2825945pwi.0 for ; Sun, 15 May 2011 17:15:30 -0700 (PDT) Received: by 10.68.41.168 with SMTP id g8mr6076069pbl.194.1305504930578; Sun, 15 May 2011 17:15:30 -0700 (PDT) Received: from bubble.grove.modra.org ([115.187.252.19]) by mx.google.com with ESMTPS id y5sm2913205pbq.57.2011.05.15.17.15.27 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 15 May 2011 17:15:29 -0700 (PDT) Received: by bubble.grove.modra.org (Postfix, from userid 1000) id EB38316DE443; Mon, 16 May 2011 09:45:23 +0930 (CST) Date: Mon, 16 May 2011 00:15:00 -0000 From: Alan Modra To: Craig Southeren Cc: binutils@sourceware.org Subject: Re: PATCH: PR ld/12730: regression] crash when allocating in a static constructor Message-ID: <20110516001523.GC20800@bubble.grove.modra.org> Mail-Followup-To: Craig Southeren , binutils@sourceware.org References: <4DCFA77B.9060300@postincrement.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4DCFA77B.9060300@postincrement.com> User-Agent: Mutt/1.5.20 (2009-06-14) X-IsSubscribed: yes Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org X-SW-Source: 2011-05/txt/msg00201.txt.bz2 On Sun, May 15, 2011 at 08:14:19PM +1000, Craig Southeren wrote: > At the heart of the issue is the timing of initialising statics at > the global/namespace level. You won't get much traction on this issue here on the binutils list. We did have a ld bug that affected you but that has now been fixed. Further discussion should go to one of the gcc lists. If you can get agreement that functions declared with __attribute__ ((constructor)) ought to be treated exactly as standard C++ namespace scope constructors regarding initialisation order, then it would be good to have your testcase added to the g++ testsuite. That should ensure both g++ and ld do not regress. FWIW, I think your testcase is quite reasonable. The main reason I wanted the testcase removed from the ld testsuite because I found the testcase failed using commonly available versions of g++, and therefore a C++ testcase wasn't the best way to test ld behaviour. -- Alan Modra Australia Development Lab, IBM