tilepro: Check bfd_link_executable for TLS check
authorH.J. Lu <hjl.tools@gmail.com>
Thu, 19 Oct 2017 12:20:44 +0000 (05:20 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Thu, 19 Oct 2017 12:21:01 +0000 (05:21 -0700)
commit1ba1f393faac96f6ad80499d7133df23d6187b8c
treeb028ce5446d3a99809f51020c4a7b2cc66882ac0
parent0fb7012e88683b8bd67a4fb8f782359fa0e11724
tilepro: 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
* elf32-tilepro.c (tilepro_elf_tls_transition): Replace
bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
bfd_link_executable for TLS check.
(tilepro_elf_check_relocs): Likewise.
(allocate_dynrelocs): Likewise.
(tilepro_elf_relocate_section): Likewise.
bfd/ChangeLog
bfd/elf32-tilepro.c