/* tc-sh.c -- Assemble code for the Hitachi Super-H
- Copyright (C) 1993, 94, 95, 96, 97, 1998 Free Software Foundation.
+ Copyright (C) 1993, 94, 95, 96, 97, 98, 1999 Free Software Foundation.
This file is part of GAS, the GNU Assembler.
}
else
{
- if (opcode->arg[0] != A_END)
+ if (opcode->arg[0] == A_END)
{
- get_operands (opcode, op_end, operand);
+ /* Ignore trailing whitespace. If there is any, it has already
+ been compressed to a single space. */
+ if (*op_end == ' ')
+ op_end++;
+ }
+ else
+ {
+ op_end = get_operands (opcode, op_end, operand);
}
opcode = get_specific (opcode, operand);
return;
}
+ if (*op_end)
+ as_bad (_("excess operands: '%s'"), op_end);
+
build_Mytes (opcode, operand);
}
We have already adjusted the value of sym to include the
fragment address, so we undo that adjustment here. */
subseg_change (sec, 0);
- fix_new (sym->sy_frag, S_GET_VALUE (sym) - sym->sy_frag->fr_address,
+ fix_new (symbol_get_frag (sym),
+ S_GET_VALUE (sym) - symbol_get_frag (sym)->fr_address,
4, &abs_symbol, info.count, 0, BFD_RELOC_SH_COUNT);
}
}
|| fix->fx_r_type == BFD_RELOC_SH_DATA
|| fix->fx_r_type == BFD_RELOC_SH_LABEL);
}
+
+#ifdef OBJ_ELF
boolean
sh_fix_adjustable (fixP)
fixS *fixP;
if (fixP->fx_addsy == NULL)
return 1;
- /* Prevent all adjustments to global symbols. */
- if (S_IS_EXTERN (fixP->fx_addsy))
- return 0;
- if (S_IS_WEAK (fixP->fx_addsy))
- return 0;
-
/* We need the symbol name for the VTABLE entries */
if (fixP->fx_r_type == BFD_RELOC_VTABLE_INHERIT
|| fixP->fx_r_type == BFD_RELOC_VTABLE_ENTRY)
return 1;
}
+#endif
/* Apply a fixup to the object file. */
case BFD_RELOC_VTABLE_INHERIT:
case BFD_RELOC_VTABLE_ENTRY:
fixP->fx_done = 0;
- return 1;
+#ifdef BFD_ASSEMBLER
+ return 0;
+#else
+ return;
+#endif
default:
abort ();
int max;
{
if (fill == NULL
-#ifdef BFD_ASSEMBLER
- && (now_seg->flags & SEC_CODE) != 0
-#else
- && now_seg != data_section
- && now_seg != bss_section
-#endif
+ && subseg_text_p (now_seg)
&& n > 1)
{
static const unsigned char big_nop_pattern[] = { 0x00, 0x09 };
bfd_reloc_code_real_type r_type;
rel = (arelent *) xmalloc (sizeof (arelent));
- rel->sym_ptr_ptr = &fixp->fx_addsy->bsym;
+ rel->sym_ptr_ptr = (asymbol **) xmalloc (sizeof (asymbol *));
+ *rel->sym_ptr_ptr = symbol_get_bfdsym (fixp->fx_addsy);
rel->address = fixp->fx_frag->fr_address + fixp->fx_where;
r_type = fixp->fx_r_type;