From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20872 invoked by alias); 12 Jun 2009 12:36:15 -0000 Received: (qmail 20863 invoked by uid 22791); 12 Jun 2009 12:36:14 -0000 X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx2.redhat.com (HELO mx2.redhat.com) (66.187.237.31) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 12 Jun 2009 12:36:06 +0000 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n5CCZxON005425; Fri, 12 Jun 2009 08:35:59 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n5CCZwcc022849; Fri, 12 Jun 2009 08:35:59 -0400 Received: from [10.33.6.36] (vpn-6-36.fab.redhat.com [10.33.6.36]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n5CCZuZH025900; Fri, 12 Jun 2009 08:35:57 -0400 Message-ID: <4A324BAC.7090702@redhat.com> Date: Fri, 12 Jun 2009 12:36:00 -0000 From: Nick Clifton User-Agent: Thunderbird 2.0.0.21 (X11/20090320) MIME-Version: 1.0 To: Phil Blundell CC: binutils@sourceware.org Subject: Re: linker crash in arm stub generation References: <1244740179.21585.119.camel@mill.internal.reciva.com> In-Reply-To: <1244740179.21585.119.camel@mill.internal.reciva.com> Content-Type: multipart/mixed; boundary="------------000301030805010907090603" 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: 2009-06/txt/msg00187.txt.bz2 This is a multi-part message in MIME format. --------------000301030805010907090603 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 305 Hi Phil, > This testcase causes the linker (CVS head from a couple of days ago, > arm-linuxgnueabi target) to segfault in arm_build_one_stub(): Please could you open a bug report for this bug ? Once you have done that, please try out this patch which I think should solve the problem. Cheers Nick --------------000301030805010907090603 Content-Type: text/plain; name="elf32-arm.c.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="elf32-arm.c.patch" Content-length: 843 Index: bfd/elf32-arm.c =================================================================== RCS file: /cvs/src/src/bfd/elf32-arm.c,v retrieving revision 1.196 diff -c -3 -p -r1.196 elf32-arm.c *** bfd/elf32-arm.c 22 May 2009 11:58:44 -0000 1.196 --- bfd/elf32-arm.c 12 Jun 2009 12:34:47 -0000 *************** arm_build_one_stub (struct bfd_hash_entr *** 3450,3455 **** --- 3450,3460 ---- stub_addr = stub_sec->output_section->vma + stub_sec->output_offset + stub_entry->stub_offset; + if (stub_entry->target_section == NULL + || stub_entry->target_section->output_section == NULL) + /* The output section has been deleted, ignore this stub. */ + return TRUE; + /* This is the address of the stub destination. */ sym_value = (stub_entry->target_value + stub_entry->target_section->output_offset --------------000301030805010907090603--