From edca615ac1901ddab9beec51a4bcf8395c307109 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Wed, 19 Jan 2022 13:28:04 +1030 Subject: [PATCH] PowerPC64 DT_RELR local PLT Similarly to the local GOT case. * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Don't allocate space for PLT relocs against local syms when enable_dt_relr. --- bfd/elf64-ppc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c index 0ac96afe5a3..dccd535dbb0 100644 --- a/bfd/elf64-ppc.c +++ b/bfd/elf64-ppc.c @@ -10356,7 +10356,8 @@ ppc64_elf_size_dynamic_sections (bfd *output_bfd, s = htab->pltlocal; ent->plt.offset = s->size; s->size += LOCAL_PLT_ENTRY_SIZE (htab); - if (bfd_link_pic (info)) + if (bfd_link_pic (info) + && !(info->enable_dt_relr && !htab->opd_abi)) htab->relpltlocal->size += sizeof (Elf64_External_Rela); } } -- 2.30.2