diff options
author | Alan Modra <amodra@gmail.com> | 2001-06-27 03:14:47 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2001-06-27 03:14:47 +0000 |
commit | d48019e08841eb295f4b565799898ebcb4b0f063 (patch) | |
tree | 945b4a634df68ed761bb5502b8f75edf97a89d83 /gas/write.c | |
parent | 446f28631310205b7515598fdbcd88a4d1838da2 (diff) | |
download | gdb-d48019e08841eb295f4b565799898ebcb4b0f063.zip gdb-d48019e08841eb295f4b565799898ebcb4b0f063.tar.gz gdb-d48019e08841eb295f4b565799898ebcb4b0f063.tar.bz2 |
* write.c (fixup_segment <Difference of 2 syms same seg>): If
pcrel, subtract MD_PCREL_FROM_SECTION value.
Diffstat (limited to 'gas/write.c')
-rw-r--r-- | gas/write.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gas/write.c b/gas/write.c index ff63836..b6492c2 100644 --- a/gas/write.c +++ b/gas/write.c @@ -2661,8 +2661,10 @@ fixup_segment (fixP, this_segment_type) as_bad_where (fixP->fx_file, fixP->fx_line, _("callj to difference of 2 symbols")); #endif /* TC_I960 */ - add_number += S_GET_VALUE (add_symbolP) - - S_GET_VALUE (sub_symbolP); + add_number += (S_GET_VALUE (add_symbolP) + - S_GET_VALUE (sub_symbolP)); + if (pcrel) + add_number -= MD_PCREL_FROM_SECTION (fixP, this_segment_type); add_symbolP = NULL; pcrel = 0; /* No further pcrel processing. */ |