tilegx: Check bfd_link_executable for TLS check
authorH.J. Lu <hjl.tools@gmail.com>
Thu, 19 Oct 2017 12:22:23 +0000 (05:22 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Thu, 19 Oct 2017 12:22:35 +0000 (05:22 -0700)
commit280958942b74f3164708700f195188c4d3446f58
tree23b86f959d781b52563ae9a5f9f107dbc10cf72d
parent1ba1f393faac96f6ad80499d7133df23d6187b8c
tilegx: Check bfd_link_executable for TLS check

Copied from x86, check bfd_link_executable, instead of bfd_link_pic,
for TLS transition check.  Not sure if it works correctly.  All usages
of bfd_link_pic should be audited.

PR ld/22263
* elfxx-tilegx.c (tilegx_elf_tls_transition): Replace
bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
bfd_link_executable for TLS check.
(tilegx_elf_check_relocs): Likewise.
(allocate_dynrelocs): Likewise.
(tilegx_elf_relocate_section): Likewise.
bfd/ChangeLog
bfd/elfxx-tilegx.c