aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-v850.c
diff options
context:
space:
mode:
authorJeff Law <law@redhat.com>1996-10-16 17:26:50 +0000
committerJeff Law <law@redhat.com>1996-10-16 17:26:50 +0000
commite1d98a0a6547e6c518640756263dfdd0df8ae1cd (patch)
tree5eccbe791987bd5457038140adf84dfd2b48c89c /bfd/elf32-v850.c
parent687f4e2379f3aaf14bd74482b85488f444696464 (diff)
downloadgdb-e1d98a0a6547e6c518640756263dfdd0df8ae1cd.zip
gdb-e1d98a0a6547e6c518640756263dfdd0df8ae1cd.tar.gz
gdb-e1d98a0a6547e6c518640756263dfdd0df8ae1cd.tar.bz2
* elf32-v850.c (bfd_elf32_v850_reloc): Mask out bits we
no longer want in pc-relative relocs. Fixing some g++ testsuite failures.
Diffstat (limited to 'bfd/elf32-v850.c')
-rw-r--r--bfd/elf32-v850.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/bfd/elf32-v850.c b/bfd/elf32-v850.c
index b2dfbc3..1640375 100644
--- a/bfd/elf32-v850.c
+++ b/bfd/elf32-v850.c
@@ -314,6 +314,7 @@ bfd_elf32_v850_reloc (abfd, reloc, symbol, data, isection, obfd, err)
return bfd_reloc_dangerous;
insn = bfd_get_32 (abfd, (bfd_byte *) data + reloc->address);
+ insn &= ~0xfffe003f;
insn |= (((relocation & 0xfffe) << 16)
| ((relocation & 0x3f0000) >> 16));
bfd_put_32 (abfd, insn, (bfd_byte *)data + reloc->address);
@@ -328,6 +329,7 @@ bfd_elf32_v850_reloc (abfd, reloc, symbol, data, isection, obfd, err)
return bfd_reloc_dangerous;
insn = bfd_get_16 (abfd, (bfd_byte *) data + reloc->address);
+ insn &= 0xf870;
insn |= ((relocation & 0x1f0) << 7) | ((relocation & 0x0e) << 3);
bfd_put_16 (abfd, insn, (bfd_byte *)data + reloc->address);
return bfd_reloc_ok;