/* 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
#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"
/* 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;
{
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;
}
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;
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);
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)
{
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;
if (! header_printed)
{
minfo (_("\nSet Symbol\n\n"));
- header_printed = true;
+ header_printed = TRUE;
}
minfo ("%s", p->h->root.string);
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;