public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* PowerPC64 DT_RELR local PLT
@ 2022-01-19  6:29 Alan Modra
  0 siblings, 0 replies; only message in thread
From: Alan Modra @ 2022-01-19  6:29 UTC (permalink / raw)
  To: binutils

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.

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);
 		  }
 	      }

-- 
Alan Modra
Australia Development Lab, IBM

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-01-19  6:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-19  6:29 PowerPC64 DT_RELR local PLT Alan Modra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).