diff options
author | Alan Modra <amodra@gmail.com> | 2020-03-11 14:43:16 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2020-03-11 16:09:38 +1030 |
commit | d120ec38f2572fe87f38294e45f297d0e547f8b1 (patch) | |
tree | 0c14e8def83f4efca698ada9e7f4c4b5de46ba08 | |
parent | 34a30b6758db4fe53b2872d7bd3824c778f6118c (diff) | |
download | gdb-binutils-2_31-branch.zip gdb-binutils-2_31-branch.tar.gz gdb-binutils-2_31-branch.tar.bz2 |
powerpc64-ld infinite loopbinutils-2_31-branch
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.
(cherry picked from commit 435edf0bf231240ccecb474b74ebb49dc8db2633)
-rw-r--r-- | bfd/ChangeLog | 4 | ||||
-rw-r--r-- | bfd/elf64-ppc.c | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 4af1532..30defb5 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,7 @@ +2020-03-11 Alan Modra <amodra@gmail.com> + + * elf64-ppc.c (ppc64_elf_inline_plt): Do increment rel in for loop. + 2019-04-24 H.J. Lu <hongjiu.lu@intel.com> PR ld/24458 diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c index 746506e..657a559 100644 --- a/bfd/elf64-ppc.c +++ b/bfd/elf64-ppc.c @@ -8391,7 +8391,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; |