aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-msp430.c
diff options
context:
space:
mode:
authorBenjamin Green <bengreen5mx@gmail.com>2017-07-25 09:41:23 +0100
committerNick Clifton <nickc@redhat.com>2017-07-25 09:41:23 +0100
commitcfe7b9bd58c634bda974e291ce95030b1e42a690 (patch)
treea96f8671e9a768137123359626836414f0b19426 /bfd/elf32-msp430.c
parentec06425629516e11f3106d51fa85f49da147765f (diff)
downloadgdb-cfe7b9bd58c634bda974e291ce95030b1e42a690.zip
gdb-cfe7b9bd58c634bda974e291ce95030b1e42a690.tar.gz
gdb-cfe7b9bd58c634bda974e291ce95030b1e42a690.tar.bz2
Add a linker branch optimization for the MSP430.
PR 21824 * elf32-msp430.c (msp430_elf_relax_section): Allow conversion of 16-bit absolute branches into 10-bit pc-relative branches on the MSP430 as well as the MSP430X.
Diffstat (limited to 'bfd/elf32-msp430.c')
-rw-r--r--bfd/elf32-msp430.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/bfd/elf32-msp430.c b/bfd/elf32-msp430.c
index 9fae015..75a6288 100644
--- a/bfd/elf32-msp430.c
+++ b/bfd/elf32-msp430.c
@@ -2227,8 +2227,8 @@ msp430_elf_relax_section (bfd * abfd, asection * sec,
/* Try to turn a 16-bit absolute branch into a 10-bit pc-relative
branch. */
- if (uses_msp430x_relocs (abfd)
- && ELF32_R_TYPE (irel->r_info) == R_MSP430X_ABS16)
+ if (ELF32_R_TYPE (irel->r_info) == R_MSP430X_ABS16
+ || ELF32_R_TYPE (irel->r_info) == R_MSP430_16)
{
bfd_vma value = symval;