aboutsummaryrefslogtreecommitdiff
path: root/bfd/ecofflink.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/ecofflink.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/ecofflink.c')
-rw-r--r--bfd/ecofflink.c218
1 files changed, 109 insertions, 109 deletions
diff --git a/bfd/ecofflink.c b/bfd/ecofflink.c
index ef3bce7..9f72409 100644
--- a/bfd/ecofflink.c
+++ b/bfd/ecofflink.c
@@ -240,7 +240,7 @@ _bfd_ecoff_swap_rndx_out (int bigend,
/* Add bytes to a buffer. Return success. */
-static bfd_boolean
+static bool
ecoff_add_bytes (char **buf, char **bufend, size_t need)
{
size_t have;
@@ -258,10 +258,10 @@ ecoff_add_bytes (char **buf, char **bufend, size_t need)
}
newbuf = (char *) bfd_realloc (*buf, (bfd_size_type) have + want);
if (newbuf == NULL)
- return FALSE;
+ return false;
*buf = newbuf;
*bufend = *buf + have + want;
- return TRUE;
+ return true;
}
/* We keep a hash table which maps strings to numbers. We use it to
@@ -330,7 +330,7 @@ struct shuffle
/* The length of the information. */
unsigned long size;
/* Whether this information comes from a file or not. */
- bfd_boolean filep;
+ bool filep;
union
{
struct
@@ -383,7 +383,7 @@ struct accumulate
/* Add a file entry to a shuffle list. */
-static bfd_boolean
+static bool
add_file_shuffle (struct accumulate *ainfo,
struct shuffle **head,
struct shuffle **tail,
@@ -402,7 +402,7 @@ add_file_shuffle (struct accumulate *ainfo,
(*tail)->size += size;
if ((*tail)->size > ainfo->largest_file_shuffle)
ainfo->largest_file_shuffle = (*tail)->size;
- return TRUE;
+ return true;
}
n = (struct shuffle *) objalloc_alloc (ainfo->memory,
@@ -410,11 +410,11 @@ add_file_shuffle (struct accumulate *ainfo,
if (!n)
{
bfd_set_error (bfd_error_no_memory);
- return FALSE;
+ return false;
}
n->next = NULL;
n->size = size;
- n->filep = TRUE;
+ n->filep = true;
n->u.file.input_bfd = input_bfd;
n->u.file.offset = offset;
if (*head == (struct shuffle *) NULL)
@@ -424,12 +424,12 @@ add_file_shuffle (struct accumulate *ainfo,
*tail = n;
if (size > ainfo->largest_file_shuffle)
ainfo->largest_file_shuffle = size;
- return TRUE;
+ return true;
}
/* Add a memory entry to a shuffle list. */
-static bfd_boolean
+static bool
add_memory_shuffle (struct accumulate *ainfo,
struct shuffle **head,
struct shuffle **tail,
@@ -443,18 +443,18 @@ add_memory_shuffle (struct accumulate *ainfo,
if (!n)
{
bfd_set_error (bfd_error_no_memory);
- return FALSE;
+ return false;
}
n->next = NULL;
n->size = size;
- n->filep = FALSE;
+ n->filep = false;
n->u.memory = data;
if (*head == (struct shuffle *) NULL)
*head = n;
if (*tail != (struct shuffle *) NULL)
(*tail)->next = n;
*tail = n;
- return TRUE;
+ return true;
}
/* Initialize the FDR hash table. This returns a handle which is then
@@ -546,7 +546,7 @@ bfd_ecoff_debug_free (void * handle,
linker information structure. HANDLE is returned by
bfd_ecoff_debug_init. */
-bfd_boolean
+bool
bfd_ecoff_debug_accumulate (void * handle,
bfd *output_bfd,
struct ecoff_debug_info *output_debug,
@@ -639,10 +639,10 @@ bfd_ecoff_debug_accumulate (void * handle,
if (!input_debug->ifdmap || !rfd_out)
{
bfd_set_error (bfd_error_no_memory);
- return FALSE;
+ return false;
}
if (!add_memory_shuffle (ainfo, &ainfo->rfd, &ainfo->rfd_end, rfd_out, sz))
- return FALSE;
+ return false;
copied = 0;
@@ -683,14 +683,14 @@ bfd_ecoff_debug_accumulate (void * handle,
lookup = (char *) bfd_malloc ((bfd_size_type) strlen (name) + 20);
if (lookup == NULL)
- return FALSE;
+ return false;
sprintf (lookup, "%s %lx %lx", name, (unsigned long) fdr.csym,
(unsigned long) fdr.caux);
- fh = string_hash_lookup (&ainfo->fdr_hash, lookup, TRUE, TRUE);
+ fh = string_hash_lookup (&ainfo->fdr_hash, lookup, true, true);
free (lookup);
if (fh == (struct string_hash_entry *) NULL)
- return FALSE;
+ return false;
if (fh->val != -1)
{
@@ -740,10 +740,10 @@ bfd_ecoff_debug_accumulate (void * handle,
if (!fdr_out)
{
bfd_set_error (bfd_error_no_memory);
- return FALSE;
+ return false;
}
if (!add_memory_shuffle (ainfo, &ainfo->fdr, &ainfo->fdr_end, fdr_out, sz))
- return FALSE;
+ return false;
for (fdr_ptr = fdr_start, i = 0;
fdr_ptr < fdr_end;
fdr_ptr += fdr_add, i++)
@@ -752,7 +752,7 @@ bfd_ecoff_debug_accumulate (void * handle,
bfd_byte *sym_out;
bfd_byte *lraw_src;
bfd_byte *lraw_end;
- bfd_boolean fgotfilename;
+ bool fgotfilename;
if (input_debug->ifdmap[i] < output_symhdr->ifdMax)
{
@@ -772,17 +772,17 @@ bfd_ecoff_debug_accumulate (void * handle,
/* Swap in the local symbols, adjust their values, and swap them
out again. */
- fgotfilename = FALSE;
+ fgotfilename = false;
sz = fdr.csym * external_sym_size;
sym_out = (bfd_byte *) objalloc_alloc (ainfo->memory, sz);
if (!sym_out)
{
bfd_set_error (bfd_error_no_memory);
- return FALSE;
+ return false;
}
if (!add_memory_shuffle (ainfo, &ainfo->sym, &ainfo->sym_end, sym_out,
sz))
- return FALSE;
+ return false;
lraw_src = ((bfd_byte *) input_debug->external_sym
+ fdr.isymBase * input_swap->external_sym_size);
lraw_end = lraw_src + fdr.csym * input_swap->external_sym_size;
@@ -821,13 +821,13 @@ bfd_ecoff_debug_accumulate (void * handle,
prevent us from easily merging different FDR's. */
if (! bfd_link_relocatable (info))
{
- bfd_boolean ffilename;
+ bool ffilename;
const char *name;
if (! fgotfilename && internal_sym.iss == fdr.rss)
- ffilename = TRUE;
+ ffilename = true;
else
- ffilename = FALSE;
+ ffilename = false;
/* Hash the name into the string table. */
name = input_debug->ss + fdr.issBase + internal_sym.iss;
@@ -837,9 +837,9 @@ bfd_ecoff_debug_accumulate (void * handle,
{
struct string_hash_entry *sh;
- sh = string_hash_lookup (&ainfo->str_hash, name, TRUE, TRUE);
+ sh = string_hash_lookup (&ainfo->str_hash, name, true, true);
if (sh == (struct string_hash_entry *) NULL)
- return FALSE;
+ return false;
if (sh->val == -1)
{
sh->val = output_symhdr->issMax;
@@ -857,7 +857,7 @@ bfd_ecoff_debug_accumulate (void * handle,
if (ffilename)
{
fdr.rss = internal_sym.iss;
- fgotfilename = TRUE;
+ fgotfilename = true;
}
}
@@ -879,7 +879,7 @@ bfd_ecoff_debug_accumulate (void * handle,
file_ptr pos = input_symhdr->cbLineOffset + fdr.cbLineOffset;
if (!add_file_shuffle (ainfo, &ainfo->line, &ainfo->line_end,
input_bfd, pos, (unsigned long) fdr.cbLine))
- return FALSE;
+ return false;
fdr.ilineBase = output_symhdr->ilineMax;
fdr.cbLineOffset = output_symhdr->cbLine;
output_symhdr->ilineMax += fdr.cline;
@@ -892,7 +892,7 @@ bfd_ecoff_debug_accumulate (void * handle,
if (!add_file_shuffle (ainfo, &ainfo->aux, &ainfo->aux_end,
input_bfd, pos,
fdr.caux * sizeof (union aux_ext)))
- return FALSE;
+ return false;
fdr.iauxBase = output_symhdr->iauxMax;
output_symhdr->iauxMax += fdr.caux;
}
@@ -911,7 +911,7 @@ bfd_ecoff_debug_accumulate (void * handle,
file_ptr pos = input_symhdr->cbSsOffset + fdr.issBase;
if (!add_file_shuffle (ainfo, &ainfo->ss, &ainfo->ss_end,
input_bfd, pos, (unsigned long) fdr.cbSs))
- return FALSE;
+ return false;
fdr.issBase = output_symhdr->issMax;
output_symhdr->issMax += fdr.cbSs;
}
@@ -930,7 +930,7 @@ bfd_ecoff_debug_accumulate (void * handle,
unsigned long size = fdr.cpd * external_pdr_size;
if (!add_file_shuffle (ainfo, &ainfo->pdr, &ainfo->pdr_end,
input_bfd, pos, size))
- return FALSE;
+ return false;
}
BFD_ASSERT (external_opt_size == input_swap->external_opt_size);
if (fdr.copt > 0)
@@ -940,7 +940,7 @@ bfd_ecoff_debug_accumulate (void * handle,
unsigned long size = fdr.copt * external_opt_size;
if (!add_file_shuffle (ainfo, &ainfo->opt, &ainfo->opt_end,
input_bfd, pos, size))
- return FALSE;
+ return false;
}
}
else
@@ -963,11 +963,11 @@ bfd_ecoff_debug_accumulate (void * handle,
if (!out)
{
bfd_set_error (bfd_error_no_memory);
- return FALSE;
+ return false;
}
if (!add_memory_shuffle (ainfo, &ainfo->pdr, &ainfo->pdr_end, out,
sz))
- return FALSE;
+ return false;
for (; in < end; in += insz, out += outsz)
{
PDR pdr;
@@ -987,11 +987,11 @@ bfd_ecoff_debug_accumulate (void * handle,
if (!out)
{
bfd_set_error (bfd_error_no_memory);
- return FALSE;
+ return false;
}
if (!add_memory_shuffle (ainfo, &ainfo->opt, &ainfo->opt_end, out,
sz))
- return FALSE;
+ return false;
for (; in < end; in += insz, out += outsz)
{
OPTR opt;
@@ -1023,7 +1023,7 @@ bfd_ecoff_debug_accumulate (void * handle,
++output_symhdr->ifdMax;
}
- return TRUE;
+ return true;
}
/* Add a string to the debugging information we are accumulating.
@@ -1055,7 +1055,7 @@ ecoff_add_string (struct accumulate *ainfo,
{
struct string_hash_entry *sh;
- sh = string_hash_lookup (&ainfo->str_hash, string, TRUE, TRUE);
+ sh = string_hash_lookup (&ainfo->str_hash, string, true, true);
if (sh == (struct string_hash_entry *) NULL)
return -1;
if (sh->val == -1)
@@ -1077,7 +1077,7 @@ ecoff_add_string (struct accumulate *ainfo,
/* Add debugging information from a non-ECOFF file. */
-bfd_boolean
+bool
bfd_ecoff_debug_accumulate_other (void * handle,
bfd *output_bfd,
struct ecoff_debug_info *output_debug,
@@ -1114,19 +1114,19 @@ bfd_ecoff_debug_accumulate_other (void * handle,
fdr.rss = ecoff_add_string (ainfo, info, output_debug, &fdr,
bfd_get_filename (input_bfd));
if (fdr.rss == -1)
- return FALSE;
+ return false;
fdr.isymBase = output_symhdr->isymMax;
/* Get the local symbols from the input BFD. */
symsize = bfd_get_symtab_upper_bound (input_bfd);
if (symsize < 0)
- return FALSE;
+ return false;
symbols = (asymbol **) bfd_alloc (output_bfd, (bfd_size_type) symsize);
if (symbols == (asymbol **) NULL)
- return FALSE;
+ return false;
symcount = bfd_canonicalize_symtab (input_bfd, symbols);
if (symcount < 0)
- return FALSE;
+ return false;
sym_end = symbols + symcount;
/* Handle the local symbols. Any external symbols are handled
@@ -1144,7 +1144,7 @@ bfd_ecoff_debug_accumulate_other (void * handle,
(*sym_ptr)->name);
if (internal_sym.iss == -1)
- return FALSE;
+ return false;
if (bfd_is_com_section ((*sym_ptr)->section)
|| bfd_is_und_section ((*sym_ptr)->section))
internal_sym.value = (*sym_ptr)->value;
@@ -1161,7 +1161,7 @@ bfd_ecoff_debug_accumulate_other (void * handle,
if (!external_sym)
{
bfd_set_error (bfd_error_no_memory);
- return FALSE;
+ return false;
}
(*swap_sym_out) (output_bfd, &internal_sym, external_sym);
add_memory_shuffle (ainfo, &ainfo->sym, &ainfo->sym_end,
@@ -1182,7 +1182,7 @@ bfd_ecoff_debug_accumulate_other (void * handle,
if (!external_fdr)
{
bfd_set_error (bfd_error_no_memory);
- return FALSE;
+ return false;
}
(*output_swap->swap_fdr_out) (output_bfd, &fdr, external_fdr);
add_memory_shuffle (ainfo, &ainfo->fdr, &ainfo->fdr_end,
@@ -1191,7 +1191,7 @@ bfd_ecoff_debug_accumulate_other (void * handle,
++output_symhdr->ifdMax;
- return TRUE;
+ return true;
}
/* Set up ECOFF debugging information for the external symbols.
@@ -1199,12 +1199,12 @@ bfd_ecoff_debug_accumulate_other (void * handle,
probably be changed to use a shuffle structure. The assembler uses
this interface, so that must be changed to do something else. */
-bfd_boolean
+bool
bfd_ecoff_debug_externals (bfd *abfd,
struct ecoff_debug_info *debug,
const struct ecoff_debug_swap *swap,
- bfd_boolean relocatable,
- bfd_boolean (*get_extr) (asymbol *, EXTR *),
+ bool relocatable,
+ bool (*get_extr) (asymbol *, EXTR *),
void (*set_index) (asymbol *, bfd_size_type))
{
HDRR * const symhdr = &debug->symbolic_header;
@@ -1213,7 +1213,7 @@ bfd_ecoff_debug_externals (bfd *abfd,
sym_ptr_ptr = bfd_get_outsymbols (abfd);
if (sym_ptr_ptr == NULL)
- return TRUE;
+ return true;
for (c = bfd_get_symcount (abfd); c > 0; c--, sym_ptr_ptr++)
{
@@ -1258,15 +1258,15 @@ bfd_ecoff_debug_externals (bfd *abfd,
if (! bfd_ecoff_debug_one_external (abfd, debug, swap,
sym_ptr->name, &esym))
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
/* Add a single external symbol to the debugging information. */
-bfd_boolean
+bool
bfd_ecoff_debug_one_external (bfd *abfd,
struct ecoff_debug_info *debug,
const struct ecoff_debug_swap *swap,
@@ -1287,7 +1287,7 @@ bfd_ecoff_debug_one_external (bfd *abfd,
if (! ecoff_add_bytes ((char **) &debug->ssext,
(char **) &debug->ssext_end,
symhdr->issExtMax + namelen + 1))
- return FALSE;
+ return false;
}
if ((size_t) ((char *) debug->external_ext_end
- (char *) debug->external_ext)
@@ -1298,7 +1298,7 @@ bfd_ecoff_debug_one_external (bfd *abfd,
if (! ecoff_add_bytes ((char **) &external_ext,
(char **) &external_ext_end,
(symhdr->iextMax + 1) * (size_t) external_ext_size))
- return FALSE;
+ return false;
debug->external_ext = external_ext;
debug->external_ext_end = external_ext_end;
}
@@ -1314,7 +1314,7 @@ bfd_ecoff_debug_one_external (bfd *abfd,
strcpy (debug->ssext + symhdr->issExtMax, name);
symhdr->issExtMax += namelen + 1;
- return TRUE;
+ return true;
}
/* Align the ECOFF debugging information. */
@@ -1413,7 +1413,7 @@ bfd_ecoff_debug_size (bfd *abfd,
going to be placed at. This assumes that the counts are set
correctly. */
-static bfd_boolean
+static bool
ecoff_write_symhdr (bfd *abfd,
struct ecoff_debug_info *debug,
const struct ecoff_debug_swap *swap,
@@ -1426,7 +1426,7 @@ ecoff_write_symhdr (bfd *abfd,
/* Go to the right location in the file. */
if (bfd_seek (abfd, where, SEEK_SET) != 0)
- return FALSE;
+ return false;
where += swap->external_hdr_size;
@@ -1465,10 +1465,10 @@ ecoff_write_symhdr (bfd *abfd,
goto error_return;
free (buff);
- return TRUE;
+ return true;
error_return:
free (buff);
- return FALSE;
+ return false;
}
/* Write out the ECOFF debugging information. This function assumes
@@ -1477,7 +1477,7 @@ ecoff_write_symhdr (bfd *abfd,
information to. This function fills in the file offsets in the
symbolic header. */
-bfd_boolean
+bool
bfd_ecoff_write_debug (bfd *abfd,
struct ecoff_debug_info *debug,
const struct ecoff_debug_swap *swap,
@@ -1486,7 +1486,7 @@ bfd_ecoff_write_debug (bfd *abfd,
HDRR * const symhdr = &debug->symbolic_header;
if (! ecoff_write_symhdr (abfd, debug, swap, where))
- return FALSE;
+ return false;
#define WRITE(ptr, count, size, offset) \
BFD_ASSERT (symhdr->offset == 0 \
@@ -1495,7 +1495,7 @@ bfd_ecoff_write_debug (bfd *abfd,
&& bfd_bwrite (debug->ptr, \
(bfd_size_type) size * symhdr->count, \
abfd) != size * symhdr->count) \
- return FALSE;
+ return false;
WRITE (line, cbLine, sizeof (unsigned char), cbLineOffset);
WRITE (external_dnr, idnMax, swap->external_dnr_size, cbDnOffset);
@@ -1511,13 +1511,13 @@ bfd_ecoff_write_debug (bfd *abfd,
WRITE (external_ext, iextMax, swap->external_ext_size, cbExtOffset);
#undef WRITE
- return TRUE;
+ return true;
}
/* Write out a shuffle list. */
-static bfd_boolean
+static bool
ecoff_write_shuffle (bfd *abfd,
const struct ecoff_debug_swap *swap,
struct shuffle *shuffle,
@@ -1533,7 +1533,7 @@ ecoff_write_shuffle (bfd *abfd,
{
if (bfd_bwrite (l->u.memory, (bfd_size_type) l->size, abfd)
!= l->size)
- return FALSE;
+ return false;
}
else
{
@@ -1541,7 +1541,7 @@ ecoff_write_shuffle (bfd *abfd,
|| bfd_bread (space, (bfd_size_type) l->size,
l->u.file.input_bfd) != l->size
|| bfd_bwrite (space, (bfd_size_type) l->size, abfd) != l->size)
- return FALSE;
+ return false;
}
total += l->size;
}
@@ -1554,23 +1554,23 @@ ecoff_write_shuffle (bfd *abfd,
i = swap->debug_align - (total & (swap->debug_align - 1));
s = (bfd_byte *) bfd_zmalloc ((bfd_size_type) i);
if (s == NULL && i != 0)
- return FALSE;
+ return false;
if (bfd_bwrite (s, (bfd_size_type) i, abfd) != i)
{
free (s);
- return FALSE;
+ return false;
}
free (s);
}
- return TRUE;
+ return true;
}
/* Write out debugging information using accumulated linker
information. */
-bfd_boolean
+bool
bfd_ecoff_write_accumulated_debug (void * handle,
bfd *abfd,
struct ecoff_debug_info *debug,
@@ -1686,11 +1686,11 @@ bfd_ecoff_write_accumulated_debug (void * handle,
goto error_return;
free (space);
- return TRUE;
+ return true;
error_return:
free (space);
- return FALSE;
+ return false;
}
/* Handle the find_nearest_line function for both ECOFF and MIPS ELF
@@ -1719,7 +1719,7 @@ cmp_fdrtab_entry (const void * leftp, const void * rightp)
table will be sorted by address so we can look it up via binary
search. */
-static bfd_boolean
+static bool
mk_fdrtab (bfd *abfd,
struct ecoff_debug_info * const debug_info,
const struct ecoff_debug_swap * const debug_swap,
@@ -1729,7 +1729,7 @@ mk_fdrtab (bfd *abfd,
FDR *fdr_ptr;
FDR *fdr_start;
FDR *fdr_end;
- bfd_boolean stabs;
+ bool stabs;
long len;
bfd_size_type amt;
@@ -1748,7 +1748,7 @@ mk_fdrtab (bfd *abfd,
amt = (bfd_size_type) len * sizeof (struct ecoff_fdrtab_entry);
line_info->fdrtab = (struct ecoff_fdrtab_entry*) bfd_zalloc (abfd, amt);
if (line_info->fdrtab == NULL)
- return FALSE;
+ return false;
line_info->fdrtab_len = len;
tab = line_info->fdrtab;
@@ -1760,7 +1760,7 @@ mk_fdrtab (bfd *abfd,
/* Check whether this file has stabs debugging information. In
a file with stabs debugging information, the second local
symbol is named @stabs. */
- stabs = FALSE;
+ stabs = false;
if (fdr_ptr->csym >= 2)
{
char *sym_ptr;
@@ -1771,7 +1771,7 @@ mk_fdrtab (bfd *abfd,
(*debug_swap->swap_sym_in) (abfd, sym_ptr, &sym);
if (strcmp (debug_info->ss + fdr_ptr->issBase + sym.iss,
STABS_SYMBOL) == 0)
- stabs = TRUE;
+ stabs = true;
}
if (!stabs)
@@ -1805,7 +1805,7 @@ mk_fdrtab (bfd *abfd,
qsort (line_info->fdrtab, (size_t) len,
sizeof (struct ecoff_fdrtab_entry), cmp_fdrtab_entry);
- return TRUE;
+ return true;
}
/* Return index of first FDR that covers to OFFSET. */
@@ -1858,7 +1858,7 @@ fdrtab_lookup (struct ecoff_find_line *line_info, bfd_vma offset)
/* Look up a line given an address, storing the information in
LINE_INFO->cache. */
-static bfd_boolean
+static bool
lookup_line (bfd *abfd,
struct ecoff_debug_info * const debug_info,
const struct ecoff_debug_swap * const debug_swap,
@@ -1866,7 +1866,7 @@ lookup_line (bfd *abfd,
{
struct ecoff_fdrtab_entry *tab;
bfd_vma offset;
- bfd_boolean stabs;
+ bool stabs;
FDR *fdr_ptr;
int i;
@@ -1877,14 +1877,14 @@ lookup_line (bfd *abfd,
don't have it already. */
if (line_info->fdrtab == NULL
&& !mk_fdrtab (abfd, debug_info, debug_swap, line_info))
- return FALSE;
+ return false;
tab = line_info->fdrtab;
/* Find first FDR for address OFFSET. */
i = fdrtab_lookup (line_info, offset);
if (i < 0)
- return FALSE; /* no FDR, no fun... */
+ return false; /* no FDR, no fun... */
/* eraxxon: 'fdrtab_lookup' doesn't give what we want, at least for Compaq's
C++ compiler 6.2. Consider three FDRs with starting addresses of x, y,
@@ -1960,7 +1960,7 @@ lookup_line (bfd *abfd,
/* Check whether this file has stabs debugging information. In a
file with stabs debugging information, the second local symbol is
named @stabs. */
- stabs = FALSE;
+ stabs = false;
if (fdr_ptr->csym >= 2)
{
char *sym_ptr;
@@ -1971,7 +1971,7 @@ lookup_line (bfd *abfd,
(*debug_swap->swap_sym_in) (abfd, sym_ptr, &sym);
if (strcmp (debug_info->ss + fdr_ptr->issBase + sym.iss,
STABS_SYMBOL) == 0)
- stabs = TRUE;
+ stabs = true;
}
if (!stabs)
@@ -2106,7 +2106,7 @@ lookup_line (bfd *abfd,
while (++i < line_info->fdrtab_len);
if (!best_fdr || !best_pdr)
- return FALSE; /* Shouldn't happen... */
+ return false; /* Shouldn't happen... */
/* Phew, finally we got something that we can hold onto. */
fdr_ptr = best_fdr;
@@ -2199,8 +2199,8 @@ lookup_line (bfd *abfd,
const char *line_file_name;
bfd_vma low_func_vma;
bfd_vma low_line_vma;
- bfd_boolean past_line;
- bfd_boolean past_fn;
+ bool past_line;
+ bool past_fn;
char *sym_ptr, *sym_ptr_end;
size_t len, funclen;
char *buffer = NULL;
@@ -2226,8 +2226,8 @@ lookup_line (bfd *abfd,
line_file_name = NULL;
low_func_vma = 0;
low_line_vma = 0;
- past_line = FALSE;
- past_fn = FALSE;
+ past_line = false;
+ past_fn = false;
external_sym_size = debug_swap->external_sym_size;
@@ -2277,7 +2277,7 @@ lookup_line (bfd *abfd,
case N_FUN:
if (sym.value > offset)
- past_fn = TRUE;
+ past_fn = true;
else if (sym.value >= low_func_vma)
{
low_func_vma = sym.value;
@@ -2290,7 +2290,7 @@ lookup_line (bfd *abfd,
else if (sym.st == stLabel && sym.index != indexNil)
{
if (sym.value > offset)
- past_line = TRUE;
+ past_line = true;
else if (sym.value >= low_line_vma)
{
low_line_vma = sym.value;
@@ -2322,7 +2322,7 @@ lookup_line (bfd *abfd,
buffer = (char *) bfd_malloc ((bfd_size_type) len);
line_info->find_buffer = buffer;
if (buffer == NULL)
- return FALSE;
+ return false;
}
if (function_name != NULL)
@@ -2349,12 +2349,12 @@ lookup_line (bfd *abfd,
}
}
- return TRUE;
+ return true;
}
/* Do the work of find_nearest_line. */
-bfd_boolean
+bool
_bfd_ecoff_locate_line (bfd *abfd,
asection *section,
bfd_vma offset,
@@ -2378,7 +2378,7 @@ _bfd_ecoff_locate_line (bfd *abfd,
if (! lookup_line (abfd, debug_info, debug_swap, line_info))
{
line_info->cache.sect = NULL;
- return FALSE;
+ return false;
}
}
@@ -2386,7 +2386,7 @@ _bfd_ecoff_locate_line (bfd *abfd,
*functionname_ptr = line_info->cache.functionname;
*retline_ptr = line_info->cache.line_num;
- return TRUE;
+ return true;
}
/* These routines copy symbolic information into a memory buffer.
@@ -2399,7 +2399,7 @@ _bfd_ecoff_locate_line (bfd *abfd,
/* Collect a shuffle into a memory buffer. */
-static bfd_boolean
+static bool
ecoff_collect_shuffle (struct shuffle *l, bfd_byte *buff)
{
unsigned long total;
@@ -2414,18 +2414,18 @@ ecoff_collect_shuffle (struct shuffle *l, bfd_byte *buff)
if (bfd_seek (l->u.file.input_bfd, l->u.file.offset, SEEK_SET) != 0
|| (bfd_bread (buff, (bfd_size_type) l->size, l->u.file.input_bfd)
!= l->size))
- return FALSE;
+ return false;
}
total += l->size;
buff += l->size;
}
- return TRUE;
+ return true;
}
/* Copy PDR information into a memory buffer. */
-bfd_boolean
+bool
_bfd_ecoff_get_accumulated_pdr (void * handle,
bfd_byte *buff)
{
@@ -2436,7 +2436,7 @@ _bfd_ecoff_get_accumulated_pdr (void * handle,
/* Copy symbol information into a memory buffer. */
-bfd_boolean
+bool
_bfd_ecoff_get_accumulated_sym (void * handle, bfd_byte *buff)
{
struct accumulate *ainfo = (struct accumulate *) handle;
@@ -2446,7 +2446,7 @@ _bfd_ecoff_get_accumulated_sym (void * handle, bfd_byte *buff)
/* Copy the string table into a memory buffer. */
-bfd_boolean
+bool
_bfd_ecoff_get_accumulated_ss (void * handle, bfd_byte *buff)
{
struct accumulate *ainfo = (struct accumulate *) handle;
@@ -2471,5 +2471,5 @@ _bfd_ecoff_get_accumulated_ss (void * handle, bfd_byte *buff)
buff += len + 1;
}
- return TRUE;
+ return true;
}