diff options
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 6 | ||||
-rw-r--r-- | gas/config/tc-sh.c | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 72d54db..b7926f4 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,9 @@ +2014-08-01 Takashi Yoshii <yoshii.takashi@renesas.com> + + PR 10378 + * config/tc-sh.c (tc_gen_reloc): Fix initialization of addend in + SWITCH_TABLE case. + 2014-07-29 Matthew Fortune <matthew.fortune@imgtec.com> * config/tc-mips.c: Rename INSN_LOAD_COPROC_DELAY to INSN_LOAD_COPROC 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) |