aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-sh.c
diff options
context:
space:
mode:
Diffstat (limited to 'gas/config/tc-sh.c')
-rw-r--r--gas/config/tc-sh.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gas/config/tc-sh.c b/gas/config/tc-sh.c
index a0cd212..6e9ae92 100644
--- a/gas/config/tc-sh.c
+++ b/gas/config/tc-sh.c
@@ -4435,7 +4435,7 @@ tc_gen_reloc (asection *section ATTRIBUTE_UNUSED, fixS *fixp)
if (SWITCH_TABLE (fixp))
{
*rel->sym_ptr_ptr = symbol_get_bfdsym (fixp->fx_subsy);
- rel->addend = 0;
+ rel->addend = rel->address - S_GET_VALUE(fixp->fx_subsy);
if (r_type == BFD_RELOC_16)
r_type = BFD_RELOC_SH_SWITCH16;
else if (r_type == BFD_RELOC_8)