aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-msp430.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2015-01-15 16:20:19 +0000
committerNick Clifton <nickc@redhat.com>2015-01-15 16:20:19 +0000
commit2d071cfc6614b4ec30fa4ef8b8af5bdf2c177858 (patch)
treedbe37a6c1c9087200948d19bd2700441eb543812 /bfd/elf32-msp430.c
parentca55926c2fad07fef0e6dce8beb948167990a2e7 (diff)
downloadgdb-2d071cfc6614b4ec30fa4ef8b8af5bdf2c177858.zip
gdb-2d071cfc6614b4ec30fa4ef8b8af5bdf2c177858.tar.gz
gdb-2d071cfc6614b4ec30fa4ef8b8af5bdf2c177858.tar.bz2
Fixes a bug in the relaxation of R_MSP430X_ABS16 to R_MSP430_10_PCREL.
* elf32-msp430.c (msp430_elf_relax_section): Skip unhandled relocs. Include PC-relative adjustment for R_MSP430X_ABS16 relaxation.
Diffstat (limited to 'bfd/elf32-msp430.c')
-rw-r--r--bfd/elf32-msp430.c3
1 files changed, 2 insertions, 1 deletions
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;