* target.h: Add enum target_waitkind, enum target_signal, and
[deliverable/binutils-gdb.git] / gdb / paread.c
index 95489d925bb5edd3c35160d06f8861d0a86c63d9..7c24fdd80c6902135a623a03ee143d166dd9134c 100644 (file)
@@ -81,7 +81,7 @@ record_minimal_symbol (name, address, ms_type, objfile)
      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);
 }
 
 /*
@@ -182,13 +182,18 @@ pa_symtab_read (abfd, addr, 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;
 
@@ -407,11 +412,6 @@ pa_symfile_init (objfile)
 
   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)
@@ -420,10 +420,16 @@ pa_symfile_init (objfile)
   /* 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.  */
@@ -500,13 +506,11 @@ pa_symfile_offsets (objfile, addr)
   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 */
This page took 0.023618 seconds and 4 git commands to generate.