From: Nick Clifton Date: Thu, 15 Jan 2015 16:20:19 +0000 (+0000) Subject: Fixes a bug in the relaxation of R_MSP430X_ABS16 to R_MSP430_10_PCREL. X-Git-Tag: gdb-7.10-release~1909 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2d071cfc6614b4ec30fa4ef8b8af5bdf2c177858;p=external%2Fbinutils.git Fixes a bug in the relaxation of R_MSP430X_ABS16 to R_MSP430_10_PCREL. * elf32-msp430.c (msp430_elf_relax_section): Skip unhandled relocs. Include PC-relative adjustment for R_MSP430X_ABS16 relaxation. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index d054282..3a2d6f6 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +2015-01-15 Nick Clifton + + * elf32-msp430.c (msp430_elf_relax_section): Skip unhandled + relocs. Include PC-relative adjustment for R_MSP430X_ABS16 + relaxation. + 2015-01-15 Alan Modra * elflink.c (_bfd_elf_link_omit_section_dynsym): Return true for diff --git a/bfd/elf32-msp430.c b/bfd/elf32-msp430.c index 2157eb0..3a1c0a1 100644 --- a/bfd/elf32-msp430.c +++ b/bfd/elf32-msp430.c @@ -1921,7 +1921,7 @@ msp430_elf_relax_section (bfd * abfd, asection * sec, default: /* Not a conditional branch instruction. */ /* fprintf (stderr, "unrecog: %x\n", opcode); */ - goto error_return; + continue; } /* Note that we've changed the relocs, section contents, etc. */ @@ -2162,6 +2162,7 @@ msp430_elf_relax_section (bfd * abfd, asection * sec, { bfd_vma value = symval; + value -= (sec->output_section->vma + sec->output_offset); value -= irel->r_offset; value += irel->r_addend;