PATCH: Linker is broken due to _bfd_elf_merge_symbol change
Paul Brook
paul@codesourcery.com
Wed May 4 13:10:00 GMT 2005
> 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
More information about the Binutils
mailing list