aboutsummaryrefslogtreecommitdiff
path: root/ld/emultempl/sunos.em
diff options
context:
space:
mode:
Diffstat (limited to 'ld/emultempl/sunos.em')
-rw-r--r--ld/emultempl/sunos.em86
1 files changed, 43 insertions, 43 deletions
diff --git a/ld/emultempl/sunos.em b/ld/emultempl/sunos.em
index 64e5ea5..c00c0db 100644
--- a/ld/emultempl/sunos.em
+++ b/ld/emultempl/sunos.em
@@ -1,6 +1,6 @@
# This shell script emits a C file. -*- C -*-
# It does some substitutions.
-if [ -z "$MACHINE" ]; then
+if [ -z "$MACHINE" ]; then
OUTPUT_ARCH=${ARCH}
else
OUTPUT_ARCH=${ARCH}:${MACHINE}
@@ -9,7 +9,7 @@ cat >e${EMULATION_NAME}.c <<EOF
/* This file is is generated by a shell script. DO NOT EDIT! */
/* SunOS emulation code for ${EMULATION_NAME}
- Copyright 1991, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
+ Copyright 1991, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2002
Free Software Foundation, Inc.
Written by Steve Chamberlain <sac@cygnus.com>
SunOS shared library support by Ian Lance Taylor <ian@cygnus.com>
@@ -68,13 +68,13 @@ static void gld${EMULATION_NAME}_create_output_section_statements
static void gld${EMULATION_NAME}_find_so
PARAMS ((lang_input_statement_type *));
static char *gld${EMULATION_NAME}_search_dir
- PARAMS ((const char *, const char *, boolean *));
+ PARAMS ((const char *, const char *, bfd_boolean *));
static void gld${EMULATION_NAME}_after_open PARAMS ((void));
static void gld${EMULATION_NAME}_check_needed
PARAMS ((lang_input_statement_type *));
-static boolean gld${EMULATION_NAME}_search_needed
+static bfd_boolean gld${EMULATION_NAME}_search_needed
PARAMS ((const char *, const char *));
-static boolean gld${EMULATION_NAME}_try_needed
+static bfd_boolean gld${EMULATION_NAME}_try_needed
PARAMS ((const char *, const char *));
static void gld${EMULATION_NAME}_before_allocation PARAMS ((void));
static void gld${EMULATION_NAME}_find_assignment
@@ -98,8 +98,8 @@ gld${EMULATION_NAME}_before_parse()
}
else
ldfile_output_architecture = bfd_arch_${ARCH};
- config.dynamic_link = true;
- config.has_shared = true;
+ config.dynamic_link = TRUE;
+ config.has_shared = TRUE;
}
/* This is called after the command line arguments have been parsed,
@@ -131,7 +131,7 @@ cat >>e${EMULATION_NAME}.c <<EOF
if (c != NULL)
*c++ = '\0';
if (*l != '\0')
- ldfile_add_library_path (l, false);
+ ldfile_add_library_path (l, FALSE);
if (c == NULL)
break;
l = c;
@@ -179,7 +179,7 @@ gld${EMULATION_NAME}_find_so (inp)
for (search = search_head; search != NULL; search = search->next)
{
- boolean found_static;
+ bfd_boolean found_static;
found = gld${EMULATION_NAME}_search_dir (search->name, inp->filename,
&found_static);
@@ -202,7 +202,7 @@ gld${EMULATION_NAME}_find_so (inp)
/* Turn off the search_dirs_flag to prevent ldfile_open_file from
searching for this file again. */
- inp->search_dirs_flag = false;
+ inp->search_dirs_flag = FALSE;
free (found);
@@ -237,7 +237,7 @@ static char *
gld${EMULATION_NAME}_search_dir (dirname, filename, found_static)
const char *dirname;
const char *filename;
- boolean *found_static;
+ bfd_boolean *found_static;
{
int force_maj, force_min;
const char *dot;
@@ -252,7 +252,7 @@ gld${EMULATION_NAME}_search_dir (dirname, filename, found_static)
int statval;
struct stat st;
- *found_static = false;
+ *found_static = FALSE;
force_maj = -1;
force_min = -1;
@@ -284,7 +284,7 @@ gld${EMULATION_NAME}_search_dir (dirname, filename, found_static)
if (dir == NULL)
return NULL;
dirnamelen = strlen (dirname);
-
+
while ((entry = readdir (dir)) != NULL)
{
const char *s;
@@ -297,7 +297,7 @@ gld${EMULATION_NAME}_search_dir (dirname, filename, found_static)
if (dot == NULL
&& strcmp (entry->d_name + 3 + len, ".a") == 0)
{
- *found_static = true;
+ *found_static = TRUE;
continue;
}
@@ -373,7 +373,7 @@ gld${EMULATION_NAME}_search_dir (dirname, filename, found_static)
between after_open and check_needed. */
static struct bfd_link_needed_list *global_needed;
-static boolean global_found;
+static bfd_boolean global_found;
/* This is called after all the input files have been opened. */
@@ -412,7 +412,7 @@ gld${EMULATION_NAME}_after_open ()
/* See if this file was included in the link explicitly. */
global_needed = l;
- global_found = false;
+ global_found = FALSE;
lang_for_each_input_file (gld${EMULATION_NAME}_check_needed);
if (global_found)
continue;
@@ -513,7 +513,7 @@ cat >>e${EMULATION_NAME}.c <<EOF
/* Search for a needed file in a path. */
-static boolean
+static bfd_boolean
gld${EMULATION_NAME}_search_needed (path, name)
const char *path;
const char *name;
@@ -521,7 +521,7 @@ gld${EMULATION_NAME}_search_needed (path, name)
const char *s;
if (path == NULL || *path == '\0')
- return false;
+ return FALSE;
while (1)
{
const char *dir;
@@ -542,7 +542,7 @@ gld${EMULATION_NAME}_search_needed (path, name)
}
if (gld${EMULATION_NAME}_try_needed (dir, name))
- return true;
+ return TRUE;
if (dircopy != NULL)
free (dircopy);
@@ -552,41 +552,41 @@ gld${EMULATION_NAME}_search_needed (path, name)
path = s + 1;
}
- return false;
+ return FALSE;
}
/* This function is called for each possible directory for a needed
dynamic object. */
-static boolean
+static bfd_boolean
gld${EMULATION_NAME}_try_needed (dir, name)
const char *dir;
const char *name;
{
char *file;
char *alc;
- boolean ignore;
+ bfd_boolean ignore;
bfd *abfd;
file = gld${EMULATION_NAME}_search_dir (dir, name, &ignore);
if (file == NULL)
- return false;
+ return FALSE;
alc = (char *) xmalloc (strlen (dir) + strlen (file) + 2);
sprintf (alc, "%s/%s", dir, file);
free (file);
abfd = bfd_openr (alc, bfd_get_target (output_bfd));
if (abfd == NULL)
- return false;
+ return FALSE;
if (! bfd_check_format (abfd, bfd_object))
{
(void) bfd_close (abfd);
- return false;
+ return FALSE;
}
if ((bfd_get_file_flags (abfd) & DYNAMIC) == 0)
{
(void) bfd_close (abfd);
- return false;
+ return FALSE;
}
/* We've found the needed dynamic object. */
@@ -595,7 +595,7 @@ gld${EMULATION_NAME}_try_needed (dir, name)
if (! bfd_link_add_symbols (abfd, &link_info))
einfo ("%F%B: could not read symbols: %E\n", abfd);
- return true;
+ return TRUE;
}
/* See if we have already included a needed object in the link. This
@@ -611,7 +611,7 @@ gld${EMULATION_NAME}_check_needed (s)
if (strncmp (global_needed->name, "-l", 2) != 0)
{
if (strcmp (s->filename, global_needed->name) == 0)
- global_found = true;
+ global_found = TRUE;
}
else
{
@@ -651,7 +651,7 @@ gld${EMULATION_NAME}_check_needed (s)
|| (smin != lmin && smin != -1 && lmin != -1))
return;
- global_found = true;
+ global_found = TRUE;
}
}
@@ -659,7 +659,7 @@ gld${EMULATION_NAME}_check_needed (s)
to lang_for_each_statement. Ick. */
static const char *find_assign;
-static boolean found_assign;
+static bfd_boolean found_assign;
/* We need to use static variables to pass information around the call
to lang_for_each_input_file. Ick. */
@@ -692,7 +692,7 @@ gld${EMULATION_NAME}_before_allocation ()
if (! link_info.shared && ! link_info.relocateable && ! entry_from_cmdline)
{
struct bfd_link_hash_entry *h;
-
+
for (h = link_info.hash->undefs; h != NULL; h = h->next)
{
if (h->type == bfd_link_hash_undefined
@@ -702,11 +702,11 @@ gld${EMULATION_NAME}_before_allocation ()
&& strcmp (h->root.string, "__GLOBAL_OFFSET_TABLE_") != 0)
{
find_assign = h->root.string;
- found_assign = false;
+ found_assign = FALSE;
lang_for_each_statement (gld${EMULATION_NAME}_find_assignment);
if (! found_assign)
{
- link_info.shared = true;
+ link_info.shared = TRUE;
break;
}
}
@@ -732,8 +732,8 @@ gld${EMULATION_NAME}_before_allocation ()
afterward. */
if (! link_info.relocateable)
{
- hdyn = bfd_link_hash_lookup (link_info.hash, "__DYNAMIC", true, false,
- false);
+ hdyn = bfd_link_hash_lookup (link_info.hash, "__DYNAMIC", TRUE, FALSE,
+ FALSE);
if (hdyn == NULL)
einfo ("%P%F: bfd_link_hash_lookup: %E\n");
if (! bfd_sunos_record_link_assignment (output_bfd, &link_info,
@@ -862,7 +862,7 @@ gld${EMULATION_NAME}_find_exp_assignment (exp)
if (find_assign != NULL)
{
if (strcmp (find_assign, exp->assign.dst) == 0)
- found_assign = true;
+ found_assign = TRUE;
return;
}
@@ -986,14 +986,14 @@ then
sc="-f stringify.sed"
cat >>e${EMULATION_NAME}.c <<EOF
-{
+{
*isfile = 0;
- if (link_info.relocateable == true && config.build_constructors == true)
+ if (link_info.relocateable && config.build_constructors)
return
EOF
sed $sc ldscripts/${EMULATION_NAME}.xu >> e${EMULATION_NAME}.c
-echo ' ; else if (link_info.relocateable == true) return' >> e${EMULATION_NAME}.c
+echo ' ; else if (link_info.relocateable) return' >> e${EMULATION_NAME}.c
sed $sc ldscripts/${EMULATION_NAME}.xr >> e${EMULATION_NAME}.c
echo ' ; else if (!config.text_read_only) return' >> e${EMULATION_NAME}.c
sed $sc ldscripts/${EMULATION_NAME}.xbn >> e${EMULATION_NAME}.c
@@ -1007,12 +1007,12 @@ else
# Scripts read from the filesystem.
cat >>e${EMULATION_NAME}.c <<EOF
-{
+{
*isfile = 1;
- if (link_info.relocateable == true && config.build_constructors == true)
+ if (link_info.relocateable && config.build_constructors)
return "ldscripts/${EMULATION_NAME}.xu";
- else if (link_info.relocateable == true)
+ else if (link_info.relocateable)
return "ldscripts/${EMULATION_NAME}.xr";
else if (!config.text_read_only)
return "ldscripts/${EMULATION_NAME}.xbn";
@@ -1027,7 +1027,7 @@ fi
cat >>e${EMULATION_NAME}.c <<EOF
-struct ld_emulation_xfer_struct ld_${EMULATION_NAME}_emulation =
+struct ld_emulation_xfer_struct ld_${EMULATION_NAME}_emulation =
{
gld${EMULATION_NAME}_before_parse,
syslib_default,