Fix thinko in previous change to elf32-msp430.c
authorNick Clifton <nickc@redhat.com>
Tue, 25 Jul 2017 11:47:46 +0000 (12:47 +0100)
committerNick Clifton <nickc@redhat.com>
Tue, 25 Jul 2017 11:47:46 +0000 (12:47 +0100)
bfd/elf32-msp430.c

index 75a6288a32ae3b56e19bf5c73545f19d01445965..e1e6ed0ee5734f37904f4c14790ec5b12bf371ab 100644 (file)
@@ -2227,8 +2227,10 @@ msp430_elf_relax_section (bfd * abfd, asection * sec,
 
        /* Try to turn a 16-bit absolute branch into a 10-bit pc-relative
           branch.  */
-       if (ELF32_R_TYPE (irel->r_info) == R_MSP430X_ABS16
-           || ELF32_R_TYPE (irel->r_info) == R_MSP430_16)
+       if ((uses_msp430x_relocs (abfd)
+            && ELF32_R_TYPE (irel->r_info) == R_MSP430X_ABS16)
+           || (! uses_msp430x_relocs (abfd)
+               && ELF32_R_TYPE (irel->r_info) == R_MSP430_16))
          {
            bfd_vma value = symval;