* elf32-v850.c (bfd_elf32_v850_reloc): Mask out bits we
authorJeff Law <law@redhat.com>
Wed, 16 Oct 1996 17:26:50 +0000 (17:26 +0000)
committerJeff Law <law@redhat.com>
Wed, 16 Oct 1996 17:26:50 +0000 (17:26 +0000)
        no longer want in pc-relative relocs.
Fixing some g++ testsuite failures.

bfd/ChangeLog
bfd/elf32-v850.c

index bee588fe470b3dd9651ed2f75533e19e5286a8f1..f36191121417de236654c5e05b68e0f325ac0dc3 100644 (file)
@@ -1,4 +1,9 @@
 start-sanitize-v850
+Wed Oct 16 11:24:35 1996  Jeffrey A Law  (law@cygnus.com)
+
+       * elf32-v850.c (bfd_elf32_v850_reloc): Mask out bits we
+       no longer want in pc-relative relocs.
+
 Tue Oct 15 22:17:37 1996  Jeffrey A Law  (law@cygnus.com)
 
        * elf32-v850.c (bfd_elf32_v850_reloc): Don't silently
index b2dfbc3f0d869447ebbbb53ebcf4bcfe47bd2bc5..1640375903d34f2de48d0788ad512836a68b647e 100644 (file)
@@ -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;