struct objfile *objfile;
{
name = obsavestring (name, strlen (name), &objfile -> symbol_obstack);
- prim_record_minimal_symbol (name, address, ms_type);
+ prim_record_minimal_symbol (name, address, ms_type, objfile);
}
/*
bufp->symbol_value &= ~0x3; /* clear out permission bits */
check_strange_names:
- /* GAS leaves symbols with the prefixes "LS$", "LBB$",
- and "LBE$" in .o files after assembling. And thus
- they appear in the final executable. This can
- cause problems if these special symbols have the
- same value as real symbols. So ignore them. Also "LC$". */
+ /* GAS leaves labels in .o files after assembling. At
+ least labels starting with "LS$", "LBB$", "LBE$",
+ "LC$", and "L$" can happen. This should be fixed in
+ the assembler and/or compiler, to save space in the
+ executable (and because having GDB make gross
+ distinctions based on the name is kind of ugly), but
+ until then, just ignore them. ("L$" at least, has something
+ to do with getting relocation correct, so that one might
+ be hard to fix). */
if (*symname == 'L'
- && (symname[2] == '$' || symname[3] == '$'))
+ && (symname[1] == '$' || symname[2] == '$'
+ || symname[3] == '$'))
continue;
break;
memset ((PTR) objfile->sym_stab_info, 0, sizeof (struct dbx_symfile_info));
- if (!stabsect)
- return;
-
- if (!stringsect)
- error ("Found stabs, but not string section");
/* FIXME POKING INSIDE BFD DATA STRUCTURES */
#define STRING_TABLE_OFFSET (stringsect->filepos)
/* FIXME POKING INSIDE BFD DATA STRUCTURES */
DBX_SYMFILE_INFO (objfile)->stab_section_info = NULL;
- DBX_TEXT_SECT (objfile) = bfd_get_section_by_name (sym_bfd, ".text");
+ DBX_TEXT_SECT (objfile) = bfd_get_section_by_name (sym_bfd, "$TEXT$");
if (!DBX_TEXT_SECT (objfile))
- error ("Can't find .text section in symbol file");
+ error ("Can't find $TEXT$ section in symbol file");
+ if (!stabsect)
+ return;
+
+ if (!stringsect)
+ error ("Found stabs, but not string section");
+
/* FIXME: I suspect this should be external_nlist. The size of host
types like long and bfd_vma should not affect how we read the
file. */
return section_offsets;
}
\f
-/* Register that we are able to handle SOM object file formats (does this
- work for hp300, or just PA? I suspect the latter). */
+/* Register that we are able to handle SOM object file formats. */
static struct sym_fns pa_sym_fns =
{
- "som", /* sym_name: name or name prefix of BFD target type */
- 3, /* sym_namelen: number of significant sym_name chars */
+ bfd_target_som_flavour,
pa_new_init, /* sym_new_init: init anything gbl to entire symtab */
pa_symfile_init, /* sym_init: read initial info, setup for sym_read() */
pa_symfile_read, /* sym_read: read a symbol file into symtab */