GNU Binutils with patches for OS216
Revision | 2846942c7c83d007106cdcf1108ceedb50e1d4ec (tree) |
---|---|
Time | 2020-03-11 14:33:35 |
Author | Alan Modra <amodra@gmai...> |
Commiter | Alan Modra |
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.
(cherry picked from commit 435edf0bf231240ccecb474b74ebb49dc8db2633)
@@ -1,3 +1,7 @@ | ||
1 | +2020-03-11 Alan Modra <amodra@gmail.com> | |
2 | + | |
3 | + * elf64-ppc.c (ppc64_elf_inline_plt): Do increment rel in for loop. | |
4 | + | |
1 | 5 | 2020-01-15 Alan Modra <amodra@gmail.com> |
2 | 6 | |
3 | 7 | PR 25384 |
@@ -7158,7 +7158,7 @@ ppc64_elf_inline_plt (struct bfd_link_info *info) | ||
7158 | 7158 | return FALSE; |
7159 | 7159 | |
7160 | 7160 | relend = relstart + sec->reloc_count; |
7161 | - for (rel = relstart; rel < relend; ) | |
7161 | + for (rel = relstart; rel < relend; rel++) | |
7162 | 7162 | { |
7163 | 7163 | enum elf_ppc64_reloc_type r_type; |
7164 | 7164 | unsigned long r_symndx; |