From: Nick Clifton Date: Tue, 25 Jul 2017 11:47:46 +0000 (+0100) Subject: Fix thinko in previous change to elf32-msp430.c X-Git-Tag: users/ARM/embedded-binutils-master-2017q4~1550 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=133193b8aef9f74abce69ec84beca227dbd7f9a4;p=external%2Fbinutils.git Fix thinko in previous change to elf32-msp430.c --- diff --git a/bfd/elf32-msp430.c b/bfd/elf32-msp430.c index 75a6288..e1e6ed0 100644 --- a/bfd/elf32-msp430.c +++ b/bfd/elf32-msp430.c @@ -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;