aboutsummaryrefslogtreecommitdiff
path: root/gas/write.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2001-06-27 07:02:24 +0000
committerAlan Modra <amodra@gmail.com>2001-06-27 07:02:24 +0000
commit1a16aca4b4da5fdb8613b3b0ee4285db7d9d26ce (patch)
treec7c66b448957fdab4fb27332c2a1dd9d1b04c56e /gas/write.c
parentd48019e08841eb295f4b565799898ebcb4b0f063 (diff)
downloadfsf-binutils-gdb-1a16aca4b4da5fdb8613b3b0ee4285db7d9d26ce.zip
fsf-binutils-gdb-1a16aca4b4da5fdb8613b3b0ee4285db7d9d26ce.tar.gz
fsf-binutils-gdb-1a16aca4b4da5fdb8613b3b0ee4285db7d9d26ce.tar.bz2
* write.c (fixup_segment <Difference of 2 syms same seg>): Don't
subtract MD_PCREL_FROM_SECTION for 68k. (fixup_segment <Difference of 2 syms different seg>): Only fudge by adding MD_PCREL_FROM_SECTION for 68k or if not already pcrel.
Diffstat (limited to 'gas/write.c')
-rw-r--r--gas/write.c38
1 files changed, 24 insertions, 14 deletions
diff --git a/gas/write.c b/gas/write.c
index b6492c2..2beb1d7 100644
--- a/gas/write.c
+++ b/gas/write.c
@@ -2663,7 +2663,12 @@ fixup_segment (fixP, this_segment_type)
#endif /* TC_I960 */
add_number += (S_GET_VALUE (add_symbolP)
- S_GET_VALUE (sub_symbolP));
- if (pcrel)
+ if (1
+#ifdef TC_M68K
+ /* See the comment below about 68k weirdness. */
+ && 0
+#endif
+ && pcrel)
add_number -= MD_PCREL_FROM_SECTION (fixP, this_segment_type);
add_symbolP = NULL;
@@ -2689,21 +2694,26 @@ fixup_segment (fixP, this_segment_type)
add_number -= S_GET_VALUE (sub_symbolP);
#ifdef DIFF_EXPR_OK
- else if (S_GET_SEGMENT (sub_symbolP) == this_segment_type
-#if 0
- /* Do this even if it's already described as
- pc-relative. For example, on the m68k, an
- operand of "pc@(foo-.-2)" should address
- "foo" in a pc-relative mode. */
- && pcrel
-#endif
- )
+ else if (S_GET_SEGMENT (sub_symbolP) == this_segment_type)
{
/* Make it pc-relative. */
- add_number += (MD_PCREL_FROM_SECTION (fixP, this_segment_type)
- - S_GET_VALUE (sub_symbolP));
- pcrel = 1;
- fixP->fx_pcrel = 1;
+ if (0
+#ifdef TC_M68K
+ /* Do this for m68k even if it's already described
+ as pc-relative. On the m68k, an operand of
+ "pc@(foo-.-2)" should address "foo" in a
+ pc-relative mode. */
+ || 1
+#endif
+ || !pcrel)
+ {
+ add_number += MD_PCREL_FROM_SECTION (fixP,
+ this_segment_type);
+ pcrel = 1;
+ fixP->fx_pcrel = 1;
+ }
+
+ add_number -= S_GET_VALUE (sub_symbolP);
sub_symbolP = 0;
fixP->fx_subsy = 0;
}