2007-05-08 Paul Gilliam <pgilliam@us.ibm.com>
[deliverable/binutils-gdb.git] / gdb / elfread.c
index 7b4d6d74b4f29da99f6cd42416bac22886521281..a80b8f0854823879289c3818a5c94b54e0a2a1eb 100644 (file)
@@ -1,7 +1,7 @@
 /* Read ELF (Executable and Linking Format) object files for GDB.
 
-   Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-   2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+   Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+   2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
 
    Written by Fred Fish at Cygnus Support.
 
@@ -44,10 +44,6 @@ extern void _initialize_elfread (void);
 
 struct elfinfo
   {
-    file_ptr dboffset;         /* Offset to dwarf debug section */
-    unsigned int dbsize;       /* Size of dwarf debug section */
-    file_ptr lnoffset;         /* Offset to dwarf line number section */
-    unsigned int lnsize;       /* Size of dwarf line number section */
     asection *stabsect;                /* Section pointer for .stab section */
     asection *stabindexsect;   /* Section pointer for .stab.index section */
     asection *mdebugsect;      /* Section pointer for .mdebug section */
@@ -80,17 +76,7 @@ elf_locate_sections (bfd *ignore_abfd, asection *sectp, void *eip)
   struct elfinfo *ei;
 
   ei = (struct elfinfo *) eip;
-  if (strcmp (sectp->name, ".debug") == 0)
-    {
-      ei->dboffset = sectp->filepos;
-      ei->dbsize = bfd_get_section_size (sectp);
-    }
-  else if (strcmp (sectp->name, ".line") == 0)
-    {
-      ei->lnoffset = sectp->filepos;
-      ei->lnsize = bfd_get_section_size (sectp);
-    }
-  else if (strcmp (sectp->name, ".stab") == 0)
+  if (strcmp (sectp->name, ".stab") == 0)
     {
       ei->stabsect = sectp;
     }
@@ -284,7 +270,7 @@ elf_symtab_read (struct objfile *objfile, int dynamic,
            }
          else if (sym->section->flags & SEC_CODE)
            {
-             if (sym->flags & BSF_GLOBAL)
+             if (sym->flags & (BSF_GLOBAL | BSF_WEAK))
                {
                  ms_type = mst_text;
                }
@@ -451,7 +437,6 @@ elf_symtab_read (struct objfile *objfile, int dynamic,
    We look for sections with specific names, to tell us what debug
    format to look for:  FIXME!!!
 
-   dwarf_build_psymtabs() builds psymtabs for DWARF symbols;
    elfstab_build_psymtabs() handles STABS symbols;
    mdebug_build_psymtabs() handles ECOFF debugging information.
 
@@ -608,14 +593,6 @@ elf_symfile_read (struct objfile *objfile, int mainline)
       /* DWARF 2 sections */
       dwarf2_build_psymtabs (objfile, mainline);
     }
-  else if (ei.dboffset && ei.lnoffset)
-    {
-      /* DWARF sections */
-      dwarf_build_psymtabs (objfile,
-                           mainline,
-                           ei.dboffset, ei.dbsize,
-                           ei.lnoffset, ei.lnsize);
-    }
 
   /* FIXME: kettenis/20030504: This still needs to be integrated with
      dwarf2read.c in a better way.  */
This page took 0.024644 seconds and 4 git commands to generate.