diff options
author | Alan Modra <amodra@gmail.com> | 2014-07-02 14:04:21 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2014-07-02 14:04:21 +0930 |
commit | afb933145e2869c73c08db0995171d0d2e5b6296 (patch) | |
tree | 733ad5ab233d24c714349213e25f10c974feab72 /bfd/elf64-ppc.c | |
parent | 53a8cffa625b1b4fdf76e2dd0f0e9fc4b1bf0ab4 (diff) | |
download | gdb-afb933145e2869c73c08db0995171d0d2e5b6296.zip gdb-afb933145e2869c73c08db0995171d0d2e5b6296.tar.gz gdb-afb933145e2869c73c08db0995171d0d2e5b6296.tar.bz2 |
Set DF_STATIC_TLS for PIEs
If we can dlopen an object then DF_STATIC_TLS is relevant.
* elf32-ppc.c (ppc_elf_check_relocs): Set DF_STATIC_TLS for PIEs too.
* elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
Diffstat (limited to 'bfd/elf64-ppc.c')
-rw-r--r-- | bfd/elf64-ppc.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c index 267a925..81e54a7 100644 --- a/bfd/elf64-ppc.c +++ b/bfd/elf64-ppc.c @@ -5328,7 +5328,7 @@ ppc64_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, case R_PPC64_GOT_TPREL16_LO_DS: case R_PPC64_GOT_TPREL16_HI: case R_PPC64_GOT_TPREL16_HA: - if (!info->executable) + if (info->shared) info->flags |= DF_STATIC_TLS; tls_type = TLS_TLS | TLS_TPREL; goto dogottls; @@ -5558,7 +5558,7 @@ ppc64_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, case R_PPC64_TPREL64: tls_type = TLS_EXPLICIT | TLS_TLS | TLS_TPREL; - if (!info->executable) + if (info->shared) info->flags |= DF_STATIC_TLS; goto dotlstoc; @@ -5636,8 +5636,7 @@ ppc64_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, case R_PPC64_TPREL16_HIGHESTA: if (info->shared) { - if (!info->executable) - info->flags |= DF_STATIC_TLS; + info->flags |= DF_STATIC_TLS; goto dodyn; } break; |