From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20764 invoked by alias); 27 Jan 2012 16:49:13 -0000 Received: (qmail 20746 invoked by uid 22791); 27 Jan 2012 16:49:09 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org Received: from caibbdcaaaaf.dreamhost.com (HELO homiemail-a54.g.dreamhost.com) (208.113.200.5) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 27 Jan 2012 16:48:47 +0000 Received: from homiemail-a54.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a54.g.dreamhost.com (Postfix) with ESMTP id 29E1B3A406D for ; Fri, 27 Jan 2012 08:48:47 -0800 (PST) Received: from redwood.eagercon.com (c-76-102-3-160.hsd1.ca.comcast.net [76.102.3.160]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: eager@eagerm.com) by homiemail-a54.g.dreamhost.com (Postfix) with ESMTPSA id 053763A4065 for ; Fri, 27 Jan 2012 08:48:46 -0800 (PST) Message-ID: <4F22D56E.5030903@eagerm.com> Date: Fri, 27 Jan 2012 16:49:00 -0000 From: Michael Eager User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20111115 Thunderbird/8.0 MIME-Version: 1.0 To: binutils Subject: [PATCH, microblaze/ld] Reuse .rela.got section Content-Type: text/plain; charset=UTF-8; format=flowed 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/msg00250.txt.bz2 The linker was failing if the .rela.got section already existed. 2012-01-27 Michael Eager * bfd/elf32-microblaze.c (create_got_section): Reuse existing .rela.got section. Index: bfd/elf32-microblaze.c =================================================================== RCS file: /cvs/src/src/bfd/elf32-microblaze.c,v retrieving revision 1.11 diff -u -p -r1.11 elf32-microblaze.c --- bfd/elf32-microblaze.c 13 Jun 2011 00:59:10 -0000 1.11 +++ bfd/elf32-microblaze.c 27 Jan 2012 16:41:45 -0000 @@ -1880,7 +1880,8 @@ create_got_section (bfd *dynobj, struct if (!htab->sgot || !htab->sgotplt) return FALSE; - htab->srelgot = bfd_make_section (dynobj, ".rela.got"); + if (!(htab->srelgot = bfd_get_section_by_name (dynobj, ".rela.got"))) + htab->srelgot = bfd_make_section (dynobj, ".rela.got"); if (htab->srelgot == NULL || ! bfd_set_section_flags (dynobj, htab->srelgot, SEC_ALLOC | SEC_LOAD Applied. -- Michael Eager eager@eagercon.com 1960 Park Blvd., Palo Alto, CA 94306 650-325-8077