From c4e78c0868a22971680217a41fdb73516a26813d Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Mon, 3 May 2021 13:37:00 +0930 Subject: PR27755, powerpc-ld infinite loop PR 27755 * elf32-ppc.c (ppc_elf_inline_plt): Do increment rel in loop. (cherry picked from commit 337d0bf887a3ed6b6b2123fecfec0736640edcaf) --- bfd/ChangeLog | 5 +++++ bfd/elf32-ppc.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index ad6f934..7fbea17 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2021-05-03 Alan Modra + + PR 27755 + * elf32-ppc.c (ppc_elf_inline_plt): Do increment rel in loop. + 2020-10-07 H.J. Lu PR ld/26711 diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c index bbb154f..72e4ea5 100644 --- a/bfd/elf32-ppc.c +++ b/bfd/elf32-ppc.c @@ -4237,7 +4237,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; -- cgit v1.1