From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25067 invoked by alias); 2 Jan 2012 09:36:30 -0000 Received: (qmail 24979 invoked by uid 22791); 2 Jan 2012 09:36:29 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=BAYES_00 X-Spam-Check-By: sourceware.org Received: from mail.synsport.com (HELO shepard.synsport.net) (208.69.230.148) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 02 Jan 2012 09:36:16 +0000 Received: from [192.168.1.35] (unknown [80.31.148.81]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by shepard.synsport.net (Postfix) with ESMTP id 7038D438EC for ; Mon, 2 Jan 2012 03:36:15 -0600 (CST) Message-ID: <4F017A8B.1000905@marino.st> Date: Mon, 02 Jan 2012 09:36:00 -0000 From: John Marino User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:5.0) Gecko/20110624 Thunderbird/5.0 MIME-Version: 1.0 To: binutils@sourceware.org Subject: Re: gold linker 2.22 regressed for DragonFly References: <4ED7FCA6.8090706@marino.st> <4ED88FA5.8050408@marino.st> <4EFF3AF3.3080404@marino.st> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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: 2012-01/txt/msg00006.txt.bz2 On 1/2/2012 3:05 AM, Ian Lance Taylor wrote: > John Marino writes: > >> On 12/2/2011 3:27 PM, Ian Lance Taylor wrote: >>> John Marino writes: >>> >>>> I need to stress that gold built with ld does not have this problem. >>>> It's only gold built with gold that segfaults. Does that affect your >>>> answer? >>> >>> Try using the gold option --no-ctors-in-init-array. >>> >>> Ian >> >> I'm sorry that I had to put this away for a while, but I've picked it >> back up today. >> >> Gold build with ld will function without segfaults and produces executables. >> Gold build with gold segfaults. It ignores all command-line options. >> >> I modified the makefile to set optimization level to 0. That let me see >> the values of variables in gdb. Using gdb on ld-new (gold built with >> ld), "print options" on gdb shows a properly defined option set of >> General_options class. Doing the same for ld1 (gold built by gold) >> shows every single option with null pointers. Not even strings like >> "Report usage information" and "Report version information" are included. >> >> So the problem lies in options.h within the General_options class. I >> have no idea what ld-new is doing wrong such that ld1 can't built its >> option set. These definitions are built with macros though. > > > Did you try using the --no-ctors-in-init-array option? > > Ian Yes, I modified the gold makefile to add that to ld1_LDFLAGS and it makes no difference. The resultant ld1 will still segfault as it tries to build ld2. John