Fix 16846, LTO mismatched TLS reference

H.J. Lu hjl.tools@gmail.com
Wed Apr 16 15:16:00 GMT 2014


On Wed, Apr 16, 2014 at 2:44 AM, Alan Modra <amodra@gmail.com> wrote:
> I think this is all we need to fix pr16848.  HJ, do you see anything
> more we should do here?  I'm wondering why we have type_change_okcd
> when oldbfd is the plugin.

It is because there is no symbol type in plugin.

>
>         PR 16848

Wrong PR number. It should be PR ld/16846.

>         * elflink.c (_bfd_elf_merge_symbol): Ignore TLS mismatch when
>         current bfd is a plugin.
>
> diff --git a/bfd/elflink.c b/bfd/elflink.c
> index 3de00e1..9848dc2 100644
> --- a/bfd/elflink.c
> +++ b/bfd/elflink.c
> @@ -1108,6 +1108,8 @@ _bfd_elf_merge_symbol (bfd *abfd,
>    /* Plugin symbol type isn't currently set.  Stop bogus errors.  */
>    if (oldbfd != NULL && (oldbfd->flags & BFD_PLUGIN) != 0)
>      *type_change_ok = TRUE;
> +  else if ((abfd->flags & BFD_PLUGIN) != 0)
> +    ;
>
>    /* Check TLS symbol.  We don't check undefined symbol introduced by
>       "ld -u".  */
>
> --
> Alan Modra
> Australia Development Lab, IBM



-- 
H.J.



More information about the Binutils mailing list