]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Wrong operand for SADDR (rl78)
authorEgor Vishnyakov <lenvampir@yandex.ru>
Mon, 1 Feb 2021 16:44:32 +0000 (16:44 +0000)
committerNick Clifton <nickc@redhat.com>
Mon, 1 Feb 2021 16:45:26 +0000 (16:45 +0000)
PR 27254
* elf32-rl78.c (rl78_elf_relocate_section): Fix calculation of
offset for the R_RL78_RH_SADDR relocation.

bfd/ChangeLog
bfd/elf32-rl78.c

index 1eebae0404dd48ac9888372a65b65916ef9e54e5..3aaf9f81ce817772626bcd749fddc7bc77ed99d0 100644 (file)
@@ -1,3 +1,9 @@
+2021-02-01  Egor Vishnyakov  <lenvampir@yandex.ru>
+
+       PR 27254
+       * elf32-rl78.c (rl78_elf_relocate_section): Fix calculation of
+       offset for the R_RL78_RH_SADDR relocation.
+
 2021-01-29  Alan Modra  <amodra@gmail.com>
 
        PR 27271
index a3c697550deeaaab974779d17bfd5e8cc5f884c5..a88db133725a5d062a49fc2e29c59fc8e37a4103 100644 (file)
@@ -923,7 +923,7 @@ rl78_elf_relocate_section
 
        case R_RL78_RH_SADDR:
          RANGE (0xffe20, 0xfff1f);
-         OP (0) = relocation & 0xff;
+         OP (0) = (relocation - 0x20) & 0xff;
          break;
 
          /* Complex reloc handling:  */