aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-msp430.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2017-07-25 12:47:46 +0100
committerNick Clifton <nickc@redhat.com>2017-07-25 12:47:46 +0100
commit133193b8aef9f74abce69ec84beca227dbd7f9a4 (patch)
treee1f8d7d3bd972d0a7acda86e8b5d05a9ded93d7a /bfd/elf32-msp430.c
parent7cbc739c71fcd82fbfbf180ff636e3fbee4f30a1 (diff)
downloadgdb-133193b8aef9f74abce69ec84beca227dbd7f9a4.zip
gdb-133193b8aef9f74abce69ec84beca227dbd7f9a4.tar.gz
gdb-133193b8aef9f74abce69ec84beca227dbd7f9a4.tar.bz2
Fix thinko in previous change to elf32-msp430.c
Diffstat (limited to 'bfd/elf32-msp430.c')
-rw-r--r--bfd/elf32-msp430.c6
1 files changed, 4 insertions, 2 deletions
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;