* powerpc64-ld infinite loop
@ 2020-03-11 5:21 Alan Modra
0 siblings, 0 replies; only message in thread
From: Alan Modra @ 2020-03-11 5:21 UTC (permalink / raw)
To: binutils
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/elf64-ppc.c b/bfd/elf64-ppc.c
index 05ef34b030..c804ab3d6a 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;
--
Alan Modra
Australia Development Lab, IBM
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-03-11 5:21 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-11 5:21 powerpc64-ld infinite loop Alan Modra
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).