Updated copyright notices for most files.
[deliverable/binutils-gdb.git] / gdb / mipsread.c
index 280e605749fa408eeb6b14175baa1251d8bc2b3d..a84003fb90147f32c164b344cd7614300e6c47db 100644 (file)
@@ -1,7 +1,8 @@
 /* Read a symbol table in MIPS' format (Third-Eye).
 
    Copyright (C) 1986, 1987, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996,
-   1998, 1999, 2000, 2001, 2003, 2004, 2007 Free Software Foundation, Inc.
+   1998, 1999, 2000, 2001, 2003, 2004, 2007, 2008, 2009
+   Free Software Foundation, Inc.
 
    Contributed by Alessandro Forin (af@cs.cmu.edu) at CMU.  Major work
    by Per Bothner, John Gilmore and Ian Lance Taylor at Cygnus Support.
@@ -38,6 +39,7 @@
 #include "libcoff.h"           /* Private BFD COFF information.  */
 #include "libecoff.h"          /* Private BFD ECOFF information.  */
 #include "elf/common.h"
+#include "elf/internal.h"
 #include "elf/mips.h"
 
 static void
@@ -215,13 +217,13 @@ read_alphacoff_dynamic_symtab (struct section_offsets *section_offsets,
   dyninfo_secsize = bfd_get_section_size (si.dyninfo_sect);
   got_secsize = bfd_get_section_size (si.got_sect);
   sym_secptr = xmalloc (sym_secsize);
-  cleanups = make_cleanup (free, sym_secptr);
+  cleanups = make_cleanup (xfree, sym_secptr);
   str_secptr = xmalloc (str_secsize);
-  make_cleanup (free, str_secptr);
+  make_cleanup (xfree, str_secptr);
   dyninfo_secptr = xmalloc (dyninfo_secsize);
-  make_cleanup (free, dyninfo_secptr);
+  make_cleanup (xfree, dyninfo_secptr);
   got_secptr = xmalloc (got_secsize);
-  make_cleanup (free, got_secptr);
+  make_cleanup (xfree, got_secptr);
 
   if (!bfd_get_section_contents (abfd, si.sym_sect, sym_secptr,
                                 (file_ptr) 0, sym_secsize))
@@ -292,6 +294,8 @@ read_alphacoff_dynamic_symtab (struct section_offsets *section_offsets,
       sym_value = bfd_h_get_64 (abfd, (bfd_byte *) x_symp->st_value);
       sym_info = bfd_h_get_8 (abfd, (bfd_byte *) x_symp->st_info);
       sym_shndx = bfd_h_get_16 (abfd, (bfd_byte *) x_symp->st_shndx);
+      if (sym_shndx >= (SHN_LORESERVE & 0xffff))
+       sym_shndx += SHN_LORESERVE - (SHN_LORESERVE & 0xffff);
       isglobal = (ELF_ST_BIND (sym_info) == STB_GLOBAL);
 
       if (sym_shndx == SHN_UNDEF)
@@ -394,6 +398,7 @@ static struct sym_fns ecoff_sym_fns =
   default_symfile_offsets,     /* sym_offsets: dummy FIXME til implem sym reloc */
   default_symfile_segments,    /* sym_segments: Get segment information from
                                   a file.  */
+  NULL,                         /* sym_read_linetable */
   NULL                         /* next: pointer to next struct sym_fns */
 };
 
This page took 0.0266 seconds and 4 git commands to generate.