From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2083 invoked by alias); 4 May 2005 13:10:29 -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 1726 invoked from network); 4 May 2005 13:10:04 -0000 Received: from unknown (HELO rwcrmhc13.comcast.net) (204.127.198.39) by sourceware.org with SMTP; 4 May 2005 13:10:04 -0000 Received: from lucon.org ([24.6.212.230]) by comcast.net (rwcrmhc13) with ESMTP id <20050504131003015004lbqde>; Wed, 4 May 2005 13:10:03 +0000 Received: by lucon.org (Postfix, from userid 1000) id DD768646BD; Wed, 4 May 2005 06:10:02 -0700 (PDT) Date: Wed, 04 May 2005 13:23:00 -0000 From: "H. J. Lu" To: Paul Brook Cc: binutils@sources.redhat.com, Alan Modra Subject: Re: PATCH: Linker is broken due to _bfd_elf_merge_symbol change Message-ID: <20050504131002.GA4578@lucon.org> References: <20050504054323.GA26693@lucon.org> <20050504061302.GA27031@lucon.org> <200505041408.03940.paul@codesourcery.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200505041408.03940.paul@codesourcery.com> User-Agent: Mutt/1.4.1i X-SW-Source: 2005-05/txt/msg00100.txt.bz2 On Wed, May 04, 2005 at 02:08:03PM +0100, Paul Brook wrote: > > 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? > Not if flip != NULL. H.J.