* config/tc-sh.c (md_pcrel_from_section): Transformed from
md_pcrel_from. Handle pc-relativeness against link-time symbol. Handle relativeness to elsewhere than the fixup.
This commit is contained in:
parent
c7faceac8d
commit
ef17112f8d
2 changed files with 21 additions and 1 deletions
|
@ -1,3 +1,9 @@
|
|||
2001-09-17 Hans-Peter Nilsson <hp@bitrange.com>
|
||||
|
||||
* config/tc-sh.c (md_pcrel_from_section): Transformed from
|
||||
md_pcrel_from. Handle pc-relativeness against link-time
|
||||
symbol. Handle relativeness to elsewhere than the fixup.
|
||||
|
||||
2001-09-30 Hans-Peter Nilsson <hp@bitrange.com>
|
||||
|
||||
* Makefile.am: Update dependencies with "make dep-am".
|
||||
|
|
|
@ -3108,9 +3108,23 @@ md_number_to_chars (ptr, use, nbytes)
|
|||
}
|
||||
|
||||
long
|
||||
md_pcrel_from (fixP)
|
||||
md_pcrel_from_section (fixP, sec)
|
||||
fixS *fixP;
|
||||
segT sec;
|
||||
{
|
||||
if (fixP->fx_addsy != (symbolS *) NULL
|
||||
&& (! S_IS_DEFINED (fixP->fx_addsy)
|
||||
|| S_IS_EXTERN (fixP->fx_addsy)
|
||||
|| S_IS_WEAK (fixP->fx_addsy)
|
||||
|| S_GET_SEGMENT (fixP->fx_addsy) != sec))
|
||||
{
|
||||
/* The symbol is undefined (or is defined but not in this section,
|
||||
or we're not sure about it being the final definition). Let the
|
||||
linker figure it out. We need to adjust the subtraction of a
|
||||
symbol to the position of the relocated data, though. */
|
||||
return fixP->fx_subsy ? fixP->fx_where + fixP->fx_frag->fr_address : 0;
|
||||
}
|
||||
|
||||
return fixP->fx_size + fixP->fx_where + fixP->fx_frag->fr_address + 2;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue