aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf64-ppc.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2020-03-11 14:43:16 +1030
committerAlan Modra <amodra@gmail.com>2020-03-11 15:01:15 +1030
commit435edf0bf231240ccecb474b74ebb49dc8db2633 (patch)
treeac88e0fdc137f1f8f617508f7f79ada0a6ebe57c /bfd/elf64-ppc.c
parent9cc89dc0acc140cb27e21d2597af42d36444673b (diff)
downloadgdb-435edf0bf231240ccecb474b74ebb49dc8db2633.zip
gdb-435edf0bf231240ccecb474b74ebb49dc8db2633.tar.gz
gdb-435edf0bf231240ccecb474b74ebb49dc8db2633.tar.bz2
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.
Diffstat (limited to 'bfd/elf64-ppc.c')
-rw-r--r--bfd/elf64-ppc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c
index 05ef34b..c804ab3 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;