table = (bfd_byte *) malloc (table_size);
table = (bfd_byte *) bfd_malloc (table_size);
sunos_canonicalize_dynamic_symtab (abfd, storage)     bfd *abfd;     asymbol **storage;{  struct sunos_dynamic_info *info;  unsigned long i;  if (! sunos_slurp_dynamic_symtab (abfd))    return -1;  info = (struct sunos_dynamic_info *) obj_aout_dynamic_info (abfd);#ifdef CHECK_DYNAMIC_HASH  /* Check my understanding of the dynamic hash table by making sure     that each symbol can be located in the hash table.  */  {    bfd_size_type table_size;    bfd_byte *table;    bfd_size_type i;    if (info->dyninfo.ld_buckets > info->dynsym_count)      abort ();    table_size = info->dyninfo.ld_stab - info->dyninfo.ld_hash;    table = (bfd_byte *) malloc (table_size);    if (table == NULL && table_size != 0)      abort ();    if (bfd_seek (abfd, info->dyninfo.ld_hash, SEEK_SET) != 0	|| bfd_read ((PTR) table, 1, table_size, abfd) != table_size)      abort ();    for (i = 0; i < info->dynsym_count; i++)      {	unsigned char *name;	unsigned long hash;	name = ((unsigned char *) info->dynstr		+ GET_WORD (abfd, info->dynsym[i].e_strx));	hash = 0;	while (*name != '\0')	  hash = (hash << 1) + *name++;	hash &= 0x7fffffff;	hash %= info->dyninfo.ld_buckets;	while (GET_WORD (abfd, table + hash * HASH_ENTRY_SIZE) != i)	  {	    hash = GET_WORD (abfd,			     table + hash * HASH_ENTRY_SIZE + BYTES_IN_WORD);	    if (hash == 0 || hash >= table_size / HASH_ENTRY_SIZE)	      abort ();	  }      }    free (table);  }#endif /* CHECK_DYNAMIC_HASH */  /* Get the asymbol structures corresponding to the dynamic nlist     structures.  */  if (info->canonical_dynsym == (aout_symbol_type *) NULL)    {      info->canonical_dynsym = ((aout_symbol_type *)				bfd_alloc (abfd,					   (info->dynsym_count					    * sizeof (aout_symbol_type))));      if (info->canonical_dynsym == NULL && info->dynsym_count != 0)	{	  bfd_set_error (bfd_error_no_memory);	  return -1;	}      if (! aout_32_translate_symbol_table (abfd, info->canonical_dynsym,					    info->dynsym, info->dynsym_count,					    info->dynstr,					    info->dyninfo.ld_symb_size,					    true))	{	  if (info->canonical_dynsym != NULL)	    {	      bfd_release (abfd, info->canonical_dynsym);	      info->canonical_dynsym = NULL;	    }	  return -1;	}    }  /* Return pointers to the dynamic asymbol structures.  */  for (i = 0; i < info->dynsym_count; i++)    *storage++ = (asymbol *) (info->canonical_dynsym + i);  *storage = NULL;  return info->dynsym_count;}