From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29570 invoked by alias); 4 May 2005 13:08:19 -0000 Mailing-List: contact binutils-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sources.redhat.com Received: (qmail 28724 invoked from network); 4 May 2005 13:08:06 -0000 Received: from unknown (HELO mail.codesourcery.com) (65.74.133.9) by sourceware.org with SMTP; 4 May 2005 13:08:06 -0000 Received: (qmail 16370 invoked from network); 4 May 2005 13:08:05 -0000 Received: from localhost (HELO 81-178-171-198.dsl.pipex.com) (paul@127.0.0.1) by mail.codesourcery.com with SMTP; 4 May 2005 13:08:05 -0000 From: Paul Brook To: binutils@sources.redhat.com Subject: Re: PATCH: Linker is broken due to _bfd_elf_merge_symbol change Date: Wed, 04 May 2005 13:10:00 -0000 User-Agent: KMail/1.7.2 Cc: "H. J. Lu" , Alan Modra References: <20050504054323.GA26693@lucon.org> <20050504061302.GA27031@lucon.org> In-Reply-To: <20050504061302.GA27031@lucon.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200505041408.03940.paul@codesourcery.com> X-SW-Source: 2005-05/txt/msg00099.txt.bz2 > H.J. > ---- > 2005-05-03 H.J. Lu > > * elflink.c (_bfd_elf_merge_symbol): Only skip weak definitions > at the end, if a strong definition has already been seen. > > --- bfd/elflink.c.weak 2005-05-02 08:34:48.000000000 -0700 > +++ bfd/elflink.c 2005-05-03 22:47:58.000000000 -0700 > @@ -1078,13 +1078,6 @@ _bfd_elf_merge_symbol (bfd *abfd, > > || h->root.type == bfd_link_hash_undefined) > > *size_change_ok = TRUE; > > - /* Skip weak definitions of symbols that are already defined. */ > - if (newdef && olddef && newweak && !oldweak) > - { > - *skip = TRUE; > - return TRUE; > - } > - > /* NEWDYNCOMMON and OLDDYNCOMMON indicate whether the new or old > symbol, respectively, appears to be a common symbol in a dynamic > object. If a symbol appears in an uninitialized section, and is > @@ -1211,6 +1204,10 @@ _bfd_elf_merge_symbol (bfd *abfd, > *size_change_ok = TRUE; > } > > + /* Skip weak definitions of symbols that are already defined. */ > + if (newdef && olddef && newweak && !oldweak) > + *skip = TRUE; Shouldn't this also return TRUE? Paul