{
if (rx_bytes.n_relax || rx_bytes.link_relax || rx_bytes.n_base < 0)
{
- fragP->tc_frag_data = malloc (sizeof (rx_bytesT));
+ fragP->tc_frag_data = XNEW (rx_bytesT);
memcpy (fragP->tc_frag_data, & rx_bytes, sizeof (rx_bytesT));
}
else
fixp->fx_subsy = NULL;
}
- reloc[0] = (arelent *) xmalloc (sizeof (arelent));
- reloc[0]->sym_ptr_ptr = (asymbol **) xmalloc (sizeof (asymbol *));
+ reloc[0] = XNEW (arelent);
+ reloc[0]->sym_ptr_ptr = XNEW (asymbol *);
* reloc[0]->sym_ptr_ptr = symbol_get_bfdsym (fixp->fx_addsy);
reloc[0]->address = fixp->fx_frag->fr_address + fixp->fx_where;
reloc[0]->addend = fixp->fx_offset;
case BFD_RELOC_RX_DIFF:
reloc[0]->howto = bfd_reloc_type_lookup (stdoutput, BFD_RELOC_RX_SYM);
- reloc[1] = (arelent *) xmalloc (sizeof (arelent));
- reloc[1]->sym_ptr_ptr = (asymbol **) xmalloc (sizeof (asymbol *));
+ reloc[1] = XNEW (arelent);
+ reloc[1]->sym_ptr_ptr = XNEW (asymbol *);
* reloc[1]->sym_ptr_ptr = symbol_get_bfdsym (fixp->fx_subsy);
reloc[1]->address = fixp->fx_frag->fr_address + fixp->fx_where;
reloc[1]->addend = 0;
reloc[1]->howto = bfd_reloc_type_lookup (stdoutput, BFD_RELOC_RX_SYM);
- reloc[2] = (arelent *) xmalloc (sizeof (arelent));
+ reloc[2] = XNEW (arelent);
reloc[2]->howto = bfd_reloc_type_lookup (stdoutput, BFD_RELOC_RX_OP_SUBTRACT);
reloc[2]->addend = 0;
reloc[2]->sym_ptr_ptr = reloc[1]->sym_ptr_ptr;
reloc[2]->address = fixp->fx_frag->fr_address + fixp->fx_where;
- reloc[3] = (arelent *) xmalloc (sizeof (arelent));
+ reloc[3] = XNEW (arelent);
switch (fixp->fx_size)
{
case 1:
case BFD_RELOC_RX_GPRELL:
reloc[0]->howto = bfd_reloc_type_lookup (stdoutput, BFD_RELOC_RX_SYM);
- reloc[1] = (arelent *) xmalloc (sizeof (arelent));
- reloc[1]->sym_ptr_ptr = (asymbol **) xmalloc (sizeof (asymbol *));
+ reloc[1] = XNEW (arelent);
+ reloc[1]->sym_ptr_ptr = XNEW (asymbol *);
if (gp_symbol == NULL)
{
if (symbol_table_frozen)
reloc[1]->addend = 0;
reloc[1]->howto = bfd_reloc_type_lookup (stdoutput, BFD_RELOC_RX_SYM);
- reloc[2] = (arelent *) xmalloc (sizeof (arelent));
+ reloc[2] = XNEW (arelent);
reloc[2]->howto = bfd_reloc_type_lookup (stdoutput, BFD_RELOC_RX_OP_SUBTRACT);
reloc[2]->addend = 0;
reloc[2]->sym_ptr_ptr = reloc[1]->sym_ptr_ptr;
reloc[2]->address = fixp->fx_frag->fr_address + fixp->fx_where;
- reloc[3] = (arelent *) xmalloc (sizeof (arelent));
+ reloc[3] = XNEW (arelent);
reloc[3]->howto = bfd_reloc_type_lookup (stdoutput, BFD_RELOC_RX_ABS16UL);
reloc[3]->addend = 0;
reloc[3]->sym_ptr_ptr = reloc[1]->sym_ptr_ptr;
case BFD_RELOC_RX_GPRELW:
reloc[0]->howto = bfd_reloc_type_lookup (stdoutput, BFD_RELOC_RX_SYM);
- reloc[1] = (arelent *) xmalloc (sizeof (arelent));
- reloc[1]->sym_ptr_ptr = (asymbol **) xmalloc (sizeof (asymbol *));
+ reloc[1] = XNEW (arelent);
+ reloc[1]->sym_ptr_ptr = XNEW (asymbol *);
if (gp_symbol == NULL)
{
if (symbol_table_frozen)
reloc[1]->addend = 0;
reloc[1]->howto = bfd_reloc_type_lookup (stdoutput, BFD_RELOC_RX_SYM);
- reloc[2] = (arelent *) xmalloc (sizeof (arelent));
+ reloc[2] = XNEW (arelent);
reloc[2]->howto = bfd_reloc_type_lookup (stdoutput, BFD_RELOC_RX_OP_SUBTRACT);
reloc[2]->addend = 0;
reloc[2]->sym_ptr_ptr = reloc[1]->sym_ptr_ptr;
reloc[2]->address = fixp->fx_frag->fr_address + fixp->fx_where;
- reloc[3] = (arelent *) xmalloc (sizeof (arelent));
+ reloc[3] = XNEW (arelent);
reloc[3]->howto = bfd_reloc_type_lookup (stdoutput, BFD_RELOC_RX_ABS16UW);
reloc[3]->addend = 0;
reloc[3]->sym_ptr_ptr = reloc[1]->sym_ptr_ptr;
case BFD_RELOC_RX_GPRELB:
reloc[0]->howto = bfd_reloc_type_lookup (stdoutput, BFD_RELOC_RX_SYM);
- reloc[1] = (arelent *) xmalloc (sizeof (arelent));
- reloc[1]->sym_ptr_ptr = (asymbol **) xmalloc (sizeof (asymbol *));
+ reloc[1] = XNEW (arelent);
+ reloc[1]->sym_ptr_ptr = XNEW (asymbol *);
if (gp_symbol == NULL)
{
if (symbol_table_frozen)
reloc[1]->addend = 0;
reloc[1]->howto = bfd_reloc_type_lookup (stdoutput, BFD_RELOC_RX_SYM);
- reloc[2] = (arelent *) xmalloc (sizeof (arelent));
+ reloc[2] = XNEW (arelent);
reloc[2]->howto = bfd_reloc_type_lookup (stdoutput, BFD_RELOC_RX_OP_SUBTRACT);
reloc[2]->addend = 0;
reloc[2]->sym_ptr_ptr = reloc[1]->sym_ptr_ptr;
reloc[2]->address = fixp->fx_frag->fr_address + fixp->fx_where;
- reloc[3] = (arelent *) xmalloc (sizeof (arelent));
+ reloc[3] = XNEW (arelent);
reloc[3]->howto = bfd_reloc_type_lookup (stdoutput, BFD_RELOC_RX_ABS16U);
reloc[3]->addend = 0;
reloc[3]->sym_ptr_ptr = reloc[1]->sym_ptr_ptr;
case BFD_RELOC_RX_NEG32:
reloc[0]->howto = bfd_reloc_type_lookup (stdoutput, BFD_RELOC_RX_SYM);
- reloc[1] = (arelent *) xmalloc (sizeof (arelent));
+ reloc[1] = XNEW (arelent);
reloc[1]->howto = bfd_reloc_type_lookup (stdoutput, BFD_RELOC_RX_OP_NEG);
reloc[1]->addend = 0;
reloc[1]->sym_ptr_ptr = reloc[0]->sym_ptr_ptr;
reloc[1]->address = fixp->fx_frag->fr_address + fixp->fx_where;
- reloc[2] = (arelent *) xmalloc (sizeof (arelent));
+ reloc[2] = XNEW (arelent);
reloc[2]->howto = bfd_reloc_type_lookup (stdoutput, BFD_RELOC_RX_ABS32);
reloc[2]->addend = 0;
reloc[2]->sym_ptr_ptr = reloc[0]->sym_ptr_ptr;