* gdbserver/{remote-gutils.c remote-server.c Makefile.in
[deliverable/binutils-gdb.git] / gdb / symfile.c
index d47a443f74e1af1b9c5dfe401afc9bd2be8edaba..ec582da8ca5e95d80aa335bbc43e776fe5353eb3 100644 (file)
@@ -442,6 +442,40 @@ syms_from_objfile (objfile, addr, mainline, verbo)
   section_offsets = (*objfile -> sf -> sym_offsets) (objfile, addr);
   objfile->section_offsets = section_offsets;
 
+#ifndef IBM6000_TARGET
+  /* This is a SVR4/SunOS specific hack, I think.  In any event, it
+     screws RS/6000.  sym_offsets should be doing this sort of thing,
+     because it knows the mapping between bfd sections and
+     section_offsets.  */
+  /* This is a hack.  As far as I can tell, section offsets are not
+     target dependent.  They are all set to addr with a couple of
+     exceptions.  The exceptions are sysvr4 shared libraries, whose
+     offsets are kept in solib structures anyway and rs6000 xcoff
+     which handles shared libraries in a completely unique way.
+
+     Section offsets are built similarly, except that they are built
+     by adding addr in all cases because there is no clear mapping
+     from section_offsets into actual sections.  Note that solib.c
+     has a different algorythm for finding section offsets.
+
+     These should probably all be collapsed into some target
+     independent form of shared library support.  FIXME.  */
+
+  if (addr)
+    {
+      struct obj_section *s;
+
+      for (s = objfile->sections; s < objfile->sections_end; ++s)
+       {
+         s->addr -= s->offset;
+         s->addr += addr;
+         s->endaddr -= s->offset;
+         s->endaddr += addr;
+         s->offset += addr;
+       }
+    }
+#endif /* not IBM6000_TARGET */
+
   (*objfile -> sf -> sym_read) (objfile, section_offsets, mainline);
 
   /* Don't allow char * to have a typename (else would get caddr_t.)  */
@@ -942,10 +976,8 @@ deduce_language_from_filename (filename)
     return language_c;
   else if(STREQ(c,".cc") || STREQ(c,".C"))
     return language_cplus;
-  /* start-sanitize-chill */
   else if(STREQ(c,".ch") || STREQ(c,".c186") || STREQ(c,".c286"))
     return language_chill;
-  /* end-sanitize-chill */
 
   return language_unknown;             /* default */
 }
@@ -1331,21 +1363,6 @@ add_psymbol_addr_to_list (name, namelength, namespace, class, list, val,
 
 #endif /* !INLINE_ADD_PSYMBOL */
 
-/* Returns a section whose range includes PC or NULL if none found. */
-
-struct section_table *
-find_pc_section(pc)
-     CORE_ADDR pc;
-{
-  struct section_table *s;
-
-  s = find_pc_section_from_targets(pc);
-  if (s == NULL)
-    s = find_pc_section_from_so_list(pc);
-
-  return(s);
-}
-
 \f
 void
 _initialize_symfile ()
This page took 0.023632 seconds and 4 git commands to generate.