public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* PR27451, -z start_stop_gc for powerpc64
@ 2021-03-02 11:09 Alan Modra
  0 siblings, 0 replies; only message in thread
From: Alan Modra @ 2021-03-02 11:09 UTC (permalink / raw)
  To: binutils

PowerPC64 has its own gc_mark_dynamic_ref.

	PR 27451
	* elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Ignore synthesized
	linker defined start/stop symbols when start_stop_gc.

diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c
index dcd427b383..8a32fa47f7 100644
--- a/bfd/elf64-ppc.c
+++ b/bfd/elf64-ppc.c
@@ -5749,6 +5749,9 @@ ppc64_elf_gc_mark_dynamic_ref (struct elf_link_hash_entry *h, void *inf)
 
   if ((eh->elf.root.type == bfd_link_hash_defined
        || eh->elf.root.type == bfd_link_hash_defweak)
+      && (!eh->elf.start_stop
+	  || eh->elf.root.ldscript_def
+	  || !info->start_stop_gc)
       && ((eh->elf.ref_dynamic && !eh->elf.forced_local)
 	  || ((eh->elf.def_regular || ELF_COMMON_DEF_P (&eh->elf))
 	      && ELF_ST_VISIBILITY (eh->elf.other) != STV_INTERNAL

-- 
Alan Modra
Australia Development Lab, IBM

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

only message in thread, other threads:[~2021-03-02 11:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-02 11:09 PR27451, -z start_stop_gc for powerpc64 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).