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]

Commit: Fix msp430_elf_relax_section


Hi Guys,

   I am checking in the patch below to fix a couple of minor problems
   with the new R_MSP430X_ABS16 -> R_MSP43OX_10_PCREL relaxation.

Cheers
  Nick

bfd/ChangeLog
2015-01-15  Nick Clifton  <nickc@redhat.com>

	* elf32-msp430.c (msp430_elf_relax_section): Skip unhandled
	relocs.  Include PC-relative adjustment for R_MSP430X_ABS16
	relaxation.

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;
 	   


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