aboutsummaryrefslogtreecommitdiff
path: root/bfd/xcofflink.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2002-11-30 08:39:46 +0000
committerAlan Modra <amodra@gmail.com>2002-11-30 08:39:46 +0000
commitb34976b65aea8f33690229600bbf4527ec3118e1 (patch)
tree6411348664ef81ca2aa2e3ff325116e6e6502edf /bfd/xcofflink.c
parent583d52d728c60410c0d39bae68ee536a7b9e7a6c (diff)
downloadgdb-b34976b65aea8f33690229600bbf4527ec3118e1.zip
gdb-b34976b65aea8f33690229600bbf4527ec3118e1.tar.gz
gdb-b34976b65aea8f33690229600bbf4527ec3118e1.tar.bz2
s/boolean/bfd_boolean/ s/true/TRUE/ s/false/FALSE/. Simplify
comparisons of bfd_boolean vars with TRUE/FALSE. Formatting.
Diffstat (limited to 'bfd/xcofflink.c')
-rw-r--r--bfd/xcofflink.c855
1 files changed, 425 insertions, 430 deletions
diff --git a/bfd/xcofflink.c b/bfd/xcofflink.c
index e4e4755..0505c86 100644
--- a/bfd/xcofflink.c
+++ b/bfd/xcofflink.c
@@ -115,34 +115,35 @@ struct xcoff_final_link_info
static struct bfd_hash_entry *xcoff_link_hash_newfunc
PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *, const char *));
-static boolean xcoff_get_section_contents PARAMS ((bfd *, asection *));
+static bfd_boolean xcoff_get_section_contents PARAMS ((bfd *, asection *));
static struct internal_reloc *xcoff_read_internal_relocs
- PARAMS ((bfd *, asection *, boolean, bfd_byte *, boolean,
+ PARAMS ((bfd *, asection *, bfd_boolean, bfd_byte *, bfd_boolean,
struct internal_reloc *));
-static boolean xcoff_link_add_object_symbols
+static bfd_boolean xcoff_link_add_object_symbols
PARAMS ((bfd *, struct bfd_link_info *));
-static boolean xcoff_link_check_archive_element
- PARAMS ((bfd *, struct bfd_link_info *, boolean *));
-static boolean xcoff_link_check_ar_symbols
- PARAMS ((bfd *, struct bfd_link_info *, boolean *));
-static boolean xcoff_link_check_dynamic_ar_symbols
- PARAMS ((bfd *, struct bfd_link_info *, boolean *));
+static bfd_boolean xcoff_link_check_archive_element
+ PARAMS ((bfd *, struct bfd_link_info *, bfd_boolean *));
+static bfd_boolean xcoff_link_check_ar_symbols
+ PARAMS ((bfd *, struct bfd_link_info *, bfd_boolean *));
+static bfd_boolean xcoff_link_check_dynamic_ar_symbols
+ PARAMS ((bfd *, struct bfd_link_info *, bfd_boolean *));
static bfd_size_type xcoff_find_reloc
PARAMS ((struct internal_reloc *, bfd_size_type, bfd_vma));
-static boolean xcoff_link_add_symbols PARAMS ((bfd *, struct bfd_link_info *));
-static boolean xcoff_link_add_dynamic_symbols
+static bfd_boolean xcoff_link_add_symbols
PARAMS ((bfd *, struct bfd_link_info *));
-static boolean xcoff_mark_symbol
+static bfd_boolean xcoff_link_add_dynamic_symbols
+ PARAMS ((bfd *, struct bfd_link_info *));
+static bfd_boolean xcoff_mark_symbol
PARAMS ((struct bfd_link_info *, struct xcoff_link_hash_entry *));
-static boolean xcoff_mark PARAMS ((struct bfd_link_info *, asection *));
+static bfd_boolean xcoff_mark PARAMS ((struct bfd_link_info *, asection *));
static void xcoff_sweep PARAMS ((struct bfd_link_info *));
-static boolean xcoff_build_ldsyms
+static bfd_boolean xcoff_build_ldsyms
PARAMS ((struct xcoff_link_hash_entry *, PTR));
-static boolean xcoff_link_input_bfd
+static bfd_boolean xcoff_link_input_bfd
PARAMS ((struct xcoff_final_link_info *, bfd *));
-static boolean xcoff_write_global_symbol
+static bfd_boolean xcoff_write_global_symbol
PARAMS ((struct xcoff_link_hash_entry *, PTR));
-static boolean xcoff_reloc_link_order
+static bfd_boolean xcoff_reloc_link_order
PARAMS ((bfd *, struct xcoff_final_link_info *, asection *,
struct bfd_link_order *));
static int xcoff_sort_relocs PARAMS ((const PTR, const PTR));
@@ -154,7 +155,7 @@ static int xcoff_sort_relocs PARAMS ((const PTR, const PTR));
/* Read the contents of a section. */
-static boolean
+static bfd_boolean
xcoff_get_section_contents (abfd, sec)
bfd *abfd;
asection *sec;
@@ -165,7 +166,7 @@ xcoff_get_section_contents (abfd, sec)
bfd_size_type amt = sizeof (struct coff_section_tdata);
sec->used_by_bfd = bfd_zalloc (abfd, amt);
if (sec->used_by_bfd == NULL)
- return false;
+ return FALSE;
}
if (coff_section_data (abfd, sec)->contents == NULL)
@@ -173,15 +174,15 @@ xcoff_get_section_contents (abfd, sec)
coff_section_data (abfd, sec)->contents = ((bfd_byte *)
bfd_malloc (sec->_raw_size));
if (coff_section_data (abfd, sec)->contents == NULL)
- return false;
+ return FALSE;
if (! bfd_get_section_contents (abfd, sec,
coff_section_data (abfd, sec)->contents,
(file_ptr) 0, sec->_raw_size))
- return false;
+ return FALSE;
}
- return true;
+ return TRUE;
}
/* Get the size required to hold the dynamic symbols. */
@@ -247,7 +248,7 @@ _bfd_xcoff_canonicalize_dynamic_symtab (abfd, psyms)
return -1;
contents = coff_section_data (abfd, lsec)->contents;
- coff_section_data (abfd, lsec)->keep_contents = true;
+ coff_section_data (abfd, lsec)->keep_contents = TRUE;
bfd_xcoff_swap_ldhdr_in (abfd, contents, &ldhdr);
@@ -295,7 +296,7 @@ _bfd_xcoff_canonicalize_dynamic_symtab (abfd, psyms)
symbuf->symbol.flags |= BSF_GLOBAL;
/* FIXME: We have no way to record the other information stored
- with the loader symbol. */
+ with the loader symbol. */
*psyms = (asymbol *) symbuf;
}
@@ -421,8 +422,8 @@ _bfd_xcoff_canonicalize_dynamic_reloc (abfd, prelocs, syms)
relbuf->addend = 0;
/* Most dynamic relocs have the same type. FIXME: This is only
- correct if ldrel.l_rtype == 0. In other cases, we should use
- a different howto. */
+ correct if ldrel.l_rtype == 0. In other cases, we should use
+ a different howto. */
relbuf->howto = bfd_xcoff_dynamic_reloc_howto(abfd);
/* FIXME: We have no way to record the l_rsecnm field. */
@@ -501,14 +502,14 @@ _bfd_xcoff_bfd_link_hash_table_create (abfd)
ret->descriptor_section = NULL;
ret->imports = NULL;
ret->file_align = 0;
- ret->textro = false;
- ret->gc = false;
+ ret->textro = FALSE;
+ ret->gc = FALSE;
memset (ret->special_sections, 0, sizeof ret->special_sections);
/* The linker will always generate a full a.out header. We need to
record that fact now, before the sizeof_headers routine could be
called. */
- xcoff_data (abfd)->full_aouthdr = true;
+ xcoff_data (abfd)->full_aouthdr = TRUE;
return &ret->root;
}
@@ -535,9 +536,9 @@ xcoff_read_internal_relocs (abfd, sec, cache, external_relocs,
require_internal, internal_relocs)
bfd *abfd;
asection *sec;
- boolean cache;
+ bfd_boolean cache;
bfd_byte *external_relocs;
- boolean require_internal;
+ bfd_boolean require_internal;
struct internal_reloc *internal_relocs;
{
@@ -555,8 +556,8 @@ xcoff_read_internal_relocs (abfd, sec, cache, external_relocs,
&& cache
&& enclosing->reloc_count > 0)
{
- if (_bfd_coff_read_internal_relocs (abfd, enclosing, true,
- external_relocs, false,
+ if (_bfd_coff_read_internal_relocs (abfd, enclosing, TRUE,
+ external_relocs, FALSE,
(struct internal_reloc *) NULL)
== NULL)
return NULL;
@@ -587,7 +588,7 @@ xcoff_read_internal_relocs (abfd, sec, cache, external_relocs,
/* Given an XCOFF BFD, add symbols to the global hash table as
appropriate. */
-boolean
+bfd_boolean
_bfd_xcoff_bfd_link_add_symbols (abfd, info)
bfd *abfd;
struct bfd_link_info *info;
@@ -600,21 +601,21 @@ _bfd_xcoff_bfd_link_add_symbols (abfd, info)
case bfd_archive:
/* If the archive has a map, do the usual search. We then need
- to check the archive for dynamic objects, because they may not
- appear in the archive map even though they should, perhaps, be
- included. If the archive has no map, we just consider each object
- file in turn, since that apparently is what the AIX native linker
+ to check the archive for dynamic objects, because they may not
+ appear in the archive map even though they should, perhaps, be
+ included. If the archive has no map, we just consider each object
+ file in turn, since that apparently is what the AIX native linker
does. */
if (bfd_has_map (abfd))
{
if (! (_bfd_generic_link_add_archive_symbols
(abfd, info, xcoff_link_check_archive_element)))
- return false;
+ return FALSE;
}
{
bfd *member;
-
+
member = bfd_openr_next_archived_file (abfd, (bfd *) NULL);
while (member != NULL)
{
@@ -622,11 +623,11 @@ _bfd_xcoff_bfd_link_add_symbols (abfd, info)
&& (info->hash->creator == member->xvec)
&& (! bfd_has_map (abfd) || (member->flags & DYNAMIC) != 0))
{
- boolean needed;
-
- if (! xcoff_link_check_archive_element (member, info,
+ bfd_boolean needed;
+
+ if (! xcoff_link_check_archive_element (member, info,
&needed))
- return false;
+ return FALSE;
if (needed)
member->archive_pass = -1;
}
@@ -634,32 +635,32 @@ _bfd_xcoff_bfd_link_add_symbols (abfd, info)
}
}
- return true;
+ return TRUE;
default:
bfd_set_error (bfd_error_wrong_format);
- return false;
+ return FALSE;
}
}
/* Add symbols from an XCOFF object file. */
-static boolean
+static bfd_boolean
xcoff_link_add_object_symbols (abfd, info)
bfd *abfd;
struct bfd_link_info *info;
{
if (! _bfd_coff_get_external_symbols (abfd))
- return false;
+ return FALSE;
if (! xcoff_link_add_symbols (abfd, info))
- return false;
+ return FALSE;
if (! info->keep_memory)
{
if (! _bfd_coff_free_symbols (abfd))
- return false;
+ return FALSE;
}
- return true;
+ return TRUE;
}
/* Check a single archive element to see if we need to include it in
@@ -667,48 +668,48 @@ xcoff_link_add_object_symbols (abfd, info)
needed in the link or not. This is called via
_bfd_generic_link_add_archive_symbols. */
-static boolean
+static bfd_boolean
xcoff_link_check_archive_element (abfd, info, pneeded)
bfd *abfd;
struct bfd_link_info *info;
- boolean *pneeded;
+ bfd_boolean *pneeded;
{
if (! _bfd_coff_get_external_symbols (abfd))
- return false;
+ return FALSE;
if (! xcoff_link_check_ar_symbols (abfd, info, pneeded))
- return false;
+ return FALSE;
if (*pneeded)
{
if (! xcoff_link_add_symbols (abfd, info))
- return false;
+ return FALSE;
}
if (! info->keep_memory || ! *pneeded)
{
if (! _bfd_coff_free_symbols (abfd))
- return false;
+ return FALSE;
}
- return true;
+ return TRUE;
}
/* Look through the symbols to see if this object file should be
included in the link. */
-static boolean
+static bfd_boolean
xcoff_link_check_ar_symbols (abfd, info, pneeded)
bfd *abfd;
struct bfd_link_info *info;
- boolean *pneeded;
+ bfd_boolean *pneeded;
{
bfd_size_type symesz;
bfd_byte *esym;
bfd_byte *esym_end;
- *pneeded = false;
+ *pneeded = FALSE;
if ((abfd->flags & DYNAMIC) != 0
&& ! info->static_link
@@ -731,13 +732,13 @@ xcoff_link_check_ar_symbols (abfd, info, pneeded)
struct bfd_link_hash_entry *h;
/* This symbol is externally visible, and is defined by this
- object file. */
+ object file. */
name = _bfd_coff_internal_syment_name (abfd, &sym, buf);
if (name == NULL)
- return false;
- h = bfd_link_hash_lookup (info->hash, name, false, false, true);
+ return FALSE;
+ h = bfd_link_hash_lookup (info->hash, name, FALSE, FALSE, TRUE);
/* We are only interested in symbols that are currently
undefined. If a symbol is currently known to be common,
@@ -751,9 +752,9 @@ xcoff_link_check_ar_symbols (abfd, info, pneeded)
& XCOFF_DEF_DYNAMIC) == 0))
{
if (! (*info->callbacks->add_archive_element) (info, abfd, name))
- return false;
- *pneeded = true;
- return true;
+ return FALSE;
+ *pneeded = TRUE;
+ return TRUE;
}
}
@@ -761,18 +762,18 @@ xcoff_link_check_ar_symbols (abfd, info, pneeded)
}
/* We do not need this object file. */
- return true;
+ return TRUE;
}
/* Look through the loader symbols to see if this dynamic object
should be included in the link. The native linker uses the loader
symbols, not the normal symbol table, so we do too. */
-static boolean
+static bfd_boolean
xcoff_link_check_dynamic_ar_symbols (abfd, info, pneeded)
bfd *abfd;
struct bfd_link_info *info;
- boolean *pneeded;
+ bfd_boolean *pneeded;
{
asection *lsec;
bfd_byte *contents;
@@ -780,17 +781,17 @@ xcoff_link_check_dynamic_ar_symbols (abfd, info, pneeded)
const char *strings;
bfd_byte *elsym, *elsymend;
- *pneeded = false;
+ *pneeded = FALSE;
lsec = bfd_get_section_by_name (abfd, ".loader");
if (lsec == NULL)
{
/* There are no symbols, so don't try to include it. */
- return true;
+ return TRUE;
}
if (! xcoff_get_section_contents (abfd, lsec))
- return false;
+ return FALSE;
contents = coff_section_data (abfd, lsec)->contents;
bfd_xcoff_swap_ldhdr_in (abfd, contents, &ldhdr);
@@ -822,20 +823,20 @@ xcoff_link_check_dynamic_ar_symbols (abfd, info, pneeded)
name = nambuf;
}
- h = bfd_link_hash_lookup (info->hash, name, false, false, true);
+ h = bfd_link_hash_lookup (info->hash, name, FALSE, FALSE, TRUE);
/* We are only interested in symbols that are currently
- undefined. At this point we know that we are using an XCOFF
- hash table. */
+ undefined. At this point we know that we are using an XCOFF
+ hash table. */
if (h != NULL
&& h->type == bfd_link_hash_undefined
&& (((struct xcoff_link_hash_entry *) h)->flags
& XCOFF_DEF_DYNAMIC) == 0)
{
if (! (*info->callbacks->add_archive_element) (info, abfd, name))
- return false;
- *pneeded = true;
- return true;
+ return FALSE;
+ *pneeded = TRUE;
+ return TRUE;
}
}
@@ -847,7 +848,7 @@ xcoff_link_check_dynamic_ar_symbols (abfd, info, pneeded)
coff_section_data (abfd, lsec)->contents = NULL;
}
- return true;
+ return TRUE;
}
/* Returns the index of reloc in RELOCS with the least address greater
@@ -905,11 +906,11 @@ xcoff_find_reloc (relocs, count, address)
Takes care of creating the .loader, .gl, .ds, .debug and sections. */
-static boolean
+static bfd_boolean
xcoff_link_create_extra_sections(bfd * abfd, struct bfd_link_info *info)
{
- boolean return_value = false;
+ bfd_boolean return_value = FALSE;
if (info->hash->creator == abfd->xvec)
{
@@ -998,7 +999,7 @@ xcoff_link_create_extra_sections(bfd * abfd, struct bfd_link_info *info)
}
}
- return_value = true;
+ return_value = TRUE;
end_return:
@@ -1023,21 +1024,21 @@ xcoff_link_create_extra_sections(bfd * abfd, struct bfd_link_info *info)
relocation entries carefully, since the only way to tell which
csect they belong to is to examine the address. */
-static boolean
+static bfd_boolean
xcoff_link_add_symbols (abfd, info)
bfd *abfd;
struct bfd_link_info *info;
{
unsigned int n_tmask;
unsigned int n_btshft;
- boolean default_copy;
+ bfd_boolean default_copy;
bfd_size_type symcount;
struct xcoff_link_hash_entry **sym_hash;
asection **csect_cache;
bfd_size_type linesz;
asection *o;
asection *last_real;
- boolean keep_syms;
+ bfd_boolean keep_syms;
asection *csect;
unsigned int csect_index;
asection *first_csect;
@@ -1058,16 +1059,16 @@ xcoff_link_add_symbols (abfd, info)
&& ! info->static_link)
{
if (! xcoff_link_add_dynamic_symbols (abfd, info))
- return false;
+ return FALSE;
}
/* create the loader, toc, gl, ds and debug sections, if needed */
- if (false == xcoff_link_create_extra_sections(abfd, info))
+ if (! xcoff_link_create_extra_sections (abfd, info))
goto error_return;
if ((abfd->flags & DYNAMIC) != 0
&& ! info->static_link)
- return true;
+ return TRUE;
n_tmask = coff_data (abfd)->local_n_tmask;
n_btshft = coff_data (abfd)->local_n_btshft;
@@ -1077,9 +1078,9 @@ xcoff_link_add_symbols (abfd, info)
#define N_BTSHFT n_btshft
if (info->keep_memory)
- default_copy = false;
+ default_copy = FALSE;
else
- default_copy = true;
+ default_copy = TRUE;
symcount = obj_raw_syment_count (abfd);
@@ -1122,8 +1123,8 @@ xcoff_link_add_symbols (abfd, info)
{
reloc_info[o->target_index].relocs =
- xcoff_read_internal_relocs (abfd, o, true, (bfd_byte *) NULL,
- false, (struct internal_reloc *) NULL);
+ xcoff_read_internal_relocs (abfd, o, TRUE, (bfd_byte *) NULL,
+ FALSE, (struct internal_reloc *) NULL);
amt = o->reloc_count;
amt *= sizeof (asection *);
reloc_info[o->target_index].csects = (asection **) bfd_zmalloc (amt);
@@ -1150,7 +1151,7 @@ xcoff_link_add_symbols (abfd, info)
}
/* Don't let the linker relocation routines discard the symbols. */
- obj_coff_keep_syms (abfd) = true;
+ obj_coff_keep_syms (abfd) = TRUE;
csect = NULL;
csect_index = 0;
@@ -1214,11 +1215,11 @@ xcoff_link_add_symbols (abfd, info)
goto error_return;
/* If this symbol has line number information attached to it,
- and we're not stripping it, count the number of entries and
- add them to the count for this csect. In the final link pass
- we are going to attach line number information by symbol,
- rather than by section, in order to more easily handle
- garbage collection. */
+ and we're not stripping it, count the number of entries and
+ add them to the count for this csect. In the final link pass
+ we are going to attach line number information by symbol,
+ rather than by section, in order to more easily handle
+ garbage collection. */
if ((info->strip == strip_none || info->strip == strip_some)
&& sym.n_numaux > 1
&& csect != NULL
@@ -1336,7 +1337,7 @@ xcoff_link_add_symbols (abfd, info)
}
/* An XMC_XO external reference is actually a reference to
- an absolute location. */
+ an absolute location. */
if (aux.x_csect.x_smclas != XMC_XO)
section = bfd_und_section_ptr;
else
@@ -1430,7 +1431,7 @@ xcoff_link_add_symbols (abfd, info)
{
const char *relname;
char relbuf[SYMNMLEN + 1];
- boolean copy;
+ bfd_boolean copy;
struct xcoff_link_hash_entry *h;
/* At this point we know that the TOC entry is
@@ -1453,8 +1454,8 @@ xcoff_link_add_symbols (abfd, info)
|| relsym._n._n_n._n_zeroes != 0
|| relsym._n._n_n._n_offset == 0);
h = xcoff_link_hash_lookup (xcoff_hash_table (info),
- relname, true, copy,
- false);
+ relname, TRUE, copy,
+ FALSE);
if (h == NULL)
goto error_return;
@@ -1606,19 +1607,19 @@ xcoff_link_add_symbols (abfd, info)
follow its appropriate XTY_SD symbol. The .set pseudo op can
cause the XTY_LD to not follow the XTY_SD symbol. */
{
- boolean bad;
+ bfd_boolean bad;
- bad = false;
+ bad = FALSE;
if (aux.x_csect.x_scnlen.l < 0
|| (aux.x_csect.x_scnlen.l
>= esym - (bfd_byte *) obj_coff_external_syms (abfd)))
- bad = true;
+ bad = TRUE;
if (! bad)
{
section = xcoff_data (abfd)->csects[aux.x_csect.x_scnlen.l];
if (section == NULL
|| (section->flags & SEC_HAS_CONTENTS) == 0)
- bad = true;
+ bad = TRUE;
}
if (bad)
{
@@ -1635,11 +1636,11 @@ xcoff_link_add_symbols (abfd, info)
case XTY_CM:
/* This is an unitialized csect. We could base the name on
- the storage mapping class, but we don't bother except for
- an XMC_TD symbol. If this csect is externally visible,
- it is a common symbol. We put XMC_TD symbols in sections
- named .tocbss, and rely on the linker script to put that
- in the TOC area. */
+ the storage mapping class, but we don't bother except for
+ an XMC_TD symbol. If this csect is externally visible,
+ it is a common symbol. We put XMC_TD symbols in sections
+ named .tocbss, and rely on the linker script to put that
+ in the TOC area. */
if (csect != NULL)
{
@@ -1730,20 +1731,20 @@ xcoff_link_add_symbols (abfd, info)
}
/* Now we have enough information to add the symbol to the
- linker hash table. */
+ linker hash table. */
if (sym.n_sclass == C_EXT)
{
- boolean copy;
+ bfd_boolean copy;
BFD_ASSERT (section != NULL);
/* We must copy the name into memory if we got it from the
- syment itself, rather than the string table. */
+ syment itself, rather than the string table. */
copy = default_copy;
if (sym._n._n_n._n_zeroes != 0
|| sym._n._n_n._n_offset == 0)
- copy = true;
+ copy = TRUE;
/* The AIX linker appears to only detect multiple symbol
definitions when there is a reference to the symbol. If
@@ -1775,7 +1776,7 @@ xcoff_link_add_symbols (abfd, info)
if (! bfd_is_und_section (section))
{
*sym_hash = xcoff_link_hash_lookup (xcoff_hash_table (info),
- name, true, copy, false);
+ name, TRUE, copy, FALSE);
}
else
{
@@ -1783,8 +1784,8 @@ xcoff_link_add_symbols (abfd, info)
merging symbols. */
*sym_hash = ((struct xcoff_link_hash_entry *)
bfd_wrapped_link_hash_lookup (abfd, info, name,
- true, true,
- false));
+ TRUE, TRUE,
+ FALSE));
}
if (*sym_hash == NULL)
goto error_return;
@@ -1801,11 +1802,11 @@ xcoff_link_add_symbols (abfd, info)
& DYNAMIC) == 0))
{
/* The new symbol is from a shared library, and
- either the existing symbol is not global
- linkage code or this symbol is global linkage
- code. If the existing symbol is global
- linkage code and the new symbol is not, then
- we want to use the new symbol. */
+ either the existing symbol is not global
+ linkage code or this symbol is global linkage
+ code. If the existing symbol is global
+ linkage code and the new symbol is not, then
+ we want to use the new symbol. */
section = bfd_und_section_ptr;
value = 0;
}
@@ -1813,7 +1814,7 @@ xcoff_link_add_symbols (abfd, info)
& DYNAMIC) != 0)
{
/* The existing symbol is from a shared library.
- Replace it. */
+ Replace it. */
(*sym_hash)->root.type = bfd_link_hash_undefined;
(*sym_hash)->root.u.undef.abfd =
(*sym_hash)->root.u.def.section->owner;
@@ -1821,8 +1822,8 @@ xcoff_link_add_symbols (abfd, info)
else if (abfd->my_archive != NULL)
{
/* This is a redefinition in an object contained
- in an archive. Just ignore it. See the
- comment above. */
+ in an archive. Just ignore it. See the
+ comment above. */
section = bfd_und_section_ptr;
value = 0;
}
@@ -1830,15 +1831,15 @@ xcoff_link_add_symbols (abfd, info)
|| info->hash->undefs_tail == &(*sym_hash)->root)
{
/* This symbol has been referenced. In this
- case, we just continue and permit the
- multiple definition error. See the comment
- above about the behaviour of the AIX linker. */
+ case, we just continue and permit the
+ multiple definition error. See the comment
+ above about the behaviour of the AIX linker. */
}
else if ((*sym_hash)->smclas == aux.x_csect.x_smclas)
{
/* The symbols are both csects of the same
- class. There is at least a chance that this
- is a semi-legitimate redefinition. */
+ class. There is at least a chance that this
+ is a semi-legitimate redefinition. */
section = bfd_und_section_ptr;
value = 0;
(*sym_hash)->flags |= XCOFF_MULTIPLY_DEFINED;
@@ -1883,7 +1884,7 @@ xcoff_link_add_symbols (abfd, info)
last_real->next = NULL;
if (! (_bfd_generic_link_add_one_symbol
(info, abfd, name, flags, section, value,
- (const char *) NULL, copy, true,
+ (const char *) NULL, copy, TRUE,
(struct bfd_link_hash_entry **) sym_hash)))
goto error_return;
last_real->next = first_csect;
@@ -1974,14 +1975,14 @@ xcoff_link_add_symbols (abfd, info)
h = obj_xcoff_sym_hashes (abfd)[rel->r_symndx];
h->flags |= XCOFF_CALLED;
/* If the symbol name starts with a period, it is
- the code of a function. If the symbol is
- currently undefined, then add an undefined symbol
- for the function descriptor. This should do no
- harm, because any regular object that defines the
- function should also define the function
- descriptor. It helps, because it means that we
- will identify the function descriptor with a
- dynamic object if a dynamic object defines it. */
+ the code of a function. If the symbol is
+ currently undefined, then add an undefined symbol
+ for the function descriptor. This should do no
+ harm, because any regular object that defines the
+ function should also define the function
+ descriptor. It helps, because it means that we
+ will identify the function descriptor with a
+ dynamic object if a dynamic object defines it. */
if (h->root.root.string[0] == '.'
&& h->descriptor == NULL)
{
@@ -1990,7 +1991,7 @@ xcoff_link_add_symbols (abfd, info)
hds = xcoff_link_hash_lookup (xcoff_hash_table (info),
h->root.root.string + 1,
- true, false, true);
+ TRUE, FALSE, TRUE);
if (hds == NULL)
goto error_return;
if (hds->root.type == bfd_link_hash_new)
@@ -1999,8 +2000,8 @@ xcoff_link_add_symbols (abfd, info)
if (! (_bfd_generic_link_add_one_symbol
(info, abfd, hds->root.root.string,
(flagword) 0, bfd_und_section_ptr,
- (bfd_vma) 0, (const char *) NULL, false,
- true, &bh)))
+ (bfd_vma) 0, (const char *) NULL, FALSE,
+ TRUE, &bh)))
goto error_return;
hds = (struct xcoff_link_hash_entry *) bh;
}
@@ -2033,7 +2034,7 @@ xcoff_link_add_symbols (abfd, info)
}
/* Free up the line numbers. FIXME: We could cache these
- somewhere for the final link, to avoid reading them again. */
+ somewhere for the final link, to avoid reading them again. */
if (reloc_info[o->target_index].linenos != NULL)
{
free (reloc_info[o->target_index].linenos);
@@ -2045,7 +2046,7 @@ xcoff_link_add_symbols (abfd, info)
obj_coff_keep_syms (abfd) = keep_syms;
- return true;
+ return TRUE;
error_return:
if (reloc_info != NULL)
@@ -2060,7 +2061,7 @@ xcoff_link_add_symbols (abfd, info)
free (reloc_info);
}
obj_coff_keep_syms (abfd) = keep_syms;
- return false;
+ return FALSE;
}
#undef N_TMASK
@@ -2069,7 +2070,7 @@ xcoff_link_add_symbols (abfd, info)
/* This function is used to add symbols from a dynamic object to the
global symbol table. */
-static boolean
+static bfd_boolean
xcoff_link_add_dynamic_symbols (abfd, info)
bfd *abfd;
struct bfd_link_info *info;
@@ -2094,7 +2095,7 @@ xcoff_link_add_dynamic_symbols (abfd, info)
(_("%s: XCOFF shared object when not producing XCOFF output"),
bfd_get_filename (abfd));
bfd_set_error (bfd_error_invalid_operation);
- return false;
+ return FALSE;
}
/* The symbols we use from a dynamic object are not the symbols in
@@ -2115,12 +2116,12 @@ xcoff_link_add_dynamic_symbols (abfd, info)
(_("%s: dynamic object with no .loader section"),
bfd_get_filename (abfd));
bfd_set_error (bfd_error_no_symbols);
- return false;
+ return FALSE;
}
if (! xcoff_get_section_contents (abfd, lsec))
- return false;
+ return FALSE;
contents = coff_section_data (abfd, lsec)->contents;
/* Remove the sections from this object, so that they do not get
@@ -2162,10 +2163,10 @@ xcoff_link_add_dynamic_symbols (abfd, info)
table. However, we verified above that we are using an XCOFF
hash table. */
- h = xcoff_link_hash_lookup (xcoff_hash_table (info), name, true,
- true, true);
+ h = xcoff_link_hash_lookup (xcoff_hash_table (info), name, TRUE,
+ TRUE, TRUE);
if (h == NULL)
- return false;
+ return FALSE;
h->flags |= XCOFF_DEF_DYNAMIC;
@@ -2191,9 +2192,9 @@ xcoff_link_add_dynamic_symbols (abfd, info)
h->smclas = ldsym.l_smclas;
/* Unless this is an XMC_XO symbol, we don't bother to actually
- define it, since we don't have a section to put it in anyhow.
- Instead, the relocation routines handle the DEF_DYNAMIC flag
- correctly. */
+ define it, since we don't have a section to put it in anyhow.
+ Instead, the relocation routines handle the DEF_DYNAMIC flag
+ correctly. */
if (h->smclas == XMC_XO
&& (h->root.type == bfd_link_hash_undefined
@@ -2221,21 +2222,21 @@ xcoff_link_add_dynamic_symbols (abfd, info)
dsnm = bfd_malloc ((bfd_size_type) strlen (name) + 2);
if (dsnm == NULL)
- return false;
+ return FALSE;
dsnm[0] = '.';
strcpy (dsnm + 1, name);
hds = xcoff_link_hash_lookup (xcoff_hash_table (info), dsnm,
- true, true, true);
+ TRUE, TRUE, TRUE);
free (dsnm);
if (hds == NULL)
- return false;
+ return FALSE;
if (hds->root.type == bfd_link_hash_new)
{
hds->root.type = bfd_link_hash_undefined;
hds->root.u.undef.abfd = abfd;
/* We do not want to add this to the undefined
- symbol list. */
+ symbol list. */
}
hds->descriptor = h;
@@ -2272,7 +2273,7 @@ xcoff_link_add_dynamic_symbols (abfd, info)
n = ((struct xcoff_import_file *)
bfd_alloc (abfd, (bfd_size_type) sizeof (struct xcoff_import_file)));
if (n == NULL)
- return false;
+ return FALSE;
n->next = NULL;
/* For some reason, the path entry in the import file list for a
@@ -2305,7 +2306,7 @@ xcoff_link_add_dynamic_symbols (abfd, info)
xcoff_data (abfd)->import_file_id = c;
- return true;
+ return TRUE;
}
/* Routines that are called after all the input files have been
@@ -2314,14 +2315,14 @@ xcoff_link_add_dynamic_symbols (abfd, info)
/* Mark a symbol as not being garbage, including the section in which
it is defined. */
-static INLINE boolean
+static INLINE bfd_boolean
xcoff_mark_symbol (info, h)
struct bfd_link_info *info;
struct xcoff_link_hash_entry *h;
{
if ((h->flags & XCOFF_MARK) != 0)
- return true;
+ return TRUE;
h->flags |= XCOFF_MARK;
if (h->root.type == bfd_link_hash_defined
@@ -2334,7 +2335,7 @@ xcoff_mark_symbol (info, h)
&& (hsec->flags & SEC_MARK) == 0)
{
if (! xcoff_mark (info, hsec))
- return false;
+ return FALSE;
}
}
@@ -2342,10 +2343,10 @@ xcoff_mark_symbol (info, h)
&& (h->toc_section->flags & SEC_MARK) == 0)
{
if (! xcoff_mark (info, h->toc_section))
- return false;
+ return FALSE;
}
- return true;
+ return TRUE;
}
/* The mark phase of garbage collection. For a given section, mark
@@ -2354,14 +2355,14 @@ xcoff_mark_symbol (info, h)
the number of relocs which need to be copied into the .loader
section. */
-static boolean
+static bfd_boolean
xcoff_mark (info, sec)
struct bfd_link_info *info;
asection *sec;
{
if (bfd_is_abs_section (sec)
|| (sec->flags & SEC_MARK) != 0)
- return true;
+ return TRUE;
sec->flags |= SEC_MARK;
@@ -2387,7 +2388,7 @@ xcoff_mark (info, sec)
&& (h->flags & XCOFF_MARK) == 0)
{
if (! xcoff_mark_symbol (info, h))
- return false;
+ return FALSE;
}
}
@@ -2396,11 +2397,11 @@ xcoff_mark (info, sec)
if ((sec->flags & SEC_RELOC) != 0
&& sec->reloc_count > 0)
{
- rel = xcoff_read_internal_relocs (sec->owner, sec, true,
- (bfd_byte *) NULL, false,
+ rel = xcoff_read_internal_relocs (sec->owner, sec, TRUE,
+ (bfd_byte *) NULL, FALSE,
(struct internal_reloc *) NULL);
if (rel == NULL)
- return false;
+ return FALSE;
relend = rel + sec->reloc_count;
for (; rel < relend; rel++)
{
@@ -2416,7 +2417,7 @@ xcoff_mark (info, sec)
&& (h->flags & XCOFF_MARK) == 0)
{
if (! xcoff_mark_symbol (info, h))
- return false;
+ return FALSE;
}
rsec = xcoff_data (sec->owner)->csects[rel->r_symndx];
@@ -2424,11 +2425,11 @@ xcoff_mark (info, sec)
&& (rsec->flags & SEC_MARK) == 0)
{
if (! xcoff_mark (info, rsec))
- return false;
+ return FALSE;
}
/* See if this reloc needs to be copied into the .loader
- section. */
+ section. */
switch (rel->r_type)
{
default:
@@ -2477,7 +2478,7 @@ xcoff_mark (info, sec)
}
}
- return true;
+ return TRUE;
}
/* The sweep phase of garbage collection. Remove all garbage
@@ -2498,8 +2499,8 @@ xcoff_sweep (info)
if ((o->flags & SEC_MARK) == 0)
{
/* Keep all sections from non-XCOFF input files. Keep
- special sections. Keep .debug sections for the
- moment. */
+ special sections. Keep .debug sections for the
+ moment. */
if (sub->xvec != info->hash->creator
|| o == xcoff_hash_table (info)->debug_section
|| o == xcoff_hash_table (info)->loader_section
@@ -2522,7 +2523,7 @@ xcoff_sweep (info)
/* Record the number of elements in a set. This is used to output the
correct csect length. */
-boolean
+bfd_boolean
bfd_xcoff_link_record_set (output_bfd, info, harg, size)
bfd *output_bfd;
struct bfd_link_info *info;
@@ -2534,7 +2535,7 @@ bfd_xcoff_link_record_set (output_bfd, info, harg, size)
bfd_size_type amt;
if (bfd_get_flavour (output_bfd) != bfd_target_xcoff_flavour)
- return true;
+ return TRUE;
/* This will hardly ever be called. I don't want to burn four bytes
per global symbol, so instead the size is kept on a linked list
@@ -2543,7 +2544,7 @@ bfd_xcoff_link_record_set (output_bfd, info, harg, size)
amt = sizeof (struct xcoff_link_size_list);
n = (struct xcoff_link_size_list *) bfd_alloc (output_bfd, amt);
if (n == NULL)
- return false;
+ return FALSE;
n->next = xcoff_hash_table (info)->size_list;
n->h = h;
n->size = size;
@@ -2551,12 +2552,12 @@ bfd_xcoff_link_record_set (output_bfd, info, harg, size)
h->flags |= XCOFF_HAS_SIZE;
- return true;
+ return TRUE;
}
/* Import a symbol. */
-boolean
+bfd_boolean
bfd_xcoff_import_symbol (output_bfd, info, harg, val, imppath, impfile,
impmember, syscall_flag)
bfd *output_bfd;
@@ -2571,7 +2572,7 @@ bfd_xcoff_import_symbol (output_bfd, info, harg, val, imppath, impfile,
struct xcoff_link_hash_entry *h = (struct xcoff_link_hash_entry *) harg;
if (bfd_get_flavour (output_bfd) != bfd_target_xcoff_flavour)
- return true;
+ return TRUE;
/* A symbol name which starts with a period is the code for a
function. If the symbol is undefined, then add an undefined
@@ -2587,9 +2588,9 @@ bfd_xcoff_import_symbol (output_bfd, info, harg, val, imppath, impfile,
{
hds = xcoff_link_hash_lookup (xcoff_hash_table (info),
h->root.root.string + 1,
- true, false, true);
+ TRUE, FALSE, TRUE);
if (hds == NULL)
- return false;
+ return FALSE;
if (hds->root.type == bfd_link_hash_new)
{
hds->root.type = bfd_link_hash_undefined;
@@ -2603,8 +2604,8 @@ bfd_xcoff_import_symbol (output_bfd, info, harg, val, imppath, impfile,
}
/* Now, if the descriptor is undefined, import the descriptor
- rather than the symbol we were told to import. FIXME: Is
- this correct in all cases? */
+ rather than the symbol we were told to import. FIXME: Is
+ this correct in all cases? */
if (hds->root.type == bfd_link_hash_undefined)
h = hds;
}
@@ -2621,7 +2622,7 @@ bfd_xcoff_import_symbol (output_bfd, info, harg, val, imppath, impfile,
(info, h->root.root.string, h->root.u.def.section->owner,
h->root.u.def.section, h->root.u.def.value,
output_bfd, bfd_abs_section_ptr, val)))
- return false;
+ return FALSE;
}
h->root.type = bfd_link_hash_defined;
@@ -2641,7 +2642,7 @@ bfd_xcoff_import_symbol (output_bfd, info, harg, val, imppath, impfile,
struct xcoff_import_file **pp;
/* We start c at 1 because the first entry in the import list is
- reserved for the library search path. */
+ reserved for the library search path. */
for (pp = &xcoff_hash_table (info)->imports, c = 1;
*pp != NULL;
pp = &(*pp)->next, ++c)
@@ -2659,7 +2660,7 @@ bfd_xcoff_import_symbol (output_bfd, info, harg, val, imppath, impfile,
n = (struct xcoff_import_file *) bfd_alloc (output_bfd, amt);
if (n == NULL)
- return false;
+ return FALSE;
n->next = NULL;
n->path = imppath;
n->file = impfile;
@@ -2670,12 +2671,12 @@ bfd_xcoff_import_symbol (output_bfd, info, harg, val, imppath, impfile,
h->ldindx = c;
}
- return true;
+ return TRUE;
}
/* Export a symbol. */
-boolean
+bfd_boolean
bfd_xcoff_export_symbol (output_bfd, info, harg)
bfd *output_bfd;
struct bfd_link_info *info;
@@ -2684,7 +2685,7 @@ bfd_xcoff_export_symbol (output_bfd, info, harg)
struct xcoff_link_hash_entry *h = (struct xcoff_link_hash_entry *) harg;
if (bfd_get_flavour (output_bfd) != bfd_target_xcoff_flavour)
- return true;
+ return TRUE;
h->flags |= XCOFF_EXPORT;
@@ -2702,11 +2703,11 @@ bfd_xcoff_export_symbol (output_bfd, info, harg)
fnname = (char *) bfd_malloc (amt);
if (fnname == NULL)
- return false;
+ return FALSE;
fnname[0] = '.';
strcpy (fnname + 1, h->root.root.string);
hfn = xcoff_link_hash_lookup (xcoff_hash_table (info),
- fnname, false, false, true);
+ fnname, FALSE, FALSE, TRUE);
free (fnname);
if (hfn != NULL
&& hfn->smclas == XMC_PR
@@ -2721,7 +2722,7 @@ bfd_xcoff_export_symbol (output_bfd, info, harg)
/* Make sure we don't garbage collect this symbol. */
if (! xcoff_mark_symbol (info, h))
- return false;
+ return FALSE;
/* If this is a function descriptor, make sure we don't garbage
collect the associated function code. We normally don't have to
@@ -2731,17 +2732,17 @@ bfd_xcoff_export_symbol (output_bfd, info, harg)
if ((h->flags & XCOFF_DESCRIPTOR) != 0)
{
if (! xcoff_mark_symbol (info, h->descriptor))
- return false;
+ return FALSE;
}
- return true;
+ return TRUE;
}
/* Count a reloc against a symbol. This is called for relocs
generated by the linker script, typically for global constructors
and destructors. */
-boolean
+bfd_boolean
bfd_xcoff_link_count_reloc (output_bfd, info, name)
bfd *output_bfd;
struct bfd_link_info *info;
@@ -2750,16 +2751,16 @@ bfd_xcoff_link_count_reloc (output_bfd, info, name)
struct xcoff_link_hash_entry *h;
if (bfd_get_flavour (output_bfd) != bfd_target_xcoff_flavour)
- return true;
+ return TRUE;
h = ((struct xcoff_link_hash_entry *)
- bfd_wrapped_link_hash_lookup (output_bfd, info, name, false, false,
- false));
+ bfd_wrapped_link_hash_lookup (output_bfd, info, name, FALSE, FALSE,
+ FALSE));
if (h == NULL)
{
(*_bfd_error_handler) (_("%s: no such symbol"), name);
bfd_set_error (bfd_error_no_symbols);
- return false;
+ return FALSE;
}
h->flags |= XCOFF_REF_REGULAR | XCOFF_LDREL;
@@ -2767,15 +2768,15 @@ bfd_xcoff_link_count_reloc (output_bfd, info, name)
/* Mark the symbol to avoid garbage collection. */
if (! xcoff_mark_symbol (info, h))
- return false;
+ return FALSE;
- return true;
+ return TRUE;
}
/* This function is called for each symbol to which the linker script
assigns a value. */
-boolean
+bfd_boolean
bfd_xcoff_record_link_assignment (output_bfd, info, name)
bfd *output_bfd;
struct bfd_link_info *info;
@@ -2784,16 +2785,16 @@ bfd_xcoff_record_link_assignment (output_bfd, info, name)
struct xcoff_link_hash_entry *h;
if (bfd_get_flavour (output_bfd) != bfd_target_xcoff_flavour)
- return true;
+ return TRUE;
- h = xcoff_link_hash_lookup (xcoff_hash_table (info), name, true, true,
- false);
+ h = xcoff_link_hash_lookup (xcoff_hash_table (info), name, TRUE, TRUE,
+ FALSE);
if (h == NULL)
- return false;
+ return FALSE;
h->flags |= XCOFF_DEF_REGULAR;
- return true;
+ return TRUE;
}
/* Build the .loader section. This is called by the XCOFF linker
@@ -2813,7 +2814,7 @@ bfd_xcoff_record_link_assignment (output_bfd, info, name)
option). SPECIAL_SECTIONS is set by this routine to csects with
magic names like _end. */
-boolean
+bfd_boolean
bfd_xcoff_size_dynamic_sections (output_bfd, info, libpath, entry,
file_align, maxstack, maxdata, gc,
modtype, textro, export_defineds,
@@ -2825,12 +2826,12 @@ bfd_xcoff_size_dynamic_sections (output_bfd, info, libpath, entry,
unsigned long file_align;
unsigned long maxstack;
unsigned long maxdata;
- boolean gc;
+ bfd_boolean gc;
int modtype;
- boolean textro;
- boolean export_defineds;
+ bfd_boolean textro;
+ bfd_boolean export_defineds;
asection **special_sections;
- boolean rtld;
+ bfd_boolean rtld;
{
struct xcoff_link_hash_entry *hentry;
asection *lsec;
@@ -2851,10 +2852,10 @@ bfd_xcoff_size_dynamic_sections (output_bfd, info, libpath, entry,
{
for (i = 0; i < XCOFF_NUMBER_OF_SPECIAL_SECTIONS; i++)
special_sections[i] = NULL;
- return true;
+ return TRUE;
}
- ldinfo.failed = false;
+ ldinfo.failed = FALSE;
ldinfo.output_bfd = output_bfd;
ldinfo.info = info;
ldinfo.export_defineds = export_defineds;
@@ -2874,56 +2875,55 @@ bfd_xcoff_size_dynamic_sections (output_bfd, info, libpath, entry,
if (entry != NULL)
{
hentry = xcoff_link_hash_lookup (xcoff_hash_table (info), entry,
- false, false, true);
+ FALSE, FALSE, TRUE);
if (hentry != NULL)
hentry->flags |= XCOFF_ENTRY;
}
/* __rtinit */
- if (info->init_function || info->fini_function || rtld)
+ if (info->init_function || info->fini_function || rtld)
{
struct xcoff_link_hash_entry *hsym;
struct internal_ldsym *ldsym;
-
+
hsym = xcoff_link_hash_lookup (xcoff_hash_table (info),
- "__rtinit", false, false, true);
+ "__rtinit", FALSE, FALSE, TRUE);
if (hsym == NULL)
{
(*_bfd_error_handler)
(_("error: undefined symbol __rtinit"));
- return false;
+ return FALSE;
}
-
+
xcoff_mark_symbol (info, hsym);
hsym->flags |= (XCOFF_DEF_REGULAR | XCOFF_RTINIT);
/* __rtinit initalized */
amt = sizeof (struct internal_ldsym);
ldsym = (struct internal_ldsym *) bfd_malloc (amt);
-
- ldsym->l_value = 0; /* will be filled in later */
- ldsym->l_scnum = 2; /* data section */
- ldsym->l_smtype = XTY_SD; /* csect section definition */
- ldsym->l_smclas = 5; /* .rw */
- ldsym->l_ifile = 0; /* special system loader symbol */
- ldsym->l_parm = 0; /* NA */
-
+
+ ldsym->l_value = 0; /* will be filled in later */
+ ldsym->l_scnum = 2; /* data section */
+ ldsym->l_smtype = XTY_SD; /* csect section definition */
+ ldsym->l_smclas = 5; /* .rw */
+ ldsym->l_ifile = 0; /* special system loader symbol */
+ ldsym->l_parm = 0; /* NA */
+
/* Force __rtinit to be the first symbol in the loader symbol table
See xcoff_build_ldsyms
-
+
The first 3 symbol table indices are reserved to indicate the data,
text and bss sections. */
BFD_ASSERT (0 == ldinfo.ldsym_count);
-
+
hsym->ldindx = 3;
ldinfo.ldsym_count = 1;
hsym->ldsym = ldsym;
-
- if (false == bfd_xcoff_put_ldsymbol_name (ldinfo.output_bfd, &ldinfo,
- hsym->ldsym,
- hsym->root.root.string))
- return false;
-
+
+ if (! bfd_xcoff_put_ldsymbol_name (ldinfo.output_bfd, &ldinfo,
+ hsym->ldsym, hsym->root.root.string))
+ return FALSE;
+
/* This symbol is written out by xcoff_write_global_symbol
Set stuff up so xcoff_write_global_symbol logic works. */
hsym->flags |= XCOFF_DEF_REGULAR | XCOFF_MARK;
@@ -2938,11 +2938,11 @@ bfd_xcoff_size_dynamic_sections (output_bfd, info, libpath, entry,
|| (hentry->root.type != bfd_link_hash_defined
&& hentry->root.type != bfd_link_hash_defweak))
{
- gc = false;
- xcoff_hash_table (info)->gc = false;
+ gc = FALSE;
+ xcoff_hash_table (info)->gc = FALSE;
/* We still need to call xcoff_mark, in order to set ldrel_count
- correctly. */
+ correctly. */
for (sub = info->input_bfds; sub != NULL; sub = sub->link_next)
{
asection *o;
@@ -2962,7 +2962,7 @@ bfd_xcoff_size_dynamic_sections (output_bfd, info, libpath, entry,
if (! xcoff_mark (info, hentry->root.u.def.section))
goto error_return;
xcoff_sweep (info);
- xcoff_hash_table (info)->gc = true;
+ xcoff_hash_table (info)->gc = TRUE;
}
/* Return special sections to the caller. */
@@ -2982,7 +2982,7 @@ bfd_xcoff_size_dynamic_sections (output_bfd, info, libpath, entry,
if (info->input_bfds == NULL)
{
/* I'm not sure what to do in this bizarre case. */
- return true;
+ return TRUE;
}
xcoff_link_hash_traverse (xcoff_hash_table (info), xcoff_build_ldsyms,
@@ -3158,7 +3158,7 @@ bfd_xcoff_size_dynamic_sections (output_bfd, info, libpath, entry,
csectpp = xcoff_data (sub)->csects;
/* Dynamic object do not have csectpp's. */
- if (NULL != csectpp)
+ if (NULL != csectpp)
{
symesz = bfd_coff_symesz (sub);
esym = (bfd_byte *) obj_coff_external_syms (sub);
@@ -3183,7 +3183,7 @@ bfd_xcoff_size_dynamic_sections (output_bfd, info, libpath, entry,
bfd_size_type indx;
name = (char *) debug_contents + sym._n._n_n._n_offset;
- indx = _bfd_stringtab_add (debug_strtab, name, true, true);
+ indx = _bfd_stringtab_add (debug_strtab, name, TRUE, TRUE);
if (indx == (bfd_size_type) -1)
goto error_return;
*debug_index = indx;
@@ -3213,29 +3213,29 @@ bfd_xcoff_size_dynamic_sections (output_bfd, info, libpath, entry,
xcoff_hash_table (info)->debug_section->_raw_size =
_bfd_stringtab_size (debug_strtab);
- return true;
+ return TRUE;
error_return:
if (ldinfo.strings != NULL)
free (ldinfo.strings);
if (debug_contents != NULL)
free (debug_contents);
- return false;
+ return FALSE;
}
-boolean
+bfd_boolean
bfd_xcoff_link_generate_rtinit (abfd, init, fini, rtld)
bfd *abfd;
const char *init;
const char *fini;
- boolean rtld;
+ bfd_boolean rtld;
{
struct bfd_in_memory *bim;
-
+
bim = ((struct bfd_in_memory *)
bfd_malloc ((bfd_size_type) sizeof (struct bfd_in_memory)));
if (bim == NULL)
- return false;
+ return FALSE;
bim->size = 0;
bim->buffer = 0;
@@ -3247,21 +3247,21 @@ bfd_xcoff_link_generate_rtinit (abfd, init, fini, rtld)
abfd->direction = write_direction;
abfd->where = 0;
- if (false == bfd_xcoff_generate_rtinit (abfd, init, fini, rtld))
- return false;
+ if (! bfd_xcoff_generate_rtinit (abfd, init, fini, rtld))
+ return FALSE;
/* need to reset to unknown or it will not be read back in correctly */
abfd->format = bfd_unknown;
abfd->direction = read_direction;
abfd->where = 0;
- return true;
+ return TRUE;
}
/* Add a symbol to the .loader symbols, if necessary. */
-static boolean
+static bfd_boolean
xcoff_build_ldsyms (h, p)
struct xcoff_link_hash_entry *h;
PTR p;
@@ -3274,7 +3274,7 @@ xcoff_build_ldsyms (h, p)
/* __rtinit, this symbol has special handling. */
if (h->flags & XCOFF_RTINIT)
- return true;
+ return TRUE;
/* If this is a final link, and the symbol was defined as a common
symbol in a regular object file, and there was no definition in
@@ -3296,7 +3296,7 @@ xcoff_build_ldsyms (h, p)
&& (h->flags & XCOFF_DEF_REGULAR) != 0
&& h->root.root.string[0] != '.')
{
- boolean export;
+ bfd_boolean export;
/* We don't export a symbol which is being defined by an object
included from an archive which contains a shared object. The
@@ -3312,7 +3312,7 @@ xcoff_build_ldsyms (h, p)
them. This is confusing, but I haven't been able to think of
a different approach. Note that the symbols can, of course,
be exported explicitly. */
- export = true;
+ export = TRUE;
if ((h->root.type == bfd_link_hash_defined
|| h->root.type == bfd_link_hash_defweak)
&& h->root.u.def.section->owner != NULL
@@ -3326,7 +3326,7 @@ xcoff_build_ldsyms (h, p)
{
if ((member->flags & DYNAMIC) != 0)
{
- export = false;
+ export = FALSE;
break;
}
member = bfd_openr_next_archived_file (arbfd, member);
@@ -3375,7 +3375,7 @@ xcoff_build_ldsyms (h, p)
sec->_raw_size += bfd_xcoff_glink_code_size(ldinfo->output_bfd);
/* The global linkage code requires a TOC entry for the
- descriptor. */
+ descriptor. */
hds = h->descriptor;
BFD_ASSERT ((hds->root.type == bfd_link_hash_undefined
|| hds->root.type == bfd_link_hash_undefweak)
@@ -3393,7 +3393,7 @@ xcoff_build_ldsyms (h, p)
else if (bfd_xcoff_is_xcoff32 (ldinfo->output_bfd))
byte_size = 4;
else
- return false;
+ return FALSE;
hds->toc_section = xcoff_hash_table (ldinfo->info)->toc_section;
hds->u.toc_offset = hds->toc_section->_raw_size;
@@ -3425,10 +3425,10 @@ xcoff_build_ldsyms (h, p)
asection *sec;
/* This is an undefined function descriptor associated with
- a defined entry point. We can build up a function
- descriptor ourselves. Believe it or not, the AIX linker
- actually does this, and there are cases where we need to
- do it as well. */
+ a defined entry point. We can build up a function
+ descriptor ourselves. Believe it or not, the AIX linker
+ actually does this, and there are cases where we need to
+ do it as well. */
sec = xcoff_hash_table (ldinfo->info)->descriptor_section;
h->root.type = bfd_link_hash_defined;
h->root.u.def.section = sec;
@@ -3455,7 +3455,7 @@ xcoff_build_ldsyms (h, p)
(_("warning: attempt to export undefined symbol `%s'"),
h->root.root.string);
h->ldsym = NULL;
- return true;
+ return TRUE;
}
}
@@ -3484,7 +3484,7 @@ xcoff_build_ldsyms (h, p)
&& (h->flags & XCOFF_EXPORT) == 0)
{
h->ldsym = NULL;
- return true;
+ return TRUE;
}
/* We don't need to add this symbol if we did garbage collection and
@@ -3493,13 +3493,13 @@ xcoff_build_ldsyms (h, p)
&& (h->flags & XCOFF_MARK) == 0)
{
h->ldsym = NULL;
- return true;
+ return TRUE;
}
/* We may have already processed this symbol due to the recursive
call above. */
if ((h->flags & XCOFF_BUILT_LDSYM) != 0)
- return true;
+ return TRUE;
/* We need to add this symbol to the .loader symbols. */
@@ -3508,8 +3508,8 @@ xcoff_build_ldsyms (h, p)
h->ldsym = (struct internal_ldsym *) bfd_zalloc (ldinfo->output_bfd, amt);
if (h->ldsym == NULL)
{
- ldinfo->failed = true;
- return false;
+ ldinfo->failed = TRUE;
+ return FALSE;
}
if ((h->flags & XCOFF_IMPORT) != 0)
@@ -3521,21 +3521,20 @@ xcoff_build_ldsyms (h, p)
++ldinfo->ldsym_count;
- if (false == bfd_xcoff_put_ldsymbol_name (ldinfo->output_bfd, ldinfo,
- h->ldsym,
- h->root.root.string))
+ if (! bfd_xcoff_put_ldsymbol_name (ldinfo->output_bfd, ldinfo,
+ h->ldsym, h->root.root.string))
{
- return false;
+ return FALSE;
}
h->flags |= XCOFF_BUILT_LDSYM;
- return true;
+ return TRUE;
}
/* Do the final link step. */
-boolean
+bfd_boolean
_bfd_xcoff_bfd_final_link (abfd, info)
bfd *abfd;
struct bfd_link_info *info;
@@ -3611,7 +3610,7 @@ _bfd_xcoff_bfd_final_link (abfd, info)
link. This will normally be every section. We need
to do this so that we can identify any sections which
the linker has decided to not include. */
- sec->linker_mark = true;
+ sec->linker_mark = TRUE;
if (info->strip == strip_none
|| info->strip == strip_some)
@@ -3651,49 +3650,49 @@ _bfd_xcoff_bfd_final_link (abfd, info)
file_align = xcoff_hash_table (info)->file_align;
if (file_align != 0)
{
- boolean saw_contents;
+ bfd_boolean saw_contents;
int indx;
asection **op;
file_ptr sofar;
-
+
/* Insert .pad sections before every section which has
- contents and is loaded, if it is preceded by some other
- section which has contents and is loaded. */
- saw_contents = true;
+ contents and is loaded, if it is preceded by some other
+ section which has contents and is loaded. */
+ saw_contents = TRUE;
for (op = &abfd->sections; *op != NULL; op = &(*op)->next)
{
if (strcmp ((*op)->name, ".pad") == 0)
- saw_contents = false;
+ saw_contents = FALSE;
else if (((*op)->flags & SEC_HAS_CONTENTS) != 0
&& ((*op)->flags & SEC_LOAD) != 0)
{
if (! saw_contents)
- saw_contents = true;
+ saw_contents = TRUE;
else
{
asection *n, **st;
-
+
/* Create a pad section and place it before the section
- that needs padding. This requires unlinking and
+ that needs padding. This requires unlinking and
relinking the bfd's section list. */
-
+
st = abfd->section_tail;
n = bfd_make_section_anyway (abfd, ".pad");
n->flags = SEC_HAS_CONTENTS;
- n->alignment_power = 0;
+ n->alignment_power = 0;
BFD_ASSERT (*st == n);
bfd_section_list_remove (abfd, st);
bfd_section_list_insert (abfd, op, n);
op = &n->next;
- saw_contents = false;
+ saw_contents = FALSE;
}
}
}
-
+
/* Reset the section indices after inserting the new
- sections. */
+ sections. */
indx = 0;
for (o = abfd->sections; o != NULL; o = o->next)
{
@@ -3703,9 +3702,9 @@ _bfd_xcoff_bfd_final_link (abfd, info)
BFD_ASSERT ((unsigned int) indx == abfd->section_count);
/* Work out appropriate sizes for the .pad sections to force
- each section to land on a page boundary. This bit of
- code knows what compute_section_file_positions is going
- to do. */
+ each section to land on a page boundary. This bit of
+ code knows what compute_section_file_positions is going
+ to do. */
sofar = bfd_coff_filhsz (abfd);
sofar += bfd_coff_aoutsz (abfd);
sofar += abfd->section_count * bfd_coff_scnhsz (abfd);
@@ -3775,8 +3774,8 @@ _bfd_xcoff_bfd_final_link (abfd, info)
else
{
/* A stripped file has no relocs. However, we still
- allocate the buffers, so that later code doesn't have to
- worry about whether we are stripping or not. */
+ allocate the buffers, so that later code doesn't have to
+ worry about whether we are stripping or not. */
if (info->strip == strip_all)
o->rel_filepos = 0;
else
@@ -3787,13 +3786,13 @@ _bfd_xcoff_bfd_final_link (abfd, info)
}
/* We don't know the indices of global symbols until we have
- written out all the local symbols. For each section in
- the output file, we keep an array of pointers to hash
- table entries. Each entry in the array corresponds to a
- reloc. When we find a reloc against a global symbol, we
- set the corresponding entry in this array so that we can
- fix up the symbol index after we have written out all the
- local symbols.
+ written out all the local symbols. For each section in
+ the output file, we keep an array of pointers to hash
+ table entries. Each entry in the array corresponds to a
+ reloc. When we find a reloc against a global symbol, we
+ set the corresponding entry in this array so that we can
+ fix up the symbol index after we have written out all the
+ local symbols.
Because of this problem, we also keep the relocs in
memory until the end of the link. This wastes memory.
@@ -3850,7 +3849,7 @@ _bfd_xcoff_bfd_final_link (abfd, info)
{
bfd_size_type sz;
- sub->output_has_begun = false;
+ sub->output_has_begun = FALSE;
sz = obj_raw_syment_count (sub);
if (sz > max_sym_count)
max_sym_count = sz;
@@ -3903,7 +3902,7 @@ _bfd_xcoff_bfd_final_link (abfd, info)
{
if (! xcoff_link_input_bfd (&finfo, sub))
goto error_return;
- sub->output_has_begun = true;
+ sub->output_has_begun = TRUE;
}
}
else if (p->type == bfd_section_reloc_link_order
@@ -4142,7 +4141,7 @@ _bfd_xcoff_bfd_final_link (abfd, info)
not try to write out the symbols. */
bfd_get_symcount (abfd) = 0;
- return true;
+ return TRUE;
error_return:
if (finfo.strtab != NULL)
@@ -4176,13 +4175,13 @@ _bfd_xcoff_bfd_final_link (abfd, info)
free (finfo.external_relocs);
if (external_relocs != NULL)
free (external_relocs);
- return false;
+ return FALSE;
}
/* Link an input file into the linker output file. This function
handles all the sections and relocations of the input file at once. */
-static boolean
+static bfd_boolean
xcoff_link_input_bfd (finfo, input_bfd)
struct xcoff_final_link_info *finfo;
bfd *input_bfd;
@@ -4192,7 +4191,7 @@ xcoff_link_input_bfd (finfo, input_bfd)
bfd_size_type syment_base;
unsigned int n_tmask;
unsigned int n_btshft;
- boolean copy, hash;
+ bfd_boolean copy, hash;
bfd_size_type isymesz;
bfd_size_type osymesz;
bfd_size_type linesz;
@@ -4207,13 +4206,13 @@ xcoff_link_input_bfd (finfo, input_bfd)
bfd_byte *outsym;
unsigned int incls;
asection *oline;
- boolean keep_syms;
+ bfd_boolean keep_syms;
asection *o;
/* We can just skip DYNAMIC files, unless this is a static link. */
if ((input_bfd->flags & DYNAMIC) != 0
&& ! finfo->info->static_link)
- return true;
+ return TRUE;
/* Move all the symbols to the output file. */
@@ -4232,15 +4231,15 @@ xcoff_link_input_bfd (finfo, input_bfd)
#define N_TMASK n_tmask
#define N_BTSHFT n_btshft
- copy = false;
+ copy = FALSE;
if (! finfo->info->keep_memory)
- copy = true;
- hash = true;
+ copy = TRUE;
+ hash = TRUE;
if ((output_bfd->flags & BFD_TRADITIONAL_FORMAT) != 0)
- hash = false;
+ hash = FALSE;
if (! _bfd_coff_get_external_symbols (input_bfd))
- return false;
+ return FALSE;
esym = (bfd_byte *) obj_coff_external_syms (input_bfd);
esym_end = esym + obj_raw_syment_count (input_bfd) * isymesz;
@@ -4260,14 +4259,14 @@ xcoff_link_input_bfd (finfo, input_bfd)
struct internal_syment isym;
union internal_auxent aux;
int smtyp = 0;
- boolean skip;
- boolean require;
+ bfd_boolean skip;
+ bfd_boolean require;
int add;
bfd_coff_swap_sym_in (input_bfd, (PTR) esym, (PTR) isymp);
/* If this is a C_EXT or C_HIDEXT symbol, we need the csect
- information. */
+ information. */
if (isymp->n_sclass == C_EXT || isymp->n_sclass == C_HIDEXT)
{
BFD_ASSERT (isymp->n_numaux > 0);
@@ -4287,9 +4286,9 @@ xcoff_link_input_bfd (finfo, input_bfd)
isym = *isymp;
/* If this symbol is in the .loader section, swap out the
- .loader symbol information. If this is an external symbol
- reference to a defined symbol, though, then wait until we get
- to the definition. */
+ .loader symbol information. If this is an external symbol
+ reference to a defined symbol, though, then wait until we get
+ to the definition. */
if (isym.n_sclass == C_EXT
&& *sym_hash != NULL
&& (*sym_hash)->ldsym != NULL
@@ -4379,26 +4378,26 @@ xcoff_link_input_bfd (finfo, input_bfd)
*indexp = -1;
- skip = false;
- require = false;
+ skip = FALSE;
+ require = FALSE;
add = 1 + isym.n_numaux;
/* If we are skipping this csect, we want to skip this symbol. */
if (*csectpp == NULL)
- skip = true;
+ skip = TRUE;
/* If we garbage collected this csect, we want to skip this
- symbol. */
+ symbol. */
if (! skip
&& xcoff_hash_table (finfo->info)->gc
&& ((*csectpp)->flags & SEC_MARK) == 0
&& *csectpp != bfd_abs_section_ptr)
- skip = true;
+ skip = TRUE;
/* An XCOFF linker always skips C_STAT symbols. */
if (! skip
&& isymp->n_sclass == C_STAT)
- skip = true;
+ skip = TRUE;
/* We skip all but the first TOC anchor. */
if (! skip
@@ -4406,7 +4405,7 @@ xcoff_link_input_bfd (finfo, input_bfd)
&& aux.x_csect.x_smclas == XMC_TC0)
{
if (finfo->toc_symindx != -1)
- skip = true;
+ skip = TRUE;
else
{
bfd_vma tocval, tocend;
@@ -4418,11 +4417,11 @@ xcoff_link_input_bfd (finfo, input_bfd)
- (*csectpp)->vma);
/* We want to find out if tocval is a good value to use
- as the TOC anchor--that is, whether we can access all
- of the TOC using a 16 bit offset from tocval. This
- test assumes that the TOC comes at the end of the
- output section, as it does in the default linker
- script. */
+ as the TOC anchor--that is, whether we can access all
+ of the TOC using a 16 bit offset from tocval. This
+ test assumes that the TOC comes at the end of the
+ output section, as it does in the default linker
+ script. */
tocend = ((*csectpp)->output_section->vma
+ (*csectpp)->output_section->_raw_size);
for (inp = finfo->info->input_bfds;
@@ -4449,7 +4448,7 @@ xcoff_link_input_bfd (finfo, input_bfd)
(_("TOC overflow: 0x%lx > 0x10000; try -mminimal-toc when compiling"),
(unsigned long) (tocend - tocval));
bfd_set_error (bfd_error_file_too_big);
- return false;
+ return FALSE;
}
if (tocval + 0x8000 < tocend)
@@ -4465,7 +4464,7 @@ xcoff_link_input_bfd (finfo, input_bfd)
xcoff_data (finfo->output_bfd)->toc = tocval;
xcoff_data (finfo->output_bfd)->sntoc =
(*csectpp)->output_section->target_index;
- require = true;
+ require = TRUE;
}
}
@@ -4473,17 +4472,17 @@ xcoff_link_input_bfd (finfo, input_bfd)
/* If we are stripping all symbols, we want to skip this one. */
if (! skip
&& finfo->info->strip == strip_all)
- skip = true;
+ skip = TRUE;
/* We can skip resolved external references. */
if (! skip
&& isym.n_sclass == C_EXT
&& smtyp == XTY_ER
&& (*sym_hash)->root.type != bfd_link_hash_undefined)
- skip = true;
+ skip = TRUE;
/* We can skip common symbols if they got defined somewhere
- else. */
+ else. */
if (! skip
&& isym.n_sclass == C_EXT
&& smtyp == XTY_CM
@@ -4491,7 +4490,7 @@ xcoff_link_input_bfd (finfo, input_bfd)
|| (*sym_hash)->root.u.c.p->section != *csectpp)
&& ((*sym_hash)->root.type != bfd_link_hash_defined
|| (*sym_hash)->root.u.def.section != *csectpp))
- skip = true;
+ skip = TRUE;
/* Skip local symbols if we are discarding them. */
if (! skip
@@ -4499,14 +4498,14 @@ xcoff_link_input_bfd (finfo, input_bfd)
&& isym.n_sclass != C_EXT
&& (isym.n_sclass != C_HIDEXT
|| smtyp != XTY_SD))
- skip = true;
+ skip = TRUE;
/* If we stripping debugging symbols, and this is a debugging
- symbol, then skip it. */
+ symbol, then skip it. */
if (! skip
&& finfo->info->strip == strip_debugger
&& isym.n_scnum == N_DEBUG)
- skip = true;
+ skip = TRUE;
/* If some symbols are stripped based on the name, work out the
name and decide whether to skip this symbol. We don't handle
@@ -4524,24 +4523,24 @@ xcoff_link_input_bfd (finfo, input_bfd)
name = _bfd_coff_internal_syment_name (input_bfd, &isym, buf);
if (name == NULL)
- return false;
+ return FALSE;
if ((finfo->info->strip == strip_some
- && (bfd_hash_lookup (finfo->info->keep_hash, name, false,
- false) == NULL))
+ && (bfd_hash_lookup (finfo->info->keep_hash, name, FALSE,
+ FALSE) == NULL))
|| (finfo->info->discard == discard_l
&& (isym.n_sclass != C_EXT
&& (isym.n_sclass != C_HIDEXT
|| smtyp != XTY_SD))
&& bfd_is_local_label_name (input_bfd, name)))
- skip = true;
+ skip = TRUE;
}
/* We can not skip the first TOC anchor. */
if (skip
&& require
&& finfo->info->strip != strip_all)
- skip = false;
+ skip = FALSE;
/* We now know whether we are to skip this symbol or not. */
if (! skip)
@@ -4565,10 +4564,10 @@ xcoff_link_input_bfd (finfo, input_bfd)
(char *) NULL);
if (name == NULL)
- return false;
+ return FALSE;
indx = _bfd_stringtab_add (finfo->strtab, name, hash, copy);
if (indx == (bfd_size_type) -1)
- return false;
+ return FALSE;
isym._n._n_n._n_offset = STRING_SIZE_SIZE + indx;
}
}
@@ -4622,7 +4621,7 @@ xcoff_link_input_bfd (finfo, input_bfd)
if (bfd_seek (output_bfd, pos, SEEK_SET) != 0
|| (bfd_bwrite (outsym, osymesz, output_bfd)
!= osymesz))
- return false;
+ return FALSE;
}
}
@@ -4631,8 +4630,8 @@ xcoff_link_input_bfd (finfo, input_bfd)
}
/* The value of a C_BINCL or C_EINCL symbol is a file offset
- into the line numbers. We update the symbol values when
- we handle the line numbers. */
+ into the line numbers. We update the symbol values when
+ we handle the line numbers. */
if (isym.n_sclass == C_BINCL
|| isym.n_sclass == C_EINCL)
{
@@ -4659,8 +4658,8 @@ xcoff_link_input_bfd (finfo, input_bfd)
}
/* If this is a symbol in the TOC which we may have merged
- (class XMC_TC), remember the symbol index of the TOC
- symbol. */
+ (class XMC_TC), remember the symbol index of the TOC
+ symbol. */
if (isym.n_sclass == C_HIDEXT
&& aux.x_csect.x_smclas == XMC_TC
&& *sym_hash != NULL)
@@ -4715,7 +4714,7 @@ xcoff_link_input_bfd (finfo, input_bfd)
bfd_vma indx;
/* The value of a C_BSTAT symbol is the symbol table
- index of the containing csect. */
+ index of the containing csect. */
bfd_coff_swap_sym_in (output_bfd, (PTR) outsym, (PTR) &isym);
indx = isym.n_value;
if (indx < obj_raw_syment_count (input_bfd))
@@ -4760,13 +4759,13 @@ xcoff_link_input_bfd (finfo, input_bfd)
{
strings = _bfd_coff_read_string_table (input_bfd);
if (strings == NULL)
- return false;
+ return FALSE;
}
filename = strings + aux.x_file.x_n.x_offset;
indx = _bfd_stringtab_add (finfo->strtab, filename,
hash, copy);
if (indx == (bfd_size_type) -1)
- return false;
+ return FALSE;
aux.x_file.x_n.x_offset = STRING_SIZE_SIZE + indx;
}
}
@@ -4776,10 +4775,10 @@ xcoff_link_input_bfd (finfo, input_bfd)
{
/* We don't support type checking. I don't know if
- anybody does. */
+ anybody does. */
aux.x_csect.x_parmhash = 0;
/* I don't think anybody uses these fields, but we'd
- better clobber them just in case. */
+ better clobber them just in case. */
aux.x_csect.x_stab = 0;
aux.x_csect.x_snstab = 0;
@@ -4818,9 +4817,9 @@ xcoff_link_input_bfd (finfo, input_bfd)
&& indx < obj_raw_syment_count (input_bfd))
{
/* We look forward through the symbol for
- the index of the next symbol we are going
- to include. I don't know if this is
- entirely right. */
+ the index of the next symbol we are going
+ to include. I don't know if this is
+ entirely right. */
while (finfo->sym_indices[indx] < 0
&& indx < obj_raw_syment_count (input_bfd))
++indx;
@@ -4877,7 +4876,7 @@ xcoff_link_input_bfd (finfo, input_bfd)
if (bfd_seek (input_bfd, pos, SEEK_SET) != 0
|| (bfd_bread (finfo->linenos, amt, input_bfd)
!= amt))
- return false;
+ return FALSE;
oline = enclosing;
}
@@ -4937,7 +4936,7 @@ xcoff_link_input_bfd (finfo, input_bfd)
|| (bfd_bwrite (finfo->linenos + linoff,
linesz * count, output_bfd)
!= linesz * count))
- return false;
+ return FALSE;
o->output_section->lineno_count += count;
@@ -4949,8 +4948,8 @@ xcoff_link_input_bfd (finfo, input_bfd)
int iiadd;
/* Update any C_BINCL or C_EINCL symbols
- that refer to a line number in the
- range we just output. */
+ that refer to a line number in the
+ range we just output. */
iisp = finfo->internal_syms;
iispend = (iisp
+ obj_raw_syment_count (input_bfd));
@@ -5028,7 +5027,7 @@ xcoff_link_input_bfd (finfo, input_bfd)
bfd_size_type amt = outsym - finfo->outsyms;
if (bfd_seek (output_bfd, pos, SEEK_SET) != 0
|| bfd_bwrite (finfo->outsyms, amt, output_bfd) != amt)
- return false;
+ return FALSE;
BFD_ASSERT ((obj_raw_syment_count (output_bfd)
+ (outsym - finfo->outsyms) / osymesz)
@@ -5039,7 +5038,7 @@ xcoff_link_input_bfd (finfo, input_bfd)
/* Don't let the linker relocation routines discard the symbols. */
keep_syms = obj_coff_keep_syms (input_bfd);
- obj_coff_keep_syms (input_bfd) = true;
+ obj_coff_keep_syms (input_bfd) = TRUE;
/* Relocate the contents of each section. */
for (o = input_bfd->sections; o != NULL; o = o->next)
@@ -5066,7 +5065,7 @@ xcoff_link_input_bfd (finfo, input_bfd)
else {
if (! bfd_get_section_contents (input_bfd, o, finfo->contents,
(file_ptr) 0, o->_raw_size))
- return false;
+ return FALSE;
contents = finfo->contents;
}
@@ -5083,12 +5082,12 @@ xcoff_link_input_bfd (finfo, input_bfd)
/* Read in the relocs. */
target_index = o->output_section->target_index;
internal_relocs = (xcoff_read_internal_relocs
- (input_bfd, o, false, finfo->external_relocs,
- true,
+ (input_bfd, o, FALSE, finfo->external_relocs,
+ TRUE,
(finfo->section_info[target_index].relocs
+ o->output_section->reloc_count)));
if (internal_relocs == NULL)
- return false;
+ return FALSE;
/* Call processor specific code to relocate the section
contents. */
@@ -5098,7 +5097,7 @@ xcoff_link_input_bfd (finfo, input_bfd)
internal_relocs,
finfo->internal_syms,
xcoff_data (input_bfd)->csects))
- return false;
+ return FALSE;
offset = o->output_section->vma + o->output_offset - o->vma;
irel = internal_relocs;
@@ -5109,7 +5108,7 @@ xcoff_link_input_bfd (finfo, input_bfd)
{
struct xcoff_link_hash_entry *h = NULL;
struct internal_ldrel ldrel;
- boolean quiet;
+ bfd_boolean quiet;
*rel_hash = NULL;
@@ -5153,7 +5152,7 @@ xcoff_link_input_bfd (finfo, input_bfd)
n = ((struct xcoff_toc_rel_hash *)
bfd_alloc (finfo->output_bfd, amt));
if (n == NULL)
- return false;
+ return FALSE;
si = finfo->section_info + target_index;
n->next = si->toc_rel_hashes;
n->h = h;
@@ -5233,17 +5232,17 @@ xcoff_link_input_bfd (finfo, input_bfd)
(input_bfd, is, buf));
if (name == NULL)
- return false;
+ return FALSE;
if (! ((*finfo->info->callbacks->unattached_reloc)
(finfo->info, name, input_bfd, o,
irel->r_vaddr)))
- return false;
+ return FALSE;
}
}
}
- quiet = false;
+ quiet = FALSE;
switch (irel->r_type)
{
default:
@@ -5290,7 +5289,7 @@ xcoff_link_input_bfd (finfo, input_bfd)
bfd_archive_filename (input_bfd),
sec->name);
bfd_set_error (bfd_error_nonrepresentable_section);
- return false;
+ return FALSE;
}
}
else
@@ -5303,7 +5302,7 @@ xcoff_link_input_bfd (finfo, input_bfd)
callback for this relocation, in
_bfd_ppc_xcoff_relocate_section. Don't
issue any more warnings. */
- quiet = true;
+ quiet = TRUE;
}
if (h->ldindx < 0 && ! quiet)
{
@@ -5312,7 +5311,7 @@ xcoff_link_input_bfd (finfo, input_bfd)
bfd_archive_filename (input_bfd),
h->root.root.string);
bfd_set_error (bfd_error_bad_value);
- return false;
+ return FALSE;
}
ldrel.l_symndx = h->ldindx;
}
@@ -5328,7 +5327,7 @@ xcoff_link_input_bfd (finfo, input_bfd)
bfd_get_section_name (finfo->output_bfd,
o->output_section));
bfd_set_error (bfd_error_invalid_operation);
- return false;
+ return FALSE;
}
bfd_xcoff_swap_ldrel_out (output_bfd, &ldrel,
finfo->ldrel);
@@ -5356,7 +5355,7 @@ xcoff_link_input_bfd (finfo, input_bfd)
(o->_cooked_size != 0
? o->_cooked_size
: o->_raw_size)))
- return false;
+ return FALSE;
}
obj_coff_keep_syms (input_bfd) = keep_syms;
@@ -5364,10 +5363,10 @@ xcoff_link_input_bfd (finfo, input_bfd)
if (! finfo->info->keep_memory)
{
if (! _bfd_coff_free_symbols (input_bfd))
- return false;
+ return FALSE;
}
- return true;
+ return TRUE;
}
#undef N_TMASK
@@ -5376,7 +5375,7 @@ xcoff_link_input_bfd (finfo, input_bfd)
/* Write out a non-XCOFF global symbol. */
-static boolean
+static bfd_boolean
xcoff_write_global_symbol (h, inf)
struct xcoff_link_hash_entry *h;
PTR inf;
@@ -5386,7 +5385,7 @@ xcoff_write_global_symbol (h, inf)
bfd_byte *outsym;
struct internal_syment isym;
union internal_auxent aux;
- boolean result;
+ bfd_boolean result;
file_ptr pos;
bfd_size_type amt;
@@ -5397,13 +5396,13 @@ xcoff_write_global_symbol (h, inf)
{
h = (struct xcoff_link_hash_entry *) h->root.u.i.link;
if (h->root.type == bfd_link_hash_new)
- return true;
+ return TRUE;
}
/* If this symbol was garbage collected, just skip it. */
if (xcoff_hash_table (finfo->info)->gc
&& (h->flags & XCOFF_MARK) == 0)
- return true;
+ return TRUE;
/* If we need a .loader section entry, write it out. */
if (h->ldsym != NULL)
@@ -5625,7 +5624,7 @@ xcoff_write_global_symbol (h, inf)
}
else
{
- return false;
+ return FALSE;
}
irel->r_type = R_POS;
finfo->section_info[oindx].rel_hashes[osec->reloc_count] = NULL;
@@ -5645,10 +5644,8 @@ xcoff_write_global_symbol (h, inf)
result = bfd_xcoff_put_symbol_name (output_bfd, finfo->strtab,
&irsym, h->root.root.string);
- if (false == result)
- {
- return false;
- }
+ if (!result)
+ return FALSE;
irsym.n_value = irel->r_vaddr;
irsym.n_scnum = osec->target_index;
@@ -5674,7 +5671,7 @@ xcoff_write_global_symbol (h, inf)
amt = outsym - finfo->outsyms;
if (bfd_seek (output_bfd, pos, SEEK_SET) != 0
|| bfd_bwrite (finfo->outsyms, amt, output_bfd) != amt)
- return false;
+ return FALSE;
obj_raw_syment_count (output_bfd) +=
(outsym - finfo->outsyms) / bfd_coff_symesz (output_bfd);
@@ -5721,7 +5718,7 @@ xcoff_write_global_symbol (h, inf)
}
else
{
- return false;
+ return FALSE;
}
sec = h->root.u.def.section;
@@ -5759,7 +5756,7 @@ xcoff_write_global_symbol (h, inf)
bfd_get_filename (output_bfd),
esec->output_section->name);
bfd_set_error (bfd_error_nonrepresentable_section);
- return false;
+ return FALSE;
}
ldrel.l_rtype = (reloc_size << 8) | R_POS;
ldrel.l_rsecnm = oindx;
@@ -5821,7 +5818,7 @@ xcoff_write_global_symbol (h, inf)
bfd_get_filename (output_bfd),
tsec->output_section->name);
bfd_set_error (bfd_error_nonrepresentable_section);
- return false;
+ return FALSE;
}
ldrel.l_rtype = (reloc_size << 8) | R_POS;
ldrel.l_rsecnm = oindx;
@@ -5832,24 +5829,24 @@ xcoff_write_global_symbol (h, inf)
if (h->indx >= 0 || finfo->info->strip == strip_all)
{
BFD_ASSERT (outsym == finfo->outsyms);
- return true;
+ return TRUE;
}
if (h->indx != -2
&& (finfo->info->strip == strip_all
|| (finfo->info->strip == strip_some
&& bfd_hash_lookup (finfo->info->keep_hash, h->root.root.string,
- false, false) == NULL)))
+ FALSE, FALSE) == NULL)))
{
BFD_ASSERT (outsym == finfo->outsyms);
- return true;
+ return TRUE;
}
if (h->indx != -2
&& (h->flags & (XCOFF_REF_REGULAR | XCOFF_DEF_REGULAR)) == 0)
{
BFD_ASSERT (outsym == finfo->outsyms);
- return true;
+ return TRUE;
}
memset (&aux, 0, sizeof aux);
@@ -5858,10 +5855,8 @@ xcoff_write_global_symbol (h, inf)
result = bfd_xcoff_put_symbol_name (output_bfd, finfo->strtab, &isym,
h->root.root.string);
- if (false == result)
- {
- return false;
- }
+ if (!result)
+ return FALSE;
if (h->root.type == bfd_link_hash_undefined
|| h->root.type == bfd_link_hash_undefweak)
@@ -5957,16 +5952,16 @@ xcoff_write_global_symbol (h, inf)
amt = outsym - finfo->outsyms;
if (bfd_seek (output_bfd, pos, SEEK_SET) != 0
|| bfd_bwrite (finfo->outsyms, amt, output_bfd) != amt)
- return false;
+ return FALSE;
obj_raw_syment_count (output_bfd) +=
(outsym - finfo->outsyms) / bfd_coff_symesz (output_bfd);
- return true;
+ return TRUE;
}
/* Handle a link order which is supposed to generate a reloc. */
-static boolean
+static bfd_boolean
xcoff_reloc_link_order (output_bfd, finfo, output_section, link_order)
bfd *output_bfd;
struct xcoff_final_link_info *finfo;
@@ -5985,9 +5980,9 @@ xcoff_reloc_link_order (output_bfd, finfo, output_section, link_order)
if (link_order->type == bfd_section_reloc_link_order)
{
/* We need to somehow locate a symbol in the right section. The
- symbol must either have a value of zero, or we must adjust
- the addend by the value of the symbol. FIXME: Write this
- when we need it. The old linker couldn't handle this anyhow. */
+ symbol must either have a value of zero, or we must adjust
+ the addend by the value of the symbol. FIXME: Write this
+ when we need it. The old linker couldn't handle this anyhow. */
abort ();
}
@@ -5995,20 +5990,20 @@ xcoff_reloc_link_order (output_bfd, finfo, output_section, link_order)
if (howto == NULL)
{
bfd_set_error (bfd_error_bad_value);
- return false;
+ return FALSE;
}
h = ((struct xcoff_link_hash_entry *)
bfd_wrapped_link_hash_lookup (output_bfd, finfo->info,
link_order->u.reloc.p->u.name,
- false, false, true));
+ FALSE, FALSE, TRUE));
if (h == NULL)
{
if (! ((*finfo->info->callbacks->unattached_reloc)
(finfo->info, link_order->u.reloc.p->u.name, (bfd *) NULL,
(asection *) NULL, (bfd_vma) 0)))
- return false;
- return true;
+ return FALSE;
+ return TRUE;
}
if (h->root.type == bfd_link_hash_common)
@@ -6039,12 +6034,12 @@ xcoff_reloc_link_order (output_bfd, finfo, output_section, link_order)
bfd_size_type size;
bfd_byte *buf;
bfd_reloc_status_type rstat;
- boolean ok;
+ bfd_boolean ok;
size = bfd_get_reloc_size (howto);
buf = (bfd_byte *) bfd_zmalloc (size);
if (buf == NULL)
- return false;
+ return FALSE;
rstat = _bfd_relocate_contents (howto, output_bfd, addend, buf);
switch (rstat)
@@ -6061,7 +6056,7 @@ xcoff_reloc_link_order (output_bfd, finfo, output_section, link_order)
(bfd_vma) 0)))
{
free (buf);
- return false;
+ return FALSE;
}
break;
}
@@ -6069,7 +6064,7 @@ xcoff_reloc_link_order (output_bfd, finfo, output_section, link_order)
(file_ptr) link_order->offset, size);
free (buf);
if (! ok)
- return false;
+ return FALSE;
}
/* Store the reloc information in the right place. It will get
@@ -6124,7 +6119,7 @@ xcoff_reloc_link_order (output_bfd, finfo, output_section, link_order)
(_("%s: loader reloc in unrecognized section `%s'"),
bfd_get_filename (output_bfd), secname);
bfd_set_error (bfd_error_nonrepresentable_section);
- return false;
+ return FALSE;
}
}
else
@@ -6136,7 +6131,7 @@ xcoff_reloc_link_order (output_bfd, finfo, output_section, link_order)
bfd_get_filename (output_bfd),
h->root.root.string);
bfd_set_error (bfd_error_bad_value);
- return false;
+ return FALSE;
}
ldrel.l_symndx = h->ldindx;
}
@@ -6146,7 +6141,7 @@ xcoff_reloc_link_order (output_bfd, finfo, output_section, link_order)
bfd_xcoff_swap_ldrel_out (output_bfd, &ldrel, finfo->ldrel);
finfo->ldrel += bfd_xcoff_ldrelsz(output_bfd);
- return true;
+ return TRUE;
}
/* Sort relocs by VMA. This is called via qsort. */