aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-sh.c
diff options
context:
space:
mode:
authorKaz Kojima <kkojima@rr.iij4u.or.jp>2014-08-01 19:13:39 +0900
committerKaz Kojima <kkojima@rr.iij4u.or.jp>2014-08-01 19:13:39 +0900
commitb131d1fcfa5978f105a9ac39057475f54bab9202 (patch)
treea628ba1da811509052e75f196cf157e829843d47 /gas/config/tc-sh.c
parent22d64076c87f4fe82a3dbb1bdf3df576d36ab4c0 (diff)
downloadgdb-b131d1fcfa5978f105a9ac39057475f54bab9202.zip
gdb-b131d1fcfa5978f105a9ac39057475f54bab9202.tar.gz
gdb-b131d1fcfa5978f105a9ac39057475f54bab9202.tar.bz2
Fix PR10378 which is SH relax bug.
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)