diff options
author | Kaz Kojima <kkojima@rr.iij4u.or.jp> | 2014-08-01 19:13:39 +0900 |
---|---|---|
committer | Kaz Kojima <kkojima@rr.iij4u.or.jp> | 2014-08-01 19:13:39 +0900 |
commit | b131d1fcfa5978f105a9ac39057475f54bab9202 (patch) | |
tree | a628ba1da811509052e75f196cf157e829843d47 /gas | |
parent | 22d64076c87f4fe82a3dbb1bdf3df576d36ab4c0 (diff) | |
download | gdb-b131d1fcfa5978f105a9ac39057475f54bab9202.zip gdb-b131d1fcfa5978f105a9ac39057475f54bab9202.tar.gz gdb-b131d1fcfa5978f105a9ac39057475f54bab9202.tar.bz2 |
Fix PR10378 which is SH relax bug.
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) |