From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5274 invoked by alias); 18 Jun 2014 00:29:09 -0000 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 Received: (qmail 5256 invoked by uid 89); 18 Jun 2014 00:29:08 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-pb0-f54.google.com Received: from mail-pb0-f54.google.com (HELO mail-pb0-f54.google.com) (209.85.160.54) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Wed, 18 Jun 2014 00:29:07 +0000 Received: by mail-pb0-f54.google.com with SMTP id un15so92391pbc.41 for ; Tue, 17 Jun 2014 17:29:05 -0700 (PDT) X-Received: by 10.68.129.99 with SMTP id nv3mr35989361pbb.128.1403051345601; Tue, 17 Jun 2014 17:29:05 -0700 (PDT) Received: from bubble.grove.modra.org (CPE-58-160-155-134.oycza5.sa.bigpond.net.au. [58.160.155.134]) by mx.google.com with ESMTPSA id zq5sm269960pbb.37.2014.06.17.17.29.03 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 17 Jun 2014 17:29:04 -0700 (PDT) Received: by bubble.grove.modra.org (Postfix, from userid 1000) id 75CFEEA39A4; Wed, 18 Jun 2014 09:59:00 +0930 (CST) Date: Wed, 18 Jun 2014 00:29:00 -0000 From: Alan Modra To: Will Newton Cc: "binutils@sourceware.org" Subject: Re: 32-bit PowerPC sdata linker problem Message-ID: <20140618002900.GM3462@bubble.grove.modra.org> Mail-Followup-To: Will Newton , "binutils@sourceware.org" References: <53918356.3040102@embedded-brains.de> <20140606105420.GH5592@bubble.grove.modra.org> <5391A4BF.2030308@embedded-brains.de> <20140606121659.GJ5592@bubble.grove.modra.org> <20140607124711.GO5592@bubble.grove.modra.org> <20140616130719.GK3462@bubble.grove.modra.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes X-SW-Source: 2014-06/txt/msg00155.txt.bz2 On Mon, Jun 16, 2014 at 03:11:12PM +0100, Will Newton wrote: > On 16 June 2014 15:09, Will Newton wrote: > > On 16 June 2014 14:07, Alan Modra wrote: > >> On Mon, Jun 16, 2014 at 12:21:23PM +0100, Will Newton wrote: > >>> PROVIDE_HIDDEN (__rel_iplt_start = .); > >>> *(.rel.iplt) > >>> PROVIDE_HIDDEN (__rel_iplt_end = .); > >>> PROVIDE_HIDDEN (__rela_iplt_start = .); > >>> PROVIDE_HIDDEN (__rela_iplt_end = .); > >> > >> This should fix it. Committed. > >> > >> * scripttempl/elf.sc: Edit out __rela_iplt symbol assignments from > >> .rel sections, and __rel_iplt from .rela sections. > >> * scripttempl/nds32elf.sc: Likewise. > >> * Makefile.am (ends32*.c) Depend on nds32elf.sc. > >> * Makefile.in: Regenerate. > > > > Yes, this fixes the problem for me. Thanks! > > Would it be possible to apply the fix to the stable branch too? Done. I'm also going to commit the following to 2.24. PR 17047 * ldlang.c (lang_finish): Don't free linker hash table. diff --git a/ld/ldlang.c b/ld/ldlang.c index ba7f493..9121aa2 100644 --- a/ld/ldlang.c +++ b/ld/ldlang.c @@ -1238,7 +1238,14 @@ lang_init (void) void lang_finish (void) { + /* Some targets require access to the linker hash table during the + _bfd_write_contents call in bfd_close, so it can't be freed + before bfd_close. It can't be freed after bfd_close either, + since bfd_alloc memory holding side data structures disappears + (PR17047). So don't free it. + bfd_link_hash_table_free (link_info.output_bfd, link_info.hash); + */ bfd_hash_table_free (&lang_definedness_table); output_section_statement_table_free (); } -- Alan Modra Australia Development Lab, IBM