internal = (combined_entry_type *) bfd_alloc (abfd, size);
internal = (combined_entry_type *) bfd_zalloc (abfd, size);
coff_get_normalized_symtab (abfd)     bfd *abfd;{  combined_entry_type *internal;  combined_entry_type *internal_ptr;  combined_entry_type *symbol_ptr;  combined_entry_type *internal_end;  bfd_size_type symesz;  char *raw_src;  char *raw_end;  const char *string_table = NULL;  char *debug_section = NULL;  unsigned long size;  if (obj_raw_syments (abfd) != NULL)    return obj_raw_syments (abfd);  size = obj_raw_syment_count (abfd) * sizeof (combined_entry_type);  internal = (combined_entry_type *) bfd_alloc (abfd, size);  if (internal == NULL && size != 0)    {      bfd_set_error (bfd_error_no_memory);      return NULL;    }  internal_end = internal + obj_raw_syment_count (abfd);  if (! _bfd_coff_get_external_symbols (abfd))    return NULL;  raw_src = (char *) obj_coff_external_syms (abfd);  /* mark the end of the symbols */  symesz = bfd_coff_symesz (abfd);  raw_end = (char *) raw_src + obj_raw_syment_count (abfd) * symesz;  /* FIXME SOMEDAY.  A string table size of zero is very weird, but     probably possible.  If one shows up, it will probably kill us.  */  /* Swap all the raw entries */  for (internal_ptr = internal;       raw_src < raw_end;       raw_src += symesz, internal_ptr++)    {      unsigned int i;      bfd_coff_swap_sym_in (abfd, (PTR) raw_src,			    (PTR) & internal_ptr->u.syment);      internal_ptr->fix_value = 0;      internal_ptr->fix_tag = 0;      internal_ptr->fix_end = 0;      internal_ptr->fix_scnlen = 0;      symbol_ptr = internal_ptr;      for (i = 0;	   i < symbol_ptr->u.syment.n_numaux;	   i++)	{	  internal_ptr++;	  raw_src += symesz;	  internal_ptr->fix_value = 0;	  internal_ptr->fix_tag = 0;	  internal_ptr->fix_end = 0;	  internal_ptr->fix_scnlen = 0;	  bfd_coff_swap_aux_in (abfd, (PTR) raw_src,				symbol_ptr->u.syment.n_type,				symbol_ptr->u.syment.n_sclass,				i, symbol_ptr->u.syment.n_numaux,				&(internal_ptr->u.auxent));	  coff_pointerize_aux (abfd, internal, symbol_ptr, i,			       internal_ptr);	}    }  /* Free the raw symbols, but not the strings (if we have them).  */  obj_coff_keep_strings (abfd) = true;  if (! _bfd_coff_free_symbols (abfd))    return NULL;  for (internal_ptr = internal; internal_ptr < internal_end;       internal_ptr++)    {      if (internal_ptr->u.syment.n_sclass == C_FILE	  && internal_ptr->u.syment.n_numaux > 0)	{	  /* make a file symbol point to the name in the auxent, since	     the text ".file" is redundant */	  if ((internal_ptr + 1)->u.auxent.x_file.x_n.x_zeroes == 0)	    {	      /* the filename is a long one, point into the string table */	      if (string_table == NULL)		{		  string_table = _bfd_coff_read_string_table (abfd);		  if (string_table == NULL)		    return NULL;		}	      internal_ptr->u.syment._n._n_n._n_offset =		((long)		 (string_table		  + (internal_ptr + 1)->u.auxent.x_file.x_n.x_offset));	    }	  else	    {	      /* ordinary short filename, put into memory anyway */	      internal_ptr->u.syment._n._n_n._n_offset = (long)		copy_name (abfd, (internal_ptr + 1)->u.auxent.x_file.x_fname,			   FILNMLEN);	    }	}      else	{	  if (internal_ptr->u.syment._n._n_n._n_zeroes != 0)	    {	      /* This is a "short" name.  Make it long.  */	      unsigned long i = 0;	      char *newstring = NULL;	      /* find the length of this string without walking into memory	         that isn't ours.  */	      for (i = 0; i < 8; ++i)		{		  if (internal_ptr->u.syment._n._n_name[i] == '\0')		    {		      break;		    }		/* if end of string */		}		/* possible lengths of this string. */	      if ((newstring = (PTR) bfd_alloc (abfd, ++i)) == NULL)		{		  bfd_set_error (bfd_error_no_memory);		  return (NULL);		}		/* on error */	      memset (newstring, 0, i);	      strncpy (newstring, internal_ptr->u.syment._n._n_name, i - 1);	      internal_ptr->u.syment._n._n_n._n_offset = (long int) newstring;	      internal_ptr->u.syment._n._n_n._n_zeroes = 0;	    }	  else if (internal_ptr->u.syment._n._n_n._n_offset == 0)	    internal_ptr->u.syment._n._n_n._n_offset = (long int) "";	  else if (!bfd_coff_symname_in_debug (abfd, &internal_ptr->u.syment))	    {	      /* Long name already.  Point symbol at the string in the                 table.  */	      if (string_table == NULL)		{		  string_table = _bfd_coff_read_string_table (abfd);		  if (string_table == NULL)		    return NULL;		}	      internal_ptr->u.syment._n._n_n._n_offset =		((long int)		 (string_table		  + internal_ptr->u.syment._n._n_n._n_offset));	    }	  else	    {	      /* Long name in debug section.  Very similar.  */	      if (debug_section == NULL)		debug_section = build_debug_section (abfd);	      internal_ptr->u.syment._n._n_n._n_offset = (long int)		(debug_section + internal_ptr->u.syment._n._n_n._n_offset);	    }	}      internal_ptr += internal_ptr->u.syment.n_numaux;    }  obj_raw_syments (abfd) = internal;  BFD_ASSERT (obj_raw_syment_count (abfd)	      == (unsigned int) (internal_ptr - internal));  return (internal);}				/* coff_get_normalized_symtab() */