Fix comment.
[deliverable/binutils-gdb.git] / binutils / coffgrok.c
index 883ececb6a74edb85ae7ae9f64da106438c9da36..01a18cdc98b39b3a64fe0c5a5b2ebed978431999 100644 (file)
@@ -1,48 +1,50 @@
 /* coffgrok.c
-   Copyright 1994, 1995, 1997, 1998, 2000, 2001, 2002, 2003
+   Copyright 1994, 1995, 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2007
    Free Software Foundation, Inc.
 
-This file is part of GNU Binutils.
+   This file is part of GNU Binutils.
 
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
 
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
 
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 
 /* Written by Steve Chamberlain (sac@cygnus.com)
 
    This module reads a coff file and builds a really simple type tree
    which can be read by other programs.  The first application is a
-   coff->sysroff converter.  It can be tested with coffdump.c.
-
-*/
+   coff->sysroff converter.  It can be tested with coffdump.c.  */
 
+#include "sysdep.h"
 #include "bfd.h"
 #include "libiberty.h"
-#include "bucomm.h"
 
 #include "coff/internal.h"
 #include "../bfd/libcoff.h"
+#include "bucomm.h"
 #include "coffgrok.h"
-int lofile = 1;
+
+static int lofile = 1;
 static struct coff_scope *top_scope;
 static struct coff_scope *file_scope;
 static struct coff_ofile *ofile;
 
-struct coff_symbol *last_function_symbol;
-struct coff_type *last_function_type;
-struct coff_type *last_struct;
-struct coff_type *last_enum;
-struct coff_sfile *cur_sfile;
+static struct coff_symbol *last_function_symbol;
+static struct coff_type *last_function_type;
+static struct coff_type *last_struct;
+static struct coff_type *last_enum;
+static struct coff_sfile *cur_sfile;
 
 static struct coff_symbol **tindex;
 
@@ -156,7 +158,7 @@ do_sections_p1 (struct coff_ofile *head)
       if (strcmp (section->name, ".bss") == 0)
        head->sections[i].data = 1;
       head->sections[i].address = section->lma;
-      head->sections[i].size = section->_raw_size;
+      head->sections[i].size = bfd_get_section_size (section);
       head->sections[i].number = idx;
       head->sections[i].nrelocs = section->reloc_count;
       head->sections[i].relocs =
@@ -370,7 +372,7 @@ do_type (int i)
        {
          if (aux->x_sym.x_tagndx.p)
            {
-             /* Refe0rring to a struct defined elsewhere */
+             /* Referring to a struct defined elsewhere */
              res->type = coff_structref_type;
              res->u.astructref.ref = tindex[INDEXOF (aux->x_sym.x_tagndx.p)];
              res->size = res->u.astructref.ref ?
This page took 0.026067 seconds and 4 git commands to generate.