Fix LTO mismatched TLS reference
PR 16846 * elflink.c (_bfd_elf_merge_symbol): Ignore TLS mismatch when current bfd is a plugin. Don't always set type_change_ok when old bfd is a plugin.
This commit is contained in:
parent
389b98f7d8
commit
4c34aff883
@ -1,3 +1,10 @@
|
|||||||
|
2014-04-17 Alan Modra <amodra@gmail.com>
|
||||||
|
|
||||||
|
PR 16846
|
||||||
|
* elflink.c (_bfd_elf_merge_symbol): Ignore TLS mismatch when
|
||||||
|
current bfd is a plugin. Don't always set type_change_ok
|
||||||
|
when old bfd is a plugin.
|
||||||
|
|
||||||
2014-04-16 Tristan Gingold <gingold@adacore.com>
|
2014-04-16 Tristan Gingold <gingold@adacore.com>
|
||||||
|
|
||||||
* mach-o-x86-64.c (bfd_mach_o_x86_64_mkobject): Adjust cpusubtype
|
* mach-o-x86-64.c (bfd_mach_o_x86_64_mkobject): Adjust cpusubtype
|
||||||
|
@ -1105,15 +1105,14 @@ _bfd_elf_merge_symbol (bfd *abfd,
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Plugin symbol type isn't currently set. Stop bogus errors. */
|
/* Check TLS symbols. We don't check undefined symbols introduced
|
||||||
if (oldbfd != NULL && (oldbfd->flags & BFD_PLUGIN) != 0)
|
by "ld -u" which have no type (and oldbfd NULL), and we don't
|
||||||
*type_change_ok = TRUE;
|
check symbols from plugins because they also have no type. */
|
||||||
|
if (oldbfd != NULL
|
||||||
/* Check TLS symbol. We don't check undefined symbol introduced by
|
&& (oldbfd->flags & BFD_PLUGIN) == 0
|
||||||
"ld -u". */
|
&& (abfd->flags & BFD_PLUGIN) == 0
|
||||||
else if (oldbfd != NULL
|
&& ELF_ST_TYPE (sym->st_info) != h->type
|
||||||
&& ELF_ST_TYPE (sym->st_info) != h->type
|
&& (ELF_ST_TYPE (sym->st_info) == STT_TLS || h->type == STT_TLS))
|
||||||
&& (ELF_ST_TYPE (sym->st_info) == STT_TLS || h->type == STT_TLS))
|
|
||||||
{
|
{
|
||||||
bfd *ntbfd, *tbfd;
|
bfd *ntbfd, *tbfd;
|
||||||
bfd_boolean ntdef, tdef;
|
bfd_boolean ntdef, tdef;
|
||||||
|
Loading…
Reference in New Issue
Block a user