aboutsummaryrefslogtreecommitdiff
path: root/gas
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
parentd40d037cac40b66f4055f2aa42acaef86e9281f6 (diff)
downloadgdb-2968149b03375032d4f48d8dfbb82007ff0aca1f.zip
gdb-2968149b03375032d4f48d8dfbb82007ff0aca1f.tar.gz
gdb-2968149b03375032d4f48d8dfbb82007ff0aca1f.tar.bz2
Fix xstormy16's handling of pc-relative relocs against defined symbols.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog6
-rw-r--r--gas/config/tc-xstormy16.c8
2 files changed, 12 insertions, 2 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index fe1ef70..33db418 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,9 @@
+2003-05-02 Nick Clifton <nickc@redhat.com>
+
+ * config/tc-xstormy16.c (xstormy16_md_apply_fix3): Do not bias the
+ addend with the symbol's value for pc-relative relocations against
+ a defined symbol - this will be done automatically.
+
2003-05-01 H.J. Lu <hjl@gnu.org>
* config/obj-elf.c (obj_elf_type): Accept "notype" and
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;
}