aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2022-01-19 10:53:53 +1030
committerAlan Modra <amodra@gmail.com>2022-01-19 16:45:45 +1030
commit8f22c9532b0a568046b8d05aa90631be822bba5f (patch)
tree39e698918f3baef9be016e1d127e3af5f2517b3d /bfd
parent05900cefe27ace7e1a839aa55f741f3df653f3da (diff)
downloadgdb-8f22c9532b0a568046b8d05aa90631be822bba5f.zip
gdb-8f22c9532b0a568046b8d05aa90631be822bba5f.tar.gz
gdb-8f22c9532b0a568046b8d05aa90631be822bba5f.tar.bz2
PowerPC64 DT_RELR local GOT
Fixes another case where we end up with superfluous R_PPC64_NONE. * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Don't allocate space for GOT relocs against non-TLS local syms when enable_dt_relr. (ppc64_elf_layout_multitoc): Likewise.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/elf64-ppc.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c
index aeae3b7..0ac96af 100644
--- a/bfd/elf64-ppc.c
+++ b/bfd/elf64-ppc.c
@@ -10318,8 +10318,9 @@ ppc64_elf_size_dynamic_sections (bfd *output_bfd,
htab->got_reli_size += rel_size;
}
else if (bfd_link_pic (info)
- && !(ent->tls_type != 0
- && bfd_link_executable (info)))
+ && (ent->tls_type == 0
+ ? !info->enable_dt_relr
+ : !bfd_link_executable (info)))
{
asection *srel = ppc64_elf_tdata (ibfd)->relgot;
srel->size += rel_size;
@@ -12815,8 +12816,9 @@ ppc64_elf_layout_multitoc (struct bfd_link_info *info)
htab->got_reli_size += rel_size;
}
else if (bfd_link_pic (info)
- && !(ent->tls_type != 0
- && bfd_link_executable (info)))
+ && (ent->tls_type == 0
+ ? !info->enable_dt_relr
+ : !bfd_link_executable (info)))
{
asection *srel = ppc64_elf_tdata (ibfd)->relgot;
srel->size += rel_size;