This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] [SPARC] bfd,ld: Continue after partially-successful relaxed call relocations.


    
    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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]