PR27755, powerpc-ld infinite loop

Message ID 20210503050532.GF22624@bubble.grove.modra.org
State New
Headers show
Series
  • PR27755, powerpc-ld infinite loop
Related show

Commit Message

Luis Machado via Binutils May 3, 2021, 5:05 a.m.
PR 27755
	* elf32-ppc.c (ppc_elf_inline_plt): Do increment rel in loop.


-- 
Alan Modra
Australia Development Lab, IBM

Patch

diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c
index b17954c7312..34a6b3fd837 100644
--- a/bfd/elf32-ppc.c
+++ b/bfd/elf32-ppc.c
@@ -4242,7 +4242,7 @@  ppc_elf_inline_plt (struct bfd_link_info *info)
 	      return false;
 
 	    relend = relstart + sec->reloc_count;
-	    for (rel = relstart; rel < relend; )
+	    for (rel = relstart; rel < relend; rel++)
 	      {
 		enum elf_ppc_reloc_type r_type;
 		unsigned long r_symndx;