aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-rl78.c
diff options
context:
space:
mode:
authorEgor Vishnyakov <lenvampir@yandex.ru>2021-02-01 16:44:32 +0000
committerNick Clifton <nickc@redhat.com>2021-02-01 16:45:26 +0000
commit34c10233cd204fe5ccafde590294fe20978cb7fa (patch)
treeb8fa13964fae44de186d4590da75bcc085571d4b /bfd/elf32-rl78.c
parent72a51a06038a1d707fc6b517aad08dd0ba9c6813 (diff)
downloadfsf-binutils-gdb-34c10233cd204fe5ccafde590294fe20978cb7fa.zip
fsf-binutils-gdb-34c10233cd204fe5ccafde590294fe20978cb7fa.tar.gz
fsf-binutils-gdb-34c10233cd204fe5ccafde590294fe20978cb7fa.tar.bz2
Wrong operand for SADDR (rl78)
PR 27254 * elf32-rl78.c (rl78_elf_relocate_section): Fix calculation of offset for the R_RL78_RH_SADDR relocation.
Diffstat (limited to 'bfd/elf32-rl78.c')
-rw-r--r--bfd/elf32-rl78.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bfd/elf32-rl78.c b/bfd/elf32-rl78.c
index a3c6975..a88db13 100644
--- a/bfd/elf32-rl78.c
+++ b/bfd/elf32-rl78.c
@@ -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: */