* config/tc-mn10300.c (tc_gen_reloc): Don't emit an *ABS*
relocation for differences between symbols in a section other than the one in which the difference is to be placed; apply the relocation instead.
This commit is contained in:
parent
83c81bfe97
commit
6e22e505ed
2 changed files with 40 additions and 4 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
2001-09-25 Alexandre Oliva <aoliva@redhat.com>
|
||||||
|
|
||||||
|
* config/tc-mn10300.c (tc_gen_reloc): Don't emit an *ABS*
|
||||||
|
relocation for differences between symbols in a section other
|
||||||
|
than the one in which the difference is to be placed; apply
|
||||||
|
the relocation instead.
|
||||||
|
|
||||||
2001-09-24 Nick Clifton <nickc@cambridge.redhat.com>
|
2001-09-24 Nick Clifton <nickc@cambridge.redhat.com>
|
||||||
|
|
||||||
* config/tc-arc.c: Add missing prototype.
|
* config/tc-arc.c: Add missing prototype.
|
||||||
|
|
|
@ -1824,12 +1824,41 @@ tc_gen_reloc (seg, fixp)
|
||||||
{
|
{
|
||||||
as_bad_where (fixp->fx_file, fixp->fx_line,
|
as_bad_where (fixp->fx_file, fixp->fx_line,
|
||||||
"Difference of symbols in different sections is not supported");
|
"Difference of symbols in different sections is not supported");
|
||||||
return NULL;
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
char *fixpos = fixp->fx_where + fixp->fx_frag->fr_literal;
|
||||||
|
|
||||||
|
reloc->addend = (S_GET_VALUE (fixp->fx_addsy)
|
||||||
|
- S_GET_VALUE (fixp->fx_subsy) + fixp->fx_offset);
|
||||||
|
|
||||||
|
switch (fixp->fx_r_type)
|
||||||
|
{
|
||||||
|
case BFD_RELOC_8:
|
||||||
|
md_number_to_chars (fixpos, reloc->addend, 1);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case BFD_RELOC_16:
|
||||||
|
md_number_to_chars (fixpos, reloc->addend, 2);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case BFD_RELOC_24:
|
||||||
|
md_number_to_chars (fixpos, reloc->addend, 3);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case BFD_RELOC_32:
|
||||||
|
md_number_to_chars (fixpos, reloc->addend, 4);
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
reloc->sym_ptr_ptr = (asymbol **) &bfd_abs_symbol;
|
||||||
|
return reloc;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
reloc->sym_ptr_ptr = (asymbol **) &bfd_abs_symbol;
|
free (reloc->sym_ptr_ptr);
|
||||||
reloc->addend = (S_GET_VALUE (fixp->fx_addsy)
|
free (reloc);
|
||||||
- S_GET_VALUE (fixp->fx_subsy) + fixp->fx_offset);
|
return NULL;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue