]> Git Repo - binutils.git/blobdiff - ld/ldmisc.c
2003-04-12 Andrew Cagney <[email protected]>
[binutils.git] / ld / ldmisc.c
index 6be50c327318dd4c489ff496bba766d583fb8390..4f25dbb15fbae5f4a363d42a1ad20188188b9d6e 100644 (file)
@@ -1,25 +1,25 @@
 /* ldmisc.c
    Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-   2000, 2002
+   2000, 2002, 2003
    Free Software Foundation, Inc.
    Written by Steve Chamberlain of Cygnus Support.
 
-This file is part of GLD, the Gnu Linker.
+   This file is part of GLD, the Gnu Linker.
 
-GLD 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, or (at your option)
-any later version.
+   GLD 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, or (at your option)
+   any later version.
 
-GLD 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.
+   GLD 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 GLD; see the file COPYING.  If not, write to the Free
-Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-02111-1307, USA.  */
+   You should have received a copy of the GNU General Public License
+   along with GLD; see the file COPYING.  If not, write to the Free
+   Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+   02111-1307, USA.  */
 
 #include "bfd.h"
 #include "sysdep.h"
@@ -71,7 +71,7 @@ vfinfo (fp, fmt, arg)
      const char *fmt;
      va_list arg;
 {
-  boolean fatal = false;
+  bfd_boolean fatal = FALSE;
 
   while (*fmt != '\0')
     {
@@ -97,7 +97,7 @@ vfinfo (fp, fmt, arg)
 
            case 'X':
              /* no object output, fail return */
-             config.make_executable = false;
+             config.make_executable = FALSE;
              break;
 
            case 'V':
@@ -182,7 +182,7 @@ vfinfo (fp, fmt, arg)
 
            case 'F':
              /* Error is fatal.  */
-             fatal = true;
+             fatal = TRUE;
              break;
 
            case 'P':
@@ -250,7 +250,7 @@ vfinfo (fp, fmt, arg)
                const char *filename;
                const char *functionname;
                unsigned int linenumber;
-               boolean discard_last;
+               bfd_boolean discard_last;
 
                abfd = va_arg (arg, bfd *);
                section = va_arg (arg, asection *);
@@ -281,12 +281,12 @@ vfinfo (fp, fmt, arg)
 
                lfinfo (fp, "%B(%s+0x%v)", abfd, section->name, offset);
 
-               discard_last = true;
+               discard_last = TRUE;
                if (bfd_find_nearest_line (abfd, section, asymbols, offset,
                                           &filename, &functionname,
                                           &linenumber))
                  {
-                   boolean need_colon = true;
+                   bfd_boolean need_colon = TRUE;
 
                    if (functionname != NULL && fmt[-1] == 'C')
                      {
@@ -300,7 +300,7 @@ vfinfo (fp, fmt, arg)
                          {
                            lfinfo (fp, _(": In function `%T':\n"),
                                    functionname);
-                           need_colon = false;
+                           need_colon = FALSE;
 
                            last_bfd = abfd;
                            if (last_file != NULL)
@@ -312,7 +312,7 @@ vfinfo (fp, fmt, arg)
                              free (last_function);
                            last_function = xstrdup (functionname);
                          }
-                       discard_last = false;
+                       discard_last = FALSE;
                      }
 
                    if (filename != NULL)
@@ -328,6 +328,9 @@ vfinfo (fp, fmt, arg)
                      fprintf (fp, ":%u", linenumber);
                  }
 
+               if (asymbols != NULL && entry == NULL)
+                 free (asymbols);
+
                if (discard_last)
                  {
                    last_bfd = NULL;
@@ -364,9 +367,9 @@ vfinfo (fp, fmt, arg)
     }
 
   if (config.fatal_warnings)
-    config.make_executable = false;
+    config.make_executable = FALSE;
 
-  if (fatal == true)
+  if (fatal)
     xexit (1);
 }
 
This page took 0.030446 seconds and 4 git commands to generate.