Fri Apr 4 13:26:10 1997 Ian Lance Taylor <ian@cygnus.com>
+ * config/tc-hppa.c (tc_gen_reloc): If hppa_ren_reloc_type fails,
+ call abort (i.e., as_abort) rather than crashing.
+
* config/tc-mips.c: Protect uses of STO_MIPS16 with an ifdef of
OBJ_ELF, rather than of S_GET_OTHER.
/* tc-hppa.c -- Assemble for the PA
- Copyright (C) 1989, 1996 Free Software Foundation, Inc.
+ Copyright (C) 1989, 1996, 1997 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
assert (hppa_fixp != 0);
assert (section != 0);
- reloc = (arelent *) bfd_alloc_by_size_t (stdoutput, sizeof (arelent));
- assert (reloc != 0);
+ reloc = (arelent *) xmalloc (sizeof (arelent));
reloc->sym_ptr_ptr = &fixp->fx_addsy->bsym;
codes = (bfd_reloc_code_real_type **) hppa_gen_reloc_type (stdoutput,
fixp->fx_subsy != NULL,
fixp->fx_addsy->bsym);
+ if (codes == NULL)
+ abort ();
+
for (n_relocs = 0; codes[n_relocs]; n_relocs++)
;
- relocs = (arelent **)
- bfd_alloc_by_size_t (stdoutput, sizeof (arelent *) * n_relocs + 1);
- assert (relocs != 0);
-
- reloc = (arelent *) bfd_alloc_by_size_t (stdoutput,
- sizeof (arelent) * n_relocs);
- if (n_relocs > 0)
- assert (reloc != 0);
-
+ relocs = (arelent **) xmalloc (sizeof (arelent *) * n_relocs + 1);
+ reloc = (arelent *) xmalloc (sizeof (arelent) * n_relocs);
for (i = 0; i < n_relocs; i++)
relocs[i] = &reloc[i];
temp_fill = 0;
p = frag_var (rs_fill, (int) temp_size, (int) temp_size,
- (relax_substateT) 0, (symbolS *) 0, 1, NULL);
+ (relax_substateT) 0, (symbolS *) 0, (offsetT) 1, NULL);
bzero (p, temp_size);
/* Convert 2 bytes at a time. */