From: Alan Modra Date: Wed, 11 Mar 2020 04:13:16 +0000 (+1030) Subject: powerpc64-ld infinite loop X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=435edf0bf231240ccecb474b74ebb49dc8db2633;p=binutils-gdb.git powerpc64-ld infinite loop If this code dealing with possible conversion of inline plt sequences is ever executed, ld will hang. A binary with such sequences and of code size larger than approximately 90% the reach of an unconditional branch is the trigger. Oops. * elf64-ppc.c (ppc64_elf_inline_plt): Do increment rel in for loop. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 67858c7538b..c60fe8c7f93 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,7 @@ +2020-03-11 Alan Modra + + * elf64-ppc.c (ppc64_elf_inline_plt): Do increment rel in for loop. + 2020-03-10 Alan Modra PR 25648 diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c index 05ef34b030a..c804ab3d6af 100644 --- a/bfd/elf64-ppc.c +++ b/bfd/elf64-ppc.c @@ -7621,7 +7621,7 @@ ppc64_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_ppc64_reloc_type r_type; unsigned long r_symndx;