mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-30 00:52:16 +08:00
* 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. Permits generating negative relocs for m68k COFF.
This commit is contained in:
@ -1,5 +1,15 @@
|
|||||||
Mon Sep 18 15:22:28 1995 Ian Lance Taylor <ian@cygnus.com>
|
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.
|
* 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>
|
Mon Sep 18 14:44:04 1995 Arne H. Juul <arnej@pvv.unit.no>
|
||||||
|
@ -562,6 +562,8 @@ short
|
|||||||
tc_coff_fix2rtype (fixP)
|
tc_coff_fix2rtype (fixP)
|
||||||
fixS *fixP;
|
fixS *fixP;
|
||||||
{
|
{
|
||||||
|
if (fixP->fx_tcbit && fixP->fx_size == 4)
|
||||||
|
return R_RELLONG_NEG;
|
||||||
#ifdef NO_PCREL_RELOCS
|
#ifdef NO_PCREL_RELOCS
|
||||||
know (fixP->fx_pcrel == 0);
|
know (fixP->fx_pcrel == 0);
|
||||||
return (fixP->fx_size == 1 ? R_RELBYTE
|
return (fixP->fx_size == 1 ? R_RELBYTE
|
||||||
@ -590,6 +592,9 @@ tc_gen_reloc (section, fixp)
|
|||||||
arelent *reloc;
|
arelent *reloc;
|
||||||
bfd_reloc_code_real_type code;
|
bfd_reloc_code_real_type code;
|
||||||
|
|
||||||
|
if (fixP->fx_tcbit)
|
||||||
|
abort ();
|
||||||
|
|
||||||
#define F(SZ,PCREL) (((SZ) << 1) + (PCREL))
|
#define F(SZ,PCREL) (((SZ) << 1) + (PCREL))
|
||||||
switch (F (fixp->fx_size, fixp->fx_pcrel))
|
switch (F (fixp->fx_size, fixp->fx_pcrel))
|
||||||
{
|
{
|
||||||
@ -3354,6 +3359,14 @@ md_apply_fix_2 (fixP, val)
|
|||||||
BAD_CASE (fixP->fx_size);
|
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
|
/* 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
|
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",
|
to accept such numbers. We arbitrarily disallow "-0xff" or "0xff+0xff",
|
||||||
|
Reference in New Issue
Block a user