Mon Sep 18 15:22:28 1995 Ian Lance Taylor <ian@cygnus.com>
+ * write.c (fixup_segment): Handle ABS-sym in -sym case rather than
+ sym-sym case.
+ * config/obj-coff.c (fixup_segment): Likewise. Permit negative
+ symbols if TC_M68K.
+ * config/tc-m68k.c (tc_coff_fix2rtype): If fx_tcbit is set, return
+ R_RELLONG_NEG.
+ (tc_gen_reloc): If fx_tcbit is set, abort.
+ (md_apply_fix_2): For a negative reloc, move fx_subsy to fx_addsy,
+ and set fx_tcbit.
+
* config/tc-m68k.c (s_reg): Ignore comment field in MRI mode.
Mon Sep 18 14:44:04 1995 Arne H. Juul <arnej@pvv.unit.no>
tc_coff_fix2rtype (fixP)
fixS *fixP;
{
+ if (fixP->fx_tcbit && fixP->fx_size == 4)
+ return R_RELLONG_NEG;
#ifdef NO_PCREL_RELOCS
know (fixP->fx_pcrel == 0);
return (fixP->fx_size == 1 ? R_RELBYTE
arelent *reloc;
bfd_reloc_code_real_type code;
+ if (fixP->fx_tcbit)
+ abort ();
+
#define F(SZ,PCREL) (((SZ) << 1) + (PCREL))
switch (F (fixp->fx_size, fixp->fx_pcrel))
{
BAD_CASE (fixP->fx_size);
}
+ /* Fix up a negative reloc. */
+ if (fixP->fx_addsy == NULL && fixP->fx_subsy != NULL)
+ {
+ fixP->fx_addsy = fixP->fx_subsy;
+ fixP->fx_subsy = NULL;
+ fixP->fx_tcbit = 1;
+ }
+
/* For non-pc-relative values, it's conceivable we might get something
like "0xff" for a byte field. So extend the upper part of the range
to accept such numbers. We arbitrarily disallow "-0xff" or "0xff+0xff",