* Add support for marker type relocations. These mark areas
of interest to the linker. ENTRY/EXIT relocations for SOM are an example of marker relocations. * write.c (write_relocs): Instead of assuming size of a relocation is 4 bytes, pick up the size from relocation itself. (fixup_segment): Do not complain that a value is too small for marker relocations.
This commit is contained in:
parent
009dc5e1e5
commit
c43d56f78c
2 changed files with 11 additions and 4 deletions
|
@ -1,5 +1,13 @@
|
||||||
Mon Nov 1 21:37:04 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
|
Mon Nov 1 21:37:04 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
|
||||||
|
|
||||||
|
* Add support for marker type relocations. These mark areas
|
||||||
|
of interest to the linker. ENTRY/EXIT relocations for SOM are
|
||||||
|
an example of marker relocations.
|
||||||
|
* write.c (write_relocs): Instead of assuming size of a relocation
|
||||||
|
is 4 bytes, pick up the size from relocation itself.
|
||||||
|
(fixup_segment): Do not complain that a value is too small for
|
||||||
|
marker relocations.
|
||||||
|
|
||||||
* struc-symbol.h: Add new "sy_used" field to the symbol structure.
|
* struc-symbol.h: Add new "sy_used" field to the symbol structure.
|
||||||
* expr.c (operand): Set sy_used for any symbol used as an operand.
|
* expr.c (operand): Set sy_used for any symbol used as an operand.
|
||||||
(expr): Likewise for any symbol used in an expression.
|
(expr): Likewise for any symbol used in an expression.
|
||||||
|
|
|
@ -632,8 +632,7 @@ write_relocs (abfd, sec, xxx)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
data = fixp->fx_frag->fr_literal + fixp->fx_where;
|
data = fixp->fx_frag->fr_literal + fixp->fx_where;
|
||||||
/* @@ Assumes max size of reloc is 4. */
|
if (fixp->fx_where + fixp->fx_size
|
||||||
if (fixp->fx_where + 4
|
|
||||||
> fixp->fx_frag->fr_fix + fixp->fx_frag->fr_offset)
|
> fixp->fx_frag->fr_fix + fixp->fx_frag->fr_offset)
|
||||||
abort ();
|
abort ();
|
||||||
/* Pass bogus address so that when bfd_perform_relocation adds
|
/* Pass bogus address so that when bfd_perform_relocation adds
|
||||||
|
@ -686,7 +685,7 @@ write_relocs (abfd, sec, xxx)
|
||||||
assert(i <= n);
|
assert(i <= n);
|
||||||
}
|
}
|
||||||
data = fixp->fx_frag->fr_literal + fixp->fx_where;
|
data = fixp->fx_frag->fr_literal + fixp->fx_where;
|
||||||
if (fixp->fx_where + 4
|
if (fixp->fx_where + fixp->fx_size
|
||||||
> fixp->fx_frag->fr_fix + fixp->fx_frag->fr_offset)
|
> fixp->fx_frag->fr_fix + fixp->fx_frag->fr_offset)
|
||||||
abort ();
|
abort ();
|
||||||
for (j = 0; reloc[j]; j++)
|
for (j = 0; reloc[j]; j++)
|
||||||
|
@ -2011,7 +2010,7 @@ fixup_segment (fixP, this_segment_type)
|
||||||
} /* if there's an add_symbol */
|
} /* if there's an add_symbol */
|
||||||
} /* if pcrel */
|
} /* if pcrel */
|
||||||
|
|
||||||
if (!fixP->fx_bit_fixP)
|
if (!fixP->fx_bit_fixP && size > 0)
|
||||||
{
|
{
|
||||||
valueT mask = 0;
|
valueT mask = 0;
|
||||||
/* set all bits to one */
|
/* set all bits to one */
|
||||||
|
|
Loading…
Reference in a new issue