md_apply_fix is a NOP for ELF. So macro it away. Simplify the resulting

one for the non-ELF case.
This commit is contained in:
matt 2001-09-07 17:14:24 +00:00
parent b3b6be7160
commit 239fd58a71
2 changed files with 7 additions and 18 deletions

View File

@ -308,31 +308,17 @@ md_number_to_chars (con, value, nbytes)
that they reference. */
#ifdef BFD_ASSEMBLER
#ifndef OBJ_ELF
int /* Knows about order of bytes in address. */
md_apply_fix (fixP, valP)
fixS *fixP;
valueT *valP;
{
valueT val = *valP;
#ifdef OBJ_ELF
if (fixP->fx_r_type == BFD_RELOC_32_GOT_PCREL || (fixP->fx_size == 4 && fixP->fx_pcrel))
{
#if 0
printf("info: %s:%d: fixup: symbol=%s: %#lx (off=%#lx)\n",
fixP->fx_frag->fr_file, fixP->fx_frag->fr_line,
S_GET_NAME(fixP->fx_frag->fr_symbol
? fixP->fx_frag->fr_symbol
: fixP->fx_addsy),
val, fixP->fx_offset);
#endif
val -= fixP->fx_offset;
}
else
#endif
number_to_chars_littleendian (fixP->fx_where + fixP->fx_frag->fr_literal,
val, fixP->fx_size);
(valueT) *valP, fixP->fx_size);
return 0;
}
#endif
#else
void /* Knows about order of bytes in address. */
md_apply_fix (fixP, value)
@ -1312,7 +1298,7 @@ md_estimate_size_before_relax (fragP, segment)
p[0] |= VAX_PC_RELATIVE_MODE; /* Preserve @ bit. */
fragP->fr_fix += 1 + 4;
fix_new (fragP, old_fr_fix + 1, 4, fragP->fr_symbol,
fragP->fr_offset, 1, NO_RELOC);
fragP->fr_offset, 1, reloc_type);
break;
case STATE_CONDITIONAL_BRANCH:

View File

@ -58,6 +58,9 @@ enum reloc_type
#define tc_aout_pre_write_hook(x) {;} /* not used */
#define tc_crawl_symbol_chain(a) {;} /* not used */
#define md_operand(x)
#ifdef OBJ_ELF
#define md_apply_fix(a,b) {;} /* not used for ELF */
#endif
long md_chars_to_number PARAMS ((unsigned char *, int));