This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: Linker is broken due to _bfd_elf_merge_symbol change


> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]