aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-m32r.c
diff options
context:
space:
mode:
Diffstat (limited to 'gas/config/tc-m32r.c')
-rw-r--r--gas/config/tc-m32r.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gas/config/tc-m32r.c b/gas/config/tc-m32r.c
index 126ab9c..f77c1f1 100644
--- a/gas/config/tc-m32r.c
+++ b/gas/config/tc-m32r.c
@@ -585,7 +585,7 @@ debug_sym (int ignore ATTRIBUTE_UNUSED)
else
{
- lnk = (sym_linkS *) xmalloc (sizeof (sym_linkS));
+ lnk = XNEW (sym_linkS);
lnk->symbol = symbolP;
lnk->next = debug_sym_link;
debug_sym_link = lnk;
@@ -1898,7 +1898,7 @@ m32r_record_hi16 (int reloc_type,
gas_assert (reloc_type == BFD_RELOC_M32R_HI16_SLO
|| reloc_type == BFD_RELOC_M32R_HI16_ULO);
- hi_fixup = xmalloc (sizeof (* hi_fixup));
+ hi_fixup = XNEW (struct m32r_hi_fixup);
hi_fixup->fixp = fixP;
hi_fixup->seg = now_seg;
hi_fixup->next = m32r_hi_fixup_list;
@@ -2195,9 +2195,9 @@ tc_gen_reloc (asection * section, fixS * fixP)
arelent * reloc;
bfd_reloc_code_real_type code;
- reloc = xmalloc (sizeof (* reloc));
+ reloc = XNEW (arelent);
- reloc->sym_ptr_ptr = xmalloc (sizeof (asymbol *));
+ reloc->sym_ptr_ptr = XNEW (asymbol *);
*reloc->sym_ptr_ptr = symbol_get_bfdsym (fixP->fx_addsy);
reloc->address = fixP->fx_frag->fr_address + fixP->fx_where;