aboutsummaryrefslogtreecommitdiff
path: root/bfd/cofflink.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2021-03-31 10:30:54 +1030
committerAlan Modra <amodra@gmail.com>2021-03-31 10:49:23 +1030
commit0a1b45a20eaa98d4d9026dc1fd17e79e741183af (patch)
tree059b2b296b4d60784a82cd6a52dae47dcac4d66a /bfd/cofflink.c
parentfaa7a26040c617a6d29f601998b99a1da882c672 (diff)
downloadgdb-0a1b45a20eaa98d4d9026dc1fd17e79e741183af.zip
gdb-0a1b45a20eaa98d4d9026dc1fd17e79e741183af.tar.gz
gdb-0a1b45a20eaa98d4d9026dc1fd17e79e741183af.tar.bz2
Use bool in bfd
* sysdep.h: POISON_BFD_BOOLEAN: Define. * aix5ppc-core.c, * aout-cris.c, * aout-ns32k.c, * aout-target.h, * aoutx.h, * arc-got.h, * archive.c, * archive64.c, * archures.c, * bfd-in.h, * bfd.c, * bfdwin.c, * binary.c, * cache.c, * coff-alpha.c, * coff-arm.c, * coff-arm.h, * coff-bfd.c, * coff-bfd.h, * coff-go32.c, * coff-i386.c, * coff-ia64.c, * coff-mcore.c, * coff-mips.c, * coff-rs6000.c, * coff-sh.c, * coff-stgo32.c, * coff-tic30.c, * coff-tic4x.c, * coff-tic54x.c, * coff-x86_64.c, * coff-z80.c, * coff-z8k.c, * coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c, * compress.c, * corefile.c, * cpu-aarch64.c, * cpu-aarch64.h, * cpu-alpha.c, * cpu-arc.c, * cpu-arm.c, * cpu-arm.h, * cpu-avr.c, * cpu-bfin.c, * cpu-bpf.c, * cpu-cr16.c, * cpu-cris.c, * cpu-crx.c, * cpu-csky.c, * cpu-d10v.c, * cpu-d30v.c, * cpu-dlx.c, * cpu-epiphany.c, * cpu-fr30.c, * cpu-frv.c, * cpu-ft32.c, * cpu-h8300.c, * cpu-hppa.c, * cpu-i386.c, * cpu-ia64.c, * cpu-iamcu.c, * cpu-ip2k.c, * cpu-iq2000.c, * cpu-k1om.c, * cpu-l1om.c, * cpu-lm32.c, * cpu-m10200.c, * cpu-m10300.c, * cpu-m32c.c, * cpu-m32r.c, * cpu-m68hc11.c, * cpu-m68hc12.c, * cpu-m68k.c, * cpu-m9s12x.c, * cpu-m9s12xg.c, * cpu-mcore.c, * cpu-mep.c, * cpu-metag.c, * cpu-microblaze.c, * cpu-mips.c, * cpu-mmix.c, * cpu-moxie.c, * cpu-msp430.c, * cpu-mt.c, * cpu-nds32.c, * cpu-nfp.c, * cpu-nios2.c, * cpu-ns32k.c, * cpu-or1k.c, * cpu-pdp11.c, * cpu-pj.c, * cpu-powerpc.c, * cpu-pru.c, * cpu-riscv.c, * cpu-rl78.c, * cpu-rs6000.c, * cpu-rx.c, * cpu-s12z.c, * cpu-s390.c, * cpu-score.c, * cpu-sh.c, * cpu-sparc.c, * cpu-spu.c, * cpu-tic30.c, * cpu-tic4x.c, * cpu-tic54x.c, * cpu-tic6x.c, * cpu-tilegx.c, * cpu-tilepro.c, * cpu-v850.c, * cpu-v850_rh850.c, * cpu-vax.c, * cpu-visium.c, * cpu-wasm32.c, * cpu-xc16x.c, * cpu-xgate.c, * cpu-xstormy16.c, * cpu-xtensa.c, * cpu-z80.c, * cpu-z8k.c, * dwarf1.c, * dwarf2.c, * ecoff-bfd.h, * ecoff.c, * ecofflink.c, * elf-attrs.c, * elf-bfd.h, * elf-eh-frame.c, * elf-hppa.h, * elf-ifunc.c, * elf-m10200.c, * elf-m10300.c, * elf-nacl.c, * elf-nacl.h, * elf-properties.c, * elf-s390-common.c, * elf-s390.h, * elf-strtab.c, * elf-vxworks.c, * elf-vxworks.h, * elf.c, * elf32-am33lin.c, * elf32-arc.c, * elf32-arm.c, * elf32-arm.h, * elf32-avr.c, * elf32-avr.h, * elf32-bfin.c, * elf32-bfin.h, * elf32-cr16.c, * elf32-cr16.h, * elf32-cris.c, * elf32-crx.c, * elf32-csky.c, * elf32-csky.h, * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c, * elf32-ft32.c, * elf32-gen.c, * elf32-h8300.c, * elf32-hppa.c, * elf32-hppa.h, * elf32-i386.c, * elf32-ip2k.c, * elf32-iq2000.c, * elf32-lm32.c, * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c, * elf32-m68hc1x.c, * elf32-m68hc1x.h, * elf32-m68k.c, * elf32-m68k.h, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c, * elf32-metag.h, * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-nios2.c, * elf32-nios2.h, * elf32-or1k.c, * elf32-pj.c, * elf32-ppc.c, * elf32-ppc.h, * elf32-pru.c, * elf32-rl78.c, * elf32-rx.c, * elf32-s12z.c, * elf32-s390.c, * elf32-score.c, * elf32-score.h, * elf32-score7.c, * elf32-sh-relocs.h, * elf32-sh.c, * elf32-sparc.c, * elf32-spu.c, * elf32-spu.h, * elf32-tic6x.c, * elf32-tic6x.h, * elf32-tilegx.c, * elf32-tilepro.c, * elf32-v850.c, * elf32-v850.h, * elf32-vax.c, * elf32-visium.c, * elf32-wasm32.c, * elf32-xc16x.c, * elf32-xgate.c, * elf32-xstormy16.c, * elf32-xtensa.c, * elf32-z80.c, * elf64-alpha.c, * elf64-bpf.c, * elf64-gen.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c, * elf64-nfp.c, * elf64-ppc.c, * elf64-ppc.h, * elf64-s390.c, * elf64-sparc.c, * elf64-tilegx.c, * elf64-x86-64.c, * elfcode.h, * elfcore.h, * elflink.c, * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-aarch64.c, * elfxx-aarch64.h, * elfxx-ia64.c, * elfxx-ia64.h, * elfxx-mips.c, * elfxx-mips.h, * elfxx-riscv.c, * elfxx-riscv.h, * elfxx-sparc.c, * elfxx-sparc.h, * elfxx-target.h, * elfxx-tilegx.c, * elfxx-tilegx.h, * elfxx-x86.c, * elfxx-x86.h, * format.c, * genlink.h, * hash.c, * i386aout.c, * i386lynx.c, * i386msdos.c, * ihex.c, * libaout.h, * libbfd-in.h, * libbfd.c, * libcoff-in.h, * libecoff.h, * libpei.h, * libxcoff.h, * linker.c, * mach-o-aarch64.c, * mach-o-arm.c, * mach-o-i386.c, * mach-o-x86-64.c, * mach-o.c, * mach-o.h, * merge.c, * mmo.c, * netbsd.h, * opncls.c, * pc532-mach.c, * pdp11.c, * pe-arm.c, * pe-i386.c, * pe-mcore.c, * pe-sh.c, * pe-x86_64.c, * peXXigen.c, * pef.c, * pei-arm.c, * pei-i386.c, * pei-ia64.c, * pei-mcore.c, * pei-sh.c, * pei-x86_64.c, * peicode.h, * plugin.c, * plugin.h, * ppcboot.c, * reloc.c, * reloc16.c, * rs6000-core.c, * section.c, * simple.c, * som.c, * som.h, * srec.c, * stabs.c, * syms.c, * targets.c, * tekhex.c, * verilog.c, * vms-alpha.c, * vms-lib.c, * vms-misc.c, * vms.h, * wasm-module.c, * xcofflink.c, * xcofflink.h, * xsym.c, * xsym.h: Replace bfd_boolean with bool, FALSE with false, and TRUE with true throughout. * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. * libcoff.h: Regenerate.
Diffstat (limited to 'bfd/cofflink.c')
-rw-r--r--bfd/cofflink.c344
1 files changed, 172 insertions, 172 deletions
diff --git a/bfd/cofflink.c b/bfd/cofflink.c
index 05c6fff..c6b65c7 100644
--- a/bfd/cofflink.c
+++ b/bfd/cofflink.c
@@ -29,11 +29,11 @@
#include "libcoff.h"
#include "safe-ctype.h"
-static bfd_boolean coff_link_add_object_symbols (bfd *, struct bfd_link_info *);
-static bfd_boolean coff_link_check_archive_element
+static bool coff_link_add_object_symbols (bfd *, struct bfd_link_info *);
+static bool coff_link_check_archive_element
(bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, const char *,
- bfd_boolean *);
-static bfd_boolean coff_link_add_symbols (bfd *, struct bfd_link_info *);
+ bool *);
+static bool coff_link_add_symbols (bfd *, struct bfd_link_info *);
/* Return TRUE if SYM is a weak, external symbol. */
#define IS_WEAK_EXTERNAL(abfd, sym) \
@@ -91,7 +91,7 @@ _bfd_coff_link_hash_newfunc (struct bfd_hash_entry *entry,
/* Initialize a COFF linker hash table. */
-bfd_boolean
+bool
_bfd_coff_link_hash_table_init (struct coff_link_hash_table *table,
bfd *abfd,
struct bfd_hash_entry *(*newfunc) (struct bfd_hash_entry *,
@@ -159,7 +159,7 @@ _bfd_coff_debug_merge_hash_newfunc (struct bfd_hash_entry *entry,
/* Given a COFF BFD, add symbols to the global hash table as
appropriate. */
-bfd_boolean
+bool
_bfd_coff_link_add_symbols (bfd *abfd, struct bfd_link_info *info)
{
switch (bfd_get_format (abfd))
@@ -171,25 +171,25 @@ _bfd_coff_link_add_symbols (bfd *abfd, struct bfd_link_info *info)
(abfd, info, coff_link_check_archive_element);
default:
bfd_set_error (bfd_error_wrong_format);
- return FALSE;
+ return false;
}
}
/* Add symbols from a COFF object file. */
-static bfd_boolean
+static bool
coff_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
{
if (! _bfd_coff_get_external_symbols (abfd))
- return FALSE;
+ return false;
if (! coff_link_add_symbols (abfd, info))
- return FALSE;
+ return false;
if (! info->keep_memory
&& ! _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
@@ -197,50 +197,50 @@ coff_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
needed in the link or not. This is called via
_bfd_generic_link_add_archive_symbols. */
-static bfd_boolean
+static bool
coff_link_check_archive_element (bfd *abfd,
struct bfd_link_info *info,
struct bfd_link_hash_entry *h,
const char *name,
- bfd_boolean *pneeded)
+ bool *pneeded)
{
- *pneeded = FALSE;
+ *pneeded = false;
/* PR 22369 - Skip non COFF objects in the archive. */
if (! bfd_family_coff (abfd))
- return TRUE;
+ return true;
/* We are only interested in symbols that are currently undefined.
If a symbol is currently known to be common, COFF linkers do not
bring in an object file which defines it. */
if (h->type != bfd_link_hash_undefined)
- return TRUE;
+ return true;
/* If the archive element has already been loaded then one
of the symbols defined by that element might have been
made undefined due to being in a discarded section. */
if (((struct coff_link_hash_entry *) h)->indx == -3)
- return TRUE;
+ return true;
/* Include this element? */
if (!(*info->callbacks->add_archive_element) (info, abfd, name, &abfd))
- return TRUE;
- *pneeded = TRUE;
+ return true;
+ *pneeded = true;
return bfd_link_add_symbols (abfd, info);
}
/* Add all the symbols from an object file to the hash table. */
-static bfd_boolean
+static bool
coff_link_add_symbols (bfd *abfd,
struct bfd_link_info *info)
{
unsigned int n_tmask = coff_data (abfd)->local_n_tmask;
unsigned int n_btshft = coff_data (abfd)->local_n_btshft;
unsigned int n_btmask = coff_data (abfd)->local_n_btmask;
- bfd_boolean keep_syms;
- bfd_boolean default_copy;
+ bool keep_syms;
+ bool default_copy;
bfd_size_type symcount;
struct coff_link_hash_entry **sym_hash;
bfd_size_type symesz;
@@ -251,17 +251,17 @@ coff_link_add_symbols (bfd *abfd,
symcount = obj_raw_syment_count (abfd);
if (symcount == 0)
- return TRUE; /* Nothing to do. */
+ return true; /* Nothing to do. */
/* Keep the symbols during this function, in case the linker needs
to read the generic symbols in order to report an error message. */
keep_syms = obj_coff_keep_syms (abfd);
- obj_coff_keep_syms (abfd) = TRUE;
+ obj_coff_keep_syms (abfd) = true;
if (info->keep_memory)
- default_copy = FALSE;
+ default_copy = false;
else
- default_copy = TRUE;
+ default_copy = true;
/* We keep a list of the linker hash table entries that correspond
to particular symbols. */
@@ -279,7 +279,7 @@ coff_link_add_symbols (bfd *abfd,
{
struct internal_syment sym;
enum coff_symbol_classification classification;
- bfd_boolean copy;
+ bool copy;
bfd_coff_swap_sym_in (abfd, esym, &sym);
@@ -291,8 +291,8 @@ coff_link_add_symbols (bfd *abfd,
flagword flags;
asection *section;
bfd_vma value;
- bfd_boolean addit;
- bfd_boolean discarded = FALSE;
+ bool addit;
+ bool discarded = false;
/* This symbol is externally visible. */
@@ -305,7 +305,7 @@ coff_link_add_symbols (bfd *abfd,
copy = default_copy;
if (sym._n._n_n._n_zeroes != 0
|| sym._n._n_n._n_offset == 0)
- copy = TRUE;
+ copy = true;
value = sym.n_value;
@@ -319,7 +319,7 @@ coff_link_add_symbols (bfd *abfd,
section = coff_section_from_bfd_index (abfd, sym.n_scnum);
if (discarded_section (section))
{
- discarded = TRUE;
+ discarded = true;
section = bfd_und_section_ptr;
}
else if (! obj_pe (abfd))
@@ -347,7 +347,7 @@ coff_link_add_symbols (bfd *abfd,
if (IS_WEAK_EXTERNAL (abfd, sym))
flags = BSF_WEAK;
- addit = TRUE;
+ addit = true;
/* In the PE format, section symbols actually refer to the
start of the output section. We handle them specially
@@ -355,7 +355,7 @@ coff_link_add_symbols (bfd *abfd,
if (obj_pe (abfd) && (flags & BSF_SECTION_SYM) != 0)
{
*sym_hash = coff_link_hash_lookup (coff_hash_table (info),
- name, FALSE, copy, FALSE);
+ name, false, copy, false);
if (*sym_hash != NULL)
{
if (((*sym_hash)->coff_link_hash_flags
@@ -366,7 +366,7 @@ coff_link_add_symbols (bfd *abfd,
(_("warning: symbol `%s' is both section and non-section"),
name);
- addit = FALSE;
+ addit = false;
}
}
@@ -402,20 +402,20 @@ coff_link_add_symbols (bfd *abfd,
{
if (*sym_hash == NULL)
*sym_hash = coff_link_hash_lookup (coff_hash_table (info),
- name, FALSE, copy, FALSE);
+ name, false, copy, false);
if (*sym_hash != NULL
&& (*sym_hash)->root.type == bfd_link_hash_defined
&& coff_section_data (abfd, (*sym_hash)->root.u.def.section)->comdat != NULL
&& strcmp (coff_section_data (abfd, (*sym_hash)->root.u.def.section)->comdat->name,
coff_section_data (abfd, section)->comdat->name) == 0)
- addit = FALSE;
+ addit = false;
}
if (addit)
{
if (! (bfd_coff_link_add_one_symbol
(info, abfd, name, flags, section, value,
- (const char *) NULL, copy, FALSE,
+ (const char *) NULL, copy, false,
(struct bfd_link_hash_entry **) sym_hash)))
goto error_return;
@@ -576,23 +576,23 @@ coff_link_add_symbols (bfd *abfd,
obj_coff_keep_syms (abfd) = keep_syms;
- return TRUE;
+ return true;
error_return:
obj_coff_keep_syms (abfd) = keep_syms;
- return FALSE;
+ return false;
}
/* Do the final link step. */
-bfd_boolean
+bool
_bfd_coff_final_link (bfd *abfd,
struct bfd_link_info *info)
{
bfd_size_type symesz;
struct coff_final_link_info flaginfo;
- bfd_boolean debug_merge_allocated;
- bfd_boolean long_section_names;
+ bool debug_merge_allocated;
+ bool long_section_names;
asection *o;
struct bfd_link_order *p;
bfd_size_type max_sym_count;
@@ -625,8 +625,8 @@ _bfd_coff_final_link (bfd *abfd,
flaginfo.contents = NULL;
flaginfo.external_relocs = NULL;
flaginfo.internal_relocs = NULL;
- flaginfo.global_to_static = FALSE;
- debug_merge_allocated = FALSE;
+ flaginfo.global_to_static = false;
+ debug_merge_allocated = false;
coff_data (abfd)->link_info = info;
@@ -636,7 +636,7 @@ _bfd_coff_final_link (bfd *abfd,
if (! coff_debug_merge_hash_table_init (&flaginfo.debug_merge))
goto error_return;
- debug_merge_allocated = TRUE;
+ debug_merge_allocated = true;
/* Compute the file positions for all the sections. */
if (! abfd->output_has_begun)
@@ -653,7 +653,7 @@ _bfd_coff_final_link (bfd *abfd,
max_lineno_count = 0;
max_reloc_count = 0;
- long_section_names = FALSE;
+ long_section_names = false;
for (o = abfd->sections; o != NULL; o = o->next)
{
o->reloc_count = 0;
@@ -670,7 +670,7 @@ _bfd_coff_final_link (bfd *abfd,
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)
@@ -714,10 +714,10 @@ _bfd_coff_final_link (bfd *abfd,
coff_write_object_contents which puts the string index
into the s_name field of the section header. That is why
we pass hash as FALSE. */
- if (_bfd_stringtab_add (flaginfo.strtab, o->name, FALSE, FALSE)
+ if (_bfd_stringtab_add (flaginfo.strtab, o->name, false, false)
== (bfd_size_type) -1)
goto error_return;
- long_section_names = TRUE;
+ long_section_names = true;
}
}
@@ -804,7 +804,7 @@ _bfd_coff_final_link (bfd *abfd,
{
size_t sz;
- sub->output_has_begun = FALSE;
+ sub->output_has_begun = false;
sz = bfd_family_coff (sub) ? obj_raw_syment_count (sub) : 2;
if (sz > max_sym_count)
max_sym_count = sz;
@@ -865,7 +865,7 @@ _bfd_coff_final_link (bfd *abfd,
{
if (! _bfd_coff_link_input_bfd (&flaginfo, sub))
goto error_return;
- sub->output_has_begun = TRUE;
+ sub->output_has_begun = true;
}
}
else if (p->type == bfd_section_reloc_link_order
@@ -899,7 +899,7 @@ _bfd_coff_final_link (bfd *abfd,
union internal_auxent iaux;
bfd_size_type string_size = 0, indx;
bfd_vma written = 0;
- bfd_boolean rewrite = FALSE, hash;
+ bool rewrite = false, hash;
if (! (sym->flags & BSF_LOCAL)
|| (sym->flags & (BSF_SECTION_SYM | BSF_DEBUGGING_RELOC
@@ -912,7 +912,7 @@ _bfd_coff_final_link (bfd *abfd,
/* See if we are discarding symbols with this name. */
if ((flaginfo.info->strip == strip_some
&& (bfd_hash_lookup (flaginfo.info->keep_hash,
- bfd_asymbol_name(sym), FALSE, FALSE)
+ bfd_asymbol_name(sym), false, false)
== NULL))
|| (((flaginfo.info->discard == discard_sec_merge
&& (bfd_asymbol_section (sym)->flags & SEC_MERGE)
@@ -935,7 +935,7 @@ _bfd_coff_final_link (bfd *abfd,
&& ! isym._n._n_n._n_zeroes && isym.n_numaux)
{
indx = _bfd_stringtab_add (flaginfo.strtab, ".file", hash,
- FALSE);
+ false);
if (indx == (bfd_size_type) -1)
goto error_return;
isym._n._n_n._n_offset = STRING_SIZE_SIZE + indx;
@@ -951,14 +951,14 @@ _bfd_coff_final_link (bfd *abfd,
{
indx = _bfd_stringtab_add (flaginfo.strtab,
bfd_asymbol_name (sym), hash,
- FALSE);
+ false);
if (indx == (bfd_size_type) -1)
goto error_return;
if (isym.n_sclass != C_FILE)
{
isym._n._n_n._n_offset = STRING_SIZE_SIZE + indx;
bfd_coff_swap_sym_out (abfd, &isym, flaginfo.outsyms);
- rewrite = TRUE;
+ rewrite = true;
}
else
{
@@ -982,7 +982,7 @@ _bfd_coff_final_link (bfd *abfd,
flaginfo.outsyms);
pos = obj_sym_filepos (abfd) + flaginfo.last_file_index
* symesz;
- rewrite = TRUE;
+ rewrite = true;
}
flaginfo.last_file_index = obj_raw_syment_count (abfd);
flaginfo.last_file = isym;
@@ -1004,7 +1004,7 @@ _bfd_coff_final_link (bfd *abfd,
/* Free up the buffers used by _bfd_coff_link_input_bfd. */
coff_debug_merge_hash_table_free (&flaginfo.debug_merge);
- debug_merge_allocated = FALSE;
+ debug_merge_allocated = false;
free (flaginfo.internal_syms);
flaginfo.internal_syms = NULL;
@@ -1036,7 +1036,7 @@ _bfd_coff_final_link (bfd *abfd,
pos = obj_sym_filepos (abfd) + flaginfo.last_file_index * symesz;
if (bfd_seek (abfd, pos, SEEK_SET) != 0
|| bfd_bwrite (flaginfo.outsyms, symesz, abfd) != symesz)
- return FALSE;
+ return false;
}
/* If doing task linking (ld --task-link) then make a pass through the
@@ -1044,7 +1044,7 @@ _bfd_coff_final_link (bfd *abfd,
static. */
if (info->task_link)
{
- flaginfo.failed = FALSE;
+ flaginfo.failed = false;
coff_link_hash_traverse (coff_hash_table (info),
_bfd_coff_write_task_globals, &flaginfo);
if (flaginfo.failed)
@@ -1052,7 +1052,7 @@ _bfd_coff_final_link (bfd *abfd,
}
/* Write out the global symbols. */
- flaginfo.failed = FALSE;
+ flaginfo.failed = false;
bfd_hash_traverse (&info->hash->table, _bfd_coff_write_global_sym, &flaginfo);
if (flaginfo.failed)
goto error_return;
@@ -1141,7 +1141,7 @@ _bfd_coff_final_link (bfd *abfd,
if (coff_hash_table (info)->stab_info.stabstr != NULL)
{
if (! _bfd_write_stab_strings (abfd, &coff_hash_table (info)->stab_info))
- return FALSE;
+ return false;
}
/* Write out the string table. */
@@ -1151,7 +1151,7 @@ _bfd_coff_final_link (bfd *abfd,
pos = obj_sym_filepos (abfd) + obj_raw_syment_count (abfd) * symesz;
if (bfd_seek (abfd, pos, SEEK_SET) != 0)
- return FALSE;
+ return false;
#if STRING_SIZE_SIZE == 4
H_PUT_32 (abfd,
@@ -1163,12 +1163,12 @@ _bfd_coff_final_link (bfd *abfd,
if (bfd_bwrite (strbuf, (bfd_size_type) STRING_SIZE_SIZE, abfd)
!= STRING_SIZE_SIZE)
- return FALSE;
+ return false;
if (! _bfd_stringtab_emit (abfd, flaginfo.strtab))
- return FALSE;
+ return false;
- obj_coff_strings_written (abfd) = TRUE;
+ obj_coff_strings_written (abfd) = true;
}
_bfd_stringtab_free (flaginfo.strtab);
@@ -1177,7 +1177,7 @@ _bfd_coff_final_link (bfd *abfd,
not try to write out the symbols. */
abfd->symcount = 0;
- return TRUE;
+ return true;
error_return:
if (debug_merge_allocated)
@@ -1204,7 +1204,7 @@ _bfd_coff_final_link (bfd *abfd,
free (flaginfo.external_relocs);
free (flaginfo.internal_relocs);
free (external_relocs);
- return FALSE;
+ return false;
}
/* Parse out a -heap <reserved>,<commit> line. */
@@ -1364,7 +1364,7 @@ mark_relocs (struct coff_final_link_info *flaginfo, bfd *input_bfd)
/* Read in the relocs. */
internal_relocs = _bfd_coff_read_internal_relocs
- (input_bfd, a, FALSE,
+ (input_bfd, a, false,
flaginfo->external_relocs,
bfd_link_relocatable (flaginfo->info),
(bfd_link_relocatable (flaginfo->info)
@@ -1391,18 +1391,18 @@ mark_relocs (struct coff_final_link_info *flaginfo, bfd *input_bfd)
/* Link an input file into the linker output file. This function
handles all the sections and relocations of the input file at once. */
-bfd_boolean
+bool
_bfd_coff_link_input_bfd (struct coff_final_link_info *flaginfo, bfd *input_bfd)
{
unsigned int n_tmask = coff_data (input_bfd)->local_n_tmask;
unsigned int n_btshft = coff_data (input_bfd)->local_n_btshft;
- bfd_boolean (*adjust_symndx)
+ bool (*adjust_symndx)
(bfd *, struct bfd_link_info *, bfd *, asection *,
- struct internal_reloc *, bfd_boolean *);
+ struct internal_reloc *, bool *);
bfd *output_bfd;
const char *strings;
bfd_size_type syment_base;
- bfd_boolean copy, hash;
+ bool copy, hash;
bfd_size_type isymesz;
bfd_size_type osymesz;
bfd_size_type linesz;
@@ -1426,15 +1426,15 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *flaginfo, bfd *input_bfd)
linesz = bfd_coff_linesz (input_bfd);
BFD_ASSERT (linesz == bfd_coff_linesz (output_bfd));
- copy = FALSE;
+ copy = false;
if (! flaginfo->info->keep_memory)
- copy = TRUE;
- hash = TRUE;
+ copy = true;
+ hash = true;
if (flaginfo->info->traditional_format)
- 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;
@@ -1446,7 +1446,7 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *flaginfo, bfd *input_bfd)
if (coff_data (output_bfd)->pe
&& ! process_embedded_commands (output_bfd, flaginfo->info, input_bfd))
- return FALSE;
+ return false;
/* If we are going to perform relocations and also strip/discard some
symbols then we must make sure that we do not strip/discard those
@@ -1465,9 +1465,9 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *flaginfo, bfd *input_bfd)
{
struct internal_syment isym;
enum coff_symbol_classification classification;
- bfd_boolean skip;
- bfd_boolean global;
- bfd_boolean dont_skip_symbol;
+ bool skip;
+ bool global;
+ bool dont_skip_symbol;
int add;
bfd_coff_swap_sym_in (input_bfd, esym, isymp);
@@ -1503,17 +1503,17 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *flaginfo, bfd *input_bfd)
&& bfd_link_relocatable (flaginfo->info))
dont_skip_symbol = *indexp;
else
- dont_skip_symbol = FALSE;
+ dont_skip_symbol = false;
*indexp = -1;
- skip = FALSE;
- global = FALSE;
+ skip = false;
+ global = false;
add = 1 + isym.n_numaux;
/* If we are stripping all symbols, we want to skip this one. */
if (flaginfo->info->strip == strip_all && ! dont_skip_symbol)
- skip = TRUE;
+ skip = true;
if (! skip)
{
@@ -1528,22 +1528,22 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *flaginfo, bfd *input_bfd)
end of the symbol table, so skip them for now.
Locally defined function symbols, however, are an
exception, and are not moved to the end. */
- global = TRUE;
+ global = true;
if (! ISFCN (isym.n_type))
- skip = TRUE;
+ skip = true;
break;
case COFF_SYMBOL_UNDEFINED:
/* Undefined symbols are left for the end. */
- global = TRUE;
- skip = TRUE;
+ global = true;
+ skip = true;
break;
case COFF_SYMBOL_LOCAL:
/* This is a local symbol. Skip it if we are discarding
local symbols. */
if (flaginfo->info->discard == discard_all && ! dont_skip_symbol)
- skip = TRUE;
+ skip = true;
break;
}
}
@@ -1559,7 +1559,7 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *flaginfo, bfd *input_bfd)
&& ((*secpp)->output_section == bfd_abs_section_ptr
|| bfd_section_removed_from_list (output_bfd,
(*secpp)->output_section)))
- skip = TRUE;
+ skip = true;
#endif
/* If we stripping debugging symbols, and this is a debugging
@@ -1580,7 +1580,7 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *flaginfo, bfd *input_bfd)
|| isym.n_sclass == C_REGPARM
|| isym.n_sclass == C_FIELD
|| isym.n_sclass == C_EOS))))
- skip = TRUE;
+ skip = true;
/* If some symbols are stripped based on the name, work out the
name and decide whether to skip this symbol. */
@@ -1593,16 +1593,16 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *flaginfo, bfd *input_bfd)
name = _bfd_coff_internal_syment_name (input_bfd, &isym, buf);
if (name == NULL)
- return FALSE;
+ return false;
if (! dont_skip_symbol
&& ((flaginfo->info->strip == strip_some
- && (bfd_hash_lookup (flaginfo->info->keep_hash, name, FALSE,
- FALSE) == NULL))
+ && (bfd_hash_lookup (flaginfo->info->keep_hash, name, false,
+ false) == NULL))
|| (! global
&& flaginfo->info->discard == discard_l
&& bfd_is_local_label_name (input_bfd, name))))
- skip = TRUE;
+ skip = true;
}
/* If this is an enum, struct, or union tag, see if we have
@@ -1626,7 +1626,7 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *flaginfo, bfd *input_bfd)
name = _bfd_coff_internal_syment_name (input_bfd, &isym, buf);
if (name == NULL)
- return FALSE;
+ return false;
/* Ignore fake names invented by compiler; treat them all as
the same name. */
@@ -1636,9 +1636,9 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *flaginfo, bfd *input_bfd)
name = "";
mh = coff_debug_merge_hash_lookup (&flaginfo->debug_merge, name,
- TRUE, TRUE);
+ true, true);
if (mh == NULL)
- return FALSE;
+ return false;
/* Allocate memory to hold type information. If this turns
out to be a duplicate, we pass this address to
@@ -1646,7 +1646,7 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *flaginfo, bfd *input_bfd)
amt = sizeof (struct coff_debug_merge_type);
mt = (struct coff_debug_merge_type *) bfd_alloc (input_bfd, amt);
if (mt == NULL)
- return FALSE;
+ return false;
mt->type_class = isym.n_sclass;
/* Pick up the aux entry, which points to the end of the tag
@@ -1674,17 +1674,17 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *flaginfo, bfd *input_bfd)
*epp = (struct coff_debug_merge_element *)
bfd_alloc (input_bfd, amt);
if (*epp == NULL)
- return FALSE;
+ return false;
elename = _bfd_coff_internal_syment_name (input_bfd, islp,
elebuf);
if (elename == NULL)
- return FALSE;
+ return false;
amt = strlen (elename) + 1;
name_copy = (char *) bfd_alloc (input_bfd, amt);
if (name_copy == NULL)
- return FALSE;
+ return false;
strcpy (name_copy, elename);
(*epp)->name = name_copy;
@@ -1767,7 +1767,7 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *flaginfo, bfd *input_bfd)
bfd_release (input_bfd, mt);
*indexp = mtl->indx;
add = (eslend - esym) / isymesz;
- skip = TRUE;
+ skip = true;
}
}
}
@@ -1790,10 +1790,10 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *flaginfo, bfd *input_bfd)
anyhow. */
name = _bfd_coff_internal_syment_name (input_bfd, &isym, NULL);
if (name == NULL)
- return FALSE;
+ return false;
indx = _bfd_stringtab_add (flaginfo->strtab, name, hash, copy);
if (indx == (bfd_size_type) -1)
- return FALSE;
+ return false;
isym._n._n_n._n_offset = STRING_SIZE_SIZE + indx;
}
@@ -1890,7 +1890,7 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *flaginfo, bfd *input_bfd)
pos += flaginfo->last_file_index * osymesz;
if (bfd_seek (output_bfd, pos, SEEK_SET) != 0
|| bfd_bwrite (outsym, osymesz, output_bfd) != osymesz)
- return FALSE;
+ return false;
}
}
@@ -1922,7 +1922,7 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *flaginfo, bfd *input_bfd)
/* This can happen if there were errors earlier in
the link. */
bfd_set_error (bfd_error_bad_value);
- return FALSE;
+ return false;
}
h->indx = output_index;
}
@@ -2018,7 +2018,7 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *flaginfo, bfd *input_bfd)
{
strings = _bfd_coff_read_string_table (input_bfd);
if (strings == NULL)
- return FALSE;
+ return false;
}
if ((bfd_size_type) auxp->x_file.x_n.x_offset >= obj_coff_strings_len (input_bfd))
filename = _("<corrupt>");
@@ -2027,7 +2027,7 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *flaginfo, bfd *input_bfd)
indx = _bfd_stringtab_add (flaginfo->strtab, filename,
hash, copy);
if (indx == (bfd_size_type) -1)
- return FALSE;
+ return false;
auxp->x_file.x_n.x_offset = STRING_SIZE_SIZE + indx;
}
}
@@ -2133,7 +2133,7 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *flaginfo, bfd *input_bfd)
if (bfd_seek (output_bfd, pos, SEEK_SET) != 0
|| (bfd_bwrite (outsym, osymesz, output_bfd)
!= osymesz))
- return FALSE;
+ return false;
}
}
@@ -2179,7 +2179,7 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *flaginfo, bfd *input_bfd)
bfd_byte *eline;
bfd_byte *elineend;
bfd_byte *oeline;
- bfd_boolean skipping;
+ bool skipping;
file_ptr pos;
bfd_size_type amt;
@@ -2199,13 +2199,13 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *flaginfo, bfd *input_bfd)
if (bfd_seek (input_bfd, o->line_filepos, SEEK_SET) != 0
|| bfd_bread (flaginfo->linenos, linesz * o->lineno_count,
input_bfd) != linesz * o->lineno_count)
- return FALSE;
+ return false;
offset = o->output_section->vma + o->output_offset - o->vma;
eline = flaginfo->linenos;
oeline = flaginfo->linenos;
elineend = eline + linesz * o->lineno_count;
- skipping = FALSE;
+ skipping = false;
for (; eline < elineend; eline += linesz)
{
struct internal_lineno iline;
@@ -2231,7 +2231,7 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *flaginfo, bfd *input_bfd)
with symbol #0) will fail. We can't regain
the space in the output file, but at least
they're dense. */
- skipping = TRUE;
+ skipping = true;
}
else
{
@@ -2270,7 +2270,7 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *flaginfo, bfd *input_bfd)
is.n_numaux, auxptr);
}
- skipping = FALSE;
+ skipping = false;
}
iline.l_addr.l_symndx = indx;
@@ -2288,7 +2288,7 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *flaginfo, bfd *input_bfd)
amt = oeline - flaginfo->linenos;
if (bfd_seek (output_bfd, pos, SEEK_SET) != 0
|| bfd_bwrite (flaginfo->linenos, amt, output_bfd) != amt)
- return FALSE;
+ return false;
o->output_section->lineno_count += amt / linesz;
}
@@ -2318,7 +2318,7 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *flaginfo, bfd *input_bfd)
amt = outsym - flaginfo->outsyms;
if (bfd_seek (output_bfd, pos, SEEK_SET) != 0
|| bfd_bwrite (flaginfo->outsyms, amt, output_bfd) != amt)
- return FALSE;
+ return false;
BFD_ASSERT ((obj_raw_syment_count (output_bfd)
+ (outsym - flaginfo->outsyms) / osymesz)
@@ -2352,7 +2352,7 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *flaginfo, bfd *input_bfd)
(_("%pB: relocs in section `%pA', but it has no contents"),
input_bfd, o);
bfd_set_error (bfd_error_no_contents);
- return FALSE;
+ return false;
}
continue;
@@ -2365,7 +2365,7 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *flaginfo, bfd *input_bfd)
{
contents = flaginfo->contents;
if (! bfd_get_full_section_contents (input_bfd, o, &contents))
- return FALSE;
+ return false;
}
if ((o->flags & SEC_RELOC) != 0)
@@ -2377,7 +2377,7 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *flaginfo, bfd *input_bfd)
/* Read in the relocs. */
target_index = o->output_section->target_index;
internal_relocs = (_bfd_coff_read_internal_relocs
- (input_bfd, o, FALSE, flaginfo->external_relocs,
+ (input_bfd, o, false, flaginfo->external_relocs,
bfd_link_relocatable (flaginfo->info),
(bfd_link_relocatable (flaginfo->info)
? (flaginfo->section_info[target_index].relocs
@@ -2385,7 +2385,7 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *flaginfo, bfd *input_bfd)
: flaginfo->internal_relocs)));
if (internal_relocs == NULL
&& o->reloc_count > 0)
- return FALSE;
+ return false;
/* Run through the relocs looking for relocs against symbols
coming from discarded sections and complain about them. */
@@ -2425,7 +2425,7 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *flaginfo, bfd *input_bfd)
internal_relocs,
flaginfo->internal_syms,
flaginfo->sec_ptrs))
- return FALSE;
+ return false;
if (bfd_link_relocatable (flaginfo->info))
{
@@ -2441,7 +2441,7 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *flaginfo, bfd *input_bfd)
for (; irel < irelend; irel++, rel_hash++)
{
struct coff_link_hash_entry *h;
- bfd_boolean adjusted;
+ bool adjusted;
*rel_hash = NULL;
@@ -2456,7 +2456,7 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *flaginfo, bfd *input_bfd)
if (! (*adjust_symndx) (output_bfd, flaginfo->info,
input_bfd, o, irel,
&adjusted))
- return FALSE;
+ return false;
if (adjusted)
continue;
}
@@ -2501,7 +2501,7 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *flaginfo, bfd *input_bfd)
name = (_bfd_coff_internal_syment_name
(input_bfd, is, buf));
if (name == NULL)
- return FALSE;
+ return false;
(*flaginfo->info->callbacks->unattached_reloc)
(flaginfo->info, name, input_bfd, o, irel->r_vaddr);
@@ -2520,27 +2520,27 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *flaginfo, bfd *input_bfd)
* bfd_octets_per_byte (output_bfd, o));
if (! bfd_set_section_contents (output_bfd, o->output_section,
contents, loc, o->size))
- return FALSE;
+ return false;
}
else
{
if (! (_bfd_write_section_stabs
(output_bfd, &coff_hash_table (flaginfo->info)->stab_info,
o, &secdata->stab_info, contents)))
- return FALSE;
+ return false;
}
}
if (! flaginfo->info->keep_memory
&& ! _bfd_coff_free_symbols (input_bfd))
- return FALSE;
+ return false;
- return TRUE;
+ return true;
}
/* Write out a global symbol. Called via bfd_hash_traverse. */
-bfd_boolean
+bool
_bfd_coff_write_global_sym (struct bfd_hash_entry *bh, void *data)
{
struct coff_link_hash_entry *h = (struct coff_link_hash_entry *) bh;
@@ -2557,19 +2557,19 @@ _bfd_coff_write_global_sym (struct bfd_hash_entry *bh, void *data)
{
h = (struct coff_link_hash_entry *) h->root.u.i.link;
if (h->root.type == bfd_link_hash_new)
- return TRUE;
+ return true;
}
if (h->indx >= 0)
- return TRUE;
+ return true;
if (h->indx != -2
&& (flaginfo->info->strip == strip_all
|| (flaginfo->info->strip == strip_some
&& (bfd_hash_lookup (flaginfo->info->keep_hash,
- h->root.root.string, FALSE, FALSE)
+ h->root.root.string, false, false)
== NULL))))
- return TRUE;
+ return true;
switch (h->root.type)
{
@@ -2577,11 +2577,11 @@ _bfd_coff_write_global_sym (struct bfd_hash_entry *bh, void *data)
case bfd_link_hash_new:
case bfd_link_hash_warning:
abort ();
- return FALSE;
+ return false;
case bfd_link_hash_undefined:
if (h->indx == -3)
- return TRUE;
+ return true;
/* Fall through. */
case bfd_link_hash_undefweak:
isym.n_scnum = N_UNDEF;
@@ -2610,7 +2610,7 @@ _bfd_coff_write_global_sym (struct bfd_hash_entry *bh, void *data)
(_("%pB: stripping non-representable symbol '%s' (value "
"%" BFD_VMA_FMT "x)"),
output_bfd, h->root.root.string, isym.n_value);
- return TRUE;
+ return true;
}
#endif
}
@@ -2623,25 +2623,25 @@ _bfd_coff_write_global_sym (struct bfd_hash_entry *bh, void *data)
case bfd_link_hash_indirect:
/* Just ignore these. They can't be handled anyhow. */
- return TRUE;
+ return true;
}
if (strlen (h->root.root.string) <= SYMNMLEN)
strncpy (isym._n._n_name, h->root.root.string, SYMNMLEN);
else
{
- bfd_boolean hash;
+ bool hash;
bfd_size_type indx;
- hash = TRUE;
+ hash = true;
if (flaginfo->info->traditional_format)
- hash = FALSE;
+ hash = false;
indx = _bfd_stringtab_add (flaginfo->strtab, h->root.root.string, hash,
- FALSE);
+ false);
if (indx == (bfd_size_type) -1)
{
- flaginfo->failed = TRUE;
- return FALSE;
+ flaginfo->failed = true;
+ return false;
}
isym._n._n_n._n_zeroes = 0;
isym._n._n_n._n_offset = STRING_SIZE_SIZE + indx;
@@ -2660,7 +2660,7 @@ _bfd_coff_write_global_sym (struct bfd_hash_entry *bh, void *data)
if (flaginfo->global_to_static)
{
if (! IS_EXTERNAL (output_bfd, isym))
- return TRUE;
+ return true;
isym.n_sclass = C_STAT;
}
@@ -2684,8 +2684,8 @@ _bfd_coff_write_global_sym (struct bfd_hash_entry *bh, void *data)
if (bfd_seek (output_bfd, pos, SEEK_SET) != 0
|| bfd_bwrite (flaginfo->outsyms, symesz, output_bfd) != symesz)
{
- flaginfo->failed = TRUE;
- return FALSE;
+ flaginfo->failed = true;
+ return false;
}
h->indx = obj_raw_syment_count (output_bfd);
@@ -2749,25 +2749,25 @@ _bfd_coff_write_global_sym (struct bfd_hash_entry *bh, void *data)
flaginfo->outsyms);
if (bfd_bwrite (flaginfo->outsyms, symesz, output_bfd) != symesz)
{
- flaginfo->failed = TRUE;
- return FALSE;
+ flaginfo->failed = true;
+ return false;
}
++obj_raw_syment_count (output_bfd);
}
- return TRUE;
+ return true;
}
/* Write out task global symbols, converting them to statics. Called
via coff_link_hash_traverse. Calls bfd_coff_write_global_sym to do
the dirty work, if the symbol we are processing needs conversion. */
-bfd_boolean
+bool
_bfd_coff_write_task_globals (struct coff_link_hash_entry *h, void *data)
{
struct coff_final_link_info *flaginfo = (struct coff_final_link_info *) data;
- bfd_boolean rtnval = TRUE;
- bfd_boolean save_global_to_static;
+ bool rtnval = true;
+ bool save_global_to_static;
if (h->root.type == bfd_link_hash_warning)
h = (struct coff_link_hash_entry *) h->root.u.i.link;
@@ -2779,7 +2779,7 @@ _bfd_coff_write_task_globals (struct coff_link_hash_entry *h, void *data)
case bfd_link_hash_defined:
case bfd_link_hash_defweak:
save_global_to_static = flaginfo->global_to_static;
- flaginfo->global_to_static = TRUE;
+ flaginfo->global_to_static = true;
rtnval = _bfd_coff_write_global_sym (&h->root.root, data);
flaginfo->global_to_static = save_global_to_static;
break;
@@ -2792,7 +2792,7 @@ _bfd_coff_write_task_globals (struct coff_link_hash_entry *h, void *data)
/* Handle a link order which is supposed to generate a reloc. */
-bfd_boolean
+bool
_bfd_coff_reloc_link_order (bfd *output_bfd,
struct coff_final_link_info *flaginfo,
asection *output_section,
@@ -2806,7 +2806,7 @@ _bfd_coff_reloc_link_order (bfd *output_bfd,
if (howto == NULL)
{
bfd_set_error (bfd_error_bad_value);
- return FALSE;
+ return false;
}
if (link_order->u.reloc.p->addend != 0)
@@ -2814,13 +2814,13 @@ _bfd_coff_reloc_link_order (bfd *output_bfd,
bfd_size_type size;
bfd_byte *buf;
bfd_reloc_status_type rstat;
- bfd_boolean ok;
+ bool ok;
file_ptr loc;
size = bfd_get_reloc_size (howto);
buf = (bfd_byte *) bfd_zmalloc (size);
if (buf == NULL && size != 0)
- return FALSE;
+ return false;
rstat = _bfd_relocate_contents (howto, output_bfd,
(bfd_vma) link_order->u.reloc.p->addend,
@@ -2848,7 +2848,7 @@ _bfd_coff_reloc_link_order (bfd *output_bfd,
loc, size);
free (buf);
if (! ok)
- return FALSE;
+ return false;
}
/* Store the reloc information in the right place. It will get
@@ -2880,7 +2880,7 @@ _bfd_coff_reloc_link_order (bfd *output_bfd,
h = ((struct coff_link_hash_entry *)
bfd_wrapped_link_hash_lookup (output_bfd, flaginfo->info,
link_order->u.reloc.p->u.name,
- FALSE, FALSE, TRUE));
+ false, false, true));
if (h != NULL)
{
if (h->indx >= 0)
@@ -2912,13 +2912,13 @@ _bfd_coff_reloc_link_order (bfd *output_bfd,
/* FIXME: What is the right value for r_offset? Is zero OK? */
++output_section->reloc_count;
- return TRUE;
+ return true;
}
/* A basic reloc handling routine which may be used by processors with
simple relocs. */
-bfd_boolean
+bool
_bfd_coff_generic_relocate_section (bfd *output_bfd,
struct bfd_link_info *info,
bfd *input_bfd,
@@ -2957,7 +2957,7 @@ _bfd_coff_generic_relocate_section (bfd *output_bfd,
_bfd_error_handler
/* xgettext: c-format */
(_("%pB: illegal symbol index %ld in relocs"), input_bfd, symndx);
- return FALSE;
+ return false;
}
else
{
@@ -2977,7 +2977,7 @@ _bfd_coff_generic_relocate_section (bfd *output_bfd,
howto = bfd_coff_rtype_to_howto (input_bfd, input_section, rel, h,
sym, &addend);
if (howto == NULL)
- return FALSE;
+ return false;
/* If we are doing a relocatable link, then we can just ignore
a PC relative reloc that is pcrel_offset. It will already
@@ -3067,7 +3067,7 @@ _bfd_coff_generic_relocate_section (bfd *output_bfd,
{
(*info->callbacks->undefined_symbol)
(info, h->root.root.string, input_bfd, input_section,
- rel->r_vaddr - input_section->vma, TRUE);
+ rel->r_vaddr - input_section->vma, true);
/* Stop the linker from issueing errors about truncated relocs
referencing this undefined symbol by giving it an address
that should be in range. */
@@ -3105,7 +3105,7 @@ _bfd_coff_generic_relocate_section (bfd *output_bfd,
!= sizeof (bfd_vma))
{
bfd_set_error (bfd_error_system_call);
- return FALSE;
+ return false;
}
}
}
@@ -3126,7 +3126,7 @@ _bfd_coff_generic_relocate_section (bfd *output_bfd,
/* xgettext: c-format */
(_("%pB: bad reloc address %#" PRIx64 " in section `%pA'"),
input_bfd, (uint64_t) rel->r_vaddr, input_section);
- return FALSE;
+ return false;
case bfd_reloc_overflow:
{
const char *name;
@@ -3140,7 +3140,7 @@ _bfd_coff_generic_relocate_section (bfd *output_bfd,
{
name = _bfd_coff_internal_syment_name (input_bfd, sym, buf);
if (name == NULL)
- return FALSE;
+ return false;
}
(*info->callbacks->reloc_overflow)
@@ -3150,5 +3150,5 @@ _bfd_coff_generic_relocate_section (bfd *output_bfd,
}
}
}
- return TRUE;
+ return true;
}