aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-xstormy16.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2003-05-02 12:42:13 +0000
committerNick Clifton <nickc@redhat.com>2003-05-02 12:42:13 +0000
commit2968149b03375032d4f48d8dfbb82007ff0aca1f (patch)
treeba866f931f9f3bc68bc2ab8ba1542c2b08b1a53c /gas/config/tc-xstormy16.c
parentd40d037cac40b66f4055f2aa42acaef86e9281f6 (diff)
downloadfsf-binutils-gdb-2968149b03375032d4f48d8dfbb82007ff0aca1f.zip
fsf-binutils-gdb-2968149b03375032d4f48d8dfbb82007ff0aca1f.tar.gz
fsf-binutils-gdb-2968149b03375032d4f48d8dfbb82007ff0aca1f.tar.bz2
Fix xstormy16's handling of pc-relative relocs against defined symbols.
Diffstat (limited to 'gas/config/tc-xstormy16.c')
-rw-r--r--gas/config/tc-xstormy16.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/gas/config/tc-xstormy16.c b/gas/config/tc-xstormy16.c
index e7b6efd..2c80b1a 100644
--- a/gas/config/tc-xstormy16.c
+++ b/gas/config/tc-xstormy16.c
@@ -556,8 +556,12 @@ xstormy16_md_apply_fix3 (fixP, valueP, seg)
/* Tuck `value' away for use by tc_gen_reloc.
See the comment describing fx_addnumber in write.h.
- This field is misnamed (or misused :-). */
- fixP->fx_addnumber += value;
+ This field is misnamed (or misused :-).
+ We do not do this for pc-relative relocs against a
+ defined symbol, since it will be done for us. */
+ if ((! fixP->fx_pcrel)
+ || (fixP->fx_addsy && ! S_IS_DEFINED (fixP->fx_addsy)))
+ fixP->fx_addnumber += value;
}