This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: PATCH: Linker is broken due to _bfd_elf_merge_symbol change
- From: Paul Brook <paul at codesourcery dot com>
- To: binutils at sources dot redhat dot com
- Cc: "H. J. Lu" <hjl at lucon dot org>,Alan Modra <amodra at bigpond dot net dot au>
- Date: Wed, 4 May 2005 14:08:03 +0100
- Subject: Re: PATCH: Linker is broken due to _bfd_elf_merge_symbol change
- References: <20050504054323.GA26693@lucon.org> <20050504061302.GA27031@lucon.org>
> H.J.
> ----
> 2005-05-03 H.J. Lu <hongjiu.lu@intel.com>
>
> * 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