https://sourceware.org/bugzilla/show_bug.cgi?id=34165

--- Comment #4 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to Alan Modra from comment #2)
> -               BFD_ASSERT (elf_hash_table (info)->tls_sec != NULL);
> -               if (r_type == R_ALPHA_GOTDTPREL)
> +               if (elf_hash_table (info)->tls_sec == NULL)
> +                 {
> +                   /* If tls_sec is NULL, R_ALPHA_GOTDTPREL and
> +                      R_ALPHA_GOTTPREL must reference local weak
> +                      undefined symbols.  */
> +                   if (!_bfd_elf_symbol_refs_local_p (&h->root, info,
> +                                                      false)
> +                       || h->root.root.type != bfd_link_hash_undefweak)
> +                     abort ();
> +                   value = 0;
> +                 }
> +               else if (r_type == R_ALPHA_GOTDTPREL)
> 
> The logic here looks wrong.  You should be setting the value to zero for
> undefweak refs_local_p syms, then asserting or aborting if tls_sec is NULL
> for the other cases.  tls_sec might be non-NULL due to other tls syms.

Fixed in the v2 patch.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Reply via email to