xmmalloc (objfile->md, sizeof (struct dbx_symfile_info));
xmalloc (sizeof (struct dbx_symfile_info));
dbx_symfile_init (struct objfile *objfile){  int val;  bfd *sym_bfd = objfile->obfd;  char *name = bfd_get_filename (sym_bfd);  asection *text_sect;  unsigned char size_temp[DBX_STRINGTAB_SIZE_SIZE];  /* Allocate struct to keep track of the symfile */  objfile->sym_stab_info = (struct dbx_symfile_info *)    xmmalloc (objfile->md, sizeof (struct dbx_symfile_info));  memset (objfile->sym_stab_info, 0, sizeof (struct dbx_symfile_info));  DBX_TEXT_SECTION (objfile) = bfd_get_section_by_name (sym_bfd, ".text");  DBX_DATA_SECTION (objfile) = bfd_get_section_by_name (sym_bfd, ".data");  DBX_BSS_SECTION (objfile) = bfd_get_section_by_name (sym_bfd, ".bss");  /* FIXME POKING INSIDE BFD DATA STRUCTURES */#define	STRING_TABLE_OFFSET	(sym_bfd->origin + obj_str_filepos (sym_bfd))#define	SYMBOL_TABLE_OFFSET	(sym_bfd->origin + obj_sym_filepos (sym_bfd))  /* FIXME POKING INSIDE BFD DATA STRUCTURES */  DBX_SYMFILE_INFO (objfile)->stab_section_info = NULL;  text_sect = bfd_get_section_by_name (sym_bfd, ".text");  if (!text_sect)    error ("Can't find .text section in symbol file");  DBX_TEXT_ADDR (objfile) = bfd_section_vma (sym_bfd, text_sect);  DBX_TEXT_SIZE (objfile) = bfd_section_size (sym_bfd, text_sect);  DBX_SYMBOL_SIZE (objfile) = obj_symbol_entry_size (sym_bfd);  DBX_SYMCOUNT (objfile) = bfd_get_symcount (sym_bfd);  DBX_SYMTAB_OFFSET (objfile) = SYMBOL_TABLE_OFFSET;  /* Read the string table and stash it away in the objfile_obstack.     When we blow away the objfile the string table goes away as well.     Note that gdb used to use the results of attempting to malloc the     string table, based on the size it read, as a form of sanity check     for botched byte swapping, on the theory that a byte swapped string     table size would be so totally bogus that the malloc would fail.  Now     that we put in on the objfile_obstack, we can't do this since gdb gets     a fatal error (out of virtual memory) if the size is bogus.  We can     however at least check to see if the size is less than the size of     the size field itself, or larger than the size of the entire file.     Note that all valid string tables have a size greater than zero, since     the bytes used to hold the size are included in the count. */  if (STRING_TABLE_OFFSET == 0)    {      /* It appears that with the existing bfd code, STRING_TABLE_OFFSET         will never be zero, even when there is no string table.  This         would appear to be a bug in bfd. */      DBX_STRINGTAB_SIZE (objfile) = 0;      DBX_STRINGTAB (objfile) = NULL;    }  else    {      val = bfd_seek (sym_bfd, STRING_TABLE_OFFSET, SEEK_SET);      if (val < 0)	perror_with_name (name);      memset (size_temp, 0, sizeof (size_temp));      val = bfd_bread (size_temp, sizeof (size_temp), sym_bfd);      if (val < 0)	{	  perror_with_name (name);	}      else if (val == 0)	{	  /* With the existing bfd code, STRING_TABLE_OFFSET will be set to	     EOF if there is no string table, and attempting to read the size	     from EOF will read zero bytes. */	  DBX_STRINGTAB_SIZE (objfile) = 0;	  DBX_STRINGTAB (objfile) = NULL;	}      else	{	  /* Read some data that would appear to be the string table size.	     If there really is a string table, then it is probably the right	     size.  Byteswap if necessary and validate the size.  Note that	     the minimum is DBX_STRINGTAB_SIZE_SIZE.  If we just read some	     random data that happened to be at STRING_TABLE_OFFSET, because	     bfd can't tell us there is no string table, the sanity checks may	     or may not catch this. */	  DBX_STRINGTAB_SIZE (objfile) = bfd_h_get_32 (sym_bfd, size_temp);	  if (DBX_STRINGTAB_SIZE (objfile) < sizeof (size_temp)	      || DBX_STRINGTAB_SIZE (objfile) > bfd_get_size (sym_bfd))	    error ("ridiculous string table size (%d bytes).",		   DBX_STRINGTAB_SIZE (objfile));	  DBX_STRINGTAB (objfile) =	    (char *) obstack_alloc (&objfile->objfile_obstack,				    DBX_STRINGTAB_SIZE (objfile));	  OBJSTAT (objfile, sz_strtab += DBX_STRINGTAB_SIZE (objfile));	  /* Now read in the string table in one big gulp.  */	  val = bfd_seek (sym_bfd, STRING_TABLE_OFFSET, SEEK_SET);	  if (val < 0)	    perror_with_name (name);	  val = bfd_bread (DBX_STRINGTAB (objfile),			   DBX_STRINGTAB_SIZE (objfile),			   sym_bfd);	  if (val != DBX_STRINGTAB_SIZE (objfile))	    perror_with_name (name);	}    }}