{
bfd_size_type amt = sizeof (ecoff_data_type);
- abfd->tdata.ecoff_obj_data = bfd_zalloc (abfd, amt);
+ abfd->tdata.ecoff_obj_data = (struct ecoff_tdata *) bfd_zalloc (abfd, amt);
if (abfd->tdata.ecoff_obj_data == NULL)
return FALSE;
bfd_boolean
_bfd_ecoff_set_arch_mach_hook (bfd *abfd, void * filehdr)
{
- struct internal_filehdr *internal_f = filehdr;
+ struct internal_filehdr *internal_f = (struct internal_filehdr *) filehdr;
enum bfd_architecture arch;
unsigned long mach;
asection *section ATTRIBUTE_UNUSED,
flagword * flags_ptr)
{
- struct internal_scnhdr *internal_s = hdr;
+ struct internal_scnhdr *internal_s = (struct internal_scnhdr *) hdr;
long styp_flags = internal_s->s_flags;
flagword sec_flags = 0;
the symbols, so we swap them here. */
amt = internal_symhdr->ifdMax;
amt *= sizeof (struct fdr);
- debug->fdr = bfd_alloc (abfd, amt);
+ debug->fdr = (FDR *) bfd_alloc (abfd, amt);
if (debug->fdr == NULL)
return FALSE;
external_fdr_size = backend->debug_swap.external_fdr_size;
internal_size = bfd_get_symcount (abfd);
internal_size *= sizeof (ecoff_symbol_type);
- internal = bfd_alloc (abfd, internal_size);
+ internal = (ecoff_symbol_type *) bfd_alloc (abfd, internal_size);
if (internal == NULL)
return FALSE;
amt = section->reloc_count;
amt *= sizeof (arelent);
- internal_relocs = bfd_alloc (abfd, amt);
+ internal_relocs = (arelent *) bfd_alloc (abfd, amt);
external_reloc_size = backend->external_reloc_size;
amt = external_reloc_size * section->reloc_count;
- external_relocs = bfd_alloc (abfd, amt);
+ external_relocs = (char *) bfd_alloc (abfd, amt);
if (internal_relocs == NULL || external_relocs == NULL)
return FALSE;
if (bfd_seek (abfd, section->rel_filepos, SEEK_SET) != 0)
{
bfd_size_type amt = sizeof (struct ecoff_find_line);
- ecoff_data (abfd)->find_line_info = bfd_zalloc (abfd, amt);
+ ecoff_data (abfd)->find_line_info =
+ (struct ecoff_find_line *) bfd_zalloc (abfd, amt);
if (ecoff_data (abfd)->find_line_info == NULL)
return FALSE;
}
/* Sort the sections by VMA. */
amt = abfd->section_count;
amt *= sizeof (asection *);
- sorted_hdrs = bfd_malloc (amt);
+ sorted_hdrs = (asection **) bfd_malloc (amt);
if (sorted_hdrs == NULL)
return FALSE;
for (current = abfd->sections, i = 0;
parsed_size = mapdata->parsed_size;
bfd_release (abfd, (void *) mapdata);
- raw_armap = bfd_alloc (abfd, parsed_size);
+ raw_armap = (char *) bfd_alloc (abfd, parsed_size);
if (raw_armap == NULL)
return FALSE;
amt = ardata->symdef_count;
amt *= sizeof (struct symdef);
- symdef_ptr = bfd_alloc (abfd, amt);
+ symdef_ptr = (struct symdef *) bfd_alloc (abfd, amt);
if (!symdef_ptr)
return FALSE;
if (bfd_bwrite ((void *) temp, (bfd_size_type) 4, abfd) != 4)
return FALSE;
- hashtable = bfd_zalloc (abfd, symdefsize);
+ hashtable = (bfd_byte *) bfd_zalloc (abfd, symdefsize);
if (!hashtable)
return FALSE;
struct ecoff_link_hash_table *ret;
bfd_size_type amt = sizeof (struct ecoff_link_hash_table);
- ret = bfd_malloc (amt);
+ ret = (struct ecoff_link_hash_table *) bfd_malloc (amt);
if (ret == NULL)
return NULL;
if (!_bfd_link_hash_table_init (&ret->root, abfd,
amt = ext_count;
amt *= sizeof (struct bfd_link_hash_entry *);
- sym_hash = bfd_alloc (abfd, amt);
+ sym_hash = (struct bfd_link_hash_entry **) bfd_alloc (abfd, amt);
if (!sym_hash)
return FALSE;
ecoff_data (abfd)->sym_hashes = (struct ecoff_link_hash_entry **) sym_hash;
|| bfd_bread (external_ext, esize, abfd) != esize)
goto error_return;
- ssext = bfd_malloc ((bfd_size_type) symhdr->issExtMax);
+ ssext = (char *) bfd_malloc ((bfd_size_type) symhdr->issExtMax);
if (ssext == NULL && symhdr->issExtMax != 0)
goto error_return;
|| bfd_bread (external_ext, esize, abfd) != esize)
goto error_return;
- ssext = bfd_malloc ((bfd_size_type) symhdr->issExtMax);
+ ssext = (char *) bfd_malloc ((bfd_size_type) symhdr->issExtMax);
if (ssext == NULL && symhdr->issExtMax != 0)
goto error_return;
else \
{ \
bfd_size_type amt = (bfd_size_type) size * symhdr->count; \
- debug->ptr = bfd_malloc (amt); \
+ debug->ptr = (type) bfd_malloc (amt); \
if (debug->ptr == NULL) \
{ \
ret = FALSE; \
bfd_byte *buf;
size = bfd_get_reloc_size (rel.howto);
- buf = bfd_zmalloc (size);
+ buf = (bfd_byte *) bfd_zmalloc (size);
if (buf == NULL)
return FALSE;
rstat = _bfd_relocate_contents (rel.howto, output_bfd,
/* Get some memory and swap out the reloc. */
external_reloc_size = ecoff_backend (output_bfd)->external_reloc_size;
- rbuf = bfd_malloc (external_reloc_size);
+ rbuf = (bfd_byte *) bfd_malloc (external_reloc_size);
if (rbuf == NULL)
return FALSE;