* 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.
This commit is contained in:
parent
d48019e088
commit
1a16aca4b4
|
@ -1,3 +1,10 @@
|
||||||
|
2001-06-27 Alan Modra <amodra@bigpond.net.au>
|
||||||
|
|
||||||
|
* 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.
|
||||||
|
|
||||||
2001-06-27 Tracy A. Kuhrt <Tracy.Kuhrt@microchip.com>
|
2001-06-27 Tracy A. Kuhrt <Tracy.Kuhrt@microchip.com>
|
||||||
|
|
||||||
* write.c (fixup_segment <Difference of 2 syms same seg>): If
|
* write.c (fixup_segment <Difference of 2 syms same seg>): If
|
||||||
|
|
38
gas/write.c
38
gas/write.c
|
@ -2663,7 +2663,12 @@ fixup_segment (fixP, this_segment_type)
|
||||||
#endif /* TC_I960 */
|
#endif /* TC_I960 */
|
||||||
add_number += (S_GET_VALUE (add_symbolP)
|
add_number += (S_GET_VALUE (add_symbolP)
|
||||||
- S_GET_VALUE (sub_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_number -= MD_PCREL_FROM_SECTION (fixP, this_segment_type);
|
||||||
|
|
||||||
add_symbolP = NULL;
|
add_symbolP = NULL;
|
||||||
|
@ -2689,21 +2694,26 @@ fixup_segment (fixP, this_segment_type)
|
||||||
add_number -= S_GET_VALUE (sub_symbolP);
|
add_number -= S_GET_VALUE (sub_symbolP);
|
||||||
|
|
||||||
#ifdef DIFF_EXPR_OK
|
#ifdef DIFF_EXPR_OK
|
||||||
else if (S_GET_SEGMENT (sub_symbolP) == this_segment_type
|
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
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
/* Make it pc-relative. */
|
/* Make it pc-relative. */
|
||||||
add_number += (MD_PCREL_FROM_SECTION (fixP, this_segment_type)
|
if (0
|
||||||
- S_GET_VALUE (sub_symbolP));
|
#ifdef TC_M68K
|
||||||
pcrel = 1;
|
/* Do this for m68k even if it's already described
|
||||||
fixP->fx_pcrel = 1;
|
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;
|
sub_symbolP = 0;
|
||||||
fixP->fx_subsy = 0;
|
fixP->fx_subsy = 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue