* dw2gencfi.c (cfi_parse_arg): Only use tc_regname_to_dw2regnum if
[binutils-gdb.git] / ld / ldctor.c
index 0a434b812e1bd55f999a512566d4ed3ba9cf0c2f..a5089cfeaa1d3bd4252e4cb8214d93693a67ad27 100644 (file)
@@ -1,8 +1,8 @@
 /* ldctor.c -- constructor support routines
-   Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 1998
-   Free Software Foundation, Inc.
+   Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
+   2002 Free Software Foundation, Inc.
    By Steve Chamberlain <sac@cygnus.com>
-   
+
 This file is part of GLD, the Gnu Linker.
 
 GLD is free software; you can redistribute it and/or modify
@@ -23,14 +23,13 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 #include "bfd.h"
 #include "sysdep.h"
 #include "bfdlink.h"
-
-#include <ctype.h>
+#include "safe-ctype.h"
 
 #include "ld.h"
 #include "ldexp.h"
 #include "ldlang.h"
 #include "ldmisc.h"
-#include "ldgram.h"
+#include <ldgram.h>
 #include "ldmain.h"
 #include "ldctor.h"
 
@@ -44,7 +43,7 @@ lang_statement_list_type constructor_list;
 /* Whether the constructors should be sorted.  Note that this is
    global for the entire link; we assume that there is only a single
    CONSTRUCTORS command in the linker script.  */
-boolean constructors_sorted;
+bfd_boolean constructors_sorted;
 
 /* The sets we have seen.  */
 struct set_info *sets;
@@ -86,7 +85,8 @@ ldctor_add_set_entry (h, reloc, name, section, value)
     {
       if (p->reloc != reloc)
        {
-         einfo (_("%P%X: Different relocs used in set %s\n"), h->root.string);
+         einfo (_("%P%X: Different relocs used in set %s\n"),
+                h->root.string);
          return;
        }
 
@@ -136,7 +136,7 @@ ctor_prio (name)
   while (*name == '_')
     ++name;
 
-  if (strncmp (name, "GLOBAL_",  sizeof "GLOBAL_" - 1) != 0)
+  if (strncmp (name, "GLOBAL_", sizeof "GLOBAL_" - 1) != 0)
     return -1;
 
   name += sizeof "GLOBAL_" - 1;
@@ -145,7 +145,7 @@ ctor_prio (name)
     return -1;
   if (name[1] != 'I' && name[1] != 'D')
     return -1;
-  if (! isdigit ((unsigned char) name[3]))
+  if (! ISDIGIT (name[3]))
     return -1;
 
   return atoi (name + 3);
@@ -204,16 +204,16 @@ ctor_cmp (p1, p2)
 void
 ldctor_build_sets ()
 {
-  static boolean called;
+  static bfd_boolean called;
   lang_statement_list_type *old;
-  boolean header_printed;
+  bfd_boolean header_printed;
   struct set_info *p;
 
   /* The emulation code may call us directly, but we only want to do
      this once.  */
   if (called)
     return;
-  called = true;
+  called = TRUE;
 
   if (constructors_sorted)
     {
@@ -256,7 +256,7 @@ ldctor_build_sets ()
 
   lang_list_init (stat_ptr);
 
-  header_printed = false;
+  header_printed = FALSE;
   for (p = sets; p != (struct set_info *) NULL; p = p->next)
     {
       struct set_element *e;
@@ -342,7 +342,7 @@ ldctor_build_sets ()
              if (! header_printed)
                {
                  minfo (_("\nSet                 Symbol\n\n"));
-                 header_printed = true;
+                 header_printed = TRUE;
                }
 
              minfo ("%s", p->h->root.string);
@@ -365,7 +365,7 @@ ldctor_build_sets ()
                minfo ("%G\n", e->section->owner, e->section, e->value);
            }
 
-          /* Need SEC_KEEP for --gc-sections */
+         /* Need SEC_KEEP for --gc-sections.  */
          if (! bfd_is_abs_section (e->section))
            e->section->flags |= SEC_KEEP;