Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/gpl3/binutils/dist/bfd Fix regression where ld(1) i...



details:   https://anonhg.NetBSD.org/src/rev/e6ee0e7b5562
branches:  trunk
changeset: 961477:e6ee0e7b5562
user:      rin <rin%NetBSD.org@localhost>
date:      Thu Apr 22 01:09:48 2021 +0000

description:
Fix regression where ld(1) is trapped into infinite loop when
linking binary whose text does not fit within R_PPC_REL24.

Reported upstream as Bug 27755:
https://sourceware.org/bugzilla/show_bug.cgi?id=27755

This problem was introduced to binutils-2-31-1 for our tree.
netbsd-9 is affected, while netbsd-8 is not.

diffstat:

 external/gpl3/binutils/dist/bfd/elf32-ppc.c |  2 +-
 external/gpl3/binutils/dist/bfd/elf64-ppc.c |  2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diffs (24 lines):

diff -r 6e87808fa212 -r e6ee0e7b5562 external/gpl3/binutils/dist/bfd/elf32-ppc.c
--- a/external/gpl3/binutils/dist/bfd/elf32-ppc.c       Wed Apr 21 16:23:47 2021 +0000
+++ b/external/gpl3/binutils/dist/bfd/elf32-ppc.c       Thu Apr 22 01:09:48 2021 +0000
@@ -4235,7 +4235,7 @@
              return FALSE;
 
            relend = relstart + sec->reloc_count;
-           for (rel = relstart; rel < relend; )
+           for (rel = relstart; rel < relend; rel++)
              {
                enum elf_ppc_reloc_type r_type;
                unsigned long r_symndx;
diff -r 6e87808fa212 -r e6ee0e7b5562 external/gpl3/binutils/dist/bfd/elf64-ppc.c
--- a/external/gpl3/binutils/dist/bfd/elf64-ppc.c       Wed Apr 21 16:23:47 2021 +0000
+++ b/external/gpl3/binutils/dist/bfd/elf64-ppc.c       Thu Apr 22 01:09:48 2021 +0000
@@ -7507,7 +7507,7 @@
              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;



Home | Main Index | Thread Index | Old Index