This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] [SPARC] bfd,ld: Continue after partially-successful relaxed call relocations.
- From: jose dot marchesi at oracle dot com (Jose E. Marchesi)
- To: binutils at sourceware dot org
- Cc: Alyssa Milburn <amilburn at zall dot org>
- Date: Mon, 05 Dec 2016 13:40:57 +0100
- Subject: Re: [PATCH] [SPARC] bfd,ld: Continue after partially-successful relaxed call relocations.
- Authentication-results: sourceware.org; auth=none
- References: <20161125130528.GA25683@zall.org> <874m2vabis.fsf@oracle.com>
ping. Nick, ok for master?
diff --git a/bfd/elfxx-sparc.c b/bfd/elfxx-sparc.c
index 056a4b7..f191d57 100644
--- a/bfd/elfxx-sparc.c
+++ b/bfd/elfxx-sparc.c
@@ -4122,7 +4122,7 @@ _bfd_sparc_elf_relocate_section (bfd *output_bfd,
contents + rel->r_offset - 4);
if ((z & (0xffffffff ^ RD(~0)))
!= (INSN_OR | RS1(O7) | RS2(G0)))
- break;
+ continue;
/* The sequence was
or %o7, %g0, %rN
@@ -4135,7 +4135,7 @@ _bfd_sparc_elf_relocate_section (bfd *output_bfd,
reg = (y & RS1(~0)) >> 14;
if (reg != ((z & RD(~0)) >> 25)
|| reg == G0 || reg == O7)
- break;
+ continue;
bfd_put_32 (input_bfd, (bfd_vma) INSN_NOP,
contents + rel->r_offset + 4);
LGTM.
This bug has been lurking around since f7775d95. There used to be a
switch statement between that code and the for loop iterating over the
relocations, hence the breaks.
No regressions in sparc64-linux-gnu.