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.
This commit is contained in:
Alan Modra 2021-03-31 10:30:54 +10:30
parent faa7a26040
commit 0a1b45a20e
331 changed files with 28318 additions and 28257 deletions

View File

@ -1,3 +1,94 @@
2021-03-31 Alan Modra <amodra@gmail.com>
* 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.
2021-03-31 Alan Modra <amodra@gmail.com> 2021-03-31 Alan Modra <amodra@gmail.com>
* bfd-in.h: Include stdbool.h. * bfd-in.h: Include stdbool.h.

View File

@ -24,7 +24,7 @@
#include "bfd.h" #include "bfd.h"
bfd_cleanup xcoff64_core_p (bfd *); bfd_cleanup xcoff64_core_p (bfd *);
bfd_boolean xcoff64_core_file_matches_executable_p (bfd *, bfd *); bool xcoff64_core_file_matches_executable_p (bfd *, bfd *);
char *xcoff64_core_file_failing_command (bfd *); char *xcoff64_core_file_failing_command (bfd *);
int xcoff64_core_file_failing_signal (bfd *); int xcoff64_core_file_failing_signal (bfd *);
@ -238,14 +238,14 @@ xcoff64_core_p (bfd *abfd)
/* Return `TRUE' if given core is from the given executable. */ /* Return `TRUE' if given core is from the given executable. */
bfd_boolean bool
xcoff64_core_file_matches_executable_p (bfd *core_bfd, bfd *exec_bfd) xcoff64_core_file_matches_executable_p (bfd *core_bfd, bfd *exec_bfd)
{ {
struct core_dumpxx core; struct core_dumpxx core;
char *path, *s; char *path, *s;
size_t alloc; size_t alloc;
const char *str1, *str2; const char *str1, *str2;
bfd_boolean return_value = FALSE; bool return_value = false;
/* Get the header. */ /* Get the header. */
if (bfd_seek (core_bfd, 0, SEEK_SET) != 0) if (bfd_seek (core_bfd, 0, SEEK_SET) != 0)
@ -295,7 +295,7 @@ xcoff64_core_file_matches_executable_p (bfd *core_bfd, bfd *exec_bfd)
str2 = str2 != NULL ? str2 + 1 : bfd_get_filename (exec_bfd); str2 = str2 != NULL ? str2 + 1 : bfd_get_filename (exec_bfd);
if (strcmp (str1, str2) == 0) if (strcmp (str1, str2) == 0)
return_value = TRUE; return_value = true;
xcoff64_core_file_matches_executable_p_end_1: xcoff64_core_file_matches_executable_p_end_1:
free (path); free (path);
@ -335,7 +335,7 @@ xcoff64_core_p (bfd *abfd ATTRIBUTE_UNUSED)
return 0; return 0;
} }
bfd_boolean bool
xcoff64_core_file_matches_executable_p (bfd *core_bfd, bfd *exec_bfd) xcoff64_core_file_matches_executable_p (bfd *core_bfd, bfd *exec_bfd)
{ {
return generic_core_file_matches_executable_p (core_bfd, exec_bfd); return generic_core_file_matches_executable_p (core_bfd, exec_bfd);

View File

@ -69,7 +69,7 @@
#define MY_exec_hdr_flags 1 #define MY_exec_hdr_flags 1
#define MY_write_object_contents MY (write_object_contents) #define MY_write_object_contents MY (write_object_contents)
static bfd_boolean MY (write_object_contents) (bfd *); static bool MY (write_object_contents) (bfd *);
/* Forward this, so we can use a pointer to it in PARAMS. */ /* Forward this, so we can use a pointer to it in PARAMS. */
struct reloc_ext_external; struct reloc_ext_external;
@ -82,7 +82,7 @@ static void MY (swap_ext_reloc_in) (bfd *, struct reloc_ext_external *,
arelent *, asymbol **, bfd_size_type); arelent *, asymbol **, bfd_size_type);
#define MY_set_sizes MY (set_sizes) #define MY_set_sizes MY (set_sizes)
static bfd_boolean MY (set_sizes) (bfd *); static bool MY (set_sizes) (bfd *);
/* To set back reloc_size to ext, we make MY (set_sizes) be called /* To set back reloc_size to ext, we make MY (set_sizes) be called
through this construct. Note that MY_set_arch_mach is only called through this construct. Note that MY_set_arch_mach is only called
@ -110,7 +110,7 @@ static bfd_boolean MY (set_sizes) (bfd *);
/* We need our own version to set header flags. */ /* We need our own version to set header flags. */
static bfd_boolean static bool
MY (write_object_contents) (bfd *abfd) MY (write_object_contents) (bfd *abfd)
{ {
struct external_exec exec_bytes; struct external_exec exec_bytes;
@ -131,7 +131,7 @@ MY (write_object_contents) (bfd *abfd)
WRITE_HEADERS (abfd, execp); WRITE_HEADERS (abfd, execp);
return TRUE; return true;
} }
/* We need our own for these reasons: /* We need our own for these reasons:
@ -269,7 +269,7 @@ MY (swap_ext_reloc_in) (bfd *abfd,
"obj_reloc_entry_size (abfd) = RELOC_EXT_SIZE;", to avoid changing "obj_reloc_entry_size (abfd) = RELOC_EXT_SIZE;", to avoid changing
NAME (aout, set_arch_mach) in aoutx. */ NAME (aout, set_arch_mach) in aoutx. */
static bfd_boolean static bool
MY (set_sizes) (bfd *abfd) MY (set_sizes) (bfd *abfd)
{ {
/* Just as the default in aout-target.h (with some #ifdefs folded)... */ /* Just as the default in aout-target.h (with some #ifdefs folded)... */
@ -286,5 +286,5 @@ MY (set_sizes) (bfd *abfd)
obj_reloc_entry_size (abfd) = RELOC_EXT_SIZE; obj_reloc_entry_size (abfd) = RELOC_EXT_SIZE;
return TRUE; return true;
} }

View File

@ -31,7 +31,7 @@
reloc_howto_type * MYNS (bfd_reloc_type_lookup) (bfd *, bfd_reloc_code_real_type); reloc_howto_type * MYNS (bfd_reloc_type_lookup) (bfd *, bfd_reloc_code_real_type);
reloc_howto_type * MYNS (bfd_reloc_name_lookup) (bfd *, const char *); reloc_howto_type * MYNS (bfd_reloc_name_lookup) (bfd *, const char *);
bfd_boolean MYNS (write_object_contents) (bfd *); bool MYNS (write_object_contents) (bfd *);
/* Avoid multiple definitions from aoutx if supporting /* Avoid multiple definitions from aoutx if supporting
standard a.out format(s) as well as this one. */ standard a.out format(s) as well as this one. */
@ -79,58 +79,58 @@ void bfd_ns32k_arch (void);
reloc_howto_type MY (howto_table)[] = reloc_howto_type MY (howto_table)[] =
{ {
/* ns32k immediate operands. */ /* ns32k immediate operands. */
HOWTO (BFD_RELOC_NS32K_IMM_8, 0, 0, 8, FALSE, 0, complain_overflow_signed, HOWTO (BFD_RELOC_NS32K_IMM_8, 0, 0, 8, false, 0, complain_overflow_signed,
_bfd_ns32k_reloc_imm, "NS32K_IMM_8", _bfd_ns32k_reloc_imm, "NS32K_IMM_8",
TRUE, 0x000000ff,0x000000ff, FALSE), true, 0x000000ff,0x000000ff, false),
HOWTO (BFD_RELOC_NS32K_IMM_16, 0, 1, 16, FALSE, 0, complain_overflow_signed, HOWTO (BFD_RELOC_NS32K_IMM_16, 0, 1, 16, false, 0, complain_overflow_signed,
_bfd_ns32k_reloc_imm, "NS32K_IMM_16", _bfd_ns32k_reloc_imm, "NS32K_IMM_16",
TRUE, 0x0000ffff,0x0000ffff, FALSE), true, 0x0000ffff,0x0000ffff, false),
HOWTO (BFD_RELOC_NS32K_IMM_32, 0, 2, 32, FALSE, 0, complain_overflow_signed, HOWTO (BFD_RELOC_NS32K_IMM_32, 0, 2, 32, false, 0, complain_overflow_signed,
_bfd_ns32k_reloc_imm, "NS32K_IMM_32", _bfd_ns32k_reloc_imm, "NS32K_IMM_32",
TRUE, 0xffffffff,0xffffffff, FALSE), true, 0xffffffff,0xffffffff, false),
HOWTO (BFD_RELOC_NS32K_IMM_8_PCREL, 0, 0, 8, TRUE, 0, complain_overflow_signed, HOWTO (BFD_RELOC_NS32K_IMM_8_PCREL, 0, 0, 8, true, 0, complain_overflow_signed,
_bfd_ns32k_reloc_imm, "PCREL_NS32K_IMM_8", _bfd_ns32k_reloc_imm, "PCREL_NS32K_IMM_8",
TRUE, 0x000000ff, 0x000000ff, FALSE), true, 0x000000ff, 0x000000ff, false),
HOWTO (BFD_RELOC_NS32K_IMM_16_PCREL, 0, 1, 16, TRUE, 0, complain_overflow_signed, HOWTO (BFD_RELOC_NS32K_IMM_16_PCREL, 0, 1, 16, true, 0, complain_overflow_signed,
_bfd_ns32k_reloc_imm, "PCREL_NS32K_IMM_16", _bfd_ns32k_reloc_imm, "PCREL_NS32K_IMM_16",
TRUE, 0x0000ffff,0x0000ffff, FALSE), true, 0x0000ffff,0x0000ffff, false),
HOWTO (BFD_RELOC_NS32K_IMM_32_PCREL, 0, 2, 32, TRUE, 0, complain_overflow_signed, HOWTO (BFD_RELOC_NS32K_IMM_32_PCREL, 0, 2, 32, true, 0, complain_overflow_signed,
_bfd_ns32k_reloc_imm, "PCREL_NS32K_IMM_32", _bfd_ns32k_reloc_imm, "PCREL_NS32K_IMM_32",
TRUE, 0xffffffff,0xffffffff, FALSE), true, 0xffffffff,0xffffffff, false),
/* ns32k displacements. */ /* ns32k displacements. */
HOWTO (BFD_RELOC_NS32K_DISP_8, 0, 0, 7, FALSE, 0, complain_overflow_signed, HOWTO (BFD_RELOC_NS32K_DISP_8, 0, 0, 7, false, 0, complain_overflow_signed,
_bfd_ns32k_reloc_disp, "NS32K_DISP_8", _bfd_ns32k_reloc_disp, "NS32K_DISP_8",
TRUE, 0x000000ff,0x000000ff, FALSE), true, 0x000000ff,0x000000ff, false),
HOWTO (BFD_RELOC_NS32K_DISP_16, 0, 1, 14, FALSE, 0, complain_overflow_signed, HOWTO (BFD_RELOC_NS32K_DISP_16, 0, 1, 14, false, 0, complain_overflow_signed,
_bfd_ns32k_reloc_disp, "NS32K_DISP_16", _bfd_ns32k_reloc_disp, "NS32K_DISP_16",
TRUE, 0x0000ffff, 0x0000ffff, FALSE), true, 0x0000ffff, 0x0000ffff, false),
HOWTO (BFD_RELOC_NS32K_DISP_32, 0, 2, 30, FALSE, 0, complain_overflow_signed, HOWTO (BFD_RELOC_NS32K_DISP_32, 0, 2, 30, false, 0, complain_overflow_signed,
_bfd_ns32k_reloc_disp, "NS32K_DISP_32", _bfd_ns32k_reloc_disp, "NS32K_DISP_32",
TRUE, 0xffffffff, 0xffffffff, FALSE), true, 0xffffffff, 0xffffffff, false),
HOWTO (BFD_RELOC_NS32K_DISP_8_PCREL, 0, 0, 7, TRUE, 0, complain_overflow_signed, HOWTO (BFD_RELOC_NS32K_DISP_8_PCREL, 0, 0, 7, true, 0, complain_overflow_signed,
_bfd_ns32k_reloc_disp, "PCREL_NS32K_DISP_8", _bfd_ns32k_reloc_disp, "PCREL_NS32K_DISP_8",
TRUE, 0x000000ff,0x000000ff, FALSE), true, 0x000000ff,0x000000ff, false),
HOWTO (BFD_RELOC_NS32K_DISP_16_PCREL, 0, 1, 14, TRUE, 0, complain_overflow_signed, HOWTO (BFD_RELOC_NS32K_DISP_16_PCREL, 0, 1, 14, true, 0, complain_overflow_signed,
_bfd_ns32k_reloc_disp, "PCREL_NS32K_DISP_16", _bfd_ns32k_reloc_disp, "PCREL_NS32K_DISP_16",
TRUE, 0x0000ffff,0x0000ffff, FALSE), true, 0x0000ffff,0x0000ffff, false),
HOWTO (BFD_RELOC_NS32K_DISP_32_PCREL, 0, 2, 30, TRUE, 0, complain_overflow_signed, HOWTO (BFD_RELOC_NS32K_DISP_32_PCREL, 0, 2, 30, true, 0, complain_overflow_signed,
_bfd_ns32k_reloc_disp, "PCREL_NS32K_DISP_32", _bfd_ns32k_reloc_disp, "PCREL_NS32K_DISP_32",
TRUE, 0xffffffff,0xffffffff, FALSE), true, 0xffffffff,0xffffffff, false),
/* Normal 2's complement. */ /* Normal 2's complement. */
HOWTO (BFD_RELOC_8, 0, 0, 8, FALSE, 0, complain_overflow_bitfield,0, HOWTO (BFD_RELOC_8, 0, 0, 8, false, 0, complain_overflow_bitfield,0,
"8", TRUE, 0x000000ff,0x000000ff, FALSE), "8", true, 0x000000ff,0x000000ff, false),
HOWTO (BFD_RELOC_16, 0, 1, 16, FALSE, 0, complain_overflow_bitfield,0, HOWTO (BFD_RELOC_16, 0, 1, 16, false, 0, complain_overflow_bitfield,0,
"16", TRUE, 0x0000ffff,0x0000ffff, FALSE), "16", true, 0x0000ffff,0x0000ffff, false),
HOWTO (BFD_RELOC_32, 0, 2, 32, FALSE, 0, complain_overflow_bitfield,0, HOWTO (BFD_RELOC_32, 0, 2, 32, false, 0, complain_overflow_bitfield,0,
"32", TRUE, 0xffffffff,0xffffffff, FALSE), "32", true, 0xffffffff,0xffffffff, false),
HOWTO (BFD_RELOC_8_PCREL, 0, 0, 8, TRUE, 0, complain_overflow_signed, 0, HOWTO (BFD_RELOC_8_PCREL, 0, 0, 8, true, 0, complain_overflow_signed, 0,
"PCREL_8", TRUE, 0x000000ff,0x000000ff, FALSE), "PCREL_8", true, 0x000000ff,0x000000ff, false),
HOWTO (BFD_RELOC_16_PCREL, 0, 1, 16, TRUE, 0, complain_overflow_signed, 0, HOWTO (BFD_RELOC_16_PCREL, 0, 1, 16, true, 0, complain_overflow_signed, 0,
"PCREL_16", TRUE, 0x0000ffff,0x0000ffff, FALSE), "PCREL_16", true, 0x0000ffff,0x0000ffff, false),
HOWTO (BFD_RELOC_32_PCREL, 0, 2, 32, TRUE, 0, complain_overflow_signed, 0, HOWTO (BFD_RELOC_32_PCREL, 0, 2, 32, true, 0, complain_overflow_signed, 0,
"PCREL_32", TRUE, 0xffffffff,0xffffffff, FALSE), "PCREL_32", true, 0xffffffff,0xffffffff, false),
}; };
#define CTOR_TABLE_RELOC_HOWTO(BFD) (MY (howto_table) + 14) #define CTOR_TABLE_RELOC_HOWTO(BFD) (MY (howto_table) + 14)

View File

@ -193,7 +193,7 @@ MY (object_p) (bfd *abfd)
#ifndef MY_mkobject #ifndef MY_mkobject
static bfd_boolean static bool
MY (mkobject) (bfd *abfd) MY (mkobject) (bfd *abfd)
{ {
return NAME (aout, mkobject (abfd)); return NAME (aout, mkobject (abfd));
@ -210,7 +210,7 @@ MY (mkobject) (bfd *abfd)
section contents, and copy_private_bfd_data is not called until section contents, and copy_private_bfd_data is not called until
after the section contents have been set. */ after the section contents have been set. */
static bfd_boolean static bool
MY_bfd_copy_private_section_data (bfd *ibfd, MY_bfd_copy_private_section_data (bfd *ibfd,
asection *isec ATTRIBUTE_UNUSED, asection *isec ATTRIBUTE_UNUSED,
bfd *obfd, bfd *obfd,
@ -219,7 +219,7 @@ MY_bfd_copy_private_section_data (bfd *ibfd,
if (bfd_get_flavour (ibfd) == bfd_target_aout_flavour if (bfd_get_flavour (ibfd) == bfd_target_aout_flavour
&& bfd_get_flavour (obfd) == bfd_target_aout_flavour) && bfd_get_flavour (obfd) == bfd_target_aout_flavour)
obj_aout_subformat (obfd) = obj_aout_subformat (ibfd); obj_aout_subformat (obfd) = obj_aout_subformat (ibfd);
return TRUE; return true;
} }
#endif #endif
@ -230,7 +230,7 @@ MY_bfd_copy_private_section_data (bfd *ibfd,
#ifndef MY_write_object_contents #ifndef MY_write_object_contents
static bfd_boolean static bool
MY (write_object_contents) (bfd *abfd) MY (write_object_contents) (bfd *abfd)
{ {
struct external_exec exec_bytes; struct external_exec exec_bytes;
@ -240,14 +240,14 @@ MY (write_object_contents) (bfd *abfd)
WRITE_HEADERS (abfd, execp); WRITE_HEADERS (abfd, execp);
return TRUE; return true;
} }
#define MY_write_object_contents MY (write_object_contents) #define MY_write_object_contents MY (write_object_contents)
#endif #endif
#ifndef MY_set_sizes #ifndef MY_set_sizes
static bfd_boolean static bool
MY (set_sizes) (bfd *abfd) MY (set_sizes) (bfd *abfd)
{ {
adata(abfd).page_size = TARGET_PAGE_SIZE; adata(abfd).page_size = TARGET_PAGE_SIZE;
@ -260,7 +260,7 @@ MY (set_sizes) (bfd *abfd)
#endif #endif
adata(abfd).exec_bytes_size = EXEC_BYTES_SIZE; adata(abfd).exec_bytes_size = EXEC_BYTES_SIZE;
return TRUE; return true;
} }
#define MY_set_sizes MY (set_sizes) #define MY_set_sizes MY (set_sizes)
#endif #endif
@ -345,7 +345,7 @@ MY_final_link_callback (bfd *abfd,
/* Final link routine. We need to use a call back to get the correct /* Final link routine. We need to use a call back to get the correct
offsets in the output file. */ offsets in the output file. */
static bfd_boolean static bool
MY_bfd_final_link (bfd *abfd, struct bfd_link_info *info) MY_bfd_final_link (bfd *abfd, struct bfd_link_info *info)
{ {
return NAME (aout, final_link) (abfd, info, MY_final_link_callback); return NAME (aout, final_link) (abfd, info, MY_final_link_callback);
@ -598,11 +598,11 @@ MY_bfd_final_link (bfd *abfd, struct bfd_link_info *info)
/* Handle closing of a BFD including the resource-releasing parts. */ /* Handle closing of a BFD including the resource-releasing parts. */
static bfd_boolean static bool
MY_close_and_cleanup (bfd *abfd) MY_close_and_cleanup (bfd *abfd)
{ {
if (!MY_bfd_free_cached_info (abfd)) if (!MY_bfd_free_cached_info (abfd))
return FALSE; return false;
return _bfd_generic_close_and_cleanup (abfd); return _bfd_generic_close_and_cleanup (abfd);
} }

File diff suppressed because it is too large Load Diff

View File

@ -49,8 +49,8 @@ struct got_entry
struct got_entry *next; struct got_entry *next;
enum tls_type_e type; enum tls_type_e type;
bfd_vma offset; bfd_vma offset;
bfd_boolean processed; bool processed;
bfd_boolean created_dyn_relocation; bool created_dyn_relocation;
enum tls_got_entries existing_entries; enum tls_got_entries existing_entries;
}; };
@ -114,8 +114,8 @@ new_got_entry_to_list (struct got_entry **list,
entry->type = type; entry->type = type;
entry->offset = offset; entry->offset = offset;
entry->next = NULL; entry->next = NULL;
entry->processed = FALSE; entry->processed = false;
entry->created_dyn_relocation = FALSE; entry->created_dyn_relocation = false;
entry->existing_entries = existing_entries; entry->existing_entries = existing_entries;
ARC_DEBUG ("New GOT got entry added to list: " ARC_DEBUG ("New GOT got entry added to list: "
@ -210,11 +210,11 @@ arc_got_entry_type_for_reloc (reloc_howto_type *howto)
if (H) \ if (H) \
if (H->dynindx == -1 && !H->forced_local) \ if (H->dynindx == -1 && !H->forced_local) \
if (! bfd_elf_link_record_dynamic_symbol (info, H)) \ if (! bfd_elf_link_record_dynamic_symbol (info, H)) \
return FALSE; \ return false; \
htab->s##SECNAME->size += 4; \ htab->s##SECNAME->size += 4; \
} \ } \
static bfd_boolean static bool
arc_fill_got_info_for_reloc (enum tls_type_e type, arc_fill_got_info_for_reloc (enum tls_type_e type,
struct got_entry **list, struct got_entry **list,
struct bfd_link_info * info, struct bfd_link_info * info,
@ -223,7 +223,7 @@ arc_fill_got_info_for_reloc (enum tls_type_e type,
struct elf_link_hash_table *htab = elf_hash_table (info); struct elf_link_hash_table *htab = elf_hash_table (info);
if (got_entry_for_type (list, type) != NULL) if (got_entry_for_type (list, type) != NULL)
return TRUE; return true;
switch (type) switch (type)
{ {
@ -240,9 +240,9 @@ arc_fill_got_info_for_reloc (enum tls_type_e type,
case GOT_TLS_GD: case GOT_TLS_GD:
{ {
bfd_vma offset bfd_vma offset
= ADD_SYMBOL_REF_SEC_AND_RELOC (got, TRUE, h); = ADD_SYMBOL_REF_SEC_AND_RELOC (got, true, h);
bfd_vma ATTRIBUTE_UNUSED notneeded bfd_vma ATTRIBUTE_UNUSED notneeded
= ADD_SYMBOL_REF_SEC_AND_RELOC (got, TRUE, h); = ADD_SYMBOL_REF_SEC_AND_RELOC (got, true, h);
new_got_entry_to_list (list, type, offset, TLS_GOT_MOD_AND_OFF); new_got_entry_to_list (list, type, offset, TLS_GOT_MOD_AND_OFF);
} }
break; break;
@ -250,16 +250,16 @@ arc_fill_got_info_for_reloc (enum tls_type_e type,
case GOT_TLS_LE: case GOT_TLS_LE:
{ {
bfd_vma offset bfd_vma offset
= ADD_SYMBOL_REF_SEC_AND_RELOC (got, TRUE, h); = ADD_SYMBOL_REF_SEC_AND_RELOC (got, true, h);
new_got_entry_to_list (list, type, offset, TLS_GOT_OFF); new_got_entry_to_list (list, type, offset, TLS_GOT_OFF);
} }
break; break;
default: default:
return FALSE; return false;
break; break;
} }
return TRUE; return true;
} }
@ -284,7 +284,7 @@ relocate_fix_got_relocs_for_got_info (struct got_entry ** list_p,
BFD_ASSERT (entry); BFD_ASSERT (entry);
if (h == NULL if (h == NULL
|| h->forced_local == TRUE || h->forced_local == true
|| (! elf_hash_table (info)->dynamic_sections_created || (! elf_hash_table (info)->dynamic_sections_created
|| (bfd_link_pic (info) || (bfd_link_pic (info)
&& SYMBOL_REFERENCES_LOCAL (info, h)))) && SYMBOL_REFERENCES_LOCAL (info, h))))
@ -425,7 +425,7 @@ relocate_fix_got_relocs_for_got_info (struct got_entry ** list_p,
BFD_ASSERT (0); BFD_ASSERT (0);
break; break;
} }
entry->processed = TRUE; entry->processed = true;
} }
} }
@ -460,7 +460,7 @@ create_got_dynrelocs_for_single_entry (struct got_entry *list,
{ {
ADD_RELA (output_bfd, got, got_offset, h->dynindx, R_ARC_GLOB_DAT, 0); ADD_RELA (output_bfd, got, got_offset, h->dynindx, R_ARC_GLOB_DAT, 0);
} }
list->created_dyn_relocation = TRUE; list->created_dyn_relocation = true;
} }
else if (list->existing_entries != TLS_GOT_NONE else if (list->existing_entries != TLS_GOT_NONE
&& !list->created_dyn_relocation) && !list->created_dyn_relocation)
@ -515,7 +515,7 @@ GOT_OFFSET = %#lx, GOT_VMA = %#lx, INDEX = %ld, ADDEND = %#lx\n",
+ htab->sgot->output_offset + got_offset), + htab->sgot->output_offset + got_offset),
(long) dynindx, (long) addend); (long) dynindx, (long) addend);
} }
list->created_dyn_relocation = TRUE; list->created_dyn_relocation = true;
} }
} }

View File

@ -186,7 +186,7 @@ _bfd_ar_spacepad (char *p, size_t n, const char *fmt, long val)
memcpy (p, buf, n); memcpy (p, buf, n);
} }
bfd_boolean bool
_bfd_ar_sizepad (char *p, size_t n, bfd_size_type size) _bfd_ar_sizepad (char *p, size_t n, bfd_size_type size)
{ {
char buf[21]; char buf[21];
@ -197,7 +197,7 @@ _bfd_ar_sizepad (char *p, size_t n, bfd_size_type size)
if (len > n) if (len > n)
{ {
bfd_set_error (bfd_error_file_too_big); bfd_set_error (bfd_error_file_too_big);
return FALSE; return false;
} }
if (len < n) if (len < n)
{ {
@ -206,17 +206,17 @@ _bfd_ar_sizepad (char *p, size_t n, bfd_size_type size)
} }
else else
memcpy (p, buf, n); memcpy (p, buf, n);
return TRUE; return true;
} }
bfd_boolean bool
_bfd_generic_mkarchive (bfd *abfd) _bfd_generic_mkarchive (bfd *abfd)
{ {
size_t amt = sizeof (struct artdata); size_t amt = sizeof (struct artdata);
abfd->tdata.aout_ar_data = (struct artdata *) bfd_zalloc (abfd, amt); abfd->tdata.aout_ar_data = (struct artdata *) bfd_zalloc (abfd, amt);
if (bfd_ardata (abfd) == NULL) if (bfd_ardata (abfd) == NULL)
return FALSE; return false;
/* Already cleared by bfd_zalloc above. /* Already cleared by bfd_zalloc above.
bfd_ardata (abfd)->cache = NULL; bfd_ardata (abfd)->cache = NULL;
@ -226,7 +226,7 @@ _bfd_generic_mkarchive (bfd *abfd)
bfd_ardata (abfd)->extended_names_size = 0; bfd_ardata (abfd)->extended_names_size = 0;
bfd_ardata (abfd)->tdata = NULL; */ bfd_ardata (abfd)->tdata = NULL; */
return TRUE; return true;
} }
/* /*
@ -284,18 +284,18 @@ FUNCTION
bfd_set_archive_head bfd_set_archive_head
SYNOPSIS SYNOPSIS
bfd_boolean bfd_set_archive_head (bfd *output, bfd *new_head); bool bfd_set_archive_head (bfd *output, bfd *new_head);
DESCRIPTION DESCRIPTION
Set the head of the chain of Set the head of the chain of
BFDs contained in the archive @var{output} to @var{new_head}. BFDs contained in the archive @var{output} to @var{new_head}.
*/ */
bfd_boolean bool
bfd_set_archive_head (bfd *output_archive, bfd *new_head) bfd_set_archive_head (bfd *output_archive, bfd *new_head)
{ {
output_archive->archive_head = new_head; output_archive->archive_head = new_head;
return TRUE; return true;
} }
bfd * bfd *
@ -349,7 +349,7 @@ _bfd_calloc_wrapper (size_t a, size_t b)
/* Kind of stupid to call cons for each one, but we don't do too many. */ /* Kind of stupid to call cons for each one, but we don't do too many. */
bfd_boolean bool
_bfd_add_bfd_to_archive_cache (bfd *arch_bfd, file_ptr filepos, bfd *new_elt) _bfd_add_bfd_to_archive_cache (bfd *arch_bfd, file_ptr filepos, bfd *new_elt)
{ {
struct ar_cache *cache; struct ar_cache *cache;
@ -361,7 +361,7 @@ _bfd_add_bfd_to_archive_cache (bfd *arch_bfd, file_ptr filepos, bfd *new_elt)
hash_table = htab_create_alloc (16, hash_file_ptr, eq_file_ptr, hash_table = htab_create_alloc (16, hash_file_ptr, eq_file_ptr,
NULL, _bfd_calloc_wrapper, free); NULL, _bfd_calloc_wrapper, free);
if (hash_table == NULL) if (hash_table == NULL)
return FALSE; return false;
bfd_ardata (arch_bfd)->cache = hash_table; bfd_ardata (arch_bfd)->cache = hash_table;
} }
@ -375,7 +375,7 @@ _bfd_add_bfd_to_archive_cache (bfd *arch_bfd, file_ptr filepos, bfd *new_elt)
arch_eltdata (new_elt)->parent_cache = hash_table; arch_eltdata (new_elt)->parent_cache = hash_table;
arch_eltdata (new_elt)->key = filepos; arch_eltdata (new_elt)->key = filepos;
return TRUE; return true;
} }
static bfd * static bfd *
@ -924,7 +924,7 @@ bfd_generic_archive_p (bfd *abfd)
abfd->no_element_cache = save; abfd->no_element_cache = save;
if (first != NULL) if (first != NULL)
{ {
first->target_defaulted = FALSE; first->target_defaulted = false;
if (bfd_check_format (first, bfd_object) if (bfd_check_format (first, bfd_object)
&& first->xvec != abfd->xvec) && first->xvec != abfd->xvec)
bfd_set_error (bfd_error_wrong_object_format); bfd_set_error (bfd_error_wrong_object_format);
@ -955,7 +955,7 @@ bfd_generic_archive_p (bfd *abfd)
/* Read a BSD-style archive symbol table. Returns FALSE on error, /* Read a BSD-style archive symbol table. Returns FALSE on error,
TRUE otherwise. */ TRUE otherwise. */
static bfd_boolean static bool
do_slurp_bsd_armap (bfd *abfd) do_slurp_bsd_armap (bfd *abfd)
{ {
struct areltdata *mapdata; struct areltdata *mapdata;
@ -969,7 +969,7 @@ do_slurp_bsd_armap (bfd *abfd)
mapdata = (struct areltdata *) _bfd_read_ar_hdr (abfd); mapdata = (struct areltdata *) _bfd_read_ar_hdr (abfd);
if (mapdata == NULL) if (mapdata == NULL)
return FALSE; return false;
parsed_size = mapdata->parsed_size; parsed_size = mapdata->parsed_size;
free (mapdata); free (mapdata);
/* PR 17512: file: 883ff754. */ /* PR 17512: file: 883ff754. */
@ -977,12 +977,12 @@ do_slurp_bsd_armap (bfd *abfd)
if (parsed_size < BSD_SYMDEF_COUNT_SIZE + BSD_STRING_COUNT_SIZE) if (parsed_size < BSD_SYMDEF_COUNT_SIZE + BSD_STRING_COUNT_SIZE)
{ {
bfd_set_error (bfd_error_malformed_archive); bfd_set_error (bfd_error_malformed_archive);
return FALSE; return false;
} }
raw_armap = (bfd_byte *) _bfd_alloc_and_read (abfd, parsed_size, parsed_size); raw_armap = (bfd_byte *) _bfd_alloc_and_read (abfd, parsed_size, parsed_size);
if (raw_armap == NULL) if (raw_armap == NULL)
return FALSE; return false;
parsed_size -= BSD_SYMDEF_COUNT_SIZE + BSD_STRING_COUNT_SIZE; parsed_size -= BSD_SYMDEF_COUNT_SIZE + BSD_STRING_COUNT_SIZE;
amt = H_GET_32 (abfd, raw_armap); amt = H_GET_32 (abfd, raw_armap);
@ -1028,20 +1028,20 @@ do_slurp_bsd_armap (bfd *abfd)
/* FIXME, we should provide some way to free raw_ardata when /* FIXME, we should provide some way to free raw_ardata when
we are done using the strings from it. For now, it seems we are done using the strings from it. For now, it seems
to be allocated on an objalloc anyway... */ to be allocated on an objalloc anyway... */
abfd->has_armap = TRUE; abfd->has_armap = true;
return TRUE; return true;
release_armap: release_armap:
ardata->symdef_count = 0; ardata->symdef_count = 0;
ardata->symdefs = NULL; ardata->symdefs = NULL;
bfd_release (abfd, raw_armap); bfd_release (abfd, raw_armap);
return FALSE; return false;
} }
/* Read a COFF archive symbol table. Returns FALSE on error, TRUE /* Read a COFF archive symbol table. Returns FALSE on error, TRUE
otherwise. */ otherwise. */
static bfd_boolean static bool
do_slurp_coff_armap (bfd *abfd) do_slurp_coff_armap (bfd *abfd)
{ {
struct areltdata *mapdata; struct areltdata *mapdata;
@ -1060,12 +1060,12 @@ do_slurp_coff_armap (bfd *abfd)
mapdata = (struct areltdata *) _bfd_read_ar_hdr (abfd); mapdata = (struct areltdata *) _bfd_read_ar_hdr (abfd);
if (mapdata == NULL) if (mapdata == NULL)
return FALSE; return false;
parsed_size = mapdata->parsed_size; parsed_size = mapdata->parsed_size;
free (mapdata); free (mapdata);
if (bfd_bread (int_buf, 4, abfd) != 4) if (bfd_bread (int_buf, 4, abfd) != 4)
return FALSE; return false;
/* It seems that all numeric information in a coff archive is always /* It seems that all numeric information in a coff archive is always
in big endian format, no matter the host or target. */ in big endian format, no matter the host or target. */
@ -1078,7 +1078,7 @@ do_slurp_coff_armap (bfd *abfd)
if (_bfd_mul_overflow (nsymz, sizeof (carsym), &carsym_size)) if (_bfd_mul_overflow (nsymz, sizeof (carsym), &carsym_size))
{ {
bfd_set_error (bfd_error_no_memory); bfd_set_error (bfd_error_no_memory);
return FALSE; return false;
} }
filesize = bfd_get_file_size (abfd); filesize = bfd_get_file_size (abfd);
@ -1088,7 +1088,7 @@ do_slurp_coff_armap (bfd *abfd)
|| parsed_size - 4 < ptrsize) || parsed_size - 4 < ptrsize)
{ {
bfd_set_error (bfd_error_malformed_archive); bfd_set_error (bfd_error_malformed_archive);
return FALSE; return false;
} }
stringsize = parsed_size - ptrsize - 4; stringsize = parsed_size - ptrsize - 4;
@ -1096,13 +1096,13 @@ do_slurp_coff_armap (bfd *abfd)
if (carsym_size + stringsize + 1 <= carsym_size) if (carsym_size + stringsize + 1 <= carsym_size)
{ {
bfd_set_error (bfd_error_no_memory); bfd_set_error (bfd_error_no_memory);
return FALSE; return false;
} }
/* Allocate and read in the raw offsets. */ /* Allocate and read in the raw offsets. */
raw_armap = (int *) _bfd_malloc_and_read (abfd, ptrsize, ptrsize); raw_armap = (int *) _bfd_malloc_and_read (abfd, ptrsize, ptrsize);
if (raw_armap == NULL) if (raw_armap == NULL)
return FALSE; return false;
ardata->symdefs = (struct carsym *) bfd_alloc (abfd, ardata->symdefs = (struct carsym *) bfd_alloc (abfd,
carsym_size + stringsize + 1); carsym_size + stringsize + 1);
@ -1135,7 +1135,7 @@ do_slurp_coff_armap (bfd *abfd)
if (bfd_seek (abfd, ardata->first_file_filepos, SEEK_SET) != 0) if (bfd_seek (abfd, ardata->first_file_filepos, SEEK_SET) != 0)
goto release_symdefs; goto release_symdefs;
abfd->has_armap = TRUE; abfd->has_armap = true;
free (raw_armap); free (raw_armap);
/* Check for a second archive header (as used by PE). */ /* Check for a second archive header (as used by PE). */
@ -1149,31 +1149,31 @@ do_slurp_coff_armap (bfd *abfd)
free (tmp); free (tmp);
} }
return TRUE; return true;
release_symdefs: release_symdefs:
bfd_release (abfd, (ardata)->symdefs); bfd_release (abfd, (ardata)->symdefs);
free_armap: free_armap:
free (raw_armap); free (raw_armap);
return FALSE; return false;
} }
/* This routine can handle either coff-style or bsd-style armaps /* This routine can handle either coff-style or bsd-style armaps
(archive symbol table). Returns FALSE on error, TRUE otherwise */ (archive symbol table). Returns FALSE on error, TRUE otherwise */
bfd_boolean bool
bfd_slurp_armap (bfd *abfd) bfd_slurp_armap (bfd *abfd)
{ {
char nextname[17]; char nextname[17];
int i = bfd_bread (nextname, 16, abfd); int i = bfd_bread (nextname, 16, abfd);
if (i == 0) if (i == 0)
return TRUE; return true;
if (i != 16) if (i != 16)
return FALSE; return false;
if (bfd_seek (abfd, (file_ptr) -16, SEEK_CUR) != 0) if (bfd_seek (abfd, (file_ptr) -16, SEEK_CUR) != 0)
return FALSE; return false;
if (startswith (nextname, "__.SYMDEF ") if (startswith (nextname, "__.SYMDEF ")
|| startswith (nextname, "__.SYMDEF/ ")) /* Old Linux archives. */ || startswith (nextname, "__.SYMDEF/ ")) /* Old Linux archives. */
@ -1187,7 +1187,7 @@ bfd_slurp_armap (bfd *abfd)
return _bfd_archive_64_bit_slurp_armap (abfd); return _bfd_archive_64_bit_slurp_armap (abfd);
#else #else
bfd_set_error (bfd_error_wrong_format); bfd_set_error (bfd_error_wrong_format);
return FALSE; return false;
#endif #endif
} }
else if (startswith (nextname, "#1/20 ")) else if (startswith (nextname, "#1/20 "))
@ -1199,20 +1199,20 @@ bfd_slurp_armap (bfd *abfd)
char extname[21]; char extname[21];
if (bfd_bread (&hdr, sizeof (hdr), abfd) != sizeof (hdr)) if (bfd_bread (&hdr, sizeof (hdr), abfd) != sizeof (hdr))
return FALSE; return false;
/* Read the extended name. We know its length. */ /* Read the extended name. We know its length. */
if (bfd_bread (extname, 20, abfd) != 20) if (bfd_bread (extname, 20, abfd) != 20)
return FALSE; return false;
if (bfd_seek (abfd, -(file_ptr) (sizeof (hdr) + 20), SEEK_CUR) != 0) if (bfd_seek (abfd, -(file_ptr) (sizeof (hdr) + 20), SEEK_CUR) != 0)
return FALSE; return false;
extname[20] = 0; extname[20] = 0;
if (startswith (extname, "__.SYMDEF SORTED") if (startswith (extname, "__.SYMDEF SORTED")
|| startswith (extname, "__.SYMDEF")) || startswith (extname, "__.SYMDEF"))
return do_slurp_bsd_armap (abfd); return do_slurp_bsd_armap (abfd);
} }
abfd->has_armap = FALSE; abfd->has_armap = false;
return TRUE; return true;
} }
/** Extended name table. /** Extended name table.
@ -1227,7 +1227,7 @@ bfd_slurp_armap (bfd *abfd)
/* Returns FALSE on error, TRUE otherwise. */ /* Returns FALSE on error, TRUE otherwise. */
bfd_boolean bool
_bfd_slurp_extended_name_table (bfd *abfd) _bfd_slurp_extended_name_table (bfd *abfd)
{ {
char nextname[17]; char nextname[17];
@ -1235,7 +1235,7 @@ _bfd_slurp_extended_name_table (bfd *abfd)
/* FIXME: Formatting sucks here, and in case of failure of BFD_READ, /* FIXME: Formatting sucks here, and in case of failure of BFD_READ,
we probably don't want to return TRUE. */ we probably don't want to return TRUE. */
if (bfd_seek (abfd, bfd_ardata (abfd)->first_file_filepos, SEEK_SET) != 0) if (bfd_seek (abfd, bfd_ardata (abfd)->first_file_filepos, SEEK_SET) != 0)
return FALSE; return false;
if (bfd_bread (nextname, 16, abfd) == 16) if (bfd_bread (nextname, 16, abfd) == 16)
{ {
@ -1244,19 +1244,19 @@ _bfd_slurp_extended_name_table (bfd *abfd)
ufile_ptr filesize; ufile_ptr filesize;
if (bfd_seek (abfd, (file_ptr) -16, SEEK_CUR) != 0) if (bfd_seek (abfd, (file_ptr) -16, SEEK_CUR) != 0)
return FALSE; return false;
if (! startswith (nextname, "ARFILENAMES/ ") if (! startswith (nextname, "ARFILENAMES/ ")
&& ! startswith (nextname, "// ")) && ! startswith (nextname, "// "))
{ {
bfd_ardata (abfd)->extended_names = NULL; bfd_ardata (abfd)->extended_names = NULL;
bfd_ardata (abfd)->extended_names_size = 0; bfd_ardata (abfd)->extended_names_size = 0;
return TRUE; return true;
} }
namedata = (struct areltdata *) _bfd_read_ar_hdr (abfd); namedata = (struct areltdata *) _bfd_read_ar_hdr (abfd);
if (namedata == NULL) if (namedata == NULL)
return FALSE; return false;
filesize = bfd_get_file_size (abfd); filesize = bfd_get_file_size (abfd);
amt = namedata->parsed_size; amt = namedata->parsed_size;
@ -1274,7 +1274,7 @@ _bfd_slurp_extended_name_table (bfd *abfd)
free (namedata); free (namedata);
bfd_ardata (abfd)->extended_names = NULL; bfd_ardata (abfd)->extended_names = NULL;
bfd_ardata (abfd)->extended_names_size = 0; bfd_ardata (abfd)->extended_names_size = 0;
return FALSE; return false;
} }
if (bfd_bread (bfd_ardata (abfd)->extended_names, amt, abfd) != amt) if (bfd_bread (bfd_ardata (abfd)->extended_names, amt, abfd) != amt)
@ -1314,7 +1314,7 @@ _bfd_slurp_extended_name_table (bfd *abfd)
free (namedata); free (namedata);
} }
return TRUE; return true;
} }
#ifdef VMS #ifdef VMS
@ -1497,35 +1497,35 @@ adjust_relative_path (const char * path, const char * ref_path)
/* Build a BFD style extended name table. */ /* Build a BFD style extended name table. */
bfd_boolean bool
_bfd_archive_bsd_construct_extended_name_table (bfd *abfd, _bfd_archive_bsd_construct_extended_name_table (bfd *abfd,
char **tabloc, char **tabloc,
bfd_size_type *tablen, bfd_size_type *tablen,
const char **name) const char **name)
{ {
*name = "ARFILENAMES/"; *name = "ARFILENAMES/";
return _bfd_construct_extended_name_table (abfd, FALSE, tabloc, tablen); return _bfd_construct_extended_name_table (abfd, false, tabloc, tablen);
} }
/* Build an SVR4 style extended name table. */ /* Build an SVR4 style extended name table. */
bfd_boolean bool
_bfd_archive_coff_construct_extended_name_table (bfd *abfd, _bfd_archive_coff_construct_extended_name_table (bfd *abfd,
char **tabloc, char **tabloc,
bfd_size_type *tablen, bfd_size_type *tablen,
const char **name) const char **name)
{ {
*name = "//"; *name = "//";
return _bfd_construct_extended_name_table (abfd, TRUE, tabloc, tablen); return _bfd_construct_extended_name_table (abfd, true, tabloc, tablen);
} }
bfd_boolean bool
_bfd_noarchive_construct_extended_name_table (bfd *abfd ATTRIBUTE_UNUSED, _bfd_noarchive_construct_extended_name_table (bfd *abfd ATTRIBUTE_UNUSED,
char **tabloc ATTRIBUTE_UNUSED, char **tabloc ATTRIBUTE_UNUSED,
bfd_size_type *len ATTRIBUTE_UNUSED, bfd_size_type *len ATTRIBUTE_UNUSED,
const char **name ATTRIBUTE_UNUSED) const char **name ATTRIBUTE_UNUSED)
{ {
return TRUE; return true;
} }
/* Follows archive_head and produces an extended name table if /* Follows archive_head and produces an extended name table if
@ -1536,9 +1536,9 @@ _bfd_noarchive_construct_extended_name_table (bfd *abfd ATTRIBUTE_UNUSED,
something went wrong. A successful return may still involve a something went wrong. A successful return may still involve a
zero-length tablen! */ zero-length tablen! */
bfd_boolean bool
_bfd_construct_extended_name_table (bfd *abfd, _bfd_construct_extended_name_table (bfd *abfd,
bfd_boolean trailing_slash, bool trailing_slash,
char **tabloc, char **tabloc,
bfd_size_type *tablen) bfd_size_type *tablen)
{ {
@ -1598,7 +1598,7 @@ _bfd_construct_extended_name_table (bfd *abfd,
normal = normalize (abfd, bfd_get_filename (current)); normal = normalize (abfd, bfd_get_filename (current));
if (normal == NULL) if (normal == NULL)
return FALSE; return false;
thislen = strlen (normal); thislen = strlen (normal);
@ -1634,11 +1634,11 @@ _bfd_construct_extended_name_table (bfd *abfd,
} }
if (total_namelen == 0) if (total_namelen == 0)
return TRUE; return true;
*tabloc = (char *) bfd_alloc (abfd, total_namelen); *tabloc = (char *) bfd_alloc (abfd, total_namelen);
if (*tabloc == NULL) if (*tabloc == NULL)
return FALSE; return false;
*tablen = total_namelen; *tablen = total_namelen;
strptr = *tabloc; strptr = *tabloc;
@ -1679,7 +1679,7 @@ _bfd_construct_extended_name_table (bfd *abfd,
{ {
normal = normalize (abfd, filename); normal = normalize (abfd, filename);
if (normal == NULL) if (normal == NULL)
return FALSE; return false;
} }
thislen = strlen (normal); thislen = strlen (normal);
@ -1716,13 +1716,13 @@ _bfd_construct_extended_name_table (bfd *abfd,
} }
} }
return TRUE; return true;
} }
/* Do not construct an extended name table but transforms name field into /* Do not construct an extended name table but transforms name field into
its extended form. */ its extended form. */
bfd_boolean bool
_bfd_archive_bsd44_construct_extended_name_table (bfd *abfd, _bfd_archive_bsd44_construct_extended_name_table (bfd *abfd,
char **tabloc, char **tabloc,
bfd_size_type *tablen, bfd_size_type *tablen,
@ -1744,7 +1744,7 @@ _bfd_archive_bsd44_construct_extended_name_table (bfd *abfd,
unsigned int len; unsigned int len;
if (normal == NULL) if (normal == NULL)
return FALSE; return false;
for (len = 0; normal[len]; len++) for (len = 0; normal[len]; len++)
if (normal[len] == ' ') if (normal[len] == ' ')
@ -1760,24 +1760,24 @@ _bfd_archive_bsd44_construct_extended_name_table (bfd *abfd,
} }
} }
return TRUE; return true;
} }
/* Write an archive header. */ /* Write an archive header. */
bfd_boolean bool
_bfd_generic_write_ar_hdr (bfd *archive, bfd *abfd) _bfd_generic_write_ar_hdr (bfd *archive, bfd *abfd)
{ {
struct ar_hdr *hdr = arch_hdr (abfd); struct ar_hdr *hdr = arch_hdr (abfd);
if (bfd_bwrite (hdr, sizeof (*hdr), archive) != sizeof (*hdr)) if (bfd_bwrite (hdr, sizeof (*hdr), archive) != sizeof (*hdr))
return FALSE; return false;
return TRUE; return true;
} }
/* Write an archive header using BSD4.4 convention. */ /* Write an archive header using BSD4.4 convention. */
bfd_boolean bool
_bfd_bsd44_write_ar_hdr (bfd *archive, bfd *abfd) _bfd_bsd44_write_ar_hdr (bfd *archive, bfd *abfd)
{ {
struct ar_hdr *hdr = arch_hdr (abfd); struct ar_hdr *hdr = arch_hdr (abfd);
@ -1793,13 +1793,13 @@ _bfd_bsd44_write_ar_hdr (bfd *archive, bfd *abfd)
if (!_bfd_ar_sizepad (hdr->ar_size, sizeof (hdr->ar_size), if (!_bfd_ar_sizepad (hdr->ar_size, sizeof (hdr->ar_size),
arch_eltdata (abfd)->parsed_size + padded_len)) arch_eltdata (abfd)->parsed_size + padded_len))
return FALSE; return false;
if (bfd_bwrite (hdr, sizeof (*hdr), archive) != sizeof (*hdr)) if (bfd_bwrite (hdr, sizeof (*hdr), archive) != sizeof (*hdr))
return FALSE; return false;
if (bfd_bwrite (fullname, len, archive) != len) if (bfd_bwrite (fullname, len, archive) != len)
return FALSE; return false;
if (len & 3) if (len & 3)
{ {
@ -1807,18 +1807,18 @@ _bfd_bsd44_write_ar_hdr (bfd *archive, bfd *abfd)
len = 4 - (len & 3); len = 4 - (len & 3);
if (bfd_bwrite (pad, len, archive) != len) if (bfd_bwrite (pad, len, archive) != len)
return FALSE; return false;
} }
} }
else else
{ {
if (bfd_bwrite (hdr, sizeof (*hdr), archive) != sizeof (*hdr)) if (bfd_bwrite (hdr, sizeof (*hdr), archive) != sizeof (*hdr))
return FALSE; return false;
} }
return TRUE; return true;
} }
bfd_boolean bool
_bfd_noarchive_write_ar_hdr (bfd *archive, bfd *abfd ATTRIBUTE_UNUSED) _bfd_noarchive_write_ar_hdr (bfd *archive, bfd *abfd ATTRIBUTE_UNUSED)
{ {
return _bfd_bool_bfd_false_error (archive); return _bfd_bool_bfd_false_error (archive);
@ -2095,16 +2095,16 @@ _bfd_noarchive_truncate_arname (bfd *abfd ATTRIBUTE_UNUSED,
/* The BFD is open for write and has its format set to bfd_archive. */ /* The BFD is open for write and has its format set to bfd_archive. */
bfd_boolean bool
_bfd_write_archive_contents (bfd *arch) _bfd_write_archive_contents (bfd *arch)
{ {
bfd *current; bfd *current;
char *etable = NULL; char *etable = NULL;
bfd_size_type elength = 0; bfd_size_type elength = 0;
const char *ename = NULL; const char *ename = NULL;
bfd_boolean makemap = bfd_has_map (arch); bool makemap = bfd_has_map (arch);
/* If no .o's, don't bother to make a map. */ /* If no .o's, don't bother to make a map. */
bfd_boolean hasobjects = FALSE; bool hasobjects = false;
bfd_size_type wrote; bfd_size_type wrote;
int tries; int tries;
char *armag; char *armag;
@ -2143,27 +2143,27 @@ _bfd_write_archive_contents (bfd *arch)
if (makemap && ! hasobjects) if (makemap && ! hasobjects)
{ /* Don't bother if we won't make a map! */ { /* Don't bother if we won't make a map! */
if ((bfd_check_format (current, bfd_object))) if ((bfd_check_format (current, bfd_object)))
hasobjects = TRUE; hasobjects = true;
} }
} }
if (!BFD_SEND (arch, _bfd_construct_extended_name_table, if (!BFD_SEND (arch, _bfd_construct_extended_name_table,
(arch, &etable, &elength, &ename))) (arch, &etable, &elength, &ename)))
return FALSE; return false;
if (bfd_seek (arch, (file_ptr) 0, SEEK_SET) != 0) if (bfd_seek (arch, (file_ptr) 0, SEEK_SET) != 0)
return FALSE; return false;
armag = ARMAG; armag = ARMAG;
if (bfd_is_thin_archive (arch)) if (bfd_is_thin_archive (arch))
armag = ARMAGT; armag = ARMAGT;
wrote = bfd_bwrite (armag, SARMAG, arch); wrote = bfd_bwrite (armag, SARMAG, arch);
if (wrote != SARMAG) if (wrote != SARMAG)
return FALSE; return false;
if (makemap && hasobjects) if (makemap && hasobjects)
{ {
if (! _bfd_compute_and_write_armap (arch, (unsigned int) elength)) if (! _bfd_compute_and_write_armap (arch, (unsigned int) elength))
return FALSE; return false;
} }
if (elength != 0) if (elength != 0)
@ -2175,16 +2175,16 @@ _bfd_write_archive_contents (bfd *arch)
/* Round size up to even number in archive header. */ /* Round size up to even number in archive header. */
if (!_bfd_ar_sizepad (hdr.ar_size, sizeof (hdr.ar_size), if (!_bfd_ar_sizepad (hdr.ar_size, sizeof (hdr.ar_size),
(elength + 1) & ~(bfd_size_type) 1)) (elength + 1) & ~(bfd_size_type) 1))
return FALSE; return false;
memcpy (hdr.ar_fmag, ARFMAG, 2); memcpy (hdr.ar_fmag, ARFMAG, 2);
if ((bfd_bwrite (&hdr, sizeof (struct ar_hdr), arch) if ((bfd_bwrite (&hdr, sizeof (struct ar_hdr), arch)
!= sizeof (struct ar_hdr)) != sizeof (struct ar_hdr))
|| bfd_bwrite (etable, elength, arch) != elength) || bfd_bwrite (etable, elength, arch) != elength)
return FALSE; return false;
if ((elength % 2) == 1) if ((elength % 2) == 1)
{ {
if (bfd_bwrite (&ARFMAG[1], 1, arch) != 1) if (bfd_bwrite (&ARFMAG[1], 1, arch) != 1)
return FALSE; return false;
} }
} }
@ -2197,7 +2197,7 @@ _bfd_write_archive_contents (bfd *arch)
/* Write ar header. */ /* Write ar header. */
if (!_bfd_write_ar_hdr (arch, current)) if (!_bfd_write_ar_hdr (arch, current))
return FALSE; return false;
if (bfd_is_thin_archive (arch)) if (bfd_is_thin_archive (arch))
continue; continue;
if (bfd_seek (current, (file_ptr) 0, SEEK_SET) != 0) if (bfd_seek (current, (file_ptr) 0, SEEK_SET) != 0)
@ -2213,14 +2213,14 @@ _bfd_write_archive_contents (bfd *arch)
if (bfd_bread (buffer, amt, current) != amt) if (bfd_bread (buffer, amt, current) != amt)
goto input_err; goto input_err;
if (bfd_bwrite (buffer, amt, arch) != amt) if (bfd_bwrite (buffer, amt, arch) != amt)
return FALSE; return false;
remaining -= amt; remaining -= amt;
} }
if ((arelt_size (current) % 2) == 1) if ((arelt_size (current) % 2) == 1)
{ {
if (bfd_bwrite (&ARFMAG[1], 1, arch) != 1) if (bfd_bwrite (&ARFMAG[1], 1, arch) != 1)
return FALSE; return false;
} }
} }
@ -2243,16 +2243,16 @@ _bfd_write_archive_contents (bfd *arch)
while (++tries < 6); while (++tries < 6);
} }
return TRUE; return true;
input_err: input_err:
bfd_set_input_error (current, bfd_get_error ()); bfd_set_input_error (current, bfd_get_error ());
return FALSE; return false;
} }
/* Note that the namidx for the first symbol is 0. */ /* Note that the namidx for the first symbol is 0. */
bfd_boolean bool
_bfd_compute_and_write_armap (bfd *arch, unsigned int elength) _bfd_compute_and_write_armap (bfd *arch, unsigned int elength)
{ {
char *first_name = NULL; char *first_name = NULL;
@ -2264,9 +2264,9 @@ _bfd_compute_and_write_armap (bfd *arch, unsigned int elength)
int stridx = 0; int stridx = 0;
asymbol **syms = NULL; asymbol **syms = NULL;
long syms_max = 0; long syms_max = 0;
bfd_boolean ret; bool ret;
size_t amt; size_t amt;
static bfd_boolean report_plugin_err = TRUE; static bool report_plugin_err = true;
/* Dunno if this is the best place for this info... */ /* Dunno if this is the best place for this info... */
if (elength != 0) if (elength != 0)
@ -2303,7 +2303,7 @@ _bfd_compute_and_write_armap (bfd *arch, unsigned int elength)
if (current->lto_slim_object && report_plugin_err) if (current->lto_slim_object && report_plugin_err)
{ {
report_plugin_err = FALSE; report_plugin_err = false;
_bfd_error_handler _bfd_error_handler
(_("%pB: plugin needed to handle lto object"), (_("%pB: plugin needed to handle lto object"),
current); current);
@ -2363,7 +2363,7 @@ _bfd_compute_and_write_armap (bfd *arch, unsigned int elength)
"__gnu_lto_slim") == 0 "__gnu_lto_slim") == 0
&& report_plugin_err) && report_plugin_err)
{ {
report_plugin_err = FALSE; report_plugin_err = false;
_bfd_error_handler _bfd_error_handler
(_("%pB: plugin needed to handle lto object"), (_("%pB: plugin needed to handle lto object"),
current); current);
@ -2411,10 +2411,10 @@ _bfd_compute_and_write_armap (bfd *arch, unsigned int elength)
if (first_name != NULL) if (first_name != NULL)
bfd_release (arch, first_name); bfd_release (arch, first_name);
return FALSE; return false;
} }
bfd_boolean bool
_bfd_bsd_write_armap (bfd *arch, _bfd_bsd_write_armap (bfd *arch,
unsigned int elength, unsigned int elength,
struct orl *map, struct orl *map,
@ -2498,14 +2498,14 @@ _bfd_bsd_write_armap (bfd *arch,
_bfd_ar_spacepad (hdr.ar_uid, sizeof (hdr.ar_uid), "%ld", uid); _bfd_ar_spacepad (hdr.ar_uid, sizeof (hdr.ar_uid), "%ld", uid);
_bfd_ar_spacepad (hdr.ar_gid, sizeof (hdr.ar_gid), "%ld", gid); _bfd_ar_spacepad (hdr.ar_gid, sizeof (hdr.ar_gid), "%ld", gid);
if (!_bfd_ar_sizepad (hdr.ar_size, sizeof (hdr.ar_size), mapsize)) if (!_bfd_ar_sizepad (hdr.ar_size, sizeof (hdr.ar_size), mapsize))
return FALSE; return false;
memcpy (hdr.ar_fmag, ARFMAG, 2); memcpy (hdr.ar_fmag, ARFMAG, 2);
if (bfd_bwrite (&hdr, sizeof (struct ar_hdr), arch) if (bfd_bwrite (&hdr, sizeof (struct ar_hdr), arch)
!= sizeof (struct ar_hdr)) != sizeof (struct ar_hdr))
return FALSE; return false;
H_PUT_32 (arch, ranlibsize, temp); H_PUT_32 (arch, ranlibsize, temp);
if (bfd_bwrite (temp, sizeof (temp), arch) != sizeof (temp)) if (bfd_bwrite (temp, sizeof (temp), arch) != sizeof (temp))
return FALSE; return false;
firstreal = first; firstreal = first;
current = arch->archive_head; current = arch->archive_head;
@ -2536,7 +2536,7 @@ _bfd_bsd_write_armap (bfd *arch,
if (firstreal != (file_ptr) offset) if (firstreal != (file_ptr) offset)
{ {
bfd_set_error (bfd_error_file_truncated); bfd_set_error (bfd_error_file_truncated);
return FALSE; return false;
} }
last_elt = current; last_elt = current;
@ -2544,19 +2544,19 @@ _bfd_bsd_write_armap (bfd *arch,
H_PUT_32 (arch, firstreal, buf + BSD_SYMDEF_OFFSET_SIZE); H_PUT_32 (arch, firstreal, buf + BSD_SYMDEF_OFFSET_SIZE);
if (bfd_bwrite (buf, BSD_SYMDEF_SIZE, arch) if (bfd_bwrite (buf, BSD_SYMDEF_SIZE, arch)
!= BSD_SYMDEF_SIZE) != BSD_SYMDEF_SIZE)
return FALSE; return false;
} }
/* Now write the strings themselves. */ /* Now write the strings themselves. */
H_PUT_32 (arch, stringsize, temp); H_PUT_32 (arch, stringsize, temp);
if (bfd_bwrite (temp, sizeof (temp), arch) != sizeof (temp)) if (bfd_bwrite (temp, sizeof (temp), arch) != sizeof (temp))
return FALSE; return false;
for (count = 0; count < orl_count; count++) for (count = 0; count < orl_count; count++)
{ {
size_t len = strlen (*map[count].name) + 1; size_t len = strlen (*map[count].name) + 1;
if (bfd_bwrite (*map[count].name, len, arch) != len) if (bfd_bwrite (*map[count].name, len, arch) != len)
return FALSE; return false;
} }
/* The spec sez this should be a newline. But in order to be /* The spec sez this should be a newline. But in order to be
@ -2564,10 +2564,10 @@ _bfd_bsd_write_armap (bfd *arch,
if (padit) if (padit)
{ {
if (bfd_bwrite ("", 1, arch) != 1) if (bfd_bwrite ("", 1, arch) != 1)
return FALSE; return false;
} }
return TRUE; return true;
} }
/* At the end of archive file handling, update the timestamp in the /* At the end of archive file handling, update the timestamp in the
@ -2576,7 +2576,7 @@ _bfd_bsd_write_armap (bfd *arch,
Return TRUE if the timestamp was OK, or an unusual problem happened. Return TRUE if the timestamp was OK, or an unusual problem happened.
Return FALSE if we updated the timestamp. */ Return FALSE if we updated the timestamp. */
bfd_boolean bool
_bfd_archive_bsd_update_armap_timestamp (bfd *arch) _bfd_archive_bsd_update_armap_timestamp (bfd *arch)
{ {
struct stat archstat; struct stat archstat;
@ -2584,7 +2584,7 @@ _bfd_archive_bsd_update_armap_timestamp (bfd *arch)
/* If creating deterministic archives, just leave the timestamp as-is. */ /* If creating deterministic archives, just leave the timestamp as-is. */
if ((arch->flags & BFD_DETERMINISTIC_OUTPUT) != 0) if ((arch->flags & BFD_DETERMINISTIC_OUTPUT) != 0)
return TRUE; return true;
/* Flush writes, get last-write timestamp from file, and compare it /* Flush writes, get last-write timestamp from file, and compare it
to the timestamp IN the file. */ to the timestamp IN the file. */
@ -2594,11 +2594,11 @@ _bfd_archive_bsd_update_armap_timestamp (bfd *arch)
bfd_perror (_("Reading archive file mod timestamp")); bfd_perror (_("Reading archive file mod timestamp"));
/* Can't read mod time for some reason. */ /* Can't read mod time for some reason. */
return TRUE; return true;
} }
if (((long) archstat.st_mtime) <= bfd_ardata (arch)->armap_timestamp) if (((long) archstat.st_mtime) <= bfd_ardata (arch)->armap_timestamp)
/* OK by the linker's rules. */ /* OK by the linker's rules. */
return TRUE; return true;
/* Update the timestamp. */ /* Update the timestamp. */
bfd_ardata (arch)->armap_timestamp = archstat.st_mtime + ARMAP_TIME_OFFSET; bfd_ardata (arch)->armap_timestamp = archstat.st_mtime + ARMAP_TIME_OFFSET;
@ -2618,11 +2618,11 @@ _bfd_archive_bsd_update_armap_timestamp (bfd *arch)
bfd_perror (_("Writing updated armap timestamp")); bfd_perror (_("Writing updated armap timestamp"));
/* Some error while writing. */ /* Some error while writing. */
return TRUE; return true;
} }
/* We updated the timestamp successfully. */ /* We updated the timestamp successfully. */
return FALSE; return false;
} }
/* A coff armap looks like : /* A coff armap looks like :
@ -2638,7 +2638,7 @@ _bfd_archive_bsd_update_armap_timestamp (bfd *arch)
symbol name n-1 */ symbol name n-1 */
bfd_boolean bool
_bfd_coff_write_armap (bfd *arch, _bfd_coff_write_armap (bfd *arch,
unsigned int elength, unsigned int elength,
struct orl *map, struct orl *map,
@ -2701,7 +2701,7 @@ _bfd_coff_write_armap (bfd *arch,
memset (&hdr, ' ', sizeof (struct ar_hdr)); memset (&hdr, ' ', sizeof (struct ar_hdr));
hdr.ar_name[0] = '/'; hdr.ar_name[0] = '/';
if (!_bfd_ar_sizepad (hdr.ar_size, sizeof (hdr.ar_size), mapsize)) if (!_bfd_ar_sizepad (hdr.ar_size, sizeof (hdr.ar_size), mapsize))
return FALSE; return false;
_bfd_ar_spacepad (hdr.ar_date, sizeof (hdr.ar_date), "%ld", _bfd_ar_spacepad (hdr.ar_date, sizeof (hdr.ar_date), "%ld",
((arch->flags & BFD_DETERMINISTIC_OUTPUT) == 0 ((arch->flags & BFD_DETERMINISTIC_OUTPUT) == 0
? time (NULL) : 0)); ? time (NULL) : 0));
@ -2714,10 +2714,10 @@ _bfd_coff_write_armap (bfd *arch,
/* Write the ar header for this item and the number of symbols. */ /* Write the ar header for this item and the number of symbols. */
if (bfd_bwrite (&hdr, sizeof (struct ar_hdr), arch) if (bfd_bwrite (&hdr, sizeof (struct ar_hdr), arch)
!= sizeof (struct ar_hdr)) != sizeof (struct ar_hdr))
return FALSE; return false;
if (!bfd_write_bigendian_4byte_int (arch, symbol_count)) if (!bfd_write_bigendian_4byte_int (arch, symbol_count))
return FALSE; return false;
/* Two passes, first write the file offsets for each symbol - /* Two passes, first write the file offsets for each symbol -
remembering that each offset is on a two byte boundary. */ remembering that each offset is on a two byte boundary. */
@ -2741,10 +2741,10 @@ _bfd_coff_write_armap (bfd *arch,
if (archive_member_file_ptr != (file_ptr) offset) if (archive_member_file_ptr != (file_ptr) offset)
{ {
bfd_set_error (bfd_error_file_truncated); bfd_set_error (bfd_error_file_truncated);
return FALSE; return false;
} }
if (!bfd_write_bigendian_4byte_int (arch, offset)) if (!bfd_write_bigendian_4byte_int (arch, offset))
return FALSE; return false;
count++; count++;
} }
archive_member_file_ptr += sizeof (struct ar_hdr); archive_member_file_ptr += sizeof (struct ar_hdr);
@ -2764,7 +2764,7 @@ _bfd_coff_write_armap (bfd *arch,
size_t len = strlen (*map[count].name) + 1; size_t len = strlen (*map[count].name) + 1;
if (bfd_bwrite (*map[count].name, len, arch) != len) if (bfd_bwrite (*map[count].name, len, arch) != len)
return FALSE; return false;
} }
/* The spec sez this should be a newline. But in order to be /* The spec sez this should be a newline. But in order to be
@ -2772,13 +2772,13 @@ _bfd_coff_write_armap (bfd *arch,
if (padit) if (padit)
{ {
if (bfd_bwrite ("", 1, arch) != 1) if (bfd_bwrite ("", 1, arch) != 1)
return FALSE; return false;
} }
return TRUE; return true;
} }
bfd_boolean bool
_bfd_noarchive_write_armap _bfd_noarchive_write_armap
(bfd *arch ATTRIBUTE_UNUSED, (bfd *arch ATTRIBUTE_UNUSED,
unsigned int elength ATTRIBUTE_UNUSED, unsigned int elength ATTRIBUTE_UNUSED,
@ -2786,7 +2786,7 @@ _bfd_noarchive_write_armap
unsigned int orl_count ATTRIBUTE_UNUSED, unsigned int orl_count ATTRIBUTE_UNUSED,
int stridx ATTRIBUTE_UNUSED) int stridx ATTRIBUTE_UNUSED)
{ {
return TRUE; return true;
} }
static int static int
@ -2822,7 +2822,7 @@ _bfd_unlink_from_archive_parent (bfd *abfd)
} }
} }
bfd_boolean bool
_bfd_archive_close_and_cleanup (bfd *abfd) _bfd_archive_close_and_cleanup (bfd *abfd)
{ {
if (bfd_read_p (abfd) && abfd->format == bfd_archive) if (bfd_read_p (abfd) && abfd->format == bfd_archive)
@ -2852,5 +2852,5 @@ _bfd_archive_close_and_cleanup (bfd *abfd)
if (abfd->is_linker_output) if (abfd->is_linker_output)
(*abfd->link.hash->hash_table_free) (abfd); (*abfd->link.hash->hash_table_free) (abfd);
return TRUE; return true;
} }

View File

@ -34,7 +34,7 @@
/* Read an Irix 6 armap. */ /* Read an Irix 6 armap. */
bfd_boolean bool
_bfd_archive_64_bit_slurp_armap (bfd *abfd) _bfd_archive_64_bit_slurp_armap (bfd *abfd)
{ {
struct artdata *ardata = bfd_ardata (abfd); struct artdata *ardata = bfd_ardata (abfd);
@ -54,12 +54,12 @@ _bfd_archive_64_bit_slurp_armap (bfd *abfd)
/* Get the name of the first element. */ /* Get the name of the first element. */
i = bfd_bread (nextname, 16, abfd); i = bfd_bread (nextname, 16, abfd);
if (i == 0) if (i == 0)
return TRUE; return true;
if (i != 16) if (i != 16)
return FALSE; return false;
if (bfd_seek (abfd, (file_ptr) - 16, SEEK_CUR) != 0) if (bfd_seek (abfd, (file_ptr) - 16, SEEK_CUR) != 0)
return FALSE; return false;
/* Archives with traditional armaps are still permitted. */ /* Archives with traditional armaps are still permitted. */
if (startswith (nextname, "/ ")) if (startswith (nextname, "/ "))
@ -67,13 +67,13 @@ _bfd_archive_64_bit_slurp_armap (bfd *abfd)
if (! startswith (nextname, "/SYM64/ ")) if (! startswith (nextname, "/SYM64/ "))
{ {
abfd->has_armap = FALSE; abfd->has_armap = false;
return TRUE; return true;
} }
mapdata = (struct areltdata *) _bfd_read_ar_hdr (abfd); mapdata = (struct areltdata *) _bfd_read_ar_hdr (abfd);
if (mapdata == NULL) if (mapdata == NULL)
return FALSE; return false;
parsed_size = mapdata->parsed_size; parsed_size = mapdata->parsed_size;
free (mapdata); free (mapdata);
@ -81,14 +81,14 @@ _bfd_archive_64_bit_slurp_armap (bfd *abfd)
if (filesize != 0 && parsed_size > filesize) if (filesize != 0 && parsed_size > filesize)
{ {
bfd_set_error (bfd_error_malformed_archive); bfd_set_error (bfd_error_malformed_archive);
return FALSE; return false;
} }
if (bfd_bread (int_buf, 8, abfd) != 8) if (bfd_bread (int_buf, 8, abfd) != 8)
{ {
if (bfd_get_error () != bfd_error_system_call) if (bfd_get_error () != bfd_error_system_call)
bfd_set_error (bfd_error_malformed_archive); bfd_set_error (bfd_error_malformed_archive);
return FALSE; return false;
} }
nsymz = bfd_getb64 (int_buf); nsymz = bfd_getb64 (int_buf);
@ -108,11 +108,11 @@ _bfd_archive_64_bit_slurp_armap (bfd *abfd)
|| amt <= stringsize) || amt <= stringsize)
{ {
bfd_set_error (bfd_error_malformed_archive); bfd_set_error (bfd_error_malformed_archive);
return FALSE; return false;
} }
ardata->symdefs = (struct carsym *) bfd_alloc (abfd, amt); ardata->symdefs = (struct carsym *) bfd_alloc (abfd, amt);
if (ardata->symdefs == NULL) if (ardata->symdefs == NULL)
return FALSE; return false;
carsyms = ardata->symdefs; carsyms = ardata->symdefs;
stringbase = ((char *) ardata->symdefs) + carsym_size; stringbase = ((char *) ardata->symdefs) + carsym_size;
@ -142,21 +142,21 @@ _bfd_archive_64_bit_slurp_armap (bfd *abfd)
/* Pad to an even boundary if you have to. */ /* Pad to an even boundary if you have to. */
ardata->first_file_filepos += (ardata->first_file_filepos) % 2; ardata->first_file_filepos += (ardata->first_file_filepos) % 2;
abfd->has_armap = TRUE; abfd->has_armap = true;
bfd_release (abfd, raw_armap); bfd_release (abfd, raw_armap);
return TRUE; return true;
release_symdefs: release_symdefs:
bfd_release (abfd, ardata->symdefs); bfd_release (abfd, ardata->symdefs);
return FALSE; return false;
} }
/* Write out an Irix 6 armap. The Irix 6 tools are supposed to be /* Write out an Irix 6 armap. The Irix 6 tools are supposed to be
able to handle ordinary ELF armaps, but at least on Irix 6.2 the able to handle ordinary ELF armaps, but at least on Irix 6.2 the
linker crashes. */ linker crashes. */
bfd_boolean bool
_bfd_archive_64_bit_write_armap (bfd *arch, _bfd_archive_64_bit_write_armap (bfd *arch,
unsigned int elength, unsigned int elength,
struct orl *map, struct orl *map,
@ -185,7 +185,7 @@ _bfd_archive_64_bit_write_armap (bfd *arch,
memset (&hdr, ' ', sizeof (struct ar_hdr)); memset (&hdr, ' ', sizeof (struct ar_hdr));
memcpy (hdr.ar_name, "/SYM64/", strlen ("/SYM64/")); memcpy (hdr.ar_name, "/SYM64/", strlen ("/SYM64/"));
if (!_bfd_ar_sizepad (hdr.ar_size, sizeof (hdr.ar_size), mapsize)) if (!_bfd_ar_sizepad (hdr.ar_size, sizeof (hdr.ar_size), mapsize))
return FALSE; return false;
_bfd_ar_spacepad (hdr.ar_date, sizeof (hdr.ar_date), "%ld", _bfd_ar_spacepad (hdr.ar_date, sizeof (hdr.ar_date), "%ld",
time (NULL)); time (NULL));
/* This, at least, is what Intel coff sets the values to.: */ /* This, at least, is what Intel coff sets the values to.: */
@ -198,11 +198,11 @@ _bfd_archive_64_bit_write_armap (bfd *arch,
if (bfd_bwrite (&hdr, sizeof (struct ar_hdr), arch) if (bfd_bwrite (&hdr, sizeof (struct ar_hdr), arch)
!= sizeof (struct ar_hdr)) != sizeof (struct ar_hdr))
return FALSE; return false;
bfd_putb64 ((bfd_vma) symbol_count, buf); bfd_putb64 ((bfd_vma) symbol_count, buf);
if (bfd_bwrite (buf, 8, arch) != 8) if (bfd_bwrite (buf, 8, arch) != 8)
return FALSE; return false;
/* Two passes, first write the file offsets for each symbol - /* Two passes, first write the file offsets for each symbol -
remembering that each offset is on a two byte boundary. */ remembering that each offset is on a two byte boundary. */
@ -223,7 +223,7 @@ _bfd_archive_64_bit_write_armap (bfd *arch,
{ {
bfd_putb64 ((bfd_vma) archive_member_file_ptr, buf); bfd_putb64 ((bfd_vma) archive_member_file_ptr, buf);
if (bfd_bwrite (buf, 8, arch) != 8) if (bfd_bwrite (buf, 8, arch) != 8)
return FALSE; return false;
} }
/* Add size of this archive entry */ /* Add size of this archive entry */
@ -240,7 +240,7 @@ _bfd_archive_64_bit_write_armap (bfd *arch,
size_t len = strlen (*map[count].name) + 1; size_t len = strlen (*map[count].name) + 1;
if (bfd_bwrite (*map[count].name, len, arch) != len) if (bfd_bwrite (*map[count].name, len, arch) != len)
return FALSE; return false;
} }
/* The spec says that this should be padded to an 8 byte boundary. /* The spec says that this should be padded to an 8 byte boundary.
@ -248,9 +248,9 @@ _bfd_archive_64_bit_write_armap (bfd *arch,
while (padding != 0) while (padding != 0)
{ {
if (bfd_bwrite ("", 1, arch) != 1) if (bfd_bwrite ("", 1, arch) != 1)
return FALSE; return false;
--padding; --padding;
} }
return TRUE; return true;
} }

View File

@ -581,17 +581,16 @@ DESCRIPTION
. {* TRUE if this is the default machine for the architecture. . {* TRUE if this is the default machine for the architecture.
. The default arch should be the first entry for an arch so that . The default arch should be the first entry for an arch so that
. all the entries for that arch can be accessed via <<next>>. *} . all the entries for that arch can be accessed via <<next>>. *}
. bfd_boolean the_default; . bool the_default;
. const struct bfd_arch_info * (*compatible) (const struct bfd_arch_info *, . const struct bfd_arch_info * (*compatible) (const struct bfd_arch_info *,
. const struct bfd_arch_info *); . const struct bfd_arch_info *);
. .
. bfd_boolean (*scan) (const struct bfd_arch_info *, const char *); . bool (*scan) (const struct bfd_arch_info *, const char *);
. .
. {* Allocate via bfd_malloc and return a fill buffer of size COUNT. If . {* Allocate via bfd_malloc and return a fill buffer of size COUNT. If
. IS_BIGENDIAN is TRUE, the order of bytes is big endian. If CODE is . IS_BIGENDIAN is TRUE, the order of bytes is big endian. If CODE is
. TRUE, the buffer contains code. *} . TRUE, the buffer contains code. *}
. void *(*fill) (bfd_size_type count, bfd_boolean is_bigendian, . void *(*fill) (bfd_size_type count, bool is_bigendian, bool code);
. bfd_boolean code);
. .
. const struct bfd_arch_info *next; . const struct bfd_arch_info *next;
. .
@ -892,7 +891,7 @@ FUNCTION
SYNOPSIS SYNOPSIS
const bfd_arch_info_type *bfd_arch_get_compatible const bfd_arch_info_type *bfd_arch_get_compatible
(const bfd *abfd, const bfd *bbfd, bfd_boolean accept_unknowns); (const bfd *abfd, const bfd *bbfd, bool accept_unknowns);
DESCRIPTION DESCRIPTION
Determine whether two BFDs' architectures and machine types Determine whether two BFDs' architectures and machine types
@ -905,7 +904,7 @@ DESCRIPTION
const bfd_arch_info_type * const bfd_arch_info_type *
bfd_arch_get_compatible (const bfd *abfd, bfd_arch_get_compatible (const bfd *abfd,
const bfd *bbfd, const bfd *bbfd,
bfd_boolean accept_unknowns) bool accept_unknowns)
{ {
const bfd *ubfd, *kbfd; const bfd *ubfd, *kbfd;
@ -946,7 +945,7 @@ DESCRIPTION
const bfd_arch_info_type bfd_default_arch_struct = const bfd_arch_info_type bfd_default_arch_struct =
{ {
32, 32, 8, bfd_arch_unknown, 0, "unknown", "unknown", 2, TRUE, 32, 32, 8, bfd_arch_unknown, 0, "unknown", "unknown", 2, true,
bfd_default_compatible, bfd_default_compatible,
bfd_default_scan, bfd_default_scan,
bfd_arch_default_fill, bfd_arch_default_fill,
@ -975,7 +974,7 @@ FUNCTION
bfd_default_set_arch_mach bfd_default_set_arch_mach
SYNOPSIS SYNOPSIS
bfd_boolean bfd_default_set_arch_mach bool bfd_default_set_arch_mach
(bfd *abfd, enum bfd_architecture arch, unsigned long mach); (bfd *abfd, enum bfd_architecture arch, unsigned long mach);
DESCRIPTION DESCRIPTION
@ -985,18 +984,18 @@ DESCRIPTION
pointer. pointer.
*/ */
bfd_boolean bool
bfd_default_set_arch_mach (bfd *abfd, bfd_default_set_arch_mach (bfd *abfd,
enum bfd_architecture arch, enum bfd_architecture arch,
unsigned long mach) unsigned long mach)
{ {
abfd->arch_info = bfd_lookup_arch (arch, mach); abfd->arch_info = bfd_lookup_arch (arch, mach);
if (abfd->arch_info != NULL) if (abfd->arch_info != NULL)
return TRUE; return true;
abfd->arch_info = &bfd_default_arch_struct; abfd->arch_info = &bfd_default_arch_struct;
bfd_set_error (bfd_error_bad_value); bfd_set_error (bfd_error_bad_value);
return FALSE; return false;
} }
/* /*
@ -1107,7 +1106,7 @@ INTERNAL_FUNCTION
bfd_default_scan bfd_default_scan
SYNOPSIS SYNOPSIS
bfd_boolean bfd_default_scan bool bfd_default_scan
(const struct bfd_arch_info *info, const char *string); (const struct bfd_arch_info *info, const char *string);
DESCRIPTION DESCRIPTION
@ -1115,7 +1114,7 @@ DESCRIPTION
architecture hit and a machine hit. architecture hit and a machine hit.
*/ */
bfd_boolean bool
bfd_default_scan (const bfd_arch_info_type *info, const char *string) bfd_default_scan (const bfd_arch_info_type *info, const char *string)
{ {
const char *ptr_src; const char *ptr_src;
@ -1128,11 +1127,11 @@ bfd_default_scan (const bfd_arch_info_type *info, const char *string)
default architecture? */ default architecture? */
if (strcasecmp (string, info->arch_name) == 0 if (strcasecmp (string, info->arch_name) == 0
&& info->the_default) && info->the_default)
return TRUE; return true;
/* Exact match of the machine name (PRINTABLE_NAME)? */ /* Exact match of the machine name (PRINTABLE_NAME)? */
if (strcasecmp (string, info->printable_name) == 0) if (strcasecmp (string, info->printable_name) == 0)
return TRUE; return true;
/* Given that printable_name contains no colon, attempt to match: /* Given that printable_name contains no colon, attempt to match:
ARCH_NAME [ ":" ] PRINTABLE_NAME? */ ARCH_NAME [ ":" ] PRINTABLE_NAME? */
@ -1146,13 +1145,13 @@ bfd_default_scan (const bfd_arch_info_type *info, const char *string)
{ {
if (strcasecmp (string + strlen_arch_name + 1, if (strcasecmp (string + strlen_arch_name + 1,
info->printable_name) == 0) info->printable_name) == 0)
return TRUE; return true;
} }
else else
{ {
if (strcasecmp (string + strlen_arch_name, if (strcasecmp (string + strlen_arch_name,
info->printable_name) == 0) info->printable_name) == 0)
return TRUE; return true;
} }
} }
} }
@ -1165,7 +1164,7 @@ bfd_default_scan (const bfd_arch_info_type *info, const char *string)
if (strncasecmp (string, info->printable_name, colon_index) == 0 if (strncasecmp (string, info->printable_name, colon_index) == 0
&& strcasecmp (string + colon_index, && strcasecmp (string + colon_index,
info->printable_name + colon_index + 1) == 0) info->printable_name + colon_index + 1) == 0)
return TRUE; return true;
} }
/* Given that PRINTABLE_NAME has the form: <arch> ":" <mach>; Do not /* Given that PRINTABLE_NAME has the form: <arch> ":" <mach>; Do not
@ -1295,16 +1294,16 @@ bfd_default_scan (const bfd_arch_info_type *info, const char *string)
break; break;
default: default:
return FALSE; return false;
} }
if (arch != info->arch) if (arch != info->arch)
return FALSE; return false;
if (number != info->mach) if (number != info->mach)
return FALSE; return false;
return TRUE; return true;
} }
/* /*
@ -1441,8 +1440,8 @@ INTERNAL_FUNCTION
SYNOPSIS SYNOPSIS
void *bfd_arch_default_fill (bfd_size_type count, void *bfd_arch_default_fill (bfd_size_type count,
bfd_boolean is_bigendian, bool is_bigendian,
bfd_boolean code); bool code);
DESCRIPTION DESCRIPTION
Allocate via bfd_malloc and return a fill buffer of size COUNT. Allocate via bfd_malloc and return a fill buffer of size COUNT.
@ -1452,8 +1451,8 @@ DESCRIPTION
void * void *
bfd_arch_default_fill (bfd_size_type count, bfd_arch_default_fill (bfd_size_type count,
bfd_boolean is_bigendian ATTRIBUTE_UNUSED, bool is_bigendian ATTRIBUTE_UNUSED,
bfd_boolean code ATTRIBUTE_UNUSED) bool code ATTRIBUTE_UNUSED)
{ {
void *fill = bfd_malloc (count); void *fill = bfd_malloc (count);
if (fill != NULL) if (fill != NULL)
@ -1461,7 +1460,7 @@ bfd_arch_default_fill (bfd_size_type count,
return fill; return fill;
} }
bfd_boolean bool
_bfd_nowrite_set_arch_mach (bfd *abfd, _bfd_nowrite_set_arch_mach (bfd *abfd,
enum bfd_architecture arch ATTRIBUTE_UNUSED, enum bfd_architecture arch ATTRIBUTE_UNUSED,
unsigned long mach ATTRIBUTE_UNUSED) unsigned long mach ATTRIBUTE_UNUSED)

View File

@ -339,7 +339,7 @@ struct bfd_hash_table
}; };
/* Initialize a hash table. */ /* Initialize a hash table. */
extern bfd_boolean bfd_hash_table_init extern bool bfd_hash_table_init
(struct bfd_hash_table *, (struct bfd_hash_table *,
struct bfd_hash_entry *(*) (struct bfd_hash_entry *, struct bfd_hash_entry *(*) (struct bfd_hash_entry *,
struct bfd_hash_table *, struct bfd_hash_table *,
@ -347,7 +347,7 @@ extern bfd_boolean bfd_hash_table_init
unsigned int); unsigned int);
/* Initialize a hash table specifying a size. */ /* Initialize a hash table specifying a size. */
extern bfd_boolean bfd_hash_table_init_n extern bool bfd_hash_table_init_n
(struct bfd_hash_table *, (struct bfd_hash_table *,
struct bfd_hash_entry *(*) (struct bfd_hash_entry *, struct bfd_hash_entry *(*) (struct bfd_hash_entry *,
struct bfd_hash_table *, struct bfd_hash_table *,
@ -363,8 +363,7 @@ extern void bfd_hash_table_free
COPY argument must be TRUE if this routine should copy the string COPY argument must be TRUE if this routine should copy the string
into newly allocated memory when adding an entry. */ into newly allocated memory when adding an entry. */
extern struct bfd_hash_entry *bfd_hash_lookup extern struct bfd_hash_entry *bfd_hash_lookup
(struct bfd_hash_table *, const char *, bfd_boolean create, (struct bfd_hash_table *, const char *, bool create, bool copy);
bfd_boolean copy);
/* Insert an entry in a hash table. */ /* Insert an entry in a hash table. */
extern struct bfd_hash_entry *bfd_hash_insert extern struct bfd_hash_entry *bfd_hash_insert
@ -392,7 +391,7 @@ extern void *bfd_hash_allocate
INFO argument is passed to the function. */ INFO argument is passed to the function. */
extern void bfd_hash_traverse extern void bfd_hash_traverse
(struct bfd_hash_table *, (struct bfd_hash_table *,
bfd_boolean (*) (struct bfd_hash_entry *, void *), bool (*) (struct bfd_hash_entry *, void *),
void *info); void *info);
/* Allows the default size of a hash table to be configured. New hash /* Allows the default size of a hash table to be configured. New hash
@ -455,15 +454,15 @@ extern int bfd_stat (bfd *, struct stat *);
#endif #endif
extern void _bfd_warn_deprecated (const char *, const char *, int, const char *); extern void _bfd_warn_deprecated (const char *, const char *, int, const char *);
extern bfd_boolean bfd_cache_close extern bool bfd_cache_close
(bfd *abfd); (bfd *abfd);
/* NB: This declaration should match the autogenerated one in libbfd.h. */ /* NB: This declaration should match the autogenerated one in libbfd.h. */
extern bfd_boolean bfd_cache_close_all (void); extern bool bfd_cache_close_all (void);
extern bfd_boolean bfd_record_phdr extern bool bfd_record_phdr
(bfd *, unsigned long, bfd_boolean, flagword, bfd_boolean, bfd_vma, (bfd *, unsigned long, bool, flagword, bool, bfd_vma,
bfd_boolean, bfd_boolean, unsigned int, struct bfd_section **); bool, bool, unsigned int, struct bfd_section **);
/* Byte swapping routines. */ /* Byte swapping routines. */
@ -490,8 +489,8 @@ void bfd_putl16 (bfd_vma, void *);
/* Byte swapping routines which take size and endiannes as arguments. */ /* Byte swapping routines which take size and endiannes as arguments. */
bfd_uint64_t bfd_get_bits (const void *, int, bfd_boolean); bfd_uint64_t bfd_get_bits (const void *, int, bool);
void bfd_put_bits (bfd_uint64_t, void *, int, bfd_boolean); void bfd_put_bits (bfd_uint64_t, void *, int, bool);
/* mmap hacks */ /* mmap hacks */
@ -518,8 +517,8 @@ extern void bfd_init_window
(bfd_window *); (bfd_window *);
extern void bfd_free_window extern void bfd_free_window
(bfd_window *); (bfd_window *);
extern bfd_boolean bfd_get_file_window extern bool bfd_get_file_window
(bfd *, file_ptr, bfd_size_type, bfd_window *, bfd_boolean); (bfd *, file_ptr, bfd_size_type, bfd_window *, bool);
/* Externally visible ELF routines. */ /* Externally visible ELF routines. */
@ -551,7 +550,7 @@ struct bfd_link_hash_entry;
/* Return TRUE if the start of STR matches PREFIX, FALSE otherwise. */ /* Return TRUE if the start of STR matches PREFIX, FALSE otherwise. */
static inline bfd_boolean static inline bool
startswith (const char *str, const char *prefix) startswith (const char *str, const char *prefix)
{ {
return strncmp (str, prefix, strlen (prefix)) == 0; return strncmp (str, prefix, strlen (prefix)) == 0;

View File

@ -346,7 +346,7 @@ struct bfd_hash_table
}; };
/* Initialize a hash table. */ /* Initialize a hash table. */
extern bfd_boolean bfd_hash_table_init extern bool bfd_hash_table_init
(struct bfd_hash_table *, (struct bfd_hash_table *,
struct bfd_hash_entry *(*) (struct bfd_hash_entry *, struct bfd_hash_entry *(*) (struct bfd_hash_entry *,
struct bfd_hash_table *, struct bfd_hash_table *,
@ -354,7 +354,7 @@ extern bfd_boolean bfd_hash_table_init
unsigned int); unsigned int);
/* Initialize a hash table specifying a size. */ /* Initialize a hash table specifying a size. */
extern bfd_boolean bfd_hash_table_init_n extern bool bfd_hash_table_init_n
(struct bfd_hash_table *, (struct bfd_hash_table *,
struct bfd_hash_entry *(*) (struct bfd_hash_entry *, struct bfd_hash_entry *(*) (struct bfd_hash_entry *,
struct bfd_hash_table *, struct bfd_hash_table *,
@ -370,8 +370,7 @@ extern void bfd_hash_table_free
COPY argument must be TRUE if this routine should copy the string COPY argument must be TRUE if this routine should copy the string
into newly allocated memory when adding an entry. */ into newly allocated memory when adding an entry. */
extern struct bfd_hash_entry *bfd_hash_lookup extern struct bfd_hash_entry *bfd_hash_lookup
(struct bfd_hash_table *, const char *, bfd_boolean create, (struct bfd_hash_table *, const char *, bool create, bool copy);
bfd_boolean copy);
/* Insert an entry in a hash table. */ /* Insert an entry in a hash table. */
extern struct bfd_hash_entry *bfd_hash_insert extern struct bfd_hash_entry *bfd_hash_insert
@ -399,7 +398,7 @@ extern void *bfd_hash_allocate
INFO argument is passed to the function. */ INFO argument is passed to the function. */
extern void bfd_hash_traverse extern void bfd_hash_traverse
(struct bfd_hash_table *, (struct bfd_hash_table *,
bfd_boolean (*) (struct bfd_hash_entry *, void *), bool (*) (struct bfd_hash_entry *, void *),
void *info); void *info);
/* Allows the default size of a hash table to be configured. New hash /* Allows the default size of a hash table to be configured. New hash
@ -462,15 +461,15 @@ extern int bfd_stat (bfd *, struct stat *);
#endif #endif
extern void _bfd_warn_deprecated (const char *, const char *, int, const char *); extern void _bfd_warn_deprecated (const char *, const char *, int, const char *);
extern bfd_boolean bfd_cache_close extern bool bfd_cache_close
(bfd *abfd); (bfd *abfd);
/* NB: This declaration should match the autogenerated one in libbfd.h. */ /* NB: This declaration should match the autogenerated one in libbfd.h. */
extern bfd_boolean bfd_cache_close_all (void); extern bool bfd_cache_close_all (void);
extern bfd_boolean bfd_record_phdr extern bool bfd_record_phdr
(bfd *, unsigned long, bfd_boolean, flagword, bfd_boolean, bfd_vma, (bfd *, unsigned long, bool, flagword, bool, bfd_vma,
bfd_boolean, bfd_boolean, unsigned int, struct bfd_section **); bool, bool, unsigned int, struct bfd_section **);
/* Byte swapping routines. */ /* Byte swapping routines. */
@ -497,8 +496,8 @@ void bfd_putl16 (bfd_vma, void *);
/* Byte swapping routines which take size and endiannes as arguments. */ /* Byte swapping routines which take size and endiannes as arguments. */
bfd_uint64_t bfd_get_bits (const void *, int, bfd_boolean); bfd_uint64_t bfd_get_bits (const void *, int, bool);
void bfd_put_bits (bfd_uint64_t, void *, int, bfd_boolean); void bfd_put_bits (bfd_uint64_t, void *, int, bool);
/* mmap hacks */ /* mmap hacks */
@ -525,8 +524,8 @@ extern void bfd_init_window
(bfd_window *); (bfd_window *);
extern void bfd_free_window extern void bfd_free_window
(bfd_window *); (bfd_window *);
extern bfd_boolean bfd_get_file_window extern bool bfd_get_file_window
(bfd *, file_ptr, bfd_size_type, bfd_window *, bfd_boolean); (bfd *, file_ptr, bfd_size_type, bfd_window *, bool);
/* Externally visible ELF routines. */ /* Externally visible ELF routines. */
@ -558,7 +557,7 @@ struct bfd_link_hash_entry;
/* Return TRUE if the start of STR matches PREFIX, FALSE otherwise. */ /* Return TRUE if the start of STR matches PREFIX, FALSE otherwise. */
static inline bfd_boolean static inline bool
startswith (const char *str, const char *prefix) startswith (const char *str, const char *prefix)
{ {
return strncmp (str, prefix, strlen (prefix)) == 0; return strncmp (str, prefix, strlen (prefix)) == 0;
@ -602,15 +601,15 @@ bfd *bfd_openr_iovec (const char *filename, const char *target,
bfd *bfd_openw (const char *filename, const char *target); bfd *bfd_openw (const char *filename, const char *target);
bfd_boolean bfd_close (bfd *abfd); bool bfd_close (bfd *abfd);
bfd_boolean bfd_close_all_done (bfd *); bool bfd_close_all_done (bfd *);
bfd *bfd_create (const char *filename, bfd *templ); bfd *bfd_create (const char *filename, bfd *templ);
bfd_boolean bfd_make_writable (bfd *abfd); bool bfd_make_writable (bfd *abfd);
bfd_boolean bfd_make_readable (bfd *abfd); bool bfd_make_readable (bfd *abfd);
void *bfd_alloc (bfd *abfd, bfd_size_type wanted); void *bfd_alloc (bfd *abfd, bfd_size_type wanted);
@ -632,7 +631,7 @@ char *bfd_follow_gnu_debugaltlink (bfd *abfd, const char *dir);
struct bfd_section *bfd_create_gnu_debuglink_section struct bfd_section *bfd_create_gnu_debuglink_section
(bfd *abfd, const char *filename); (bfd *abfd, const char *filename);
bfd_boolean bfd_fill_in_gnu_debuglink_section bool bfd_fill_in_gnu_debuglink_section
(bfd *abfd, struct bfd_section *sect, const char *filename); (bfd *abfd, struct bfd_section *sect, const char *filename);
char *bfd_follow_build_id_debuglink (bfd *abfd, const char *dir); char *bfd_follow_build_id_debuglink (bfd *abfd, const char *dir);
@ -1244,7 +1243,7 @@ bfd_section_userdata (const asection *sec)
{ {
return sec->userdata; return sec->userdata;
} }
static inline bfd_boolean static inline bool
bfd_is_com_section (const asection *sec) bfd_is_com_section (const asection *sec)
{ {
return (sec->flags & SEC_IS_COMMON) != 0; return (sec->flags & SEC_IS_COMMON) != 0;
@ -1254,33 +1253,33 @@ bfd_is_com_section (const asection *sec)
because not all callers use the return value. A macro implementation because not all callers use the return value. A macro implementation
would use a comma expression, eg: "((ptr)->foo = val, TRUE)" and some would use a comma expression, eg: "((ptr)->foo = val, TRUE)" and some
compilers will complain about comma expressions that have no effect. */ compilers will complain about comma expressions that have no effect. */
static inline bfd_boolean static inline bool
bfd_set_section_userdata (asection *sec, void *val) bfd_set_section_userdata (asection *sec, void *val)
{ {
sec->userdata = val; sec->userdata = val;
return TRUE; return true;
} }
static inline bfd_boolean static inline bool
bfd_set_section_vma (asection *sec, bfd_vma val) bfd_set_section_vma (asection *sec, bfd_vma val)
{ {
sec->vma = sec->lma = val; sec->vma = sec->lma = val;
sec->user_set_vma = TRUE; sec->user_set_vma = true;
return TRUE; return true;
} }
static inline bfd_boolean static inline bool
bfd_set_section_lma (asection *sec, bfd_vma val) bfd_set_section_lma (asection *sec, bfd_vma val)
{ {
sec->lma = val; sec->lma = val;
return TRUE; return true;
} }
static inline bfd_boolean static inline bool
bfd_set_section_alignment (asection *sec, unsigned int val) bfd_set_section_alignment (asection *sec, unsigned int val)
{ {
sec->alignment_power = val; sec->alignment_power = val;
return TRUE; return true;
} }
/* These sections are global, and are managed by BFD. The application /* These sections are global, and are managed by BFD. The application
@ -1302,25 +1301,25 @@ extern asection _bfd_std_section[4];
/* Pointer to the indirect section. */ /* Pointer to the indirect section. */
#define bfd_ind_section_ptr (&_bfd_std_section[3]) #define bfd_ind_section_ptr (&_bfd_std_section[3])
static inline bfd_boolean static inline bool
bfd_is_und_section (const asection *sec) bfd_is_und_section (const asection *sec)
{ {
return sec == bfd_und_section_ptr; return sec == bfd_und_section_ptr;
} }
static inline bfd_boolean static inline bool
bfd_is_abs_section (const asection *sec) bfd_is_abs_section (const asection *sec)
{ {
return sec == bfd_abs_section_ptr; return sec == bfd_abs_section_ptr;
} }
static inline bfd_boolean static inline bool
bfd_is_ind_section (const asection *sec) bfd_is_ind_section (const asection *sec)
{ {
return sec == bfd_ind_section_ptr; return sec == bfd_ind_section_ptr;
} }
static inline bfd_boolean static inline bool
bfd_is_const_section (const asection *sec) bfd_is_const_section (const asection *sec)
{ {
return (sec >= _bfd_std_section return (sec >= _bfd_std_section
@ -1329,7 +1328,7 @@ bfd_is_const_section (const asection *sec)
} }
/* Return TRUE if input section SEC has been discarded. */ /* Return TRUE if input section SEC has been discarded. */
static inline bfd_boolean static inline bool
discarded_section (const asection *sec) discarded_section (const asection *sec)
{ {
return (!bfd_is_abs_section (sec) return (!bfd_is_abs_section (sec)
@ -1400,7 +1399,7 @@ asection *bfd_get_linker_section (bfd *abfd, const char *name);
asection *bfd_get_section_by_name_if asection *bfd_get_section_by_name_if
(bfd *abfd, (bfd *abfd,
const char *name, const char *name,
bfd_boolean (*func) (bfd *abfd, asection *sect, void *obj), bool (*func) (bfd *abfd, asection *sect, void *obj),
void *obj); void *obj);
char *bfd_get_unique_section_name char *bfd_get_unique_section_name
@ -1418,7 +1417,7 @@ asection *bfd_make_section_with_flags
asection *bfd_make_section (bfd *, const char *name); asection *bfd_make_section (bfd *, const char *name);
bfd_boolean bfd_set_section_flags (asection *sec, flagword flags); bool bfd_set_section_flags (asection *sec, flagword flags);
void bfd_rename_section void bfd_rename_section
(asection *sec, const char *newname); (asection *sec, const char *newname);
@ -1430,33 +1429,33 @@ void bfd_map_over_sections
asection *bfd_sections_find_if asection *bfd_sections_find_if
(bfd *abfd, (bfd *abfd,
bfd_boolean (*operation) (bfd *abfd, asection *sect, void *obj), bool (*operation) (bfd *abfd, asection *sect, void *obj),
void *obj); void *obj);
bfd_boolean bfd_set_section_size (asection *sec, bfd_size_type val); bool bfd_set_section_size (asection *sec, bfd_size_type val);
bfd_boolean bfd_set_section_contents bool bfd_set_section_contents
(bfd *abfd, asection *section, const void *data, (bfd *abfd, asection *section, const void *data,
file_ptr offset, bfd_size_type count); file_ptr offset, bfd_size_type count);
bfd_boolean bfd_get_section_contents bool bfd_get_section_contents
(bfd *abfd, asection *section, void *location, file_ptr offset, (bfd *abfd, asection *section, void *location, file_ptr offset,
bfd_size_type count); bfd_size_type count);
bfd_boolean bfd_malloc_and_get_section bool bfd_malloc_and_get_section
(bfd *abfd, asection *section, bfd_byte **buf); (bfd *abfd, asection *section, bfd_byte **buf);
bfd_boolean bfd_copy_private_section_data bool bfd_copy_private_section_data
(bfd *ibfd, asection *isec, bfd *obfd, asection *osec); (bfd *ibfd, asection *isec, bfd *obfd, asection *osec);
#define bfd_copy_private_section_data(ibfd, isection, obfd, osection) \ #define bfd_copy_private_section_data(ibfd, isection, obfd, osection) \
BFD_SEND (obfd, _bfd_copy_private_section_data, \ BFD_SEND (obfd, _bfd_copy_private_section_data, \
(ibfd, isection, obfd, osection)) (ibfd, isection, obfd, osection))
bfd_boolean bfd_generic_is_group_section (bfd *, const asection *sec); bool bfd_generic_is_group_section (bfd *, const asection *sec);
const char *bfd_generic_group_name (bfd *, const asection *sec); const char *bfd_generic_group_name (bfd *, const asection *sec);
bfd_boolean bfd_generic_discard_group (bfd *abfd, asection *group); bool bfd_generic_discard_group (bfd *abfd, asection *group);
/* Extracted from archures.c. */ /* Extracted from archures.c. */
enum bfd_architecture enum bfd_architecture
@ -1965,17 +1964,16 @@ typedef struct bfd_arch_info
/* TRUE if this is the default machine for the architecture. /* TRUE if this is the default machine for the architecture.
The default arch should be the first entry for an arch so that The default arch should be the first entry for an arch so that
all the entries for that arch can be accessed via <<next>>. */ all the entries for that arch can be accessed via <<next>>. */
bfd_boolean the_default; bool the_default;
const struct bfd_arch_info * (*compatible) (const struct bfd_arch_info *, const struct bfd_arch_info * (*compatible) (const struct bfd_arch_info *,
const struct bfd_arch_info *); const struct bfd_arch_info *);
bfd_boolean (*scan) (const struct bfd_arch_info *, const char *); bool (*scan) (const struct bfd_arch_info *, const char *);
/* Allocate via bfd_malloc and return a fill buffer of size COUNT. If /* Allocate via bfd_malloc and return a fill buffer of size COUNT. If
IS_BIGENDIAN is TRUE, the order of bytes is big endian. If CODE is IS_BIGENDIAN is TRUE, the order of bytes is big endian. If CODE is
TRUE, the buffer contains code. */ TRUE, the buffer contains code. */
void *(*fill) (bfd_size_type count, bfd_boolean is_bigendian, void *(*fill) (bfd_size_type count, bool is_bigendian, bool code);
bfd_boolean code);
const struct bfd_arch_info *next; const struct bfd_arch_info *next;
@ -1998,11 +1996,11 @@ const bfd_arch_info_type *bfd_scan_arch (const char *string);
const char **bfd_arch_list (void); const char **bfd_arch_list (void);
const bfd_arch_info_type *bfd_arch_get_compatible const bfd_arch_info_type *bfd_arch_get_compatible
(const bfd *abfd, const bfd *bbfd, bfd_boolean accept_unknowns); (const bfd *abfd, const bfd *bbfd, bool accept_unknowns);
void bfd_set_arch_info (bfd *abfd, const bfd_arch_info_type *arg); void bfd_set_arch_info (bfd *abfd, const bfd_arch_info_type *arg);
bfd_boolean bfd_default_set_arch_mach bool bfd_default_set_arch_mach
(bfd *abfd, enum bfd_architecture arch, unsigned long mach); (bfd *abfd, enum bfd_architecture arch, unsigned long mach);
enum bfd_architecture bfd_get_arch (const bfd *abfd); enum bfd_architecture bfd_get_arch (const bfd *abfd);
@ -2187,8 +2185,8 @@ struct reloc_howto_struct
{ (unsigned) type, size < 0 ? -size : size, bits, right, left, ovf, \ { (unsigned) type, size < 0 ? -size : size, bits, right, left, ovf, \
size < 0, pcrel, inplace, pcrel_off, src_mask, dst_mask, func, name } size < 0, pcrel, inplace, pcrel_off, src_mask, dst_mask, func, name }
#define EMPTY_HOWTO(C) \ #define EMPTY_HOWTO(C) \
HOWTO ((C), 0, 0, 0, FALSE, 0, complain_overflow_dont, NULL, \ HOWTO ((C), 0, 0, 0, false, 0, complain_overflow_dont, NULL, \
NULL, FALSE, 0, 0, FALSE) NULL, false, 0, 0, false)
unsigned int bfd_get_reloc_size (reloc_howto_type *); unsigned int bfd_get_reloc_size (reloc_howto_type *);
@ -2206,7 +2204,7 @@ bfd_reloc_status_type bfd_check_overflow
unsigned int addrsize, unsigned int addrsize,
bfd_vma relocation); bfd_vma relocation);
bfd_boolean bfd_reloc_offset_in_range bool bfd_reloc_offset_in_range
(reloc_howto_type *howto, (reloc_howto_type *howto,
bfd *abfd, bfd *abfd,
asection *section, asection *section,
@ -6440,14 +6438,14 @@ asymbol;
#define bfd_get_symtab_upper_bound(abfd) \ #define bfd_get_symtab_upper_bound(abfd) \
BFD_SEND (abfd, _bfd_get_symtab_upper_bound, (abfd)) BFD_SEND (abfd, _bfd_get_symtab_upper_bound, (abfd))
bfd_boolean bfd_is_local_label (bfd *abfd, asymbol *sym); bool bfd_is_local_label (bfd *abfd, asymbol *sym);
bfd_boolean bfd_is_local_label_name (bfd *abfd, const char *name); bool bfd_is_local_label_name (bfd *abfd, const char *name);
#define bfd_is_local_label_name(abfd, name) \ #define bfd_is_local_label_name(abfd, name) \
BFD_SEND (abfd, _bfd_is_local_label_name, (abfd, name)) BFD_SEND (abfd, _bfd_is_local_label_name, (abfd, name))
bfd_boolean bfd_is_target_special_symbol (bfd *abfd, asymbol *sym); bool bfd_is_target_special_symbol (bfd *abfd, asymbol *sym);
#define bfd_is_target_special_symbol(abfd, sym) \ #define bfd_is_target_special_symbol(abfd, sym) \
BFD_SEND (abfd, _bfd_is_target_special_symbol, (abfd, sym)) BFD_SEND (abfd, _bfd_is_target_special_symbol, (abfd, sym))
@ -6455,7 +6453,7 @@ bfd_boolean bfd_is_target_special_symbol (bfd *abfd, asymbol *sym);
#define bfd_canonicalize_symtab(abfd, location) \ #define bfd_canonicalize_symtab(abfd, location) \
BFD_SEND (abfd, _bfd_canonicalize_symtab, (abfd, location)) BFD_SEND (abfd, _bfd_canonicalize_symtab, (abfd, location))
bfd_boolean bfd_set_symtab bool bfd_set_symtab
(bfd *abfd, asymbol **location, unsigned int count); (bfd *abfd, asymbol **location, unsigned int count);
void bfd_print_symbol_vandf (bfd *abfd, void *file, asymbol *symbol); void bfd_print_symbol_vandf (bfd *abfd, void *file, asymbol *symbol);
@ -6470,11 +6468,11 @@ asymbol *_bfd_generic_make_empty_symbol (bfd *);
int bfd_decode_symclass (asymbol *symbol); int bfd_decode_symclass (asymbol *symbol);
bfd_boolean bfd_is_undefined_symclass (int symclass); bool bfd_is_undefined_symclass (int symclass);
void bfd_symbol_info (asymbol *symbol, symbol_info *ret); void bfd_symbol_info (asymbol *symbol, symbol_info *ret);
bfd_boolean bfd_copy_private_symbol_data bool bfd_copy_private_symbol_data
(bfd *ibfd, asymbol *isym, bfd *obfd, asymbol *osym); (bfd *ibfd, asymbol *isym, bfd *obfd, asymbol *osym);
#define bfd_copy_private_symbol_data(ibfd, isymbol, obfd, osymbol) \ #define bfd_copy_private_symbol_data(ibfd, isymbol, obfd, osymbol) \
@ -6819,7 +6817,7 @@ bfd_get_filename (const bfd *abfd)
return abfd->filename; return abfd->filename;
} }
static inline bfd_boolean static inline bool
bfd_get_cacheable (const bfd *abfd) bfd_get_cacheable (const bfd *abfd)
{ {
return abfd->cacheable; return abfd->cacheable;
@ -6867,13 +6865,13 @@ bfd_count_sections (const bfd *abfd)
return abfd->section_count; return abfd->section_count;
} }
static inline bfd_boolean static inline bool
bfd_has_map (const bfd *abfd) bfd_has_map (const bfd *abfd)
{ {
return abfd->has_armap; return abfd->has_armap;
} }
static inline bfd_boolean static inline bool
bfd_is_thin_archive (const bfd *abfd) bfd_is_thin_archive (const bfd *abfd)
{ {
return abfd->is_thin_archive; return abfd->is_thin_archive;
@ -6886,15 +6884,15 @@ bfd_usrdata (const bfd *abfd)
} }
/* See note beside bfd_set_section_userdata. */ /* See note beside bfd_set_section_userdata. */
static inline bfd_boolean static inline bool
bfd_set_cacheable (bfd * abfd, bfd_boolean val) bfd_set_cacheable (bfd * abfd, bool val)
{ {
abfd->cacheable = val; abfd->cacheable = val;
return TRUE; return true;
} }
static inline void static inline void
bfd_set_thin_archive (bfd *abfd, bfd_boolean val) bfd_set_thin_archive (bfd *abfd, bool val)
{ {
abfd->is_thin_archive = val; abfd->is_thin_archive = val;
} }
@ -7029,7 +7027,7 @@ bfd_section_list_insert_before (bfd *abfd, asection *b, asection *s)
abfd->sections = s; abfd->sections = s;
} }
static inline bfd_boolean static inline bool
bfd_section_removed_from_list (const bfd *abfd, const asection *s) bfd_section_removed_from_list (const bfd *abfd, const asection *s)
{ {
return s->next ? s->next->prev != s : abfd->section_last != s; return s->next ? s->next->prev != s : abfd->section_last != s;
@ -7101,13 +7099,13 @@ void bfd_set_reloc
#define bfd_set_reloc(abfd, asect, location, count) \ #define bfd_set_reloc(abfd, asect, location, count) \
BFD_SEND (abfd, _bfd_set_reloc, (abfd, asect, location, count)) BFD_SEND (abfd, _bfd_set_reloc, (abfd, asect, location, count))
bfd_boolean bfd_set_file_flags (bfd *abfd, flagword flags); bool bfd_set_file_flags (bfd *abfd, flagword flags);
int bfd_get_arch_size (bfd *abfd); int bfd_get_arch_size (bfd *abfd);
int bfd_get_sign_extend_vma (bfd *abfd); int bfd_get_sign_extend_vma (bfd *abfd);
bfd_boolean bfd_set_start_address (bfd *abfd, bfd_vma vma); bool bfd_set_start_address (bfd *abfd, bfd_vma vma);
unsigned int bfd_get_gp_size (bfd *abfd); unsigned int bfd_get_gp_size (bfd *abfd);
@ -7115,17 +7113,17 @@ void bfd_set_gp_size (bfd *abfd, unsigned int i);
bfd_vma bfd_scan_vma (const char *string, const char **end, int base); bfd_vma bfd_scan_vma (const char *string, const char **end, int base);
bfd_boolean bfd_copy_private_header_data (bfd *ibfd, bfd *obfd); bool bfd_copy_private_header_data (bfd *ibfd, bfd *obfd);
#define bfd_copy_private_header_data(ibfd, obfd) \ #define bfd_copy_private_header_data(ibfd, obfd) \
BFD_SEND (obfd, _bfd_copy_private_header_data, \ BFD_SEND (obfd, _bfd_copy_private_header_data, \
(ibfd, obfd)) (ibfd, obfd))
bfd_boolean bfd_copy_private_bfd_data (bfd *ibfd, bfd *obfd); bool bfd_copy_private_bfd_data (bfd *ibfd, bfd *obfd);
#define bfd_copy_private_bfd_data(ibfd, obfd) \ #define bfd_copy_private_bfd_data(ibfd, obfd) \
BFD_SEND (obfd, _bfd_copy_private_bfd_data, \ BFD_SEND (obfd, _bfd_copy_private_bfd_data, \
(ibfd, obfd)) (ibfd, obfd))
bfd_boolean bfd_set_private_flags (bfd *abfd, flagword flags); bool bfd_set_private_flags (bfd *abfd, flagword flags);
#define bfd_set_private_flags(abfd, flags) \ #define bfd_set_private_flags(abfd, flags) \
BFD_SEND (abfd, _bfd_set_private_flags, (abfd, flags)) BFD_SEND (abfd, _bfd_set_private_flags, (abfd, flags))
@ -7225,20 +7223,20 @@ bfd_boolean bfd_set_private_flags (bfd *abfd, flagword flags);
extern bfd_byte *bfd_get_relocated_section_contents extern bfd_byte *bfd_get_relocated_section_contents
(bfd *, struct bfd_link_info *, struct bfd_link_order *, bfd_byte *, (bfd *, struct bfd_link_info *, struct bfd_link_order *, bfd_byte *,
bfd_boolean, asymbol **); bool, asymbol **);
bfd_boolean bfd_alt_mach_code (bfd *abfd, int alternative); bool bfd_alt_mach_code (bfd *abfd, int alternative);
bfd_vma bfd_emul_get_maxpagesize (const char *); bfd_vma bfd_emul_get_maxpagesize (const char *);
bfd_vma bfd_emul_get_commonpagesize (const char *, bfd_boolean); bfd_vma bfd_emul_get_commonpagesize (const char *, bool);
char *bfd_demangle (bfd *, const char *, int); char *bfd_demangle (bfd *, const char *, int);
void bfd_update_compression_header void bfd_update_compression_header
(bfd *abfd, bfd_byte *contents, asection *sec); (bfd *abfd, bfd_byte *contents, asection *sec);
bfd_boolean bfd_check_compression_header bool bfd_check_compression_header
(bfd *abfd, bfd_byte *contents, asection *sec, (bfd *abfd, bfd_byte *contents, asection *sec,
bfd_size_type *uncompressed_size, bfd_size_type *uncompressed_size,
unsigned int *uncompressed_alignment_power); unsigned int *uncompressed_alignment_power);
@ -7248,7 +7246,7 @@ int bfd_get_compression_header_size (bfd *abfd, asection *sec);
bfd_size_type bfd_convert_section_size bfd_size_type bfd_convert_section_size
(bfd *ibfd, asection *isec, bfd *obfd, bfd_size_type size); (bfd *ibfd, asection *isec, bfd *obfd, bfd_size_type size);
bfd_boolean bfd_convert_section_contents bool bfd_convert_section_contents
(bfd *ibfd, asection *isec, bfd *obfd, (bfd *ibfd, asection *isec, bfd *obfd,
bfd_byte **ptr, bfd_size_type *ptr_size); bfd_byte **ptr, bfd_size_type *ptr_size);
@ -7256,7 +7254,7 @@ bfd_boolean bfd_convert_section_contents
symindex bfd_get_next_mapent symindex bfd_get_next_mapent
(bfd *abfd, symindex previous, carsym **sym); (bfd *abfd, symindex previous, carsym **sym);
bfd_boolean bfd_set_archive_head (bfd *output, bfd *new_head); bool bfd_set_archive_head (bfd *output, bfd *new_head);
bfd *bfd_openr_next_archived_file (bfd *archive, bfd *previous); bfd *bfd_openr_next_archived_file (bfd *archive, bfd *previous);
@ -7267,10 +7265,10 @@ int bfd_core_file_failing_signal (bfd *abfd);
int bfd_core_file_pid (bfd *abfd); int bfd_core_file_pid (bfd *abfd);
bfd_boolean core_file_matches_executable_p bool core_file_matches_executable_p
(bfd *core_bfd, bfd *exec_bfd); (bfd *core_bfd, bfd *exec_bfd);
bfd_boolean generic_core_file_matches_executable_p bool generic_core_file_matches_executable_p
(bfd *core_bfd, bfd *exec_bfd); (bfd *core_bfd, bfd *exec_bfd);
/* Extracted from targets.c. */ /* Extracted from targets.c. */
@ -7297,7 +7295,7 @@ bfd_boolean generic_core_file_matches_executable_p
/* Defined to TRUE if unused section symbol should be kept. */ /* Defined to TRUE if unused section symbol should be kept. */
#ifndef TARGET_KEEP_UNUSED_SECTION_SYMBOLS #ifndef TARGET_KEEP_UNUSED_SECTION_SYMBOLS
#define TARGET_KEEP_UNUSED_SECTION_SYMBOLS TRUE #define TARGET_KEEP_UNUSED_SECTION_SYMBOLS true
#endif #endif
enum bfd_flavour enum bfd_flavour
@ -7374,7 +7372,7 @@ typedef struct bfd_target
unsigned char match_priority; unsigned char match_priority;
/* TRUE if unused section symbols should be kept. */ /* TRUE if unused section symbols should be kept. */
bfd_boolean keep_unused_section_symbols; bool keep_unused_section_symbols;
/* Entries for byte swapping for data. These are different from the /* Entries for byte swapping for data. These are different from the
other entry points, since they don't take a BFD as the first argument. other entry points, since they don't take a BFD as the first argument.
@ -7408,10 +7406,10 @@ typedef struct bfd_target
bfd_cleanup (*_bfd_check_format[bfd_type_end]) (bfd *); bfd_cleanup (*_bfd_check_format[bfd_type_end]) (bfd *);
/* Set the format of a file being written. */ /* Set the format of a file being written. */
bfd_boolean (*_bfd_set_format[bfd_type_end]) (bfd *); bool (*_bfd_set_format[bfd_type_end]) (bfd *);
/* Write cached information into a file being written, at <<bfd_close>>. */ /* Write cached information into a file being written, at <<bfd_close>>. */
bfd_boolean (*_bfd_write_contents[bfd_type_end]) (bfd *); bool (*_bfd_write_contents[bfd_type_end]) (bfd *);
/* Generic entry points. */ /* Generic entry points. */
@ -7423,17 +7421,16 @@ typedef struct bfd_target
NAME##_get_section_contents_in_window NAME##_get_section_contents_in_window
/* Called when the BFD is being closed to do any necessary cleanup. */ /* Called when the BFD is being closed to do any necessary cleanup. */
bfd_boolean (*_close_and_cleanup) (bfd *); bool (*_close_and_cleanup) (bfd *);
/* Ask the BFD to free all cached information. */ /* Ask the BFD to free all cached information. */
bfd_boolean (*_bfd_free_cached_info) (bfd *); bool (*_bfd_free_cached_info) (bfd *);
/* Called when a new section is created. */ /* Called when a new section is created. */
bfd_boolean (*_new_section_hook) (bfd *, sec_ptr); bool (*_new_section_hook) (bfd *, sec_ptr);
/* Read the contents of a section. */ /* Read the contents of a section. */
bfd_boolean (*_bfd_get_section_contents) (bfd *, sec_ptr, void *, file_ptr, bool (*_bfd_get_section_contents) (bfd *, sec_ptr, void *, file_ptr,
bfd_size_type);
bfd_boolean (*_bfd_get_section_contents_in_window) (bfd *, sec_ptr,
bfd_window *, file_ptr,
bfd_size_type); bfd_size_type);
bool (*_bfd_get_section_contents_in_window) (bfd *, sec_ptr, bfd_window *,
file_ptr, bfd_size_type);
/* Entry points to copy private data. */ /* Entry points to copy private data. */
#define BFD_JUMP_TABLE_COPY(NAME) \ #define BFD_JUMP_TABLE_COPY(NAME) \
@ -7448,34 +7445,32 @@ typedef struct bfd_target
/* Called to copy BFD general private data from one object file /* Called to copy BFD general private data from one object file
to another. */ to another. */
bfd_boolean (*_bfd_copy_private_bfd_data) (bfd *, bfd *); bool (*_bfd_copy_private_bfd_data) (bfd *, bfd *);
/* Called to merge BFD general private data from one object file /* Called to merge BFD general private data from one object file
to a common output file when linking. */ to a common output file when linking. */
bfd_boolean (*_bfd_merge_private_bfd_data) (bfd *, struct bfd_link_info *); bool (*_bfd_merge_private_bfd_data) (bfd *, struct bfd_link_info *);
/* Called to initialize BFD private section data from one object file /* Called to initialize BFD private section data from one object file
to another. */ to another. */
#define bfd_init_private_section_data(ibfd, isec, obfd, osec, link_info) \ #define bfd_init_private_section_data(ibfd, isec, obfd, osec, link_info) \
BFD_SEND (obfd, _bfd_init_private_section_data, \ BFD_SEND (obfd, _bfd_init_private_section_data, \
(ibfd, isec, obfd, osec, link_info)) (ibfd, isec, obfd, osec, link_info))
bfd_boolean (*_bfd_init_private_section_data) (bfd *, sec_ptr, bfd *, bool (*_bfd_init_private_section_data) (bfd *, sec_ptr, bfd *, sec_ptr,
sec_ptr,
struct bfd_link_info *); struct bfd_link_info *);
/* Called to copy BFD private section data from one object file /* Called to copy BFD private section data from one object file
to another. */ to another. */
bfd_boolean (*_bfd_copy_private_section_data) (bfd *, sec_ptr, bfd *, bool (*_bfd_copy_private_section_data) (bfd *, sec_ptr, bfd *, sec_ptr);
sec_ptr);
/* Called to copy BFD private symbol data from one symbol /* Called to copy BFD private symbol data from one symbol
to another. */ to another. */
bfd_boolean (*_bfd_copy_private_symbol_data) (bfd *, asymbol *, bfd *, bool (*_bfd_copy_private_symbol_data) (bfd *, asymbol *,
asymbol *); bfd *, asymbol *);
/* Called to copy BFD private header data from one object file /* Called to copy BFD private header data from one object file
to another. */ to another. */
bfd_boolean (*_bfd_copy_private_header_data) (bfd *, bfd *); bool (*_bfd_copy_private_header_data) (bfd *, bfd *);
/* Called to set private backend flags. */ /* Called to set private backend flags. */
bfd_boolean (*_bfd_set_private_flags) (bfd *, flagword); bool (*_bfd_set_private_flags) (bfd *, flagword);
/* Called to print private BFD data. */ /* Called to print private BFD data. */
bfd_boolean (*_bfd_print_private_bfd_data) (bfd *, void *); bool (*_bfd_print_private_bfd_data) (bfd *, void *);
/* Core file entry points. */ /* Core file entry points. */
#define BFD_JUMP_TABLE_CORE(NAME) \ #define BFD_JUMP_TABLE_CORE(NAME) \
@ -7484,9 +7479,9 @@ typedef struct bfd_target
NAME##_core_file_matches_executable_p, \ NAME##_core_file_matches_executable_p, \
NAME##_core_file_pid NAME##_core_file_pid
char * (*_core_file_failing_command) (bfd *); char *(*_core_file_failing_command) (bfd *);
int (*_core_file_failing_signal) (bfd *); int (*_core_file_failing_signal) (bfd *);
bfd_boolean (*_core_file_matches_executable_p) (bfd *, bfd *); bool (*_core_file_matches_executable_p) (bfd *, bfd *);
int (*_core_file_pid) (bfd *); int (*_core_file_pid) (bfd *);
/* Archive entry points. */ /* Archive entry points. */
@ -7503,22 +7498,21 @@ typedef struct bfd_target
NAME##_generic_stat_arch_elt, \ NAME##_generic_stat_arch_elt, \
NAME##_update_armap_timestamp NAME##_update_armap_timestamp
bfd_boolean (*_bfd_slurp_armap) (bfd *); bool (*_bfd_slurp_armap) (bfd *);
bfd_boolean (*_bfd_slurp_extended_name_table) (bfd *); bool (*_bfd_slurp_extended_name_table) (bfd *);
bfd_boolean (*_bfd_construct_extended_name_table) (bfd *, char **, bool (*_bfd_construct_extended_name_table) (bfd *, char **,
bfd_size_type *, bfd_size_type *,
const char **); const char **);
void (*_bfd_truncate_arname) (bfd *, const char *, char *); void (*_bfd_truncate_arname) (bfd *, const char *, char *);
bfd_boolean (*write_armap) (bfd *, unsigned int, struct orl *, bool (*write_armap) (bfd *, unsigned, struct orl *, unsigned, int);
unsigned int, int); void *(*_bfd_read_ar_hdr_fn) (bfd *);
void * (*_bfd_read_ar_hdr_fn) (bfd *); bool (*_bfd_write_ar_hdr_fn) (bfd *, bfd *);
bfd_boolean (*_bfd_write_ar_hdr_fn) (bfd *, bfd *); bfd *(*openr_next_archived_file) (bfd *, bfd *);
bfd * (*openr_next_archived_file) (bfd *, bfd *);
#define bfd_get_elt_at_index(b,i) \ #define bfd_get_elt_at_index(b,i) \
BFD_SEND (b, _bfd_get_elt_at_index, (b,i)) BFD_SEND (b, _bfd_get_elt_at_index, (b,i))
bfd * (*_bfd_get_elt_at_index) (bfd *, symindex); bfd *(*_bfd_get_elt_at_index) (bfd *, symindex);
int (*_bfd_stat_arch_elt) (bfd *, struct stat *); int (*_bfd_stat_arch_elt) (bfd *, struct stat *);
bfd_boolean (*_bfd_update_armap_timestamp) (bfd *); bool (*_bfd_update_armap_timestamp) (bfd *);
/* Entry points used for symbols. */ /* Entry points used for symbols. */
#define BFD_JUMP_TABLE_SYMBOLS(NAME) \ #define BFD_JUMP_TABLE_SYMBOLS(NAME) \
@ -7546,39 +7540,39 @@ typedef struct bfd_target
bfd_print_symbol_type); bfd_print_symbol_type);
#define bfd_print_symbol(b,p,s,e) \ #define bfd_print_symbol(b,p,s,e) \
BFD_SEND (b, _bfd_print_symbol, (b,p,s,e)) BFD_SEND (b, _bfd_print_symbol, (b,p,s,e))
void (*_bfd_get_symbol_info) (bfd *, struct bfd_symbol *, void (*_bfd_get_symbol_info) (bfd *, struct bfd_symbol *, symbol_info *);
symbol_info *);
#define bfd_get_symbol_info(b,p,e) \ #define bfd_get_symbol_info(b,p,e) \
BFD_SEND (b, _bfd_get_symbol_info, (b,p,e)) BFD_SEND (b, _bfd_get_symbol_info, (b,p,e))
const char *(*_bfd_get_symbol_version_string) (bfd *, struct bfd_symbol *, const char *
bfd_boolean, (*_bfd_get_symbol_version_string) (bfd *, struct bfd_symbol *,
bfd_boolean *); bool, bool *);
#define bfd_get_symbol_version_string(b,s,p,h) \ #define bfd_get_symbol_version_string(b,s,p,h) \
BFD_SEND (b, _bfd_get_symbol_version_string, (b,s,p,h)) BFD_SEND (b, _bfd_get_symbol_version_string, (b,s,p,h))
bfd_boolean (*_bfd_is_local_label_name) (bfd *, const char *); bool (*_bfd_is_local_label_name) (bfd *, const char *);
bfd_boolean (*_bfd_is_target_special_symbol) (bfd *, asymbol *); bool (*_bfd_is_target_special_symbol) (bfd *, asymbol *);
alent * (*_get_lineno) (bfd *, struct bfd_symbol *); alent *
bfd_boolean (*_bfd_find_nearest_line) (bfd *, struct bfd_symbol **, (*_get_lineno) (bfd *, struct bfd_symbol *);
bool (*_bfd_find_nearest_line) (bfd *, struct bfd_symbol **,
struct bfd_section *, bfd_vma, struct bfd_section *, bfd_vma,
const char **, const char **, const char **, const char **,
unsigned int *, unsigned int *); unsigned int *, unsigned int *);
bfd_boolean (*_bfd_find_line) (bfd *, struct bfd_symbol **, bool (*_bfd_find_line) (bfd *, struct bfd_symbol **,
struct bfd_symbol *, const char **, struct bfd_symbol *, const char **,
unsigned int *); unsigned int *);
bfd_boolean (*_bfd_find_inliner_info) bool (*_bfd_find_inliner_info)
(bfd *, const char **, const char **, unsigned int *); (bfd *, const char **, const char **, unsigned int *);
/* Back-door to allow format-aware applications to create debug symbols /* Back-door to allow format-aware applications to create debug symbols
while using BFD for everything else. Currently used by the assembler while using BFD for everything else. Currently used by the assembler
when creating COFF files. */ when creating COFF files. */
asymbol * (*_bfd_make_debug_symbol) (bfd *, void *, unsigned long size); asymbol *
(*_bfd_make_debug_symbol) (bfd *, void *, unsigned long size);
#define bfd_read_minisymbols(b, d, m, s) \ #define bfd_read_minisymbols(b, d, m, s) \
BFD_SEND (b, _read_minisymbols, (b, d, m, s)) BFD_SEND (b, _read_minisymbols, (b, d, m, s))
long (*_read_minisymbols) (bfd *, bfd_boolean, void **, long (*_read_minisymbols) (bfd *, bool, void **, unsigned int *);
unsigned int *);
#define bfd_minisymbol_to_symbol(b, d, m, f) \ #define bfd_minisymbol_to_symbol(b, d, m, f) \
BFD_SEND (b, _minisymbol_to_symbol, (b, d, m, f)) BFD_SEND (b, _minisymbol_to_symbol, (b, d, m, f))
asymbol * (*_minisymbol_to_symbol) (bfd *, bfd_boolean, const void *, asymbol *
asymbol *); (*_minisymbol_to_symbol) (bfd *, bool, const void *, asymbol *);
/* Routines for relocs. */ /* Routines for relocs. */
#define BFD_JUMP_TABLE_RELOCS(NAME) \ #define BFD_JUMP_TABLE_RELOCS(NAME) \
@ -7603,9 +7597,9 @@ typedef struct bfd_target
NAME##_set_arch_mach, \ NAME##_set_arch_mach, \
NAME##_set_section_contents NAME##_set_section_contents
bfd_boolean (*_bfd_set_arch_mach) (bfd *, enum bfd_architecture, bool (*_bfd_set_arch_mach) (bfd *, enum bfd_architecture,
unsigned long); unsigned long);
bfd_boolean (*_bfd_set_section_contents) (bfd *, sec_ptr, const void *, bool (*_bfd_set_section_contents) (bfd *, sec_ptr, const void *,
file_ptr, bfd_size_type); file_ptr, bfd_size_type);
/* Routines used by the linker. */ /* Routines used by the linker. */
@ -7632,14 +7626,15 @@ typedef struct bfd_target
NAME##_bfd_define_start_stop NAME##_bfd_define_start_stop
int (*_bfd_sizeof_headers) (bfd *, struct bfd_link_info *); int (*_bfd_sizeof_headers) (bfd *, struct bfd_link_info *);
bfd_byte * (*_bfd_get_relocated_section_contents) (bfd *, bfd_byte *
(*_bfd_get_relocated_section_contents) (bfd *,
struct bfd_link_info *, struct bfd_link_info *,
struct bfd_link_order *, struct bfd_link_order *,
bfd_byte *, bfd_boolean, bfd_byte *, bool,
struct bfd_symbol **); struct bfd_symbol **);
bfd_boolean (*_bfd_relax_section) (bfd *, struct bfd_section *, bool (*_bfd_relax_section) (bfd *, struct bfd_section *,
struct bfd_link_info *, bfd_boolean *); struct bfd_link_info *, bool *);
/* Create a hash table for the linker. Different backends store /* Create a hash table for the linker. Different backends store
different information in this table. */ different information in this table. */
@ -7647,7 +7642,7 @@ typedef struct bfd_target
(*_bfd_link_hash_table_create) (bfd *); (*_bfd_link_hash_table_create) (bfd *);
/* Add symbols from this object file into the hash table. */ /* Add symbols from this object file into the hash table. */
bfd_boolean (*_bfd_link_add_symbols) (bfd *, struct bfd_link_info *); bool (*_bfd_link_add_symbols) (bfd *, struct bfd_link_info *);
/* Indicate that we are only retrieving symbol values from this section. */ /* Indicate that we are only retrieving symbol values from this section. */
void (*_bfd_link_just_syms) (asection *, struct bfd_link_info *); void (*_bfd_link_just_syms) (asection *, struct bfd_link_info *);
@ -7662,40 +7657,40 @@ typedef struct bfd_target
/* Do a link based on the link_order structures attached to each /* Do a link based on the link_order structures attached to each
section of the BFD. */ section of the BFD. */
bfd_boolean (*_bfd_final_link) (bfd *, struct bfd_link_info *); bool (*_bfd_final_link) (bfd *, struct bfd_link_info *);
/* Should this section be split up into smaller pieces during linking. */ /* Should this section be split up into smaller pieces during linking. */
bfd_boolean (*_bfd_link_split_section) (bfd *, struct bfd_section *); bool (*_bfd_link_split_section) (bfd *, struct bfd_section *);
/* Check the relocations in the bfd for validity. */ /* Check the relocations in the bfd for validity. */
bfd_boolean (* _bfd_link_check_relocs)(bfd *, struct bfd_link_info *); bool (* _bfd_link_check_relocs)(bfd *, struct bfd_link_info *);
/* Remove sections that are not referenced from the output. */ /* Remove sections that are not referenced from the output. */
bfd_boolean (*_bfd_gc_sections) (bfd *, struct bfd_link_info *); bool (*_bfd_gc_sections) (bfd *, struct bfd_link_info *);
/* Sets the bitmask of allowed and disallowed section flags. */ /* Sets the bitmask of allowed and disallowed section flags. */
bfd_boolean (*_bfd_lookup_section_flags) (struct bfd_link_info *, bool (*_bfd_lookup_section_flags) (struct bfd_link_info *,
struct flag_info *, asection *); struct flag_info *, asection *);
/* Attempt to merge SEC_MERGE sections. */ /* Attempt to merge SEC_MERGE sections. */
bfd_boolean (*_bfd_merge_sections) (bfd *, struct bfd_link_info *); bool (*_bfd_merge_sections) (bfd *, struct bfd_link_info *);
/* Is this section a member of a group? */ /* Is this section a member of a group? */
bfd_boolean (*_bfd_is_group_section) (bfd *, const struct bfd_section *); bool (*_bfd_is_group_section) (bfd *, const struct bfd_section *);
/* The group name, if section is a member of a group. */ /* The group name, if section is a member of a group. */
const char *(*_bfd_group_name) (bfd *, const struct bfd_section *); const char *(*_bfd_group_name) (bfd *, const struct bfd_section *);
/* Discard members of a group. */ /* Discard members of a group. */
bfd_boolean (*_bfd_discard_group) (bfd *, struct bfd_section *); bool (*_bfd_discard_group) (bfd *, struct bfd_section *);
/* Check if SEC has been already linked during a reloceatable or /* Check if SEC has been already linked during a reloceatable or
final link. */ final link. */
bfd_boolean (*_section_already_linked) (bfd *, asection *, bool (*_section_already_linked) (bfd *, asection *,
struct bfd_link_info *); struct bfd_link_info *);
/* Define a common symbol. */ /* Define a common symbol. */
bfd_boolean (*_bfd_define_common_symbol) (bfd *, struct bfd_link_info *, bool (*_bfd_define_common_symbol) (bfd *, struct bfd_link_info *,
struct bfd_link_hash_entry *); struct bfd_link_hash_entry *);
/* Hide a symbol. */ /* Hide a symbol. */
@ -7756,31 +7751,31 @@ bfd_applicable_file_flags (const bfd *abfd)
return abfd->xvec->object_flags; return abfd->xvec->object_flags;
} }
static inline bfd_boolean static inline bool
bfd_family_coff (const bfd *abfd) bfd_family_coff (const bfd *abfd)
{ {
return (bfd_get_flavour (abfd) == bfd_target_coff_flavour return (bfd_get_flavour (abfd) == bfd_target_coff_flavour
|| bfd_get_flavour (abfd) == bfd_target_xcoff_flavour); || bfd_get_flavour (abfd) == bfd_target_xcoff_flavour);
} }
static inline bfd_boolean static inline bool
bfd_big_endian (const bfd *abfd) bfd_big_endian (const bfd *abfd)
{ {
return abfd->xvec->byteorder == BFD_ENDIAN_BIG; return abfd->xvec->byteorder == BFD_ENDIAN_BIG;
} }
static inline bfd_boolean static inline bool
bfd_little_endian (const bfd *abfd) bfd_little_endian (const bfd *abfd)
{ {
return abfd->xvec->byteorder == BFD_ENDIAN_LITTLE; return abfd->xvec->byteorder == BFD_ENDIAN_LITTLE;
} }
static inline bfd_boolean static inline bool
bfd_header_big_endian (const bfd *abfd) bfd_header_big_endian (const bfd *abfd)
{ {
return abfd->xvec->header_byteorder == BFD_ENDIAN_BIG; return abfd->xvec->header_byteorder == BFD_ENDIAN_BIG;
} }
static inline bfd_boolean static inline bool
bfd_header_little_endian (const bfd *abfd) bfd_header_little_endian (const bfd *abfd)
{ {
return abfd->xvec->header_byteorder == BFD_ENDIAN_LITTLE; return abfd->xvec->header_byteorder == BFD_ENDIAN_LITTLE;
@ -7806,19 +7801,19 @@ bfd_asymbol_flavour (const asymbol *sy)
return sy->the_bfd->xvec->flavour; return sy->the_bfd->xvec->flavour;
} }
static inline bfd_boolean static inline bool
bfd_keep_unused_section_symbols (const bfd *abfd) bfd_keep_unused_section_symbols (const bfd *abfd)
{ {
return abfd->xvec->keep_unused_section_symbols; return abfd->xvec->keep_unused_section_symbols;
} }
bfd_boolean bfd_set_default_target (const char *name); bool bfd_set_default_target (const char *name);
const bfd_target *bfd_find_target (const char *target_name, bfd *abfd); const bfd_target *bfd_find_target (const char *target_name, bfd *abfd);
const bfd_target *bfd_get_target_info (const char *target_name, const bfd_target *bfd_get_target_info (const char *target_name,
bfd *abfd, bfd *abfd,
bfd_boolean *is_bigendian, bool *is_bigendian,
int *underscoring, int *underscoring,
const char **def_target_arch); const char **def_target_arch);
const char ** bfd_target_list (void); const char ** bfd_target_list (void);
@ -7830,12 +7825,12 @@ const bfd_target *bfd_iterate_over_targets
const char *bfd_flavour_name (enum bfd_flavour flavour); const char *bfd_flavour_name (enum bfd_flavour flavour);
/* Extracted from format.c. */ /* Extracted from format.c. */
bfd_boolean bfd_check_format (bfd *abfd, bfd_format format); bool bfd_check_format (bfd *abfd, bfd_format format);
bfd_boolean bfd_check_format_matches bool bfd_check_format_matches
(bfd *abfd, bfd_format format, char ***matching); (bfd *abfd, bfd_format format, char ***matching);
bfd_boolean bfd_set_format (bfd *abfd, bfd_format format); bool bfd_set_format (bfd *abfd, bfd_format format);
const char *bfd_format_string (bfd_format format); const char *bfd_format_string (bfd_format format);
@ -7851,19 +7846,19 @@ const char *bfd_format_string (bfd_format format);
&& bfd_is_abs_section ((H)->u.def.section) \ && bfd_is_abs_section ((H)->u.def.section) \
&& !(H)->rel_from_abs) && !(H)->rel_from_abs)
bfd_boolean bfd_link_split_section (bfd *abfd, asection *sec); bool bfd_link_split_section (bfd *abfd, asection *sec);
#define bfd_link_split_section(abfd, sec) \ #define bfd_link_split_section(abfd, sec) \
BFD_SEND (abfd, _bfd_link_split_section, (abfd, sec)) BFD_SEND (abfd, _bfd_link_split_section, (abfd, sec))
bfd_boolean bfd_section_already_linked (bfd *abfd, bool bfd_section_already_linked (bfd *abfd,
asection *sec, asection *sec,
struct bfd_link_info *info); struct bfd_link_info *info);
#define bfd_section_already_linked(abfd, sec, info) \ #define bfd_section_already_linked(abfd, sec, info) \
BFD_SEND (abfd, _section_already_linked, (abfd, sec, info)) BFD_SEND (abfd, _section_already_linked, (abfd, sec, info))
bfd_boolean bfd_generic_define_common_symbol bool bfd_generic_define_common_symbol
(bfd *output_bfd, struct bfd_link_info *info, (bfd *output_bfd, struct bfd_link_info *info,
struct bfd_link_hash_entry *h); struct bfd_link_hash_entry *h);
@ -7886,18 +7881,18 @@ struct bfd_link_hash_entry *bfd_generic_define_start_stop
struct bfd_elf_version_tree * bfd_find_version_for_sym struct bfd_elf_version_tree * bfd_find_version_for_sym
(struct bfd_elf_version_tree *verdefs, (struct bfd_elf_version_tree *verdefs,
const char *sym_name, bfd_boolean *hide); const char *sym_name, bool *hide);
bfd_boolean bfd_hide_sym_by_version bool bfd_hide_sym_by_version
(struct bfd_elf_version_tree *verdefs, const char *sym_name); (struct bfd_elf_version_tree *verdefs, const char *sym_name);
bfd_boolean bfd_link_check_relocs bool bfd_link_check_relocs
(bfd *abfd, struct bfd_link_info *info); (bfd *abfd, struct bfd_link_info *info);
bfd_boolean _bfd_generic_link_check_relocs bool _bfd_generic_link_check_relocs
(bfd *abfd, struct bfd_link_info *info); (bfd *abfd, struct bfd_link_info *info);
bfd_boolean bfd_merge_private_bfd_data bool bfd_merge_private_bfd_data
(bfd *ibfd, struct bfd_link_info *info); (bfd *ibfd, struct bfd_link_info *info);
#define bfd_merge_private_bfd_data(ibfd, info) \ #define bfd_merge_private_bfd_data(ibfd, info) \
@ -7908,28 +7903,28 @@ bfd_byte *bfd_simple_get_relocated_section_contents
(bfd *abfd, asection *sec, bfd_byte *outbuf, asymbol **symbol_table); (bfd *abfd, asection *sec, bfd_byte *outbuf, asymbol **symbol_table);
/* Extracted from compress.c. */ /* Extracted from compress.c. */
bfd_boolean bfd_get_full_section_contents bool bfd_get_full_section_contents
(bfd *abfd, asection *section, bfd_byte **ptr); (bfd *abfd, asection *section, bfd_byte **ptr);
void bfd_cache_section_contents void bfd_cache_section_contents
(asection *sec, void *contents); (asection *sec, void *contents);
bfd_boolean bfd_is_section_compressed_with_header bool bfd_is_section_compressed_with_header
(bfd *abfd, asection *section, (bfd *abfd, asection *section,
int *compression_header_size_p, int *compression_header_size_p,
bfd_size_type *uncompressed_size_p, bfd_size_type *uncompressed_size_p,
unsigned int *uncompressed_alignment_power_p); unsigned int *uncompressed_alignment_power_p);
bfd_boolean bfd_is_section_compressed bool bfd_is_section_compressed
(bfd *abfd, asection *section); (bfd *abfd, asection *section);
bfd_boolean bfd_init_section_decompress_status bool bfd_init_section_decompress_status
(bfd *abfd, asection *section); (bfd *abfd, asection *section);
bfd_boolean bfd_init_section_compress_status bool bfd_init_section_compress_status
(bfd *abfd, asection *section); (bfd *abfd, asection *section);
bfd_boolean bfd_compress_section bool bfd_compress_section
(bfd *abfd, asection *section, bfd_byte *uncompressed_buffer); (bfd *abfd, asection *section, bfd_byte *uncompressed_buffer);
#ifdef __cplusplus #ifdef __cplusplus

118
bfd/bfd.c
View File

@ -372,7 +372,7 @@ CODE_FRAGMENT
. return abfd->filename; . return abfd->filename;
.} .}
. .
.static inline bfd_boolean .static inline bool
.bfd_get_cacheable (const bfd *abfd) .bfd_get_cacheable (const bfd *abfd)
.{ .{
. return abfd->cacheable; . return abfd->cacheable;
@ -420,13 +420,13 @@ CODE_FRAGMENT
. return abfd->section_count; . return abfd->section_count;
.} .}
. .
.static inline bfd_boolean .static inline bool
.bfd_has_map (const bfd *abfd) .bfd_has_map (const bfd *abfd)
.{ .{
. return abfd->has_armap; . return abfd->has_armap;
.} .}
. .
.static inline bfd_boolean .static inline bool
.bfd_is_thin_archive (const bfd *abfd) .bfd_is_thin_archive (const bfd *abfd)
.{ .{
. return abfd->is_thin_archive; . return abfd->is_thin_archive;
@ -439,15 +439,15 @@ CODE_FRAGMENT
.} .}
. .
.{* See note beside bfd_set_section_userdata. *} .{* See note beside bfd_set_section_userdata. *}
.static inline bfd_boolean .static inline bool
.bfd_set_cacheable (bfd * abfd, bfd_boolean val) .bfd_set_cacheable (bfd * abfd, bool val)
.{ .{
. abfd->cacheable = val; . abfd->cacheable = val;
. return TRUE; . return true;
.} .}
. .
.static inline void .static inline void
.bfd_set_thin_archive (bfd *abfd, bfd_boolean val) .bfd_set_thin_archive (bfd *abfd, bool val)
.{ .{
. abfd->is_thin_archive = val; . abfd->is_thin_archive = val;
.} .}
@ -582,7 +582,7 @@ CODE_FRAGMENT
. abfd->sections = s; . abfd->sections = s;
.} .}
. .
.static inline bfd_boolean .static inline bool
.bfd_section_removed_from_list (const bfd *abfd, const asection *s) .bfd_section_removed_from_list (const bfd *abfd, const asection *s)
.{ .{
. return s->next ? s->next->prev != s : abfd->section_last != s; . return s->next ? s->next->prev != s : abfd->section_last != s;
@ -1615,7 +1615,7 @@ FUNCTION
bfd_set_file_flags bfd_set_file_flags
SYNOPSIS SYNOPSIS
bfd_boolean bfd_set_file_flags (bfd *abfd, flagword flags); bool bfd_set_file_flags (bfd *abfd, flagword flags);
DESCRIPTION DESCRIPTION
Set the flag word in the BFD @var{abfd} to the value @var{flags}. Set the flag word in the BFD @var{abfd} to the value @var{flags}.
@ -1630,29 +1630,29 @@ DESCRIPTION
*/ */
bfd_boolean bool
bfd_set_file_flags (bfd *abfd, flagword flags) bfd_set_file_flags (bfd *abfd, flagword flags)
{ {
if (abfd->format != bfd_object) if (abfd->format != bfd_object)
{ {
bfd_set_error (bfd_error_wrong_format); bfd_set_error (bfd_error_wrong_format);
return FALSE; return false;
} }
if (bfd_read_p (abfd)) if (bfd_read_p (abfd))
{ {
bfd_set_error (bfd_error_invalid_operation); bfd_set_error (bfd_error_invalid_operation);
return FALSE; return false;
} }
abfd->flags = flags; abfd->flags = flags;
if ((flags & bfd_applicable_file_flags (abfd)) != flags) if ((flags & bfd_applicable_file_flags (abfd)) != flags)
{ {
bfd_set_error (bfd_error_invalid_operation); bfd_set_error (bfd_error_invalid_operation);
return FALSE; return false;
} }
return TRUE; return true;
} }
void void
@ -1769,7 +1769,7 @@ FUNCTION
bfd_set_start_address bfd_set_start_address
SYNOPSIS SYNOPSIS
bfd_boolean bfd_set_start_address (bfd *abfd, bfd_vma vma); bool bfd_set_start_address (bfd *abfd, bfd_vma vma);
DESCRIPTION DESCRIPTION
Make @var{vma} the entry point of output BFD @var{abfd}. Make @var{vma} the entry point of output BFD @var{abfd}.
@ -1778,11 +1778,11 @@ RETURNS
Returns <<TRUE>> on success, <<FALSE>> otherwise. Returns <<TRUE>> on success, <<FALSE>> otherwise.
*/ */
bfd_boolean bool
bfd_set_start_address (bfd *abfd, bfd_vma vma) bfd_set_start_address (bfd *abfd, bfd_vma vma)
{ {
abfd->start_address = vma; abfd->start_address = vma;
return TRUE; return true;
} }
/* /*
@ -1970,7 +1970,7 @@ FUNCTION
bfd_copy_private_header_data bfd_copy_private_header_data
SYNOPSIS SYNOPSIS
bfd_boolean bfd_copy_private_header_data (bfd *ibfd, bfd *obfd); bool bfd_copy_private_header_data (bfd *ibfd, bfd *obfd);
DESCRIPTION DESCRIPTION
Copy private BFD header information from the BFD @var{ibfd} to the Copy private BFD header information from the BFD @var{ibfd} to the
@ -1993,7 +1993,7 @@ FUNCTION
bfd_copy_private_bfd_data bfd_copy_private_bfd_data
SYNOPSIS SYNOPSIS
bfd_boolean bfd_copy_private_bfd_data (bfd *ibfd, bfd *obfd); bool bfd_copy_private_bfd_data (bfd *ibfd, bfd *obfd);
DESCRIPTION DESCRIPTION
Copy private BFD information from the BFD @var{ibfd} to the Copy private BFD information from the BFD @var{ibfd} to the
@ -2014,7 +2014,7 @@ FUNCTION
bfd_set_private_flags bfd_set_private_flags
SYNOPSIS SYNOPSIS
bfd_boolean bfd_set_private_flags (bfd *abfd, flagword flags); bool bfd_set_private_flags (bfd *abfd, flagword flags);
DESCRIPTION DESCRIPTION
Set private BFD flag information in the BFD @var{abfd}. Set private BFD flag information in the BFD @var{abfd}.
@ -2132,7 +2132,7 @@ DESCRIPTION
. .
.extern bfd_byte *bfd_get_relocated_section_contents .extern bfd_byte *bfd_get_relocated_section_contents
. (bfd *, struct bfd_link_info *, struct bfd_link_order *, bfd_byte *, . (bfd *, struct bfd_link_info *, struct bfd_link_order *, bfd_byte *,
. bfd_boolean, asymbol **); . bool, asymbol **);
. .
*/ */
@ -2142,12 +2142,12 @@ bfd_get_relocated_section_contents (bfd *abfd,
struct bfd_link_info *link_info, struct bfd_link_info *link_info,
struct bfd_link_order *link_order, struct bfd_link_order *link_order,
bfd_byte *data, bfd_byte *data,
bfd_boolean relocatable, bool relocatable,
asymbol **symbols) asymbol **symbols)
{ {
bfd *abfd2; bfd *abfd2;
bfd_byte *(*fn) (bfd *, struct bfd_link_info *, struct bfd_link_order *, bfd_byte *(*fn) (bfd *, struct bfd_link_info *, struct bfd_link_order *,
bfd_byte *, bfd_boolean, asymbol **); bfd_byte *, bool, asymbol **);
if (link_order->type == bfd_indirect_link_order) if (link_order->type == bfd_indirect_link_order)
{ {
@ -2165,15 +2165,15 @@ bfd_get_relocated_section_contents (bfd *abfd,
/* Record information about an ELF program header. */ /* Record information about an ELF program header. */
bfd_boolean bool
bfd_record_phdr (bfd *abfd, bfd_record_phdr (bfd *abfd,
unsigned long type, unsigned long type,
bfd_boolean flags_valid, bool flags_valid,
flagword flags, flagword flags,
bfd_boolean at_valid, bool at_valid,
bfd_vma at, /* Bytes. */ bfd_vma at, /* Bytes. */
bfd_boolean includes_filehdr, bool includes_filehdr,
bfd_boolean includes_phdrs, bool includes_phdrs,
unsigned int count, unsigned int count,
asection **secs) asection **secs)
{ {
@ -2182,13 +2182,13 @@ bfd_record_phdr (bfd *abfd,
unsigned int opb = bfd_octets_per_byte (abfd, NULL); unsigned int opb = bfd_octets_per_byte (abfd, NULL);
if (bfd_get_flavour (abfd) != bfd_target_elf_flavour) if (bfd_get_flavour (abfd) != bfd_target_elf_flavour)
return TRUE; return true;
amt = sizeof (struct elf_segment_map); amt = sizeof (struct elf_segment_map);
amt += ((bfd_size_type) count - 1) * sizeof (asection *); amt += ((bfd_size_type) count - 1) * sizeof (asection *);
m = (struct elf_segment_map *) bfd_zalloc (abfd, amt); m = (struct elf_segment_map *) bfd_zalloc (abfd, amt);
if (m == NULL) if (m == NULL)
return FALSE; return false;
m->p_type = type; m->p_type = type;
m->p_flags = flags; m->p_flags = flags;
@ -2205,13 +2205,13 @@ bfd_record_phdr (bfd *abfd,
; ;
*pm = m; *pm = m;
return TRUE; return true;
} }
#ifdef BFD64 #ifdef BFD64
/* Return true iff this target is 32-bit. */ /* Return true iff this target is 32-bit. */
static bfd_boolean static bool
is32bit (bfd *abfd) is32bit (bfd *abfd)
{ {
if (bfd_get_flavour (abfd) == bfd_target_elf_flavour) if (bfd_get_flavour (abfd) == bfd_target_elf_flavour)
@ -2259,7 +2259,7 @@ FUNCTION
bfd_alt_mach_code bfd_alt_mach_code
SYNOPSIS SYNOPSIS
bfd_boolean bfd_alt_mach_code (bfd *abfd, int alternative); bool bfd_alt_mach_code (bfd *abfd, int alternative);
DESCRIPTION DESCRIPTION
@ -2270,7 +2270,7 @@ DESCRIPTION
machine codes. machine codes.
*/ */
bfd_boolean bool
bfd_alt_mach_code (bfd *abfd, int alternative) bfd_alt_mach_code (bfd *abfd, int alternative)
{ {
if (bfd_get_flavour (abfd) == bfd_target_elf_flavour) if (bfd_get_flavour (abfd) == bfd_target_elf_flavour)
@ -2286,25 +2286,25 @@ bfd_alt_mach_code (bfd *abfd, int alternative)
case 1: case 1:
code = get_elf_backend_data (abfd)->elf_machine_alt1; code = get_elf_backend_data (abfd)->elf_machine_alt1;
if (code == 0) if (code == 0)
return FALSE; return false;
break; break;
case 2: case 2:
code = get_elf_backend_data (abfd)->elf_machine_alt2; code = get_elf_backend_data (abfd)->elf_machine_alt2;
if (code == 0) if (code == 0)
return FALSE; return false;
break; break;
default: default:
return FALSE; return false;
} }
elf_elfheader (abfd)->e_machine = code; elf_elfheader (abfd)->e_machine = code;
return TRUE; return true;
} }
return FALSE; return false;
} }
/* /*
@ -2340,7 +2340,7 @@ FUNCTION
bfd_emul_get_commonpagesize bfd_emul_get_commonpagesize
SYNOPSIS SYNOPSIS
bfd_vma bfd_emul_get_commonpagesize (const char *, bfd_boolean); bfd_vma bfd_emul_get_commonpagesize (const char *, bool);
DESCRIPTION DESCRIPTION
Returns the common page size, in bytes, as determined by Returns the common page size, in bytes, as determined by
@ -2351,7 +2351,7 @@ RETURNS
*/ */
bfd_vma bfd_vma
bfd_emul_get_commonpagesize (const char *emul, bfd_boolean relro) bfd_emul_get_commonpagesize (const char *emul, bool relro)
{ {
const bfd_target *target; const bfd_target *target;
@ -2391,7 +2391,7 @@ bfd_demangle (bfd *abfd, const char *name, int options)
char *res, *alloc; char *res, *alloc;
const char *pre, *suf; const char *pre, *suf;
size_t pre_len; size_t pre_len;
bfd_boolean skip_lead; bool skip_lead;
skip_lead = (abfd != NULL skip_lead = (abfd != NULL
&& *name != '\0' && *name != '\0'
@ -2542,7 +2542,7 @@ bfd_update_compression_header (bfd *abfd, bfd_byte *contents,
bfd_check_compression_header bfd_check_compression_header
SYNOPSIS SYNOPSIS
bfd_boolean bfd_check_compression_header bool bfd_check_compression_header
(bfd *abfd, bfd_byte *contents, asection *sec, (bfd *abfd, bfd_byte *contents, asection *sec,
bfd_size_type *uncompressed_size, bfd_size_type *uncompressed_size,
unsigned int *uncompressed_alignment_power); unsigned int *uncompressed_alignment_power);
@ -2557,7 +2557,7 @@ RETURNS
Return TRUE if the compression header is valid. Return TRUE if the compression header is valid.
*/ */
bfd_boolean bool
bfd_check_compression_header (bfd *abfd, bfd_byte *contents, bfd_check_compression_header (bfd *abfd, bfd_byte *contents,
asection *sec, asection *sec,
bfd_size_type *uncompressed_size, bfd_size_type *uncompressed_size,
@ -2587,11 +2587,11 @@ bfd_check_compression_header (bfd *abfd, bfd_byte *contents,
{ {
*uncompressed_size = chdr.ch_size; *uncompressed_size = chdr.ch_size;
*uncompressed_alignment_power = bfd_log2 (chdr.ch_addralign); *uncompressed_alignment_power = bfd_log2 (chdr.ch_addralign);
return TRUE; return true;
} }
} }
return FALSE; return false;
} }
/* /*
@ -2686,7 +2686,7 @@ FUNCTION
bfd_convert_section_contents bfd_convert_section_contents
SYNOPSIS SYNOPSIS
bfd_boolean bfd_convert_section_contents bool bfd_convert_section_contents
(bfd *ibfd, asection *isec, bfd *obfd, (bfd *ibfd, asection *isec, bfd *obfd,
bfd_byte **ptr, bfd_size_type *ptr_size); bfd_byte **ptr, bfd_size_type *ptr_size);
@ -2698,24 +2698,24 @@ DESCRIPTION
function, and the new size written to @var{ptr_size}. function, and the new size written to @var{ptr_size}.
*/ */
bfd_boolean bool
bfd_convert_section_contents (bfd *ibfd, sec_ptr isec, bfd *obfd, bfd_convert_section_contents (bfd *ibfd, sec_ptr isec, bfd *obfd,
bfd_byte **ptr, bfd_size_type *ptr_size) bfd_byte **ptr, bfd_size_type *ptr_size)
{ {
bfd_byte *contents; bfd_byte *contents;
bfd_size_type ihdr_size, ohdr_size, size; bfd_size_type ihdr_size, ohdr_size, size;
Elf_Internal_Chdr chdr; Elf_Internal_Chdr chdr;
bfd_boolean use_memmove; bool use_memmove;
/* Do nothing if either input or output aren't ELF. */ /* Do nothing if either input or output aren't ELF. */
if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour
|| bfd_get_flavour (obfd) != bfd_target_elf_flavour) || bfd_get_flavour (obfd) != bfd_target_elf_flavour)
return TRUE; return true;
/* Do nothing if ELF classes of input and output are the same. */ /* Do nothing if ELF classes of input and output are the same. */
if (get_elf_backend_data (ibfd)->s->elfclass if (get_elf_backend_data (ibfd)->s->elfclass
== get_elf_backend_data (obfd)->s->elfclass) == get_elf_backend_data (obfd)->s->elfclass)
return TRUE; return true;
/* Convert GNU properties. */ /* Convert GNU properties. */
if (startswith (isec->name, NOTE_GNU_PROPERTY_SECTION_NAME)) if (startswith (isec->name, NOTE_GNU_PROPERTY_SECTION_NAME))
@ -2724,18 +2724,18 @@ bfd_convert_section_contents (bfd *ibfd, sec_ptr isec, bfd *obfd,
/* Do nothing if input file will be decompressed. */ /* Do nothing if input file will be decompressed. */
if ((ibfd->flags & BFD_DECOMPRESS)) if ((ibfd->flags & BFD_DECOMPRESS))
return TRUE; return true;
/* Do nothing if the input section isn't a SHF_COMPRESSED section. */ /* Do nothing if the input section isn't a SHF_COMPRESSED section. */
ihdr_size = bfd_get_compression_header_size (ibfd, isec); ihdr_size = bfd_get_compression_header_size (ibfd, isec);
if (ihdr_size == 0) if (ihdr_size == 0)
return TRUE; return true;
/* PR 25221. Check for corrupt input sections. */ /* PR 25221. Check for corrupt input sections. */
if (ihdr_size > bfd_get_section_limit (ibfd, isec)) if (ihdr_size > bfd_get_section_limit (ibfd, isec))
/* FIXME: Issue a warning about a corrupt /* FIXME: Issue a warning about a corrupt
compression header size field ? */ compression header size field ? */
return FALSE; return false;
contents = *ptr; contents = *ptr;
@ -2751,13 +2751,13 @@ bfd_convert_section_contents (bfd *ibfd, sec_ptr isec, bfd *obfd,
ohdr_size = sizeof (Elf64_External_Chdr); ohdr_size = sizeof (Elf64_External_Chdr);
use_memmove = FALSE; use_memmove = false;
} }
else if (ihdr_size != sizeof (Elf64_External_Chdr)) else if (ihdr_size != sizeof (Elf64_External_Chdr))
{ {
/* FIXME: Issue a warning about a corrupt /* FIXME: Issue a warning about a corrupt
compression header size field ? */ compression header size field ? */
return FALSE; return false;
} }
else else
{ {
@ -2767,7 +2767,7 @@ bfd_convert_section_contents (bfd *ibfd, sec_ptr isec, bfd *obfd,
chdr.ch_addralign = bfd_get_64 (ibfd, &echdr->ch_addralign); chdr.ch_addralign = bfd_get_64 (ibfd, &echdr->ch_addralign);
ohdr_size = sizeof (Elf32_External_Chdr); ohdr_size = sizeof (Elf32_External_Chdr);
use_memmove = TRUE; use_memmove = true;
} }
size = bfd_section_size (isec) - ihdr_size + ohdr_size; size = bfd_section_size (isec) - ihdr_size + ohdr_size;
@ -2775,7 +2775,7 @@ bfd_convert_section_contents (bfd *ibfd, sec_ptr isec, bfd *obfd,
{ {
contents = (bfd_byte *) bfd_malloc (size); contents = (bfd_byte *) bfd_malloc (size);
if (contents == NULL) if (contents == NULL)
return FALSE; return false;
} }
/* Write out the output compression header. */ /* Write out the output compression header. */
@ -2806,7 +2806,7 @@ bfd_convert_section_contents (bfd *ibfd, sec_ptr isec, bfd *obfd,
} }
*ptr_size = size; *ptr_size = size;
return TRUE; return true;
} }
/* Get the linker information. */ /* Get the linker information. */

View File

@ -104,12 +104,12 @@ bfd_free_window (bfd_window *windowp)
static int ok_to_map = 1; static int ok_to_map = 1;
bfd_boolean bool
bfd_get_file_window (bfd *abfd, bfd_get_file_window (bfd *abfd,
file_ptr offset, file_ptr offset,
bfd_size_type size, bfd_size_type size,
bfd_window *windowp, bfd_window *windowp,
bfd_boolean writable) bool writable)
{ {
static size_t pagesize; static size_t pagesize;
bfd_window_internal *i = windowp->i; bfd_window_internal *i = windowp->i;
@ -131,7 +131,7 @@ bfd_get_file_window (bfd *abfd,
{ {
i = bfd_zmalloc (sizeof (bfd_window_internal)); i = bfd_zmalloc (sizeof (bfd_window_internal));
if (i == NULL) if (i == NULL)
return FALSE; return false;
i->data = NULL; i->data = NULL;
} }
#ifdef HAVE_MMAP #ifdef HAVE_MMAP
@ -199,7 +199,7 @@ bfd_get_file_window (bfd *abfd,
i->mapped = 1; i->mapped = 1;
i->refcount = 1; i->refcount = 1;
windowp->i = i; windowp->i = i;
return TRUE; return true;
} }
else if (debug_windows) else if (debug_windows)
{ {
@ -231,7 +231,7 @@ bfd_get_file_window (bfd *abfd,
if (size_to_alloc == 0) if (size_to_alloc == 0)
{ {
windowp->i = i; windowp->i = i;
return TRUE; return true;
} }
goto free_and_fail; goto free_and_fail;
} }
@ -254,12 +254,12 @@ bfd_get_file_window (bfd *abfd,
windowp->data = i->data; windowp->data = i->data;
windowp->size = i->size; windowp->size = i->size;
windowp->i = i; windowp->i = i;
return TRUE; return true;
free_and_fail: free_and_fail:
/* We have a bfd_window_internal, but an error occurred. Free it. */ /* We have a bfd_window_internal, but an error occurred. Free it. */
free (i); free (i);
return FALSE; return false;
} }
#endif /* USE_MMAP */ #endif /* USE_MMAP */

View File

@ -43,10 +43,10 @@
/* Create a binary object. Invoked via bfd_set_format. */ /* Create a binary object. Invoked via bfd_set_format. */
static bfd_boolean static bool
binary_mkobject (bfd *abfd ATTRIBUTE_UNUSED) binary_mkobject (bfd *abfd ATTRIBUTE_UNUSED)
{ {
return TRUE; return true;
} }
/* Any file may be considered to be a binary file, provided the target /* Any file may be considered to be a binary file, provided the target
@ -95,7 +95,7 @@ binary_object_p (bfd *abfd)
/* Get contents of the only section. */ /* Get contents of the only section. */
static bfd_boolean static bool
binary_get_section_contents (bfd *abfd, binary_get_section_contents (bfd *abfd,
asection *section, asection *section,
void * location, void * location,
@ -104,8 +104,8 @@ binary_get_section_contents (bfd *abfd,
{ {
if (bfd_seek (abfd, section->filepos + offset, SEEK_SET) != 0 if (bfd_seek (abfd, section->filepos + offset, SEEK_SET) != 0
|| bfd_bread (location, count, abfd) != count) || bfd_bread (location, count, abfd) != count)
return FALSE; return false;
return TRUE; return true;
} }
/* Return the amount of memory needed to read the symbol table. */ /* Return the amount of memory needed to read the symbol table. */
@ -218,7 +218,7 @@ binary_get_symbol_info (bfd *ignore_abfd ATTRIBUTE_UNUSED,
/* Write section contents of a binary file. */ /* Write section contents of a binary file. */
static bfd_boolean static bool
binary_set_section_contents (bfd *abfd, binary_set_section_contents (bfd *abfd,
asection *sec, asection *sec,
const void * data, const void * data,
@ -226,18 +226,18 @@ binary_set_section_contents (bfd *abfd,
bfd_size_type size) bfd_size_type size)
{ {
if (size == 0) if (size == 0)
return TRUE; return true;
if (! abfd->output_has_begun) if (! abfd->output_has_begun)
{ {
bfd_boolean found_low; bool found_low;
bfd_vma low; bfd_vma low;
asection *s; asection *s;
/* The lowest section LMA sets the virtual address of the start /* The lowest section LMA sets the virtual address of the start
of the file. We use this to set the file position of all the of the file. We use this to set the file position of all the
sections. */ sections. */
found_low = FALSE; found_low = false;
low = 0; low = 0;
for (s = abfd->sections; s != NULL; s = s->next) for (s = abfd->sections; s != NULL; s = s->next)
if (((s->flags if (((s->flags
@ -247,7 +247,7 @@ binary_set_section_contents (bfd *abfd,
&& (! found_low || s->lma < low)) && (! found_low || s->lma < low))
{ {
low = s->lma; low = s->lma;
found_low = TRUE; found_low = true;
} }
for (s = abfd->sections; s != NULL; s = s->next) for (s = abfd->sections; s != NULL; s = s->next)
@ -278,16 +278,16 @@ binary_set_section_contents (bfd *abfd,
s); s);
} }
abfd->output_has_begun = TRUE; abfd->output_has_begun = true;
} }
/* We don't want to output anything for a section that is neither /* We don't want to output anything for a section that is neither
loaded nor allocated. The contents of such a section are not loaded nor allocated. The contents of such a section are not
meaningful in the binary format. */ meaningful in the binary format. */
if ((sec->flags & (SEC_LOAD | SEC_ALLOC)) == 0) if ((sec->flags & (SEC_LOAD | SEC_ALLOC)) == 0)
return TRUE; return true;
if ((sec->flags & SEC_NEVER_LOAD) != 0) if ((sec->flags & SEC_NEVER_LOAD) != 0)
return TRUE; return true;
return _bfd_generic_set_section_contents (abfd, sec, data, offset, size); return _bfd_generic_set_section_contents (abfd, sec, data, offset, size);
} }

View File

@ -160,16 +160,16 @@ snip (bfd *abfd)
/* Close a BFD and remove it from the cache. */ /* Close a BFD and remove it from the cache. */
static bfd_boolean static bool
bfd_cache_delete (bfd *abfd) bfd_cache_delete (bfd *abfd)
{ {
bfd_boolean ret; bool ret;
if (fclose ((FILE *) abfd->iostream) == 0) if (fclose ((FILE *) abfd->iostream) == 0)
ret = TRUE; ret = true;
else else
{ {
ret = FALSE; ret = false;
bfd_set_error (bfd_error_system_call); bfd_set_error (bfd_error_system_call);
} }
@ -184,7 +184,7 @@ bfd_cache_delete (bfd *abfd)
/* We need to open a new file, and the cache is full. Find the least /* We need to open a new file, and the cache is full. Find the least
recently used cacheable BFD and close it. */ recently used cacheable BFD and close it. */
static bfd_boolean static bool
close_one (void) close_one (void)
{ {
register bfd *to_kill; register bfd *to_kill;
@ -208,7 +208,7 @@ close_one (void)
if (to_kill == NULL) if (to_kill == NULL)
{ {
/* There are no open cacheable BFD's. */ /* There are no open cacheable BFD's. */
return TRUE; return true;
} }
to_kill->where = _bfd_real_ftell ((FILE *) to_kill->iostream); to_kill->where = _bfd_real_ftell ((FILE *) to_kill->iostream);
@ -485,25 +485,25 @@ INTERNAL_FUNCTION
bfd_cache_init bfd_cache_init
SYNOPSIS SYNOPSIS
bfd_boolean bfd_cache_init (bfd *abfd); bool bfd_cache_init (bfd *abfd);
DESCRIPTION DESCRIPTION
Add a newly opened BFD to the cache. Add a newly opened BFD to the cache.
*/ */
bfd_boolean bool
bfd_cache_init (bfd *abfd) bfd_cache_init (bfd *abfd)
{ {
BFD_ASSERT (abfd->iostream != NULL); BFD_ASSERT (abfd->iostream != NULL);
if (open_files >= bfd_cache_max_open ()) if (open_files >= bfd_cache_max_open ())
{ {
if (! close_one ()) if (! close_one ())
return FALSE; return false;
} }
abfd->iovec = &cache_iovec; abfd->iovec = &cache_iovec;
insert (abfd); insert (abfd);
++open_files; ++open_files;
return TRUE; return true;
} }
/* /*
@ -511,7 +511,7 @@ INTERNAL_FUNCTION
bfd_cache_close bfd_cache_close
SYNOPSIS SYNOPSIS
bfd_boolean bfd_cache_close (bfd *abfd); bool bfd_cache_close (bfd *abfd);
DESCRIPTION DESCRIPTION
Remove the BFD @var{abfd} from the cache. If the attached file is open, Remove the BFD @var{abfd} from the cache. If the attached file is open,
@ -522,15 +522,15 @@ RETURNS
returned if all is well. returned if all is well.
*/ */
bfd_boolean bool
bfd_cache_close (bfd *abfd) bfd_cache_close (bfd *abfd)
{ {
if (abfd->iovec != &cache_iovec) if (abfd->iovec != &cache_iovec)
return TRUE; return true;
if (abfd->iostream == NULL) if (abfd->iostream == NULL)
/* Previously closed. */ /* Previously closed. */
return TRUE; return true;
return bfd_cache_delete (abfd); return bfd_cache_delete (abfd);
} }
@ -540,7 +540,7 @@ FUNCTION
bfd_cache_close_all bfd_cache_close_all
SYNOPSIS SYNOPSIS
bfd_boolean bfd_cache_close_all (void); bool bfd_cache_close_all (void);
DESCRIPTION DESCRIPTION
Remove all BFDs from the cache. If the attached file is open, Remove all BFDs from the cache. If the attached file is open,
@ -551,10 +551,10 @@ RETURNS
returned if all is well. returned if all is well.
*/ */
bfd_boolean bool
bfd_cache_close_all (void) bfd_cache_close_all (void)
{ {
bfd_boolean ret = TRUE; bool ret = true;
while (bfd_last_cache != NULL) while (bfd_last_cache != NULL)
ret &= bfd_cache_close (bfd_last_cache); ret &= bfd_cache_close (bfd_last_cache);
@ -580,7 +580,7 @@ DESCRIPTION
FILE * FILE *
bfd_open_file (bfd *abfd) bfd_open_file (bfd *abfd)
{ {
abfd->cacheable = TRUE; /* Allow it to be closed later. */ abfd->cacheable = true; /* Allow it to be closed later. */
if (open_files >= bfd_cache_max_open ()) if (open_files >= bfd_cache_max_open ())
{ {
@ -634,7 +634,7 @@ bfd_open_file (bfd *abfd)
#endif #endif
abfd->iostream = _bfd_real_fopen (bfd_get_filename (abfd), abfd->iostream = _bfd_real_fopen (bfd_get_filename (abfd),
FOPEN_WUB); FOPEN_WUB);
abfd->opened_once = TRUE; abfd->opened_once = true;
} }
break; break;
} }

View File

@ -118,45 +118,45 @@ static reloc_howto_type alpha_howto_table[] =
0, /* rightshift */ 0, /* rightshift */
0, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* size (0 = byte, 1 = short, 2 = long) */
8, /* bitsize */ 8, /* bitsize */
TRUE, /* pc_relative */ true, /* pc_relative */
0, /* bitpos */ 0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */ complain_overflow_dont, /* complain_on_overflow */
reloc_nil, /* special_function */ reloc_nil, /* special_function */
"IGNORE", /* name */ "IGNORE", /* name */
TRUE, /* partial_inplace */ true, /* partial_inplace */
0, /* src_mask */ 0, /* src_mask */
0, /* dst_mask */ 0, /* dst_mask */
TRUE), /* pcrel_offset */ true), /* pcrel_offset */
/* A 32 bit reference to a symbol. */ /* A 32 bit reference to a symbol. */
HOWTO (ALPHA_R_REFLONG, /* type */ HOWTO (ALPHA_R_REFLONG, /* type */
0, /* rightshift */ 0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */ 2, /* size (0 = byte, 1 = short, 2 = long) */
32, /* bitsize */ 32, /* bitsize */
FALSE, /* pc_relative */ false, /* pc_relative */
0, /* bitpos */ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */ complain_overflow_bitfield, /* complain_on_overflow */
0, /* special_function */ 0, /* special_function */
"REFLONG", /* name */ "REFLONG", /* name */
TRUE, /* partial_inplace */ true, /* partial_inplace */
0xffffffff, /* src_mask */ 0xffffffff, /* src_mask */
0xffffffff, /* dst_mask */ 0xffffffff, /* dst_mask */
FALSE), /* pcrel_offset */ false), /* pcrel_offset */
/* A 64 bit reference to a symbol. */ /* A 64 bit reference to a symbol. */
HOWTO (ALPHA_R_REFQUAD, /* type */ HOWTO (ALPHA_R_REFQUAD, /* type */
0, /* rightshift */ 0, /* rightshift */
4, /* size (0 = byte, 1 = short, 2 = long) */ 4, /* size (0 = byte, 1 = short, 2 = long) */
64, /* bitsize */ 64, /* bitsize */
FALSE, /* pc_relative */ false, /* pc_relative */
0, /* bitpos */ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */ complain_overflow_bitfield, /* complain_on_overflow */
0, /* special_function */ 0, /* special_function */
"REFQUAD", /* name */ "REFQUAD", /* name */
TRUE, /* partial_inplace */ true, /* partial_inplace */
MINUS_ONE, /* src_mask */ MINUS_ONE, /* src_mask */
MINUS_ONE, /* dst_mask */ MINUS_ONE, /* dst_mask */
FALSE), /* pcrel_offset */ false), /* pcrel_offset */
/* A 32 bit GP relative offset. This is just like REFLONG except /* A 32 bit GP relative offset. This is just like REFLONG except
that when the value is used the value of the gp register will be that when the value is used the value of the gp register will be
@ -165,15 +165,15 @@ static reloc_howto_type alpha_howto_table[] =
0, /* rightshift */ 0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */ 2, /* size (0 = byte, 1 = short, 2 = long) */
32, /* bitsize */ 32, /* bitsize */
FALSE, /* pc_relative */ false, /* pc_relative */
0, /* bitpos */ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */ complain_overflow_bitfield, /* complain_on_overflow */
0, /* special_function */ 0, /* special_function */
"GPREL32", /* name */ "GPREL32", /* name */
TRUE, /* partial_inplace */ true, /* partial_inplace */
0xffffffff, /* src_mask */ 0xffffffff, /* src_mask */
0xffffffff, /* dst_mask */ 0xffffffff, /* dst_mask */
FALSE), /* pcrel_offset */ false), /* pcrel_offset */
/* Used for an instruction that refers to memory off the GP /* Used for an instruction that refers to memory off the GP
register. The offset is 16 bits of the 32 bit instruction. This register. The offset is 16 bits of the 32 bit instruction. This
@ -182,15 +182,15 @@ static reloc_howto_type alpha_howto_table[] =
0, /* rightshift */ 0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */ 2, /* size (0 = byte, 1 = short, 2 = long) */
16, /* bitsize */ 16, /* bitsize */
FALSE, /* pc_relative */ false, /* pc_relative */
0, /* bitpos */ 0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */ complain_overflow_signed, /* complain_on_overflow */
0, /* special_function */ 0, /* special_function */
"LITERAL", /* name */ "LITERAL", /* name */
TRUE, /* partial_inplace */ true, /* partial_inplace */
0xffff, /* src_mask */ 0xffff, /* src_mask */
0xffff, /* dst_mask */ 0xffff, /* dst_mask */
FALSE), /* pcrel_offset */ false), /* pcrel_offset */
/* This reloc only appears immediately following a LITERAL reloc. /* This reloc only appears immediately following a LITERAL reloc.
It identifies a use of the literal. It seems that the linker can It identifies a use of the literal. It seems that the linker can
@ -205,15 +205,15 @@ static reloc_howto_type alpha_howto_table[] =
0, /* rightshift */ 0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */ 2, /* size (0 = byte, 1 = short, 2 = long) */
32, /* bitsize */ 32, /* bitsize */
FALSE, /* pc_relative */ false, /* pc_relative */
0, /* bitpos */ 0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */ complain_overflow_dont, /* complain_on_overflow */
reloc_nil, /* special_function */ reloc_nil, /* special_function */
"LITUSE", /* name */ "LITUSE", /* name */
FALSE, /* partial_inplace */ false, /* partial_inplace */
0, /* src_mask */ 0, /* src_mask */
0, /* dst_mask */ 0, /* dst_mask */
FALSE), /* pcrel_offset */ false), /* pcrel_offset */
/* Load the gp register. This is always used for a ldah instruction /* Load the gp register. This is always used for a ldah instruction
which loads the upper 16 bits of the gp register. The next reloc which loads the upper 16 bits of the gp register. The next reloc
@ -230,15 +230,15 @@ static reloc_howto_type alpha_howto_table[] =
16, /* rightshift */ 16, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */ 2, /* size (0 = byte, 1 = short, 2 = long) */
16, /* bitsize */ 16, /* bitsize */
TRUE, /* pc_relative */ true, /* pc_relative */
0, /* bitpos */ 0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */ complain_overflow_dont, /* complain_on_overflow */
reloc_nil, /* special_function */ reloc_nil, /* special_function */
"GPDISP", /* name */ "GPDISP", /* name */
TRUE, /* partial_inplace */ true, /* partial_inplace */
0xffff, /* src_mask */ 0xffff, /* src_mask */
0xffff, /* dst_mask */ 0xffff, /* dst_mask */
TRUE), /* pcrel_offset */ true), /* pcrel_offset */
/* A 21 bit branch. The native assembler generates these for /* A 21 bit branch. The native assembler generates these for
branches within the text segment, and also fills in the PC branches within the text segment, and also fills in the PC
@ -247,90 +247,90 @@ static reloc_howto_type alpha_howto_table[] =
2, /* rightshift */ 2, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */ 2, /* size (0 = byte, 1 = short, 2 = long) */
21, /* bitsize */ 21, /* bitsize */
TRUE, /* pc_relative */ true, /* pc_relative */
0, /* bitpos */ 0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */ complain_overflow_signed, /* complain_on_overflow */
0, /* special_function */ 0, /* special_function */
"BRADDR", /* name */ "BRADDR", /* name */
TRUE, /* partial_inplace */ true, /* partial_inplace */
0x1fffff, /* src_mask */ 0x1fffff, /* src_mask */
0x1fffff, /* dst_mask */ 0x1fffff, /* dst_mask */
FALSE), /* pcrel_offset */ false), /* pcrel_offset */
/* A hint for a jump to a register. */ /* A hint for a jump to a register. */
HOWTO (ALPHA_R_HINT, /* type */ HOWTO (ALPHA_R_HINT, /* type */
2, /* rightshift */ 2, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */ 2, /* size (0 = byte, 1 = short, 2 = long) */
14, /* bitsize */ 14, /* bitsize */
TRUE, /* pc_relative */ true, /* pc_relative */
0, /* bitpos */ 0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */ complain_overflow_dont, /* complain_on_overflow */
0, /* special_function */ 0, /* special_function */
"HINT", /* name */ "HINT", /* name */
TRUE, /* partial_inplace */ true, /* partial_inplace */
0x3fff, /* src_mask */ 0x3fff, /* src_mask */
0x3fff, /* dst_mask */ 0x3fff, /* dst_mask */
FALSE), /* pcrel_offset */ false), /* pcrel_offset */
/* 16 bit PC relative offset. */ /* 16 bit PC relative offset. */
HOWTO (ALPHA_R_SREL16, /* type */ HOWTO (ALPHA_R_SREL16, /* type */
0, /* rightshift */ 0, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */ 1, /* size (0 = byte, 1 = short, 2 = long) */
16, /* bitsize */ 16, /* bitsize */
TRUE, /* pc_relative */ true, /* pc_relative */
0, /* bitpos */ 0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */ complain_overflow_signed, /* complain_on_overflow */
0, /* special_function */ 0, /* special_function */
"SREL16", /* name */ "SREL16", /* name */
TRUE, /* partial_inplace */ true, /* partial_inplace */
0xffff, /* src_mask */ 0xffff, /* src_mask */
0xffff, /* dst_mask */ 0xffff, /* dst_mask */
FALSE), /* pcrel_offset */ false), /* pcrel_offset */
/* 32 bit PC relative offset. */ /* 32 bit PC relative offset. */
HOWTO (ALPHA_R_SREL32, /* type */ HOWTO (ALPHA_R_SREL32, /* type */
0, /* rightshift */ 0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */ 2, /* size (0 = byte, 1 = short, 2 = long) */
32, /* bitsize */ 32, /* bitsize */
TRUE, /* pc_relative */ true, /* pc_relative */
0, /* bitpos */ 0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */ complain_overflow_signed, /* complain_on_overflow */
0, /* special_function */ 0, /* special_function */
"SREL32", /* name */ "SREL32", /* name */
TRUE, /* partial_inplace */ true, /* partial_inplace */
0xffffffff, /* src_mask */ 0xffffffff, /* src_mask */
0xffffffff, /* dst_mask */ 0xffffffff, /* dst_mask */
FALSE), /* pcrel_offset */ false), /* pcrel_offset */
/* A 64 bit PC relative offset. */ /* A 64 bit PC relative offset. */
HOWTO (ALPHA_R_SREL64, /* type */ HOWTO (ALPHA_R_SREL64, /* type */
0, /* rightshift */ 0, /* rightshift */
4, /* size (0 = byte, 1 = short, 2 = long) */ 4, /* size (0 = byte, 1 = short, 2 = long) */
64, /* bitsize */ 64, /* bitsize */
TRUE, /* pc_relative */ true, /* pc_relative */
0, /* bitpos */ 0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */ complain_overflow_signed, /* complain_on_overflow */
0, /* special_function */ 0, /* special_function */
"SREL64", /* name */ "SREL64", /* name */
TRUE, /* partial_inplace */ true, /* partial_inplace */
MINUS_ONE, /* src_mask */ MINUS_ONE, /* src_mask */
MINUS_ONE, /* dst_mask */ MINUS_ONE, /* dst_mask */
FALSE), /* pcrel_offset */ false), /* pcrel_offset */
/* Push a value on the reloc evaluation stack. */ /* Push a value on the reloc evaluation stack. */
HOWTO (ALPHA_R_OP_PUSH, /* type */ HOWTO (ALPHA_R_OP_PUSH, /* type */
0, /* rightshift */ 0, /* rightshift */
0, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* size (0 = byte, 1 = short, 2 = long) */
0, /* bitsize */ 0, /* bitsize */
FALSE, /* pc_relative */ false, /* pc_relative */
0, /* bitpos */ 0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */ complain_overflow_dont, /* complain_on_overflow */
0, /* special_function */ 0, /* special_function */
"OP_PUSH", /* name */ "OP_PUSH", /* name */
FALSE, /* partial_inplace */ false, /* partial_inplace */
0, /* src_mask */ 0, /* src_mask */
0, /* dst_mask */ 0, /* dst_mask */
FALSE), /* pcrel_offset */ false), /* pcrel_offset */
/* Store the value from the stack at the given address. Store it in /* Store the value from the stack at the given address. Store it in
a bitfield of size r_size starting at bit position r_offset. */ a bitfield of size r_size starting at bit position r_offset. */
@ -338,15 +338,15 @@ static reloc_howto_type alpha_howto_table[] =
0, /* rightshift */ 0, /* rightshift */
4, /* size (0 = byte, 1 = short, 2 = long) */ 4, /* size (0 = byte, 1 = short, 2 = long) */
64, /* bitsize */ 64, /* bitsize */
FALSE, /* pc_relative */ false, /* pc_relative */
0, /* bitpos */ 0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */ complain_overflow_dont, /* complain_on_overflow */
0, /* special_function */ 0, /* special_function */
"OP_STORE", /* name */ "OP_STORE", /* name */
FALSE, /* partial_inplace */ false, /* partial_inplace */
0, /* src_mask */ 0, /* src_mask */
MINUS_ONE, /* dst_mask */ MINUS_ONE, /* dst_mask */
FALSE), /* pcrel_offset */ false), /* pcrel_offset */
/* Subtract the reloc address from the value on the top of the /* Subtract the reloc address from the value on the top of the
relocation stack. */ relocation stack. */
@ -354,15 +354,15 @@ static reloc_howto_type alpha_howto_table[] =
0, /* rightshift */ 0, /* rightshift */
0, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* size (0 = byte, 1 = short, 2 = long) */
0, /* bitsize */ 0, /* bitsize */
FALSE, /* pc_relative */ false, /* pc_relative */
0, /* bitpos */ 0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */ complain_overflow_dont, /* complain_on_overflow */
0, /* special_function */ 0, /* special_function */
"OP_PSUB", /* name */ "OP_PSUB", /* name */
FALSE, /* partial_inplace */ false, /* partial_inplace */
0, /* src_mask */ 0, /* src_mask */
0, /* dst_mask */ 0, /* dst_mask */
FALSE), /* pcrel_offset */ false), /* pcrel_offset */
/* Shift the value on the top of the relocation stack right by the /* Shift the value on the top of the relocation stack right by the
given value. */ given value. */
@ -370,30 +370,30 @@ static reloc_howto_type alpha_howto_table[] =
0, /* rightshift */ 0, /* rightshift */
0, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* size (0 = byte, 1 = short, 2 = long) */
0, /* bitsize */ 0, /* bitsize */
FALSE, /* pc_relative */ false, /* pc_relative */
0, /* bitpos */ 0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */ complain_overflow_dont, /* complain_on_overflow */
0, /* special_function */ 0, /* special_function */
"OP_PRSHIFT", /* name */ "OP_PRSHIFT", /* name */
FALSE, /* partial_inplace */ false, /* partial_inplace */
0, /* src_mask */ 0, /* src_mask */
0, /* dst_mask */ 0, /* dst_mask */
FALSE), /* pcrel_offset */ false), /* pcrel_offset */
/* Adjust the GP value for a new range in the object file. */ /* Adjust the GP value for a new range in the object file. */
HOWTO (ALPHA_R_GPVALUE, /* type */ HOWTO (ALPHA_R_GPVALUE, /* type */
0, /* rightshift */ 0, /* rightshift */
0, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* size (0 = byte, 1 = short, 2 = long) */
0, /* bitsize */ 0, /* bitsize */
FALSE, /* pc_relative */ false, /* pc_relative */
0, /* bitpos */ 0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */ complain_overflow_dont, /* complain_on_overflow */
0, /* special_function */ 0, /* special_function */
"GPVALUE", /* name */ "GPVALUE", /* name */
FALSE, /* partial_inplace */ false, /* partial_inplace */
0, /* src_mask */ 0, /* src_mask */
0, /* dst_mask */ 0, /* dst_mask */
FALSE) /* pcrel_offset */ false) /* pcrel_offset */
}; };
/* Recognize an Alpha ECOFF file. */ /* Recognize an Alpha ECOFF file. */
@ -436,14 +436,14 @@ alpha_ecoff_object_p (bfd *abfd)
/* See whether the magic number matches. */ /* See whether the magic number matches. */
static bfd_boolean static bool
alpha_ecoff_bad_format_hook (bfd *abfd ATTRIBUTE_UNUSED, alpha_ecoff_bad_format_hook (bfd *abfd ATTRIBUTE_UNUSED,
void * filehdr) void * filehdr)
{ {
struct internal_filehdr *internal_f = (struct internal_filehdr *) filehdr; struct internal_filehdr *internal_f = (struct internal_filehdr *) filehdr;
if (! ALPHA_ECOFF_BADMAG (*internal_f)) if (! ALPHA_ECOFF_BADMAG (*internal_f))
return TRUE; return true;
if (ALPHA_ECOFF_COMPRESSEDMAG (*internal_f)) if (ALPHA_ECOFF_COMPRESSEDMAG (*internal_f))
_bfd_error_handler _bfd_error_handler
@ -451,7 +451,7 @@ alpha_ecoff_bad_format_hook (bfd *abfd ATTRIBUTE_UNUSED,
"use compiler flags, or objZ, to generate uncompressed binaries"), "use compiler flags, or objZ, to generate uncompressed binaries"),
abfd); abfd);
return FALSE; return false;
} }
/* This is a hook called by coff_real_object_p to create any backend /* This is a hook called by coff_real_object_p to create any backend
@ -727,7 +727,7 @@ alpha_ecoff_get_relocated_section_contents (bfd *abfd,
struct bfd_link_info *link_info, struct bfd_link_info *link_info,
struct bfd_link_order *link_order, struct bfd_link_order *link_order,
bfd_byte *data, bfd_byte *data,
bfd_boolean relocatable, bool relocatable,
asymbol **symbols) asymbol **symbols)
{ {
bfd *input_bfd = link_order->u.indirect.section->owner; bfd *input_bfd = link_order->u.indirect.section->owner;
@ -737,7 +737,7 @@ alpha_ecoff_get_relocated_section_contents (bfd *abfd,
long reloc_count; long reloc_count;
bfd *output_bfd = relocatable ? abfd : (bfd *) NULL; bfd *output_bfd = relocatable ? abfd : (bfd *) NULL;
bfd_vma gp; bfd_vma gp;
bfd_boolean gp_undefined; bool gp_undefined;
bfd_vma stack[RELOC_STACKSIZE]; bfd_vma stack[RELOC_STACKSIZE];
int tos = 0; int tos = 0;
@ -766,7 +766,7 @@ alpha_ecoff_get_relocated_section_contents (bfd *abfd,
goto successful_return; goto successful_return;
/* Get the GP value for the output BFD. */ /* Get the GP value for the output BFD. */
gp_undefined = FALSE; gp_undefined = false;
gp = _bfd_get_gp_value (abfd); gp = _bfd_get_gp_value (abfd);
if (gp == 0) if (gp == 0)
{ {
@ -794,11 +794,11 @@ alpha_ecoff_get_relocated_section_contents (bfd *abfd,
{ {
struct bfd_link_hash_entry *h; struct bfd_link_hash_entry *h;
h = bfd_link_hash_lookup (link_info->hash, "_gp", FALSE, FALSE, h = bfd_link_hash_lookup (link_info->hash, "_gp", false, false,
TRUE); true);
if (h == (struct bfd_link_hash_entry *) NULL if (h == (struct bfd_link_hash_entry *) NULL
|| h->type != bfd_link_hash_defined) || h->type != bfd_link_hash_defined)
gp_undefined = TRUE; gp_undefined = true;
else else
{ {
gp = (h->u.def.value gp = (h->u.def.value
@ -1086,7 +1086,7 @@ alpha_ecoff_get_relocated_section_contents (bfd *abfd,
case ALPHA_R_GPVALUE: case ALPHA_R_GPVALUE:
/* I really don't know if this does the right thing. */ /* I really don't know if this does the right thing. */
gp = rel->addend; gp = rel->addend;
gp_undefined = FALSE; gp_undefined = false;
break; break;
default: default:
@ -1109,7 +1109,7 @@ alpha_ecoff_get_relocated_section_contents (bfd *abfd,
case bfd_reloc_undefined: case bfd_reloc_undefined:
(*link_info->callbacks->undefined_symbol) (*link_info->callbacks->undefined_symbol)
(link_info, bfd_asymbol_name (*rel->sym_ptr_ptr), (link_info, bfd_asymbol_name (*rel->sym_ptr_ptr),
input_bfd, input_section, rel->address, TRUE); input_bfd, input_section, rel->address, true);
break; break;
case bfd_reloc_dangerous: case bfd_reloc_dangerous:
(*link_info->callbacks->reloc_dangerous) (*link_info->callbacks->reloc_dangerous)
@ -1331,7 +1331,7 @@ alpha_convert_external_reloc (bfd *output_bfd ATTRIBUTE_UNUSED,
quite similar to get_relocated_section_contents. Perhaps they quite similar to get_relocated_section_contents. Perhaps they
could be combined somehow. */ could be combined somehow. */
static bfd_boolean static bool
alpha_relocate_section (bfd *output_bfd, alpha_relocate_section (bfd *output_bfd,
struct bfd_link_info *info, struct bfd_link_info *info,
bfd *input_bfd, bfd *input_bfd,
@ -1342,7 +1342,7 @@ alpha_relocate_section (bfd *output_bfd,
asection **symndx_to_section, *lita_sec; asection **symndx_to_section, *lita_sec;
struct ecoff_link_hash_entry **sym_hashes; struct ecoff_link_hash_entry **sym_hashes;
bfd_vma gp; bfd_vma gp;
bfd_boolean gp_undefined; bool gp_undefined;
bfd_vma stack[RELOC_STACKSIZE]; bfd_vma stack[RELOC_STACKSIZE];
int tos = 0; int tos = 0;
struct external_reloc *ext_rel; struct external_reloc *ext_rel;
@ -1358,7 +1358,7 @@ alpha_relocate_section (bfd *output_bfd,
amt = NUM_RELOC_SECTIONS * sizeof (asection *); amt = NUM_RELOC_SECTIONS * sizeof (asection *);
symndx_to_section = (asection **) bfd_alloc (input_bfd, amt); symndx_to_section = (asection **) bfd_alloc (input_bfd, amt);
if (!symndx_to_section) if (!symndx_to_section)
return FALSE; return false;
symndx_to_section[RELOC_SECTION_NONE] = NULL; symndx_to_section[RELOC_SECTION_NONE] = NULL;
symndx_to_section[RELOC_SECTION_TEXT] = symndx_to_section[RELOC_SECTION_TEXT] =
@ -1447,7 +1447,7 @@ alpha_relocate_section (bfd *output_bfd,
_("using multiple gp values"), _("using multiple gp values"),
(char *) NULL, output_bfd, (char *) NULL, output_bfd,
(asection *) NULL, (bfd_vma) 0); (asection *) NULL, (bfd_vma) 0);
ecoff_data (output_bfd)->issued_multiple_gp_warning = TRUE; ecoff_data (output_bfd)->issued_multiple_gp_warning = true;
} }
if (lita_vma < gp - 0x8000) if (lita_vma < gp - 0x8000)
gp = lita_vma + lita_size - 0x8000; gp = lita_vma + lita_size - 0x8000;
@ -1477,9 +1477,9 @@ alpha_relocate_section (bfd *output_bfd,
int r_extern; int r_extern;
int r_offset; int r_offset;
int r_size; int r_size;
bfd_boolean relocatep; bool relocatep;
bfd_boolean adjust_addrp; bool adjust_addrp;
bfd_boolean gp_usedp; bool gp_usedp;
bfd_vma addend; bfd_vma addend;
r_vaddr = H_GET_64 (input_bfd, ext_rel->r_vaddr); r_vaddr = H_GET_64 (input_bfd, ext_rel->r_vaddr);
@ -1494,9 +1494,9 @@ alpha_relocate_section (bfd *output_bfd,
r_size = ((ext_rel->r_bits[3] & RELOC_BITS3_SIZE_LITTLE) r_size = ((ext_rel->r_bits[3] & RELOC_BITS3_SIZE_LITTLE)
>> RELOC_BITS3_SIZE_SH_LITTLE); >> RELOC_BITS3_SIZE_SH_LITTLE);
relocatep = FALSE; relocatep = false;
adjust_addrp = TRUE; adjust_addrp = true;
gp_usedp = FALSE; gp_usedp = false;
addend = 0; addend = 0;
switch (r_type) switch (r_type)
@ -1530,13 +1530,13 @@ alpha_relocate_section (bfd *output_bfd,
if (bfd_link_relocatable (info)) if (bfd_link_relocatable (info))
H_PUT_64 (input_bfd, input_section->output_offset + r_vaddr, H_PUT_64 (input_bfd, input_section->output_offset + r_vaddr,
ext_rel->r_vaddr); ext_rel->r_vaddr);
adjust_addrp = FALSE; adjust_addrp = false;
break; break;
case ALPHA_R_REFLONG: case ALPHA_R_REFLONG:
case ALPHA_R_REFQUAD: case ALPHA_R_REFQUAD:
case ALPHA_R_HINT: case ALPHA_R_HINT:
relocatep = TRUE; relocatep = true;
break; break;
case ALPHA_R_BRADDR: case ALPHA_R_BRADDR:
@ -1545,7 +1545,7 @@ alpha_relocate_section (bfd *output_bfd,
case ALPHA_R_SREL64: case ALPHA_R_SREL64:
if (r_extern) if (r_extern)
addend += - (r_vaddr + 4); addend += - (r_vaddr + 4);
relocatep = TRUE; relocatep = true;
break; break;
case ALPHA_R_GPREL32: case ALPHA_R_GPREL32:
@ -1553,9 +1553,9 @@ alpha_relocate_section (bfd *output_bfd,
bit offset from the current GP value. We must adjust it bit offset from the current GP value. We must adjust it
by the different between the original GP value and the by the different between the original GP value and the
current GP value. */ current GP value. */
relocatep = TRUE; relocatep = true;
addend = ecoff_data (input_bfd)->gp - gp; addend = ecoff_data (input_bfd)->gp - gp;
gp_usedp = TRUE; gp_usedp = true;
break; break;
case ALPHA_R_LITERAL: case ALPHA_R_LITERAL:
@ -1586,9 +1586,9 @@ alpha_relocate_section (bfd *output_bfd,
|| ((insn >> 26) & 0x3f) == 0x28); || ((insn >> 26) & 0x3f) == 0x28);
} }
relocatep = TRUE; relocatep = true;
addend = ecoff_data (input_bfd)->gp - gp; addend = ecoff_data (input_bfd)->gp - gp;
gp_usedp = TRUE; gp_usedp = true;
break; break;
case ALPHA_R_LITUSE: case ALPHA_R_LITUSE:
@ -1652,7 +1652,7 @@ alpha_relocate_section (bfd *output_bfd,
bfd_put_32 (input_bfd, (bfd_vma) insn2, bfd_put_32 (input_bfd, (bfd_vma) insn2,
contents + r_vaddr - input_section->vma + r_symndx); contents + r_vaddr - input_section->vma + r_symndx);
gp_usedp = TRUE; gp_usedp = true;
} }
break; break;
@ -1695,7 +1695,7 @@ alpha_relocate_section (bfd *output_bfd,
relocated. */ relocated. */
(*info->callbacks->undefined_symbol) (*info->callbacks->undefined_symbol)
(info, h->root.root.string, input_bfd, (info, h->root.root.string, input_bfd,
input_section, (bfd_vma) 0, TRUE); input_section, (bfd_vma) 0, true);
addend = 0; addend = 0;
} }
} }
@ -1750,7 +1750,7 @@ alpha_relocate_section (bfd *output_bfd,
} }
} }
adjust_addrp = FALSE; adjust_addrp = false;
break; break;
case ALPHA_R_OP_STORE: case ALPHA_R_OP_STORE:
@ -1787,7 +1787,7 @@ alpha_relocate_section (bfd *output_bfd,
case ALPHA_R_GPVALUE: case ALPHA_R_GPVALUE:
/* I really don't know if this does the right thing. */ /* I really don't know if this does the right thing. */
gp = ecoff_data (input_bfd)->gp + r_symndx; gp = ecoff_data (input_bfd)->gp + r_symndx;
gp_undefined = FALSE; gp_undefined = false;
break; break;
} }
@ -1892,7 +1892,7 @@ alpha_relocate_section (bfd *output_bfd,
{ {
(*info->callbacks->undefined_symbol) (*info->callbacks->undefined_symbol)
(info, h->root.root.string, input_bfd, input_section, (info, h->root.root.string, input_bfd, input_section,
r_vaddr - input_section->vma, TRUE); r_vaddr - input_section->vma, true);
relocation = 0; relocation = 0;
} }
} }
@ -1962,20 +1962,20 @@ alpha_relocate_section (bfd *output_bfd,
/* Only give the error once per link. */ /* Only give the error once per link. */
gp = 4; gp = 4;
_bfd_set_gp_value (output_bfd, gp); _bfd_set_gp_value (output_bfd, gp);
gp_undefined = FALSE; gp_undefined = false;
} }
} }
if (tos != 0) if (tos != 0)
abort (); abort ();
return TRUE; return true;
} }
/* Do final adjustments to the filehdr and the aouthdr. This routine /* Do final adjustments to the filehdr and the aouthdr. This routine
sets the dynamic bits in the file header. */ sets the dynamic bits in the file header. */
static bfd_boolean static bool
alpha_adjust_headers (bfd *abfd, alpha_adjust_headers (bfd *abfd,
struct internal_filehdr *fhdr, struct internal_filehdr *fhdr,
struct internal_aouthdr *ahdr ATTRIBUTE_UNUSED) struct internal_aouthdr *ahdr ATTRIBUTE_UNUSED)
@ -1984,7 +1984,7 @@ alpha_adjust_headers (bfd *abfd,
fhdr->f_flags |= F_ALPHA_CALL_SHARED; fhdr->f_flags |= F_ALPHA_CALL_SHARED;
else if ((abfd->flags & DYNAMIC) != 0) else if ((abfd->flags & DYNAMIC) != 0)
fhdr->f_flags |= F_ALPHA_SHARABLE; fhdr->f_flags |= F_ALPHA_SHARABLE;
return TRUE; return true;
} }
/* Archive handling. In OSF/1 (or Digital Unix) v3.2, Digital /* Archive handling. In OSF/1 (or Digital Unix) v3.2, Digital
@ -2163,7 +2163,7 @@ alpha_ecoff_get_elt_at_filepos (bfd *archive, file_ptr filepos)
bim->size = size; bim->size = size;
bim->buffer = buf; bim->buffer = buf;
nbfd->mtime_set = TRUE; nbfd->mtime_set = true;
nbfd->mtime = strtol (hdr->ar_date, (char **) NULL, 10); nbfd->mtime = strtol (hdr->ar_date, (char **) NULL, 10);
nbfd->flags |= BFD_IN_MEMORY; nbfd->flags |= BFD_IN_MEMORY;
@ -2303,8 +2303,8 @@ static const struct ecoff_backend_data alpha_ecoff_backend_data =
alpha_ecoff_swap_coff_reloc_out, alpha_ecoff_swap_coff_reloc_out,
alpha_ecoff_swap_filehdr_out, alpha_ecoff_swap_aouthdr_out, alpha_ecoff_swap_filehdr_out, alpha_ecoff_swap_aouthdr_out,
alpha_ecoff_swap_scnhdr_out, alpha_ecoff_swap_scnhdr_out,
FILHSZ, AOUTSZ, SCNHSZ, 0, 0, 0, 0, FILNMLEN, TRUE, FILHSZ, AOUTSZ, SCNHSZ, 0, 0, 0, 0, FILNMLEN, true,
ECOFF_NO_LONG_SECTION_NAMES, 4, FALSE, 2, 32768, ECOFF_NO_LONG_SECTION_NAMES, 4, false, 2, 32768,
alpha_ecoff_swap_filehdr_in, alpha_ecoff_swap_aouthdr_in, alpha_ecoff_swap_filehdr_in, alpha_ecoff_swap_aouthdr_in,
alpha_ecoff_swap_scnhdr_in, NULL, alpha_ecoff_swap_scnhdr_in, NULL,
alpha_ecoff_bad_format_hook, _bfd_ecoff_set_arch_mach_hook, alpha_ecoff_bad_format_hook, _bfd_ecoff_set_arch_mach_hook,
@ -2323,7 +2323,7 @@ static const struct ecoff_backend_data alpha_ecoff_backend_data =
/* TRUE if the .rdata section is part of the text segment, as on the /* TRUE if the .rdata section is part of the text segment, as on the
Alpha. FALSE if .rdata is part of the data segment, as on the Alpha. FALSE if .rdata is part of the data segment, as on the
MIPS. */ MIPS. */
TRUE, true,
/* Bitsize of constructor entries. */ /* Bitsize of constructor entries. */
64, 64,
/* Reloc to use for constructor entries. */ /* Reloc to use for constructor entries. */

View File

@ -167,7 +167,7 @@ coff_arm_reloc (bfd *abfd,
#endif #endif
#ifndef PCRELOFFSET #ifndef PCRELOFFSET
#define PCRELOFFSET TRUE #define PCRELOFFSET true
#endif #endif
/* These most certainly belong somewhere else. Just had to get rid of /* These most certainly belong somewhere else. Just had to get rid of
@ -223,12 +223,12 @@ static reloc_howto_type aoutarm_std_reloc_howto[] =
2, 2,
2, 2,
24, 24,
TRUE, true,
0, 0,
complain_overflow_dont, complain_overflow_dont,
aoutarm_fix_pcrel_26_done, aoutarm_fix_pcrel_26_done,
"ARM_26D", "ARM_26D",
TRUE, /* partial_inplace. */ true, /* partial_inplace. */
0x00ffffff, 0x00ffffff,
0x0, 0x0,
PCRELOFFSET), PCRELOFFSET),
@ -236,12 +236,12 @@ static reloc_howto_type aoutarm_std_reloc_howto[] =
0, 0,
2, 2,
32, 32,
FALSE, false,
0, 0,
complain_overflow_bitfield, complain_overflow_bitfield,
coff_arm_reloc, coff_arm_reloc,
"ARM_32", "ARM_32",
TRUE, /* partial_inplace. */ true, /* partial_inplace. */
0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff,
PCRELOFFSET), PCRELOFFSET),
@ -249,12 +249,12 @@ static reloc_howto_type aoutarm_std_reloc_howto[] =
0, 0,
2, 2,
32, 32,
FALSE, false,
0, 0,
complain_overflow_bitfield, complain_overflow_bitfield,
coff_arm_reloc, coff_arm_reloc,
"ARM_RVA32", "ARM_RVA32",
TRUE, /* partial_inplace. */ true, /* partial_inplace. */
0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff,
PCRELOFFSET), PCRELOFFSET),
@ -262,12 +262,12 @@ static reloc_howto_type aoutarm_std_reloc_howto[] =
2, 2,
2, 2,
24, 24,
TRUE, true,
0, 0,
complain_overflow_signed, complain_overflow_signed,
aoutarm_fix_pcrel_26 , aoutarm_fix_pcrel_26 ,
"ARM_26", "ARM_26",
FALSE, false,
0x00ffffff, 0x00ffffff,
0x00ffffff, 0x00ffffff,
PCRELOFFSET), PCRELOFFSET),
@ -275,12 +275,12 @@ static reloc_howto_type aoutarm_std_reloc_howto[] =
1, 1,
1, 1,
11, 11,
TRUE, true,
0, 0,
complain_overflow_signed, complain_overflow_signed,
coff_thumb_pcrel_12 , coff_thumb_pcrel_12 ,
"ARM_THUMB12", "ARM_THUMB12",
FALSE, false,
0x000007ff, 0x000007ff,
0x000007ff, 0x000007ff,
PCRELOFFSET), PCRELOFFSET),
@ -297,12 +297,12 @@ static reloc_howto_type aoutarm_std_reloc_howto[] =
0, 0,
1, 1,
16, 16,
FALSE, false,
0, 0,
complain_overflow_bitfield, complain_overflow_bitfield,
coff_arm_reloc, coff_arm_reloc,
"ARM_SECTION", "ARM_SECTION",
TRUE, /* partial_inplace. */ true, /* partial_inplace. */
0x0000ffff, 0x0000ffff,
0x0000ffff, 0x0000ffff,
PCRELOFFSET), PCRELOFFSET),
@ -310,12 +310,12 @@ static reloc_howto_type aoutarm_std_reloc_howto[] =
0, 0,
2, 2,
32, 32,
FALSE, false,
0, 0,
complain_overflow_bitfield, complain_overflow_bitfield,
coff_arm_reloc, coff_arm_reloc,
"ARM_SECREL", "ARM_SECREL",
TRUE, /* partial_inplace. */ true, /* partial_inplace. */
0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff,
PCRELOFFSET), PCRELOFFSET),
@ -324,12 +324,12 @@ static reloc_howto_type aoutarm_std_reloc_howto[] =
0, 0,
0, 0,
8, 8,
FALSE, false,
0, 0,
complain_overflow_bitfield, complain_overflow_bitfield,
coff_arm_reloc, coff_arm_reloc,
"ARM_8", "ARM_8",
TRUE, true,
0x000000ff, 0x000000ff,
0x000000ff, 0x000000ff,
PCRELOFFSET), PCRELOFFSET),
@ -337,12 +337,12 @@ static reloc_howto_type aoutarm_std_reloc_howto[] =
0, 0,
1, 1,
16, 16,
FALSE, false,
0, 0,
complain_overflow_bitfield, complain_overflow_bitfield,
coff_arm_reloc, coff_arm_reloc,
"ARM_16", "ARM_16",
TRUE, true,
0x0000ffff, 0x0000ffff,
0x0000ffff, 0x0000ffff,
PCRELOFFSET), PCRELOFFSET),
@ -350,12 +350,12 @@ static reloc_howto_type aoutarm_std_reloc_howto[] =
0, 0,
2, 2,
32, 32,
FALSE, false,
0, 0,
complain_overflow_bitfield, complain_overflow_bitfield,
coff_arm_reloc, coff_arm_reloc,
"ARM_32", "ARM_32",
TRUE, true,
0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff,
PCRELOFFSET), PCRELOFFSET),
@ -363,12 +363,12 @@ static reloc_howto_type aoutarm_std_reloc_howto[] =
2, 2,
2, 2,
24, 24,
TRUE, true,
0, 0,
complain_overflow_signed, complain_overflow_signed,
aoutarm_fix_pcrel_26 , aoutarm_fix_pcrel_26 ,
"ARM_26", "ARM_26",
FALSE, false,
0x00ffffff, 0x00ffffff,
0x00ffffff, 0x00ffffff,
PCRELOFFSET), PCRELOFFSET),
@ -376,92 +376,92 @@ static reloc_howto_type aoutarm_std_reloc_howto[] =
0, 0,
0, 0,
8, 8,
TRUE, true,
0, 0,
complain_overflow_signed, complain_overflow_signed,
coff_arm_reloc, coff_arm_reloc,
"ARM_DISP8", "ARM_DISP8",
TRUE, true,
0x000000ff, 0x000000ff,
0x000000ff, 0x000000ff,
TRUE), true),
HOWTO (ARM_DISP16, HOWTO (ARM_DISP16,
0, 0,
1, 1,
16, 16,
TRUE, true,
0, 0,
complain_overflow_signed, complain_overflow_signed,
coff_arm_reloc, coff_arm_reloc,
"ARM_DISP16", "ARM_DISP16",
TRUE, true,
0x0000ffff, 0x0000ffff,
0x0000ffff, 0x0000ffff,
TRUE), true),
HOWTO (ARM_DISP32, HOWTO (ARM_DISP32,
0, 0,
2, 2,
32, 32,
TRUE, true,
0, 0,
complain_overflow_signed, complain_overflow_signed,
coff_arm_reloc, coff_arm_reloc,
"ARM_DISP32", "ARM_DISP32",
TRUE, true,
0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff,
TRUE), true),
HOWTO (ARM_26D, HOWTO (ARM_26D,
2, 2,
2, 2,
24, 24,
FALSE, false,
0, 0,
complain_overflow_dont, complain_overflow_dont,
aoutarm_fix_pcrel_26_done, aoutarm_fix_pcrel_26_done,
"ARM_26D", "ARM_26D",
TRUE, true,
0x00ffffff, 0x00ffffff,
0x0, 0x0,
FALSE), false),
/* 8 is unused */ /* 8 is unused */
EMPTY_HOWTO (-1), EMPTY_HOWTO (-1),
HOWTO (ARM_NEG16, HOWTO (ARM_NEG16,
0, 0,
-1, -1,
16, 16,
FALSE, false,
0, 0,
complain_overflow_bitfield, complain_overflow_bitfield,
coff_arm_reloc, coff_arm_reloc,
"ARM_NEG16", "ARM_NEG16",
TRUE, true,
0x0000ffff, 0x0000ffff,
0x0000ffff, 0x0000ffff,
FALSE), false),
HOWTO (ARM_NEG32, HOWTO (ARM_NEG32,
0, 0,
-2, -2,
32, 32,
FALSE, false,
0, 0,
complain_overflow_bitfield, complain_overflow_bitfield,
coff_arm_reloc, coff_arm_reloc,
"ARM_NEG32", "ARM_NEG32",
TRUE, true,
0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff,
FALSE), false),
HOWTO (ARM_RVA32, HOWTO (ARM_RVA32,
0, 0,
2, 2,
32, 32,
FALSE, false,
0, 0,
complain_overflow_bitfield, complain_overflow_bitfield,
coff_arm_reloc, coff_arm_reloc,
"ARM_RVA32", "ARM_RVA32",
TRUE, true,
0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff,
PCRELOFFSET), PCRELOFFSET),
@ -469,12 +469,12 @@ static reloc_howto_type aoutarm_std_reloc_howto[] =
1, 1,
1, 1,
8, 8,
TRUE, true,
0, 0,
complain_overflow_signed, complain_overflow_signed,
coff_thumb_pcrel_9 , coff_thumb_pcrel_9 ,
"ARM_THUMB9", "ARM_THUMB9",
FALSE, false,
0x000000ff, 0x000000ff,
0x000000ff, 0x000000ff,
PCRELOFFSET), PCRELOFFSET),
@ -482,12 +482,12 @@ static reloc_howto_type aoutarm_std_reloc_howto[] =
1, 1,
1, 1,
11, 11,
TRUE, true,
0, 0,
complain_overflow_signed, complain_overflow_signed,
coff_thumb_pcrel_12 , coff_thumb_pcrel_12 ,
"ARM_THUMB12", "ARM_THUMB12",
FALSE, false,
0x000007ff, 0x000007ff,
0x000007ff, 0x000007ff,
PCRELOFFSET), PCRELOFFSET),
@ -495,12 +495,12 @@ static reloc_howto_type aoutarm_std_reloc_howto[] =
1, 1,
2, 2,
22, 22,
TRUE, true,
0, 0,
complain_overflow_signed, complain_overflow_signed,
coff_thumb_pcrel_23 , coff_thumb_pcrel_23 ,
"ARM_THUMB23", "ARM_THUMB23",
FALSE, false,
0x07ff07ff, 0x07ff07ff,
0x07ff07ff, 0x07ff07ff,
PCRELOFFSET) PCRELOFFSET)
@ -513,7 +513,7 @@ static reloc_howto_type aoutarm_std_reloc_howto[] =
/* Return TRUE if this relocation should /* Return TRUE if this relocation should
appear in the output .reloc section. */ appear in the output .reloc section. */
static bfd_boolean static bool
in_reloc_p (bfd * abfd ATTRIBUTE_UNUSED, in_reloc_p (bfd * abfd ATTRIBUTE_UNUSED,
reloc_howto_type * howto) reloc_howto_type * howto)
{ {
@ -942,7 +942,7 @@ coff_arm_link_hash_table_create (bfd * abfd)
return & ret->root.root; return & ret->root.root;
} }
static bfd_boolean static bool
arm_emit_base_file_entry (struct bfd_link_info *info, arm_emit_base_file_entry (struct bfd_link_info *info,
bfd *output_bfd, bfd *output_bfd,
asection *input_section, asection *input_section,
@ -956,10 +956,10 @@ arm_emit_base_file_entry (struct bfd_link_info *info,
if (coff_data (output_bfd)->pe) if (coff_data (output_bfd)->pe)
addr -= pe_data (output_bfd)->pe_opthdr.ImageBase; addr -= pe_data (output_bfd)->pe_opthdr.ImageBase;
if (fwrite (&addr, sizeof (addr), 1, (FILE *) info->base_file) == 1) if (fwrite (&addr, sizeof (addr), 1, (FILE *) info->base_file) == 1)
return TRUE; return true;
bfd_set_error (bfd_error_system_call); bfd_set_error (bfd_error_system_call);
return FALSE; return false;
} }
#ifndef ARM_WINCE #ifndef ARM_WINCE
@ -1035,7 +1035,7 @@ find_thumb_glue (struct bfd_link_info *info,
sprintf (tmp_name, THUMB2ARM_GLUE_ENTRY_NAME, name); sprintf (tmp_name, THUMB2ARM_GLUE_ENTRY_NAME, name);
myh = coff_link_hash_lookup myh = coff_link_hash_lookup
(coff_hash_table (info), tmp_name, FALSE, FALSE, TRUE); (coff_hash_table (info), tmp_name, false, false, true);
if (myh == NULL) if (myh == NULL)
/* xgettext:c-format */ /* xgettext:c-format */
@ -1064,7 +1064,7 @@ find_arm_glue (struct bfd_link_info *info,
sprintf (tmp_name, ARM2THUMB_GLUE_ENTRY_NAME, name); sprintf (tmp_name, ARM2THUMB_GLUE_ENTRY_NAME, name);
myh = coff_link_hash_lookup myh = coff_link_hash_lookup
(coff_hash_table (info), tmp_name, FALSE, FALSE, TRUE); (coff_hash_table (info), tmp_name, false, false, true);
if (myh == NULL) if (myh == NULL)
/* xgettext:c-format */ /* xgettext:c-format */
@ -1165,7 +1165,7 @@ static const insn32 t2a6_bx_insn = 0xe12fff1e;
ARM/Thumb builds. It is only the code marked THUMBEXTENSION that ARM/Thumb builds. It is only the code marked THUMBEXTENSION that
is different from the original. */ is different from the original. */
static bfd_boolean static bool
coff_arm_relocate_section (bfd *output_bfd, coff_arm_relocate_section (bfd *output_bfd,
struct bfd_link_info *info, struct bfd_link_info *info,
bfd *input_bfd, bfd *input_bfd,
@ -1222,7 +1222,7 @@ coff_arm_relocate_section (bfd *output_bfd,
howto = coff_rtype_to_howto (input_bfd, input_section, rel, h, howto = coff_rtype_to_howto (input_bfd, input_section, rel, h,
sym, &addend); sym, &addend);
if (howto == NULL) if (howto == NULL)
return FALSE; return false;
/* The relocation_section function will skip pcrel_offset relocs /* The relocation_section function will skip pcrel_offset relocs
when doing a relocatable link. However, we want to convert when doing a relocatable link. However, we want to convert
@ -1243,15 +1243,15 @@ coff_arm_relocate_section (bfd *output_bfd,
2, 2,
2, 2,
24, 24,
TRUE, true,
0, 0,
complain_overflow_signed, complain_overflow_signed,
aoutarm_fix_pcrel_26 , aoutarm_fix_pcrel_26 ,
"ARM_26", "ARM_26",
TRUE, true,
0x00ffffff, 0x00ffffff,
0x00ffffff, 0x00ffffff,
FALSE); false);
addend -= rel->r_vaddr - input_section->vma; addend -= rel->r_vaddr - input_section->vma;
#ifdef ARM_WINCE #ifdef ARM_WINCE
@ -1347,7 +1347,7 @@ coff_arm_relocate_section (bfd *output_bfd,
myh = find_arm_glue (info, name, input_bfd); myh = find_arm_glue (info, name, input_bfd);
if (myh == NULL) if (myh == NULL)
return FALSE; return false;
globals = coff_arm_hash_table (info); globals = coff_arm_hash_table (info);
@ -1389,7 +1389,7 @@ coff_arm_relocate_section (bfd *output_bfd,
if (info->base_file if (info->base_file
&& !arm_emit_base_file_entry (info, output_bfd, && !arm_emit_base_file_entry (info, output_bfd,
s, my_offset + 8)) s, my_offset + 8))
return FALSE; return false;
} }
BFD_ASSERT (my_offset <= globals->arm_glue_size); BFD_ASSERT (my_offset <= globals->arm_glue_size);
@ -1435,7 +1435,7 @@ coff_arm_relocate_section (bfd *output_bfd,
myh = find_thumb_glue (info, name, input_bfd); myh = find_thumb_glue (info, name, input_bfd);
if (myh == NULL) if (myh == NULL)
return FALSE; return false;
globals = coff_arm_hash_table (info); globals = coff_arm_hash_table (info);
@ -1496,7 +1496,7 @@ coff_arm_relocate_section (bfd *output_bfd,
&& !arm_emit_base_file_entry (info, && !arm_emit_base_file_entry (info,
output_bfd, s, output_bfd, s,
my_offset + 16)) my_offset + 16))
return FALSE; return false;
} }
else else
{ {
@ -1574,7 +1574,7 @@ coff_arm_relocate_section (bfd *output_bfd,
else if (! bfd_link_relocatable (info)) else if (! bfd_link_relocatable (info))
(*info->callbacks->undefined_symbol) (*info->callbacks->undefined_symbol)
(info, h->root.root.string, input_bfd, input_section, (info, h->root.root.string, input_bfd, input_section,
rel->r_vaddr - input_section->vma, TRUE); rel->r_vaddr - input_section->vma, true);
} }
/* Emit a reloc if the backend thinks it needs it. */ /* Emit a reloc if the backend thinks it needs it. */
@ -1583,7 +1583,7 @@ coff_arm_relocate_section (bfd *output_bfd,
&& pe_data(output_bfd)->in_reloc_p(output_bfd, howto) && pe_data(output_bfd)->in_reloc_p(output_bfd, howto)
&& !arm_emit_base_file_entry (info, output_bfd, input_section, && !arm_emit_base_file_entry (info, output_bfd, input_section,
rel->r_vaddr)) rel->r_vaddr))
return FALSE; return false;
if (done) if (done)
rstat = bfd_reloc_ok; rstat = bfd_reloc_ok;
@ -1608,7 +1608,7 @@ coff_arm_relocate_section (bfd *output_bfd,
{ {
bfd_vma relocation = val + addend; bfd_vma relocation = val + addend;
int size = bfd_get_reloc_size (howto); int size = bfd_get_reloc_size (howto);
bfd_boolean overflow = FALSE; bool overflow = false;
bfd_byte *location = contents + address; bfd_byte *location = contents + address;
bfd_vma x = bfd_get_32 (input_bfd, location); bfd_vma x = bfd_get_32 (input_bfd, location);
bfd_vma src_mask = 0x007FFFFE; bfd_vma src_mask = 0x007FFFFE;
@ -1674,7 +1674,7 @@ coff_arm_relocate_section (bfd *output_bfd,
/* Assumes two's complement. */ /* Assumes two's complement. */
if ( signed_check > reloc_signed_max if ( signed_check > reloc_signed_max
|| signed_check < reloc_signed_min) || signed_check < reloc_signed_min)
overflow = TRUE; overflow = true;
/* Put the relocation into the correct bits. /* Put the relocation into the correct bits.
For a BLX instruction, make sure that the relocation is rounded up For a BLX instruction, make sure that the relocation is rounded up
@ -1718,13 +1718,13 @@ coff_arm_relocate_section (bfd *output_bfd,
{ {
/* Determine if we need to set the bottom bit of a relocated address /* Determine if we need to set the bottom bit of a relocated address
because the address is the address of a Thumb code symbol. */ because the address is the address of a Thumb code symbol. */
int patchit = FALSE; int patchit = false;
if (h != NULL if (h != NULL
&& ( h->symbol_class == C_THUMBSTATFUNC && ( h->symbol_class == C_THUMBSTATFUNC
|| h->symbol_class == C_THUMBEXTFUNC)) || h->symbol_class == C_THUMBEXTFUNC))
{ {
patchit = TRUE; patchit = true;
} }
else if (sym != NULL else if (sym != NULL
&& sym->n_scnum > N_UNDEF) && sym->n_scnum > N_UNDEF)
@ -1732,7 +1732,7 @@ coff_arm_relocate_section (bfd *output_bfd,
/* No hash entry - use the symbol instead. */ /* No hash entry - use the symbol instead. */
if ( sym->n_sclass == C_THUMBSTATFUNC if ( sym->n_sclass == C_THUMBSTATFUNC
|| sym->n_sclass == C_THUMBEXTFUNC) || sym->n_sclass == C_THUMBEXTFUNC)
patchit = TRUE; patchit = true;
} }
if (patchit) if (patchit)
@ -1755,7 +1755,7 @@ coff_arm_relocate_section (bfd *output_bfd,
/* xgettext:c-format */ /* xgettext:c-format */
(_("%pB: bad reloc address %#" PRIx64 " in section `%pA'"), (_("%pB: bad reloc address %#" PRIx64 " in section `%pA'"),
input_bfd, (uint64_t) rel->r_vaddr, input_section); input_bfd, (uint64_t) rel->r_vaddr, input_section);
return FALSE; return false;
case bfd_reloc_overflow: case bfd_reloc_overflow:
{ {
const char *name; const char *name;
@ -1769,7 +1769,7 @@ coff_arm_relocate_section (bfd *output_bfd,
{ {
name = _bfd_coff_internal_syment_name (input_bfd, sym, buf); name = _bfd_coff_internal_syment_name (input_bfd, sym, buf);
if (name == NULL) if (name == NULL)
return FALSE; return false;
} }
(*info->callbacks->reloc_overflow) (*info->callbacks->reloc_overflow)
@ -1780,12 +1780,12 @@ coff_arm_relocate_section (bfd *output_bfd,
} }
} }
return TRUE; return true;
} }
#ifndef COFF_IMAGE_WITH_PE #ifndef COFF_IMAGE_WITH_PE
bfd_boolean bool
bfd_arm_allocate_interworking_sections (struct bfd_link_info * info) bfd_arm_allocate_interworking_sections (struct bfd_link_info * info)
{ {
asection * s; asection * s;
@ -1826,7 +1826,7 @@ bfd_arm_allocate_interworking_sections (struct bfd_link_info * info)
s->contents = foo; s->contents = foo;
} }
return TRUE; return true;
} }
static void static void
@ -1860,7 +1860,7 @@ record_arm_to_thumb_glue (struct bfd_link_info * info,
sprintf (tmp_name, ARM2THUMB_GLUE_ENTRY_NAME, name); sprintf (tmp_name, ARM2THUMB_GLUE_ENTRY_NAME, name);
myh = coff_link_hash_lookup myh = coff_link_hash_lookup
(coff_hash_table (info), tmp_name, FALSE, FALSE, TRUE); (coff_hash_table (info), tmp_name, false, false, true);
if (myh != NULL) if (myh != NULL)
{ {
@ -1875,7 +1875,7 @@ record_arm_to_thumb_glue (struct bfd_link_info * info,
bh = NULL; bh = NULL;
val = globals->arm_glue_size + 1; val = globals->arm_glue_size + 1;
bfd_coff_link_add_one_symbol (info, globals->bfd_of_glue_owner, tmp_name, bfd_coff_link_add_one_symbol (info, globals->bfd_of_glue_owner, tmp_name,
BSF_GLOBAL, s, val, NULL, TRUE, FALSE, &bh); BSF_GLOBAL, s, val, NULL, true, false, &bh);
free (tmp_name); free (tmp_name);
@ -1916,7 +1916,7 @@ record_thumb_to_arm_glue (struct bfd_link_info * info,
sprintf (tmp_name, THUMB2ARM_GLUE_ENTRY_NAME, name); sprintf (tmp_name, THUMB2ARM_GLUE_ENTRY_NAME, name);
myh = coff_link_hash_lookup myh = coff_link_hash_lookup
(coff_hash_table (info), tmp_name, FALSE, FALSE, TRUE); (coff_hash_table (info), tmp_name, false, false, true);
if (myh != NULL) if (myh != NULL)
{ {
@ -1928,7 +1928,7 @@ record_thumb_to_arm_glue (struct bfd_link_info * info,
bh = NULL; bh = NULL;
val = globals->thumb_glue_size + 1; val = globals->thumb_glue_size + 1;
bfd_coff_link_add_one_symbol (info, globals->bfd_of_glue_owner, tmp_name, bfd_coff_link_add_one_symbol (info, globals->bfd_of_glue_owner, tmp_name,
BSF_GLOBAL, s, val, NULL, TRUE, FALSE, &bh); BSF_GLOBAL, s, val, NULL, true, false, &bh);
/* If we mark it 'thumb', the disassembler will do a better job. */ /* If we mark it 'thumb', the disassembler will do a better job. */
myh = (struct coff_link_hash_entry *) bh; myh = (struct coff_link_hash_entry *) bh;
@ -1951,7 +1951,7 @@ record_thumb_to_arm_glue (struct bfd_link_info * info,
bh = NULL; bh = NULL;
val = globals->thumb_glue_size + (globals->support_old_code ? 8 : 4); val = globals->thumb_glue_size + (globals->support_old_code ? 8 : 4);
bfd_coff_link_add_one_symbol (info, globals->bfd_of_glue_owner, tmp_name, bfd_coff_link_add_one_symbol (info, globals->bfd_of_glue_owner, tmp_name,
BSF_LOCAL, s, val, NULL, TRUE, FALSE, &bh); BSF_LOCAL, s, val, NULL, true, false, &bh);
free (tmp_name); free (tmp_name);
@ -1965,7 +1965,7 @@ record_thumb_to_arm_glue (struct bfd_link_info * info,
This function is called from the linker scripts in ld/emultempl/ This function is called from the linker scripts in ld/emultempl/
{armcoff/pe}.em */ {armcoff/pe}.em */
bfd_boolean bool
bfd_arm_get_bfd_for_interworking (bfd * abfd, bfd_arm_get_bfd_for_interworking (bfd * abfd,
struct bfd_link_info * info) struct bfd_link_info * info)
{ {
@ -1976,14 +1976,14 @@ bfd_arm_get_bfd_for_interworking (bfd * abfd,
/* If we are only performing a partial link do not bother /* If we are only performing a partial link do not bother
getting a bfd to hold the glue. */ getting a bfd to hold the glue. */
if (bfd_link_relocatable (info)) if (bfd_link_relocatable (info))
return TRUE; return true;
globals = coff_arm_hash_table (info); globals = coff_arm_hash_table (info);
BFD_ASSERT (globals != NULL); BFD_ASSERT (globals != NULL);
if (globals->bfd_of_glue_owner != NULL) if (globals->bfd_of_glue_owner != NULL)
return TRUE; return true;
sec = bfd_get_section_by_name (abfd, ARM2THUMB_GLUE_SECTION_NAME); sec = bfd_get_section_by_name (abfd, ARM2THUMB_GLUE_SECTION_NAME);
@ -1995,7 +1995,7 @@ bfd_arm_get_bfd_for_interworking (bfd * abfd,
flags); flags);
if (sec == NULL if (sec == NULL
|| !bfd_set_section_alignment (sec, 2)) || !bfd_set_section_alignment (sec, 2))
return FALSE; return false;
} }
sec = bfd_get_section_by_name (abfd, THUMB2ARM_GLUE_SECTION_NAME); sec = bfd_get_section_by_name (abfd, THUMB2ARM_GLUE_SECTION_NAME);
@ -2009,16 +2009,16 @@ bfd_arm_get_bfd_for_interworking (bfd * abfd,
if (sec == NULL if (sec == NULL
|| !bfd_set_section_alignment (sec, 2)) || !bfd_set_section_alignment (sec, 2))
return FALSE; return false;
} }
/* Save the bfd for later use. */ /* Save the bfd for later use. */
globals->bfd_of_glue_owner = abfd; globals->bfd_of_glue_owner = abfd;
return TRUE; return true;
} }
bfd_boolean bool
bfd_arm_process_before_allocation (bfd * abfd, bfd_arm_process_before_allocation (bfd * abfd,
struct bfd_link_info * info, struct bfd_link_info * info,
int support_old_code) int support_old_code)
@ -2029,7 +2029,7 @@ bfd_arm_process_before_allocation (bfd * abfd,
/* If we are only performing a partial link do not bother /* If we are only performing a partial link do not bother
to construct any glue. */ to construct any glue. */
if (bfd_link_relocatable (info)) if (bfd_link_relocatable (info))
return TRUE; return true;
/* Here we have a bfd that is to be included on the link. We have a hook /* Here we have a bfd that is to be included on the link. We have a hook
to do reloc rummaging, before section sizes are nailed down. */ to do reloc rummaging, before section sizes are nailed down. */
@ -2046,7 +2046,7 @@ bfd_arm_process_before_allocation (bfd * abfd,
sec = abfd->sections; sec = abfd->sections;
if (sec == NULL) if (sec == NULL)
return TRUE; return true;
for (; sec != NULL; sec = sec->next) for (; sec != NULL; sec = sec->next)
{ {
@ -2130,7 +2130,7 @@ bfd_arm_process_before_allocation (bfd * abfd,
} }
} }
return TRUE; return true;
} }
#endif /* ! defined (COFF_IMAGE_WITH_PE) */ #endif /* ! defined (COFF_IMAGE_WITH_PE) */
@ -2151,13 +2151,13 @@ bfd_arm_process_before_allocation (bfd * abfd,
/* When doing a relocatable link, we want to convert ARM_26 relocs /* When doing a relocatable link, we want to convert ARM_26 relocs
into ARM_26D relocs. */ into ARM_26D relocs. */
static bfd_boolean static bool
coff_arm_adjust_symndx (bfd *obfd ATTRIBUTE_UNUSED, coff_arm_adjust_symndx (bfd *obfd ATTRIBUTE_UNUSED,
struct bfd_link_info *info ATTRIBUTE_UNUSED, struct bfd_link_info *info ATTRIBUTE_UNUSED,
bfd *ibfd, bfd *ibfd,
asection *sec, asection *sec,
struct internal_reloc *irel, struct internal_reloc *irel,
bfd_boolean *adjustedp) bool *adjustedp)
{ {
if (irel->r_type == ARM_26) if (irel->r_type == ARM_26)
{ {
@ -2170,8 +2170,8 @@ coff_arm_adjust_symndx (bfd *obfd ATTRIBUTE_UNUSED,
&& h->root.u.def.section->output_section == sec->output_section) && h->root.u.def.section->output_section == sec->output_section)
irel->r_type = ARM_26D; irel->r_type = ARM_26D;
} }
*adjustedp = FALSE; *adjustedp = false;
return TRUE; return true;
} }
/* Called when merging the private data areas of two BFDs. /* Called when merging the private data areas of two BFDs.
@ -2179,26 +2179,26 @@ coff_arm_adjust_symndx (bfd *obfd ATTRIBUTE_UNUSED,
attempting to merge binaries compiled for different ARM attempting to merge binaries compiled for different ARM
targets, eg different CPUs or different APCS's. */ targets, eg different CPUs or different APCS's. */
static bfd_boolean static bool
coff_arm_merge_private_bfd_data (bfd * ibfd, struct bfd_link_info *info) coff_arm_merge_private_bfd_data (bfd * ibfd, struct bfd_link_info *info)
{ {
bfd *obfd = info->output_bfd; bfd *obfd = info->output_bfd;
BFD_ASSERT (ibfd != NULL && obfd != NULL); BFD_ASSERT (ibfd != NULL && obfd != NULL);
if (ibfd == obfd) if (ibfd == obfd)
return TRUE; return true;
/* If the two formats are different we cannot merge anything. /* If the two formats are different we cannot merge anything.
This is not an error, since it is permissable to change the This is not an error, since it is permissable to change the
input and output formats. */ input and output formats. */
if ( ibfd->xvec->flavour != bfd_target_coff_flavour if ( ibfd->xvec->flavour != bfd_target_coff_flavour
|| obfd->xvec->flavour != bfd_target_coff_flavour) || obfd->xvec->flavour != bfd_target_coff_flavour)
return TRUE; return true;
/* Determine what should happen if the input ARM architecture /* Determine what should happen if the input ARM architecture
does not match the output ARM architecture. */ does not match the output ARM architecture. */
if (! bfd_arm_merge_machines (ibfd, obfd)) if (! bfd_arm_merge_machines (ibfd, obfd))
return FALSE; return false;
/* Verify that the APCS is the same for the two BFDs. */ /* Verify that the APCS is the same for the two BFDs. */
if (APCS_SET (ibfd)) if (APCS_SET (ibfd))
@ -2217,7 +2217,7 @@ coff_arm_merge_private_bfd_data (bfd * ibfd, struct bfd_link_info *info)
); );
bfd_set_error (bfd_error_wrong_format); bfd_set_error (bfd_error_wrong_format);
return FALSE; return false;
} }
if (APCS_FLOAT_FLAG (obfd) != APCS_FLOAT_FLAG (ibfd)) if (APCS_FLOAT_FLAG (obfd) != APCS_FLOAT_FLAG (ibfd))
@ -2236,7 +2236,7 @@ coff_arm_merge_private_bfd_data (bfd * ibfd, struct bfd_link_info *info)
ibfd, obfd); ibfd, obfd);
bfd_set_error (bfd_error_wrong_format); bfd_set_error (bfd_error_wrong_format);
return FALSE; return false;
} }
if (PIC_FLAG (obfd) != PIC_FLAG (ibfd)) if (PIC_FLAG (obfd) != PIC_FLAG (ibfd))
@ -2255,7 +2255,7 @@ coff_arm_merge_private_bfd_data (bfd * ibfd, struct bfd_link_info *info)
ibfd, obfd); ibfd, obfd);
bfd_set_error (bfd_error_wrong_format); bfd_set_error (bfd_error_wrong_format);
return FALSE; return false;
} }
} }
else else
@ -2294,12 +2294,12 @@ coff_arm_merge_private_bfd_data (bfd * ibfd, struct bfd_link_info *info)
} }
} }
return TRUE; return true;
} }
/* Display the flags field. */ /* Display the flags field. */
static bfd_boolean static bool
coff_arm_print_private_bfd_data (bfd * abfd, void * ptr) coff_arm_print_private_bfd_data (bfd * abfd, void * ptr)
{ {
FILE * file = (FILE *) ptr; FILE * file = (FILE *) ptr;
@ -2333,7 +2333,7 @@ coff_arm_print_private_bfd_data (bfd * abfd, void * ptr)
fputc ('\n', file); fputc ('\n', file);
return TRUE; return true;
} }
/* Copies the given flags into the coff_tdata.flags field. /* Copies the given flags into the coff_tdata.flags field.
@ -2343,7 +2343,7 @@ coff_arm_print_private_bfd_data (bfd * abfd, void * ptr)
Note: Although this function is static, it is explicitly Note: Although this function is static, it is explicitly
called from both coffcode.h and peicode.h. */ called from both coffcode.h and peicode.h. */
static bfd_boolean static bool
_bfd_coff_arm_set_private_flags (bfd * abfd, flagword flags) _bfd_coff_arm_set_private_flags (bfd * abfd, flagword flags)
{ {
flagword flag; flagword flag;
@ -2359,7 +2359,7 @@ _bfd_coff_arm_set_private_flags (bfd * abfd, flagword flags)
|| (APCS_FLOAT_FLAG (abfd) != (flags & F_APCS_FLOAT)) || (APCS_FLOAT_FLAG (abfd) != (flags & F_APCS_FLOAT))
|| (PIC_FLAG (abfd) != (flags & F_PIC)) || (PIC_FLAG (abfd) != (flags & F_PIC))
)) ))
return FALSE; return false;
flag |= (flags & (F_APCS_FLOAT | F_PIC)); flag |= (flags & (F_APCS_FLOAT | F_PIC));
@ -2384,24 +2384,24 @@ _bfd_coff_arm_set_private_flags (bfd * abfd, flagword flags)
SET_INTERWORK_FLAG (abfd, flag); SET_INTERWORK_FLAG (abfd, flag);
return TRUE; return true;
} }
/* Copy the important parts of the target specific data /* Copy the important parts of the target specific data
from one instance of a BFD to another. */ from one instance of a BFD to another. */
static bfd_boolean static bool
coff_arm_copy_private_bfd_data (bfd * src, bfd * dest) coff_arm_copy_private_bfd_data (bfd * src, bfd * dest)
{ {
BFD_ASSERT (src != NULL && dest != NULL); BFD_ASSERT (src != NULL && dest != NULL);
if (src == dest) if (src == dest)
return TRUE; return true;
/* If the destination is not in the same format as the source, do not do /* If the destination is not in the same format as the source, do not do
the copy. */ the copy. */
if (src->xvec != dest->xvec) if (src->xvec != dest->xvec)
return TRUE; return true;
/* Copy the flags field. */ /* Copy the flags field. */
if (APCS_SET (src)) if (APCS_SET (src))
@ -2410,13 +2410,13 @@ coff_arm_copy_private_bfd_data (bfd * src, bfd * dest)
{ {
/* If the src and dest have different APCS flag bits set, fail. */ /* If the src and dest have different APCS flag bits set, fail. */
if (APCS_26_FLAG (dest) != APCS_26_FLAG (src)) if (APCS_26_FLAG (dest) != APCS_26_FLAG (src))
return FALSE; return false;
if (APCS_FLOAT_FLAG (dest) != APCS_FLOAT_FLAG (src)) if (APCS_FLOAT_FLAG (dest) != APCS_FLOAT_FLAG (src))
return FALSE; return false;
if (PIC_FLAG (dest) != PIC_FLAG (src)) if (PIC_FLAG (dest) != PIC_FLAG (src))
return FALSE; return false;
} }
else else
SET_APCS_FLAGS (dest, APCS_26_FLAG (src) | APCS_FLOAT_FLAG (src) SET_APCS_FLAGS (dest, APCS_26_FLAG (src) | APCS_FLOAT_FLAG (src)
@ -2450,7 +2450,7 @@ coff_arm_copy_private_bfd_data (bfd * src, bfd * dest)
} }
} }
return TRUE; return true;
} }
/* Note: the definitions here of LOCAL_LABEL_PREFIX and USER_LABEL_PREIFX /* Note: the definitions here of LOCAL_LABEL_PREFIX and USER_LABEL_PREIFX
@ -2468,7 +2468,7 @@ coff_arm_copy_private_bfd_data (bfd * src, bfd * dest)
b) Allow other prefixes than ".", e.g. an empty prefix would cause all b) Allow other prefixes than ".", e.g. an empty prefix would cause all
labels of the form Lxxx to be stripped. */ labels of the form Lxxx to be stripped. */
static bfd_boolean static bool
coff_arm_is_local_label_name (bfd * abfd ATTRIBUTE_UNUSED, coff_arm_is_local_label_name (bfd * abfd ATTRIBUTE_UNUSED,
const char * name) const char * name)
{ {
@ -2478,7 +2478,7 @@ coff_arm_is_local_label_name (bfd * abfd ATTRIBUTE_UNUSED,
size_t len = strlen (USER_LABEL_PREFIX); size_t len = strlen (USER_LABEL_PREFIX);
if (strncmp (name, USER_LABEL_PREFIX, len) == 0) if (strncmp (name, USER_LABEL_PREFIX, len) == 0)
return FALSE; return false;
} }
#endif #endif
@ -2491,7 +2491,7 @@ coff_arm_is_local_label_name (bfd * abfd ATTRIBUTE_UNUSED,
size_t len = strlen (LOCAL_LABEL_PREFIX); size_t len = strlen (LOCAL_LABEL_PREFIX);
if (strncmp (name, LOCAL_LABEL_PREFIX, len) != 0) if (strncmp (name, LOCAL_LABEL_PREFIX, len) != 0)
return FALSE; return false;
/* Perform the checks below for the rest of the name. */ /* Perform the checks below for the rest of the name. */
name += len; name += len;
@ -2507,14 +2507,14 @@ coff_arm_is_local_label_name (bfd * abfd ATTRIBUTE_UNUSED,
This does depend on bfd_make_section attaching a new section to the This does depend on bfd_make_section attaching a new section to the
end of the section list for the bfd. */ end of the section list for the bfd. */
static bfd_boolean static bool
coff_arm_link_output_has_begun (bfd * sub, struct coff_final_link_info * info) coff_arm_link_output_has_begun (bfd * sub, struct coff_final_link_info * info)
{ {
return (sub->output_has_begun return (sub->output_has_begun
|| sub == coff_arm_hash_table (info->info)->bfd_of_glue_owner); || sub == coff_arm_hash_table (info->info)->bfd_of_glue_owner);
} }
static bfd_boolean static bool
coff_arm_final_link_postscript (bfd * abfd ATTRIBUTE_UNUSED, coff_arm_final_link_postscript (bfd * abfd ATTRIBUTE_UNUSED,
struct coff_final_link_info * pfinfo) struct coff_final_link_info * pfinfo)
{ {
@ -2527,9 +2527,9 @@ coff_arm_final_link_postscript (bfd * abfd ATTRIBUTE_UNUSED,
if (globals->bfd_of_glue_owner != NULL) if (globals->bfd_of_glue_owner != NULL)
{ {
if (! _bfd_coff_link_input_bfd (pfinfo, globals->bfd_of_glue_owner)) if (! _bfd_coff_link_input_bfd (pfinfo, globals->bfd_of_glue_owner))
return FALSE; return false;
globals->bfd_of_glue_owner->output_has_begun = TRUE; globals->bfd_of_glue_owner->output_has_begun = true;
} }
return bfd_arm_update_notes (abfd, ARM_NOTE_SECTION); return bfd_arm_update_notes (abfd, ARM_NOTE_SECTION);

View File

@ -19,11 +19,11 @@
MA 02110-1301, USA. */ MA 02110-1301, USA. */
/* ARM Interworking support. Called from linker. */ /* ARM Interworking support. Called from linker. */
extern bfd_boolean bfd_arm_allocate_interworking_sections extern bool bfd_arm_allocate_interworking_sections
(struct bfd_link_info *); (struct bfd_link_info *);
extern bfd_boolean bfd_arm_process_before_allocation extern bool bfd_arm_process_before_allocation
(bfd *, struct bfd_link_info *, int); (bfd *, struct bfd_link_info *, int);
extern bfd_boolean bfd_arm_get_bfd_for_interworking extern bool bfd_arm_get_bfd_for_interworking
(bfd *, struct bfd_link_info *); (bfd *, struct bfd_link_info *);

View File

@ -27,7 +27,7 @@
/* Return the COFF syment for a symbol. */ /* Return the COFF syment for a symbol. */
bfd_boolean bool
bfd_coff_get_syment (bfd *abfd, bfd_coff_get_syment (bfd *abfd,
asymbol *symbol, asymbol *symbol,
struct internal_syment *psyment) struct internal_syment *psyment)
@ -39,7 +39,7 @@ bfd_coff_get_syment (bfd *abfd,
|| ! csym->native->is_sym) || ! csym->native->is_sym)
{ {
bfd_set_error (bfd_error_invalid_operation); bfd_set_error (bfd_error_invalid_operation);
return FALSE; return false;
} }
*psyment = csym->native->u.syment; *psyment = csym->native->u.syment;
@ -50,12 +50,12 @@ bfd_coff_get_syment (bfd *abfd,
/* FIXME: We should handle fix_line here. */ /* FIXME: We should handle fix_line here. */
return TRUE; return true;
} }
/* Return the COFF auxent for a symbol. */ /* Return the COFF auxent for a symbol. */
bfd_boolean bool
bfd_coff_get_auxent (bfd *abfd, bfd_coff_get_auxent (bfd *abfd,
asymbol *symbol, asymbol *symbol,
int indx, int indx,
@ -72,7 +72,7 @@ bfd_coff_get_auxent (bfd *abfd,
|| indx >= csym->native->u.syment.n_numaux) || indx >= csym->native->u.syment.n_numaux)
{ {
bfd_set_error (bfd_error_invalid_operation); bfd_set_error (bfd_error_invalid_operation);
return FALSE; return false;
} }
ent = csym->native + indx + 1; ent = csym->native + indx + 1;
@ -95,5 +95,5 @@ bfd_coff_get_auxent (bfd *abfd,
((combined_entry_type *) pauxent->x_csect.x_scnlen.p ((combined_entry_type *) pauxent->x_csect.x_scnlen.p
- obj_raw_syments (abfd)); - obj_raw_syments (abfd));
return TRUE; return true;
} }

View File

@ -44,13 +44,13 @@ struct coff_section_tdata
/* The relocs, swapped into COFF internal form. This may be NULL. */ /* The relocs, swapped into COFF internal form. This may be NULL. */
struct internal_reloc *relocs; struct internal_reloc *relocs;
/* If this is TRUE, the relocs entry may not be freed. */ /* If this is TRUE, the relocs entry may not be freed. */
bfd_boolean keep_relocs; bool keep_relocs;
/* The section contents. This may be NULL. */ /* The section contents. This may be NULL. */
bfd_byte *contents; bfd_byte *contents;
/* If this is TRUE, the contents entry may not be freed. */ /* If this is TRUE, the contents entry may not be freed. */
bfd_boolean keep_contents; bool keep_contents;
/* Information cached by coff_find_nearest_line. */ /* Information cached by coff_find_nearest_line. */
bfd_boolean saved_bias; bool saved_bias;
bfd_signed_vma bias; bfd_signed_vma bias;
bfd_vma offset; bfd_vma offset;
unsigned int i; unsigned int i;
@ -81,11 +81,11 @@ struct coff_section_tdata
struct internal_syment; struct internal_syment;
union internal_auxent; union internal_auxent;
extern bfd_boolean bfd_coff_get_syment extern bool bfd_coff_get_syment
(bfd *, struct bfd_symbol *, struct internal_syment *); (bfd *, struct bfd_symbol *, struct internal_syment *);
extern bfd_boolean bfd_coff_get_auxent extern bool bfd_coff_get_auxent
(bfd *, struct bfd_symbol *, int, union internal_auxent *); (bfd *, struct bfd_symbol *, int, union internal_auxent *);
extern bfd_boolean bfd_coff_set_symbol_class extern bool bfd_coff_set_symbol_class
(bfd *, struct bfd_symbol *, unsigned int); (bfd *, struct bfd_symbol *, unsigned int);

View File

@ -51,7 +51,7 @@
/* The following functions are not static, because they are also /* The following functions are not static, because they are also
used for coff-go32-exe (coff-stgo32.c). */ used for coff-go32-exe (coff-stgo32.c). */
bfd_boolean _bfd_go32_mkobject (bfd *); bool _bfd_go32_mkobject (bfd *);
void _bfd_go32_swap_scnhdr_in (bfd *, void *, void *); void _bfd_go32_swap_scnhdr_in (bfd *, void *, void *);
unsigned int _bfd_go32_swap_scnhdr_out (bfd *, void *, void *); unsigned int _bfd_go32_swap_scnhdr_out (bfd *, void *, void *);
@ -61,18 +61,18 @@ unsigned int _bfd_go32_swap_scnhdr_out (bfd *, void *, void *);
#include "coff-i386.c" #include "coff-i386.c"
bfd_boolean bool
_bfd_go32_mkobject (bfd * abfd) _bfd_go32_mkobject (bfd * abfd)
{ {
const bfd_size_type amt = sizeof (coff_data_type); const bfd_size_type amt = sizeof (coff_data_type);
abfd->tdata.coff_obj_data = bfd_zalloc (abfd, amt); abfd->tdata.coff_obj_data = bfd_zalloc (abfd, amt);
if (abfd->tdata.coff_obj_data == NULL) if (abfd->tdata.coff_obj_data == NULL)
return FALSE; return false;
coff_data (abfd)->go32 = TRUE; coff_data (abfd)->go32 = true;
return TRUE; return true;
} }
void void

View File

@ -187,8 +187,8 @@ coff_i386_reloc (bfd *abfd,
/* Return TRUE if this relocation should appear in the output .reloc /* Return TRUE if this relocation should appear in the output .reloc
section. */ section. */
static bfd_boolean in_reloc_p (bfd * abfd ATTRIBUTE_UNUSED, static bool
reloc_howto_type *howto) in_reloc_p (bfd *abfd ATTRIBUTE_UNUSED, reloc_howto_type *howto)
{ {
return ! howto->pc_relative && howto->type != R_IMAGEBASE return ! howto->pc_relative && howto->type != R_IMAGEBASE
&& howto->type != R_SECREL32; && howto->type != R_SECREL32;
@ -196,7 +196,7 @@ static bfd_boolean in_reloc_p (bfd * abfd ATTRIBUTE_UNUSED,
#endif /* COFF_WITH_PE */ #endif /* COFF_WITH_PE */
#ifndef PCRELOFFSET #ifndef PCRELOFFSET
#define PCRELOFFSET FALSE #define PCRELOFFSET false
#endif #endif
static reloc_howto_type howto_table[] = static reloc_howto_type howto_table[] =
@ -211,29 +211,29 @@ static reloc_howto_type howto_table[] =
0, /* rightshift */ 0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */ 2, /* size (0 = byte, 1 = short, 2 = long) */
32, /* bitsize */ 32, /* bitsize */
FALSE, /* pc_relative */ false, /* pc_relative */
0, /* bitpos */ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */ complain_overflow_bitfield, /* complain_on_overflow */
coff_i386_reloc, /* special_function */ coff_i386_reloc, /* special_function */
"dir32", /* name */ "dir32", /* name */
TRUE, /* partial_inplace */ true, /* partial_inplace */
0xffffffff, /* src_mask */ 0xffffffff, /* src_mask */
0xffffffff, /* dst_mask */ 0xffffffff, /* dst_mask */
TRUE), /* pcrel_offset */ true), /* pcrel_offset */
/* PE IMAGE_REL_I386_DIR32NB relocation (7). */ /* PE IMAGE_REL_I386_DIR32NB relocation (7). */
HOWTO (R_IMAGEBASE, /* type */ HOWTO (R_IMAGEBASE, /* type */
0, /* rightshift */ 0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */ 2, /* size (0 = byte, 1 = short, 2 = long) */
32, /* bitsize */ 32, /* bitsize */
FALSE, /* pc_relative */ false, /* pc_relative */
0, /* bitpos */ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */ complain_overflow_bitfield, /* complain_on_overflow */
coff_i386_reloc, /* special_function */ coff_i386_reloc, /* special_function */
"rva32", /* name */ "rva32", /* name */
TRUE, /* partial_inplace */ true, /* partial_inplace */
0xffffffff, /* src_mask */ 0xffffffff, /* src_mask */
0xffffffff, /* dst_mask */ 0xffffffff, /* dst_mask */
FALSE), /* pcrel_offset */ false), /* pcrel_offset */
EMPTY_HOWTO (010), EMPTY_HOWTO (010),
EMPTY_HOWTO (011), EMPTY_HOWTO (011),
EMPTY_HOWTO (012), EMPTY_HOWTO (012),
@ -243,15 +243,15 @@ static reloc_howto_type howto_table[] =
0, /* rightshift */ 0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */ 2, /* size (0 = byte, 1 = short, 2 = long) */
32, /* bitsize */ 32, /* bitsize */
FALSE, /* pc_relative */ false, /* pc_relative */
0, /* bitpos */ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */ complain_overflow_bitfield, /* complain_on_overflow */
coff_i386_reloc, /* special_function */ coff_i386_reloc, /* special_function */
"secrel32", /* name */ "secrel32", /* name */
TRUE, /* partial_inplace */ true, /* partial_inplace */
0xffffffff, /* src_mask */ 0xffffffff, /* src_mask */
0xffffffff, /* dst_mask */ 0xffffffff, /* dst_mask */
TRUE), /* pcrel_offset */ true), /* pcrel_offset */
#else #else
EMPTY_HOWTO (013), EMPTY_HOWTO (013),
#endif #endif
@ -263,12 +263,12 @@ static reloc_howto_type howto_table[] =
0, /* rightshift */ 0, /* rightshift */
0, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* size (0 = byte, 1 = short, 2 = long) */
8, /* bitsize */ 8, /* bitsize */
FALSE, /* pc_relative */ false, /* pc_relative */
0, /* bitpos */ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */ complain_overflow_bitfield, /* complain_on_overflow */
coff_i386_reloc, /* special_function */ coff_i386_reloc, /* special_function */
"8", /* name */ "8", /* name */
TRUE, /* partial_inplace */ true, /* partial_inplace */
0x000000ff, /* src_mask */ 0x000000ff, /* src_mask */
0x000000ff, /* dst_mask */ 0x000000ff, /* dst_mask */
PCRELOFFSET), /* pcrel_offset */ PCRELOFFSET), /* pcrel_offset */
@ -277,12 +277,12 @@ static reloc_howto_type howto_table[] =
0, /* rightshift */ 0, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */ 1, /* size (0 = byte, 1 = short, 2 = long) */
16, /* bitsize */ 16, /* bitsize */
FALSE, /* pc_relative */ false, /* pc_relative */
0, /* bitpos */ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */ complain_overflow_bitfield, /* complain_on_overflow */
coff_i386_reloc, /* special_function */ coff_i386_reloc, /* special_function */
"16", /* name */ "16", /* name */
TRUE, /* partial_inplace */ true, /* partial_inplace */
0x0000ffff, /* src_mask */ 0x0000ffff, /* src_mask */
0x0000ffff, /* dst_mask */ 0x0000ffff, /* dst_mask */
PCRELOFFSET), /* pcrel_offset */ PCRELOFFSET), /* pcrel_offset */
@ -291,12 +291,12 @@ static reloc_howto_type howto_table[] =
0, /* rightshift */ 0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */ 2, /* size (0 = byte, 1 = short, 2 = long) */
32, /* bitsize */ 32, /* bitsize */
FALSE, /* pc_relative */ false, /* pc_relative */
0, /* bitpos */ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */ complain_overflow_bitfield, /* complain_on_overflow */
coff_i386_reloc, /* special_function */ coff_i386_reloc, /* special_function */
"32", /* name */ "32", /* name */
TRUE, /* partial_inplace */ true, /* partial_inplace */
0xffffffff, /* src_mask */ 0xffffffff, /* src_mask */
0xffffffff, /* dst_mask */ 0xffffffff, /* dst_mask */
PCRELOFFSET), /* pcrel_offset */ PCRELOFFSET), /* pcrel_offset */
@ -305,12 +305,12 @@ static reloc_howto_type howto_table[] =
0, /* rightshift */ 0, /* rightshift */
0, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* size (0 = byte, 1 = short, 2 = long) */
8, /* bitsize */ 8, /* bitsize */
TRUE, /* pc_relative */ true, /* pc_relative */
0, /* bitpos */ 0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */ complain_overflow_signed, /* complain_on_overflow */
coff_i386_reloc, /* special_function */ coff_i386_reloc, /* special_function */
"DISP8", /* name */ "DISP8", /* name */
TRUE, /* partial_inplace */ true, /* partial_inplace */
0x000000ff, /* src_mask */ 0x000000ff, /* src_mask */
0x000000ff, /* dst_mask */ 0x000000ff, /* dst_mask */
PCRELOFFSET), /* pcrel_offset */ PCRELOFFSET), /* pcrel_offset */
@ -319,12 +319,12 @@ static reloc_howto_type howto_table[] =
0, /* rightshift */ 0, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */ 1, /* size (0 = byte, 1 = short, 2 = long) */
16, /* bitsize */ 16, /* bitsize */
TRUE, /* pc_relative */ true, /* pc_relative */
0, /* bitpos */ 0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */ complain_overflow_signed, /* complain_on_overflow */
coff_i386_reloc, /* special_function */ coff_i386_reloc, /* special_function */
"DISP16", /* name */ "DISP16", /* name */
TRUE, /* partial_inplace */ true, /* partial_inplace */
0x0000ffff, /* src_mask */ 0x0000ffff, /* src_mask */
0x0000ffff, /* dst_mask */ 0x0000ffff, /* dst_mask */
PCRELOFFSET), /* pcrel_offset */ PCRELOFFSET), /* pcrel_offset */
@ -333,12 +333,12 @@ static reloc_howto_type howto_table[] =
0, /* rightshift */ 0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */ 2, /* size (0 = byte, 1 = short, 2 = long) */
32, /* bitsize */ 32, /* bitsize */
TRUE, /* pc_relative */ true, /* pc_relative */
0, /* bitpos */ 0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */ complain_overflow_signed, /* complain_on_overflow */
coff_i386_reloc, /* special_function */ coff_i386_reloc, /* special_function */
"DISP32", /* name */ "DISP32", /* name */
TRUE, /* partial_inplace */ true, /* partial_inplace */
0xffffffff, /* src_mask */ 0xffffffff, /* src_mask */
0xffffffff, /* dst_mask */ 0xffffffff, /* dst_mask */
PCRELOFFSET) /* pcrel_offset */ PCRELOFFSET) /* pcrel_offset */
@ -411,7 +411,7 @@ static reloc_howto_type howto_table[] =
and the regular routine is that we don't want to do anything for a and the regular routine is that we don't want to do anything for a
relocatable link. */ relocatable link. */
static bfd_boolean static bool
coff_pe_i386_relocate_section (bfd *output_bfd, coff_pe_i386_relocate_section (bfd *output_bfd,
struct bfd_link_info *info, struct bfd_link_info *info,
bfd *input_bfd, bfd *input_bfd,
@ -422,7 +422,7 @@ coff_pe_i386_relocate_section (bfd *output_bfd,
asection **sections) asection **sections)
{ {
if (bfd_link_relocatable (info)) if (bfd_link_relocatable (info))
return TRUE; return true;
return _bfd_coff_generic_relocate_section (output_bfd, info, input_bfd, return _bfd_coff_generic_relocate_section (output_bfd, info, input_bfd,
input_section, contents, input_section, contents,
@ -602,11 +602,11 @@ coff_i386_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
a leading dot for local labels, so if TARGET_UNDERSCORE is defined a leading dot for local labels, so if TARGET_UNDERSCORE is defined
we treat all symbols starting with L as local. */ we treat all symbols starting with L as local. */
static bfd_boolean static bool
coff_i386_is_local_label_name (bfd *abfd, const char *name) coff_i386_is_local_label_name (bfd *abfd, const char *name)
{ {
if (name[0] == 'L') if (name[0] == 'L')
return TRUE; return true;
return _bfd_coff_is_local_label_name (abfd, name); return _bfd_coff_is_local_label_name (abfd, name);
} }

View File

@ -53,11 +53,11 @@ static reloc_howto_type howto_table[] =
/* Return TRUE if this relocation should /* Return TRUE if this relocation should
appear in the output .reloc section. */ appear in the output .reloc section. */
static bfd_boolean static bool
in_reloc_p (bfd * abfd ATTRIBUTE_UNUSED, in_reloc_p (bfd * abfd ATTRIBUTE_UNUSED,
reloc_howto_type *howto ATTRIBUTE_UNUSED) reloc_howto_type *howto ATTRIBUTE_UNUSED)
{ {
return FALSE; /* We don't do relocs for now... */ return false; /* We don't do relocs for now... */
} }
#endif #endif

View File

@ -37,7 +37,7 @@
/* This file is compiled more than once, but we only compile the /* This file is compiled more than once, but we only compile the
final_link routine once. */ final_link routine once. */
extern bfd_boolean mcore_bfd_coff_final_link extern bool mcore_bfd_coff_final_link
(bfd *, struct bfd_link_info *); (bfd *, struct bfd_link_info *);
static bfd_reloc_status_type mcore_coff_unsupported_reloc static bfd_reloc_status_type mcore_coff_unsupported_reloc
(bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **); (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
@ -63,29 +63,29 @@ static reloc_howto_type mcore_coff_howto_table[] =
0, /* rightshift */ 0, /* rightshift */
0, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* size (0 = byte, 1 = short, 2 = long) */
0, /* bitsize */ 0, /* bitsize */
FALSE, /* pc_relative */ false, /* pc_relative */
0, /* bitpos */ 0, /* bitpos */
complain_overflow_dont, /* dont complain_on_overflow */ complain_overflow_dont, /* dont complain_on_overflow */
NULL, /* special_function */ NULL, /* special_function */
"ABSOLUTE", /* name */ "ABSOLUTE", /* name */
FALSE, /* partial_inplace */ false, /* partial_inplace */
0x00, /* src_mask */ 0x00, /* src_mask */
0x00, /* dst_mask */ 0x00, /* dst_mask */
FALSE), /* pcrel_offset */ false), /* pcrel_offset */
HOWTO (IMAGE_REL_MCORE_ADDR32,/* type */ HOWTO (IMAGE_REL_MCORE_ADDR32,/* type */
0, /* rightshift */ 0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */ 2, /* size (0 = byte, 1 = short, 2 = long) */
32, /* bitsize */ 32, /* bitsize */
FALSE, /* pc_relative */ false, /* pc_relative */
0, /* bitpos */ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */ complain_overflow_bitfield, /* complain_on_overflow */
NULL, /* special_function */ NULL, /* special_function */
"ADDR32", /* name */ "ADDR32", /* name */
TRUE, /* partial_inplace */ true, /* partial_inplace */
0xffffffff, /* src_mask */ 0xffffffff, /* src_mask */
0xffffffff, /* dst_mask */ 0xffffffff, /* dst_mask */
FALSE), /* pcrel_offset */ false), /* pcrel_offset */
/* 8 bits + 2 zero bits; jmpi/jsri/lrw instructions. /* 8 bits + 2 zero bits; jmpi/jsri/lrw instructions.
Should not appear in object files. */ Should not appear in object files. */
@ -93,15 +93,15 @@ static reloc_howto_type mcore_coff_howto_table[] =
2, /* rightshift */ 2, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */ 1, /* size (0 = byte, 1 = short, 2 = long) */
8, /* bitsize */ 8, /* bitsize */
TRUE, /* pc_relative */ true, /* pc_relative */
0, /* bitpos */ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */ complain_overflow_bitfield, /* complain_on_overflow */
mcore_coff_unsupported_reloc, /* special_function */ mcore_coff_unsupported_reloc, /* special_function */
"IMM8BY4", /* name */ "IMM8BY4", /* name */
FALSE, /* partial_inplace */ false, /* partial_inplace */
0, /* src_mask */ 0, /* src_mask */
0, /* dst_mask */ 0, /* dst_mask */
TRUE), /* pcrel_offset */ true), /* pcrel_offset */
/* bsr/bt/bf/br instructions; 11 bits + 1 zero bit /* bsr/bt/bf/br instructions; 11 bits + 1 zero bit
Span 2k instructions == 4k bytes. Span 2k instructions == 4k bytes.
@ -110,45 +110,45 @@ static reloc_howto_type mcore_coff_howto_table[] =
1, /* rightshift */ 1, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */ 1, /* size (0 = byte, 1 = short, 2 = long) */
11, /* bitsize */ 11, /* bitsize */
TRUE, /* pc_relative */ true, /* pc_relative */
0, /* bitpos */ 0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */ complain_overflow_signed, /* complain_on_overflow */
NULL, /* special_function */ NULL, /* special_function */
"IMM11BY2", /* name */ "IMM11BY2", /* name */
FALSE, /* partial_inplace */ false, /* partial_inplace */
0x0, /* src_mask */ 0x0, /* src_mask */
0x7ff, /* dst_mask */ 0x7ff, /* dst_mask */
TRUE), /* pcrel_offset */ true), /* pcrel_offset */
/* 4 bits + 1 zero bit; 'loopt' instruction only; unsupported. */ /* 4 bits + 1 zero bit; 'loopt' instruction only; unsupported. */
HOWTO (IMAGE_REL_MCORE_PCREL_IMM4BY2, /* type */ HOWTO (IMAGE_REL_MCORE_PCREL_IMM4BY2, /* type */
1, /* rightshift */ 1, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */ 1, /* size (0 = byte, 1 = short, 2 = long) */
4, /* bitsize */ 4, /* bitsize */
TRUE, /* pc_relative */ true, /* pc_relative */
0, /* bitpos */ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */ complain_overflow_bitfield, /* complain_on_overflow */
mcore_coff_unsupported_reloc, /* special_function */ mcore_coff_unsupported_reloc, /* special_function */
"IMM4BY2", /* name */ "IMM4BY2", /* name */
FALSE, /* partial_inplace */ false, /* partial_inplace */
0, /* src_mask */ 0, /* src_mask */
0, /* dst_mask */ 0, /* dst_mask */
TRUE), /* pcrel_offset */ true), /* pcrel_offset */
/* 32-bit pc-relative. Eventually this will help support PIC code. */ /* 32-bit pc-relative. Eventually this will help support PIC code. */
HOWTO (IMAGE_REL_MCORE_PCREL_32,/* type */ HOWTO (IMAGE_REL_MCORE_PCREL_32,/* type */
0, /* rightshift */ 0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */ 2, /* size (0 = byte, 1 = short, 2 = long) */
32, /* bitsize */ 32, /* bitsize */
TRUE, /* pc_relative */ true, /* pc_relative */
0, /* bitpos */ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */ complain_overflow_bitfield, /* complain_on_overflow */
NULL, /* special_function */ NULL, /* special_function */
"PCREL_32", /* name */ "PCREL_32", /* name */
FALSE, /* partial_inplace */ false, /* partial_inplace */
0x0, /* src_mask */ 0x0, /* src_mask */
0xffffffff, /* dst_mask */ 0xffffffff, /* dst_mask */
TRUE), /* pcrel_offset */ true), /* pcrel_offset */
/* Like PCREL_IMM11BY2, this relocation indicates that there is a /* Like PCREL_IMM11BY2, this relocation indicates that there is a
'jsri' at the specified address. There is a separate relocation 'jsri' at the specified address. There is a separate relocation
@ -161,29 +161,29 @@ static reloc_howto_type mcore_coff_howto_table[] =
1, /* rightshift */ 1, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */ 1, /* size (0 = byte, 1 = short, 2 = long) */
11, /* bitsize */ 11, /* bitsize */
TRUE, /* pc_relative */ true, /* pc_relative */
0, /* bitpos */ 0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */ complain_overflow_signed, /* complain_on_overflow */
NULL, /* special_function */ NULL, /* special_function */
"JSR_IMM11BY2", /* name */ "JSR_IMM11BY2", /* name */
FALSE, /* partial_inplace */ false, /* partial_inplace */
0x0, /* src_mask */ 0x0, /* src_mask */
0x7ff, /* dst_mask */ 0x7ff, /* dst_mask */
TRUE), /* pcrel_offset */ true), /* pcrel_offset */
HOWTO (IMAGE_REL_MCORE_RVA, /* type */ HOWTO (IMAGE_REL_MCORE_RVA, /* type */
0, /* rightshift */ 0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */ 2, /* size (0 = byte, 1 = short, 2 = long) */
32, /* bitsize */ 32, /* bitsize */
FALSE, /* pc_relative */ false, /* pc_relative */
0, /* bitpos */ 0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */ complain_overflow_signed, /* complain_on_overflow */
NULL, /* special_function */ NULL, /* special_function */
"MCORE_RVA", /* name */ "MCORE_RVA", /* name */
TRUE, /* partial_inplace */ true, /* partial_inplace */
0xffffffff, /* src_mask */ 0xffffffff, /* src_mask */
0xffffffff, /* dst_mask */ 0xffffffff, /* dst_mask */
TRUE) /* pcrel_offset */ true) /* pcrel_offset */
}; };
/* Extend the coff_link_hash_table structure with a few M*Core specific fields. /* Extend the coff_link_hash_table structure with a few M*Core specific fields.
@ -209,7 +209,7 @@ mcore_hash_table;
/* Add an entry to the base file. */ /* Add an entry to the base file. */
static bfd_boolean static bool
mcore_emit_base_file_entry (struct bfd_link_info *info, mcore_emit_base_file_entry (struct bfd_link_info *info,
bfd *output_bfd, bfd *output_bfd,
asection *input_section, asection *input_section,
@ -224,10 +224,10 @@ mcore_emit_base_file_entry (struct bfd_link_info *info,
addr -= pe_data (output_bfd)->pe_opthdr.ImageBase; addr -= pe_data (output_bfd)->pe_opthdr.ImageBase;
if (fwrite (&addr, sizeof (addr), 1, (FILE *) info->base_file) == 1) if (fwrite (&addr, sizeof (addr), 1, (FILE *) info->base_file) == 1)
return TRUE; return true;
bfd_set_error (bfd_error_system_call); bfd_set_error (bfd_error_system_call);
return FALSE; return false;
} }
static bfd_reloc_status_type static bfd_reloc_status_type
@ -336,14 +336,14 @@ coff_mcore_rtype_to_howto (bfd * abfd ATTRIBUTE_UNUSED,
/* Return TRUE if this relocation should appear in the output .reloc section. /* Return TRUE if this relocation should appear in the output .reloc section.
This function is referenced in pe_mkobject in peicode.h. */ This function is referenced in pe_mkobject in peicode.h. */
static bfd_boolean static bool
in_reloc_p (bfd * abfd ATTRIBUTE_UNUSED, reloc_howto_type * howto) in_reloc_p (bfd * abfd ATTRIBUTE_UNUSED, reloc_howto_type * howto)
{ {
return ! howto->pc_relative && howto->type != IMAGE_REL_MCORE_RVA; return ! howto->pc_relative && howto->type != IMAGE_REL_MCORE_RVA;
} }
/* The reloc processing routine for the optimized COFF linker. */ /* The reloc processing routine for the optimized COFF linker. */
static bfd_boolean static bool
coff_mcore_relocate_section (bfd * output_bfd, coff_mcore_relocate_section (bfd * output_bfd,
struct bfd_link_info * info, struct bfd_link_info * info,
bfd * input_bfd, bfd * input_bfd,
@ -360,7 +360,7 @@ coff_mcore_relocate_section (bfd * output_bfd,
thing. The caller will take care of adjusting the reloc thing. The caller will take care of adjusting the reloc
addresses and symbol indices. */ addresses and symbol indices. */
if (bfd_link_relocatable (info)) if (bfd_link_relocatable (info))
return TRUE; return true;
/* Check if we have the same endianness */ /* Check if we have the same endianness */
if ( input_bfd->xvec->byteorder != output_bfd->xvec->byteorder if ( input_bfd->xvec->byteorder != output_bfd->xvec->byteorder
@ -374,7 +374,7 @@ coff_mcore_relocate_section (bfd * output_bfd,
bfd_big_endian (output_bfd) ? _("big endian") : _("little endian")); bfd_big_endian (output_bfd) ? _("big endian") : _("little endian"));
bfd_set_error (bfd_error_wrong_format); bfd_set_error (bfd_error_wrong_format);
return FALSE; return false;
} }
rel = relocs; rel = relocs;
@ -414,7 +414,7 @@ coff_mcore_relocate_section (bfd * output_bfd,
howto = bfd_coff_rtype_to_howto (input_bfd, input_section, rel, h, howto = bfd_coff_rtype_to_howto (input_bfd, input_section, rel, h,
sym, & addend); sym, & addend);
if (howto == NULL) if (howto == NULL)
return FALSE; return false;
val = 0; val = 0;
@ -457,7 +457,7 @@ coff_mcore_relocate_section (bfd * output_bfd,
else else
(*info->callbacks->undefined_symbol) (*info->callbacks->undefined_symbol)
(info, h->root.root.string, input_bfd, input_section, (info, h->root.root.string, input_bfd, input_section,
rel->r_vaddr - input_section->vma, TRUE); rel->r_vaddr - input_section->vma, true);
my_name = h->root.root.string; my_name = h->root.root.string;
} }
@ -472,7 +472,7 @@ coff_mcore_relocate_section (bfd * output_bfd,
_bfd_error_handler (_("%pB: unsupported relocation type %#x"), _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
input_bfd, r_type); input_bfd, r_type);
bfd_set_error (bfd_error_bad_value); bfd_set_error (bfd_error_bad_value);
return FALSE; return false;
case IMAGE_REL_MCORE_ABSOLUTE: case IMAGE_REL_MCORE_ABSOLUTE:
_bfd_error_handler _bfd_error_handler
@ -508,7 +508,7 @@ coff_mcore_relocate_section (bfd * output_bfd,
&& pe_data (output_bfd)->in_reloc_p (output_bfd, howto) && pe_data (output_bfd)->in_reloc_p (output_bfd, howto)
&& !mcore_emit_base_file_entry (info, output_bfd, input_section, && !mcore_emit_base_file_entry (info, output_bfd, input_section,
rel->r_vaddr)) rel->r_vaddr))
return FALSE; return false;
switch (rstat) switch (rstat)
{ {
@ -526,7 +526,7 @@ coff_mcore_relocate_section (bfd * output_bfd,
} }
} }
return TRUE; return true;
} }
/* Tailor coffcode.h -- macro heaven. */ /* Tailor coffcode.h -- macro heaven. */

View File

@ -86,52 +86,52 @@ static reloc_howto_type mips_howto_table[] =
0, /* rightshift */ 0, /* rightshift */
0, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* size (0 = byte, 1 = short, 2 = long) */
8, /* bitsize */ 8, /* bitsize */
FALSE, /* pc_relative */ false, /* pc_relative */
0, /* bitpos */ 0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */ complain_overflow_dont, /* complain_on_overflow */
0, /* special_function */ 0, /* special_function */
"IGNORE", /* name */ "IGNORE", /* name */
FALSE, /* partial_inplace */ false, /* partial_inplace */
0, /* src_mask */ 0, /* src_mask */
0, /* dst_mask */ 0, /* dst_mask */
FALSE), /* pcrel_offset */ false), /* pcrel_offset */
/* A 16 bit reference to a symbol, normally from a data section. */ /* A 16 bit reference to a symbol, normally from a data section. */
HOWTO (MIPS_R_REFHALF, /* type */ HOWTO (MIPS_R_REFHALF, /* type */
0, /* rightshift */ 0, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */ 1, /* size (0 = byte, 1 = short, 2 = long) */
16, /* bitsize */ 16, /* bitsize */
FALSE, /* pc_relative */ false, /* pc_relative */
0, /* bitpos */ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */ complain_overflow_bitfield, /* complain_on_overflow */
mips_generic_reloc, /* special_function */ mips_generic_reloc, /* special_function */
"REFHALF", /* name */ "REFHALF", /* name */
TRUE, /* partial_inplace */ true, /* partial_inplace */
0xffff, /* src_mask */ 0xffff, /* src_mask */
0xffff, /* dst_mask */ 0xffff, /* dst_mask */
FALSE), /* pcrel_offset */ false), /* pcrel_offset */
/* A 32 bit reference to a symbol, normally from a data section. */ /* A 32 bit reference to a symbol, normally from a data section. */
HOWTO (MIPS_R_REFWORD, /* type */ HOWTO (MIPS_R_REFWORD, /* type */
0, /* rightshift */ 0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */ 2, /* size (0 = byte, 1 = short, 2 = long) */
32, /* bitsize */ 32, /* bitsize */
FALSE, /* pc_relative */ false, /* pc_relative */
0, /* bitpos */ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */ complain_overflow_bitfield, /* complain_on_overflow */
mips_generic_reloc, /* special_function */ mips_generic_reloc, /* special_function */
"REFWORD", /* name */ "REFWORD", /* name */
TRUE, /* partial_inplace */ true, /* partial_inplace */
0xffffffff, /* src_mask */ 0xffffffff, /* src_mask */
0xffffffff, /* dst_mask */ 0xffffffff, /* dst_mask */
FALSE), /* pcrel_offset */ false), /* pcrel_offset */
/* A 26 bit absolute jump address. */ /* A 26 bit absolute jump address. */
HOWTO (MIPS_R_JMPADDR, /* type */ HOWTO (MIPS_R_JMPADDR, /* type */
2, /* rightshift */ 2, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */ 2, /* size (0 = byte, 1 = short, 2 = long) */
26, /* bitsize */ 26, /* bitsize */
FALSE, /* pc_relative */ false, /* pc_relative */
0, /* bitpos */ 0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */ complain_overflow_dont, /* complain_on_overflow */
/* This needs complex overflow /* This needs complex overflow
@ -139,10 +139,10 @@ static reloc_howto_type mips_howto_table[] =
bits must match the PC. */ bits must match the PC. */
mips_generic_reloc, /* special_function */ mips_generic_reloc, /* special_function */
"JMPADDR", /* name */ "JMPADDR", /* name */
TRUE, /* partial_inplace */ true, /* partial_inplace */
0x3ffffff, /* src_mask */ 0x3ffffff, /* src_mask */
0x3ffffff, /* dst_mask */ 0x3ffffff, /* dst_mask */
FALSE), /* pcrel_offset */ false), /* pcrel_offset */
/* The high 16 bits of a symbol value. Handled by the function /* The high 16 bits of a symbol value. Handled by the function
mips_refhi_reloc. */ mips_refhi_reloc. */
@ -150,30 +150,30 @@ static reloc_howto_type mips_howto_table[] =
16, /* rightshift */ 16, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */ 2, /* size (0 = byte, 1 = short, 2 = long) */
16, /* bitsize */ 16, /* bitsize */
FALSE, /* pc_relative */ false, /* pc_relative */
0, /* bitpos */ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */ complain_overflow_bitfield, /* complain_on_overflow */
mips_refhi_reloc, /* special_function */ mips_refhi_reloc, /* special_function */
"REFHI", /* name */ "REFHI", /* name */
TRUE, /* partial_inplace */ true, /* partial_inplace */
0xffff, /* src_mask */ 0xffff, /* src_mask */
0xffff, /* dst_mask */ 0xffff, /* dst_mask */
FALSE), /* pcrel_offset */ false), /* pcrel_offset */
/* The low 16 bits of a symbol value. */ /* The low 16 bits of a symbol value. */
HOWTO (MIPS_R_REFLO, /* type */ HOWTO (MIPS_R_REFLO, /* type */
0, /* rightshift */ 0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */ 2, /* size (0 = byte, 1 = short, 2 = long) */
16, /* bitsize */ 16, /* bitsize */
FALSE, /* pc_relative */ false, /* pc_relative */
0, /* bitpos */ 0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */ complain_overflow_dont, /* complain_on_overflow */
mips_reflo_reloc, /* special_function */ mips_reflo_reloc, /* special_function */
"REFLO", /* name */ "REFLO", /* name */
TRUE, /* partial_inplace */ true, /* partial_inplace */
0xffff, /* src_mask */ 0xffff, /* src_mask */
0xffff, /* dst_mask */ 0xffff, /* dst_mask */
FALSE), /* pcrel_offset */ false), /* pcrel_offset */
/* A reference to an offset from the gp register. Handled by the /* A reference to an offset from the gp register. Handled by the
function mips_gprel_reloc. */ function mips_gprel_reloc. */
@ -181,15 +181,15 @@ static reloc_howto_type mips_howto_table[] =
0, /* rightshift */ 0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */ 2, /* size (0 = byte, 1 = short, 2 = long) */
16, /* bitsize */ 16, /* bitsize */
FALSE, /* pc_relative */ false, /* pc_relative */
0, /* bitpos */ 0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */ complain_overflow_signed, /* complain_on_overflow */
mips_gprel_reloc, /* special_function */ mips_gprel_reloc, /* special_function */
"GPREL", /* name */ "GPREL", /* name */
TRUE, /* partial_inplace */ true, /* partial_inplace */
0xffff, /* src_mask */ 0xffff, /* src_mask */
0xffff, /* dst_mask */ 0xffff, /* dst_mask */
FALSE), /* pcrel_offset */ false), /* pcrel_offset */
/* A reference to a literal using an offset from the gp register. /* A reference to a literal using an offset from the gp register.
Handled by the function mips_gprel_reloc. */ Handled by the function mips_gprel_reloc. */
@ -197,15 +197,15 @@ static reloc_howto_type mips_howto_table[] =
0, /* rightshift */ 0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */ 2, /* size (0 = byte, 1 = short, 2 = long) */
16, /* bitsize */ 16, /* bitsize */
FALSE, /* pc_relative */ false, /* pc_relative */
0, /* bitpos */ 0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */ complain_overflow_signed, /* complain_on_overflow */
mips_gprel_reloc, /* special_function */ mips_gprel_reloc, /* special_function */
"LITERAL", /* name */ "LITERAL", /* name */
TRUE, /* partial_inplace */ true, /* partial_inplace */
0xffff, /* src_mask */ 0xffff, /* src_mask */
0xffff, /* dst_mask */ 0xffff, /* dst_mask */
FALSE), /* pcrel_offset */ false), /* pcrel_offset */
EMPTY_HOWTO (8), EMPTY_HOWTO (8),
EMPTY_HOWTO (9), EMPTY_HOWTO (9),
@ -219,15 +219,15 @@ static reloc_howto_type mips_howto_table[] =
2, /* rightshift */ 2, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */ 2, /* size (0 = byte, 1 = short, 2 = long) */
16, /* bitsize */ 16, /* bitsize */
TRUE, /* pc_relative */ true, /* pc_relative */
0, /* bitpos */ 0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */ complain_overflow_signed, /* complain_on_overflow */
mips_generic_reloc, /* special_function */ mips_generic_reloc, /* special_function */
"PCREL16", /* name */ "PCREL16", /* name */
TRUE, /* partial_inplace */ true, /* partial_inplace */
0xffff, /* src_mask */ 0xffff, /* src_mask */
0xffff, /* dst_mask */ 0xffff, /* dst_mask */
TRUE), /* pcrel_offset */ true), /* pcrel_offset */
}; };
#define MIPS_HOWTO_COUNT \ #define MIPS_HOWTO_COUNT \
@ -235,7 +235,7 @@ static reloc_howto_type mips_howto_table[] =
/* See whether the magic number matches. */ /* See whether the magic number matches. */
static bfd_boolean static bool
mips_ecoff_bad_format_hook (bfd * abfd, void * filehdr) mips_ecoff_bad_format_hook (bfd * abfd, void * filehdr)
{ {
struct internal_filehdr *internal_f = (struct internal_filehdr *) filehdr; struct internal_filehdr *internal_f = (struct internal_filehdr *) filehdr;
@ -244,7 +244,7 @@ mips_ecoff_bad_format_hook (bfd * abfd, void * filehdr)
{ {
case MIPS_MAGIC_1: case MIPS_MAGIC_1:
/* I don't know what endianness this implies. */ /* I don't know what endianness this implies. */
return TRUE; return true;
case MIPS_MAGIC_BIG: case MIPS_MAGIC_BIG:
case MIPS_MAGIC_BIG2: case MIPS_MAGIC_BIG2:
@ -257,7 +257,7 @@ mips_ecoff_bad_format_hook (bfd * abfd, void * filehdr)
return bfd_little_endian (abfd); return bfd_little_endian (abfd);
default: default:
return FALSE; return false;
} }
} }
@ -562,7 +562,7 @@ mips_gprel_reloc (bfd *abfd ATTRIBUTE_UNUSED,
bfd *output_bfd, bfd *output_bfd,
char **error_message ATTRIBUTE_UNUSED) char **error_message ATTRIBUTE_UNUSED)
{ {
bfd_boolean relocatable; bool relocatable;
bfd_vma gp; bfd_vma gp;
bfd_vma relocation; bfd_vma relocation;
unsigned long val; unsigned long val;
@ -581,10 +581,10 @@ mips_gprel_reloc (bfd *abfd ATTRIBUTE_UNUSED,
} }
if (output_bfd != (bfd *) NULL) if (output_bfd != (bfd *) NULL)
relocatable = TRUE; relocatable = true;
else else
{ {
relocatable = FALSE; relocatable = false;
output_bfd = symbol->section->output_section->owner; output_bfd = symbol->section->output_section->owner;
} }
@ -792,7 +792,7 @@ mips_relocate_hi (struct internal_reloc *refhi,
/* Relocate a section while linking a MIPS ECOFF file. */ /* Relocate a section while linking a MIPS ECOFF file. */
static bfd_boolean static bool
mips_relocate_section (bfd *output_bfd, mips_relocate_section (bfd *output_bfd,
struct bfd_link_info *info, struct bfd_link_info *info,
bfd *input_bfd, bfd *input_bfd,
@ -803,11 +803,11 @@ mips_relocate_section (bfd *output_bfd,
asection **symndx_to_section; asection **symndx_to_section;
struct ecoff_link_hash_entry **sym_hashes; struct ecoff_link_hash_entry **sym_hashes;
bfd_vma gp; bfd_vma gp;
bfd_boolean gp_undefined; bool gp_undefined;
struct external_reloc *ext_rel; struct external_reloc *ext_rel;
struct external_reloc *ext_rel_end; struct external_reloc *ext_rel_end;
unsigned int i; unsigned int i;
bfd_boolean got_lo; bool got_lo;
struct internal_reloc lo_int_rel; struct internal_reloc lo_int_rel;
bfd_size_type amt; bfd_size_type amt;
@ -823,7 +823,7 @@ mips_relocate_section (bfd *output_bfd,
amt = NUM_RELOC_SECTIONS * sizeof (asection *); amt = NUM_RELOC_SECTIONS * sizeof (asection *);
symndx_to_section = (asection **) bfd_alloc (input_bfd, amt); symndx_to_section = (asection **) bfd_alloc (input_bfd, amt);
if (!symndx_to_section) if (!symndx_to_section)
return FALSE; return false;
symndx_to_section[RELOC_SECTION_NONE] = NULL; symndx_to_section[RELOC_SECTION_NONE] = NULL;
symndx_to_section[RELOC_SECTION_TEXT] = symndx_to_section[RELOC_SECTION_TEXT] =
@ -858,18 +858,18 @@ mips_relocate_section (bfd *output_bfd,
gp = _bfd_get_gp_value (output_bfd); gp = _bfd_get_gp_value (output_bfd);
if (gp == 0) if (gp == 0)
gp_undefined = TRUE; gp_undefined = true;
else else
gp_undefined = FALSE; gp_undefined = false;
got_lo = FALSE; got_lo = false;
ext_rel = (struct external_reloc *) external_relocs; ext_rel = (struct external_reloc *) external_relocs;
ext_rel_end = ext_rel + input_section->reloc_count; ext_rel_end = ext_rel + input_section->reloc_count;
for (i = 0; ext_rel < ext_rel_end; ext_rel++, i++) for (i = 0; ext_rel < ext_rel_end; ext_rel++, i++)
{ {
struct internal_reloc int_rel; struct internal_reloc int_rel;
bfd_boolean use_lo = FALSE; bool use_lo = false;
bfd_vma addend; bfd_vma addend;
reloc_howto_type *howto; reloc_howto_type *howto;
struct ecoff_link_hash_entry *h = NULL; struct ecoff_link_hash_entry *h = NULL;
@ -882,7 +882,7 @@ mips_relocate_section (bfd *output_bfd,
else else
{ {
int_rel = lo_int_rel; int_rel = lo_int_rel;
got_lo = FALSE; got_lo = false;
} }
BFD_ASSERT (int_rel.r_type BFD_ASSERT (int_rel.r_type
@ -912,9 +912,9 @@ mips_relocate_section (bfd *output_bfd,
&& int_rel.r_extern == lo_int_rel.r_extern && int_rel.r_extern == lo_int_rel.r_extern
&& int_rel.r_symndx == lo_int_rel.r_symndx) && int_rel.r_symndx == lo_int_rel.r_symndx)
{ {
use_lo = TRUE; use_lo = true;
if (lo_ext_rel == ext_rel + 1) if (lo_ext_rel == ext_rel + 1)
got_lo = TRUE; got_lo = true;
} }
} }
@ -956,7 +956,7 @@ mips_relocate_section (bfd *output_bfd,
/* Only give the error once per link. */ /* Only give the error once per link. */
gp = 4; gp = 4;
_bfd_set_gp_value (output_bfd, gp); _bfd_set_gp_value (output_bfd, gp);
gp_undefined = FALSE; gp_undefined = false;
} }
if (! int_rel.r_extern) if (! int_rel.r_extern)
{ {
@ -1158,7 +1158,7 @@ mips_relocate_section (bfd *output_bfd,
{ {
(*info->callbacks->undefined_symbol) (*info->callbacks->undefined_symbol)
(info, h->root.root.string, input_bfd, input_section, (info, h->root.root.string, input_bfd, input_section,
int_rel.r_vaddr - input_section->vma, TRUE); int_rel.r_vaddr - input_section->vma, true);
relocation = 0; relocation = 0;
} }
} }
@ -1236,7 +1236,7 @@ mips_relocate_section (bfd *output_bfd,
} }
} }
return TRUE; return true;
} }
static void static void
@ -1313,8 +1313,8 @@ static const struct ecoff_backend_data mips_ecoff_backend_data =
mips_ecoff_swap_coff_reloc_out, mips_ecoff_swap_coff_reloc_out,
mips_ecoff_swap_filehdr_out, mips_ecoff_swap_aouthdr_out, mips_ecoff_swap_filehdr_out, mips_ecoff_swap_aouthdr_out,
mips_ecoff_swap_scnhdr_out, mips_ecoff_swap_scnhdr_out,
FILHSZ, AOUTSZ, SCNHSZ, 0, 0, 0, 0, FILNMLEN, TRUE, FILHSZ, AOUTSZ, SCNHSZ, 0, 0, 0, 0, FILNMLEN, true,
ECOFF_NO_LONG_SECTION_NAMES, 4, FALSE, 2, 32768, ECOFF_NO_LONG_SECTION_NAMES, 4, false, 2, 32768,
mips_ecoff_swap_filehdr_in, mips_ecoff_swap_aouthdr_in, mips_ecoff_swap_filehdr_in, mips_ecoff_swap_aouthdr_in,
mips_ecoff_swap_scnhdr_in, NULL, mips_ecoff_swap_scnhdr_in, NULL,
mips_ecoff_bad_format_hook, _bfd_ecoff_set_arch_mach_hook, mips_ecoff_bad_format_hook, _bfd_ecoff_set_arch_mach_hook,
@ -1333,7 +1333,7 @@ static const struct ecoff_backend_data mips_ecoff_backend_data =
/* TRUE if the .rdata section is part of the text segment, as on the /* TRUE if the .rdata section is part of the text segment, as on the
Alpha. FALSE if .rdata is part of the data segment, as on the Alpha. FALSE if .rdata is part of the data segment, as on the
MIPS. */ MIPS. */
FALSE, false,
/* Bitsize of constructor entries. */ /* Bitsize of constructor entries. */
32, 32,
/* Reloc to use for constructor entries. */ /* Reloc to use for constructor entries. */

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -54,12 +54,12 @@
#include "coff/msdos.h" #include "coff/msdos.h"
static bfd_cleanup go32exe_check_format (bfd *); static bfd_cleanup go32exe_check_format (bfd *);
static bfd_boolean go32exe_write_object_contents (bfd *); static bool go32exe_write_object_contents (bfd *);
static bfd_boolean go32exe_mkobject (bfd *); static bool go32exe_mkobject (bfd *);
static bfd_boolean go32exe_copy_private_bfd_data (bfd *, bfd *); static bool go32exe_copy_private_bfd_data (bfd *, bfd *);
/* Defined in coff-go32.c. */ /* Defined in coff-go32.c. */
bfd_boolean _bfd_go32_mkobject (bfd *); bool _bfd_go32_mkobject (bfd *);
void _bfd_go32_swap_scnhdr_in (bfd *, void *, void *); void _bfd_go32_swap_scnhdr_in (bfd *, void *, void *);
unsigned int _bfd_go32_swap_scnhdr_out (bfd *, void *, void *); unsigned int _bfd_go32_swap_scnhdr_out (bfd *, void *, void *);
@ -217,12 +217,12 @@ go32exe_create_stub (bfd *abfd)
/* If ibfd was a stubbed coff image, copy the stub from that bfd /* If ibfd was a stubbed coff image, copy the stub from that bfd
to the new obfd. */ to the new obfd. */
static bfd_boolean static bool
go32exe_copy_private_bfd_data (bfd *ibfd, bfd *obfd) go32exe_copy_private_bfd_data (bfd *ibfd, bfd *obfd)
{ {
/* Check if both are the same targets. */ /* Check if both are the same targets. */
if (ibfd->xvec != obfd->xvec) if (ibfd->xvec != obfd->xvec)
return TRUE; return true;
/* Make sure we have a source stub. */ /* Make sure we have a source stub. */
BFD_ASSERT (coff_data (ibfd)->stub != NULL); BFD_ASSERT (coff_data (ibfd)->stub != NULL);
@ -231,7 +231,7 @@ go32exe_copy_private_bfd_data (bfd *ibfd, bfd *obfd)
if (coff_data (ibfd)->stub_size > coff_data (obfd)->stub_size) if (coff_data (ibfd)->stub_size > coff_data (obfd)->stub_size)
coff_data (obfd)->stub = bfd_alloc (obfd, coff_data (ibfd)->stub_size); coff_data (obfd)->stub = bfd_alloc (obfd, coff_data (ibfd)->stub_size);
if (coff_data (obfd)->stub == NULL) if (coff_data (obfd)->stub == NULL)
return FALSE; return false;
/* Now copy the stub. */ /* Now copy the stub. */
memcpy (coff_data (obfd)->stub, coff_data (ibfd)->stub, memcpy (coff_data (obfd)->stub, coff_data (ibfd)->stub,
@ -239,7 +239,7 @@ go32exe_copy_private_bfd_data (bfd *ibfd, bfd *obfd)
coff_data (obfd)->stub_size = coff_data (ibfd)->stub_size; coff_data (obfd)->stub_size = coff_data (ibfd)->stub_size;
obfd->origin = coff_data (obfd)->stub_size; obfd->origin = coff_data (obfd)->stub_size;
return TRUE; return true;
} }
/* Cleanup function, returned from check_format hook. */ /* Cleanup function, returned from check_format hook. */
@ -332,7 +332,7 @@ go32exe_check_format (bfd *abfd)
/* Write the stub to the output file, then call coff_write_object_contents. */ /* Write the stub to the output file, then call coff_write_object_contents. */
static bfd_boolean static bool
go32exe_write_object_contents (bfd *abfd) go32exe_write_object_contents (bfd *abfd)
{ {
const bfd_size_type pos = bfd_tell (abfd); const bfd_size_type pos = bfd_tell (abfd);
@ -345,14 +345,14 @@ go32exe_write_object_contents (bfd *abfd)
/* Write the stub. */ /* Write the stub. */
abfd->origin = 0; abfd->origin = 0;
if (bfd_seek (abfd, 0, SEEK_SET) != 0) if (bfd_seek (abfd, 0, SEEK_SET) != 0)
return FALSE; return false;
if (bfd_bwrite (coff_data (abfd)->stub, stubsize, abfd) != stubsize) if (bfd_bwrite (coff_data (abfd)->stub, stubsize, abfd) != stubsize)
return FALSE; return false;
/* Seek back to where we were. */ /* Seek back to where we were. */
abfd->origin = stubsize; abfd->origin = stubsize;
if (bfd_seek (abfd, pos, SEEK_SET) != 0) if (bfd_seek (abfd, pos, SEEK_SET) != 0)
return FALSE; return false;
return coff_write_object_contents (abfd); return coff_write_object_contents (abfd);
} }
@ -360,23 +360,23 @@ go32exe_write_object_contents (bfd *abfd)
/* mkobject hook. Called directly through bfd_set_format or via /* mkobject hook. Called directly through bfd_set_format or via
coff_mkobject_hook etc from bfd_check_format. */ coff_mkobject_hook etc from bfd_check_format. */
static bfd_boolean static bool
go32exe_mkobject (bfd *abfd) go32exe_mkobject (bfd *abfd)
{ {
/* Don't output to an archive. */ /* Don't output to an archive. */
if (abfd->my_archive != NULL) if (abfd->my_archive != NULL)
return FALSE; return false;
if (!_bfd_go32_mkobject (abfd)) if (!_bfd_go32_mkobject (abfd))
return FALSE; return false;
go32exe_create_stub (abfd); go32exe_create_stub (abfd);
if (coff_data (abfd)->stub == NULL) if (coff_data (abfd)->stub == NULL)
{ {
bfd_release (abfd, coff_data (abfd)); bfd_release (abfd, coff_data (abfd));
return FALSE; return false;
} }
abfd->origin = coff_data (abfd)->stub_size; abfd->origin = coff_data (abfd)->stub_size;
return TRUE; return true;
} }

View File

@ -31,16 +31,16 @@
reloc_howto_type tic30_coff_howto_table[] = reloc_howto_type tic30_coff_howto_table[] =
{ {
HOWTO (R_TIC30_ABS16, 2, 1, 16, FALSE, 0, 0, NULL, HOWTO (R_TIC30_ABS16, 2, 1, 16, false, 0, 0, NULL,
"16", FALSE, 0x0000FFFF, 0x0000FFFF, FALSE), "16", false, 0x0000FFFF, 0x0000FFFF, false),
HOWTO (R_TIC30_ABS24, 2, 2, 24, FALSE, 8, complain_overflow_bitfield, NULL, HOWTO (R_TIC30_ABS24, 2, 2, 24, false, 8, complain_overflow_bitfield, NULL,
"24", FALSE, 0xFFFFFF00, 0xFFFFFF00, FALSE), "24", false, 0xFFFFFF00, 0xFFFFFF00, false),
HOWTO (R_TIC30_LDP, 18, 0, 24, FALSE, 0, complain_overflow_bitfield, NULL, HOWTO (R_TIC30_LDP, 18, 0, 24, false, 0, complain_overflow_bitfield, NULL,
"LDP", FALSE, 0x00FF0000, 0x000000FF, FALSE), "LDP", false, 0x00FF0000, 0x000000FF, false),
HOWTO (R_TIC30_ABS32, 2, 2, 32, FALSE, 0, complain_overflow_bitfield, NULL, HOWTO (R_TIC30_ABS32, 2, 2, 32, false, 0, complain_overflow_bitfield, NULL,
"32", FALSE, 0xFFFFFFFF, 0xFFFFFFFF, FALSE), "32", false, 0xFFFFFFFF, 0xFFFFFFFF, false),
HOWTO (R_TIC30_PC16, 2, 1, 16, TRUE, 0, complain_overflow_signed, NULL, HOWTO (R_TIC30_PC16, 2, 1, 16, true, 0, complain_overflow_signed, NULL,
"PCREL", FALSE, 0x0000FFFF, 0x0000FFFF, FALSE), "PCREL", false, 0x0000FFFF, 0x0000FFFF, false),
EMPTY_HOWTO (-1) EMPTY_HOWTO (-1)
}; };

View File

@ -41,13 +41,13 @@ tic4x_reloc_processing (arelent *, struct internal_reloc *,
/* Replace the stock _bfd_coff_is_local_label_name to recognize TI COFF local /* Replace the stock _bfd_coff_is_local_label_name to recognize TI COFF local
labels. */ labels. */
static bfd_boolean static bool
ticoff_bfd_is_local_label_name (bfd *abfd ATTRIBUTE_UNUSED, ticoff_bfd_is_local_label_name (bfd *abfd ATTRIBUTE_UNUSED,
const char *name) const char *name)
{ {
if (TICOFF_LOCAL_LABEL_P(name)) if (TICOFF_LOCAL_LABEL_P(name))
return TRUE; return true;
return FALSE; return false;
} }
#define coff_bfd_is_local_label_name ticoff_bfd_is_local_label_name #define coff_bfd_is_local_label_name ticoff_bfd_is_local_label_name
@ -92,20 +92,20 @@ tic4x_relocation (bfd *abfd ATTRIBUTE_UNUSED,
reloc_howto_type tic4x_howto_table[] = reloc_howto_type tic4x_howto_table[] =
{ {
HOWTO(R_RELWORD, 0, 2, 16, FALSE, 0, complain_overflow_signed, tic4x_relocation, "RELWORD", TRUE, 0x0000ffff, 0x0000ffff, FALSE), HOWTO(R_RELWORD, 0, 2, 16, false, 0, complain_overflow_signed, tic4x_relocation, "RELWORD", true, 0x0000ffff, 0x0000ffff, false),
HOWTO(R_REL24, 0, 2, 24, FALSE, 0, complain_overflow_bitfield, tic4x_relocation, "REL24", TRUE, 0x00ffffff, 0x00ffffff, FALSE), HOWTO(R_REL24, 0, 2, 24, false, 0, complain_overflow_bitfield, tic4x_relocation, "REL24", true, 0x00ffffff, 0x00ffffff, false),
HOWTO(R_RELLONG, 0, 2, 32, FALSE, 0, complain_overflow_dont, tic4x_relocation, "RELLONG", TRUE, 0xffffffff, 0xffffffff, FALSE), HOWTO(R_RELLONG, 0, 2, 32, false, 0, complain_overflow_dont, tic4x_relocation, "RELLONG", true, 0xffffffff, 0xffffffff, false),
HOWTO(R_PCRWORD, 0, 2, 16, TRUE, 0, complain_overflow_signed, tic4x_relocation, "PCRWORD", TRUE, 0x0000ffff, 0x0000ffff, FALSE), HOWTO(R_PCRWORD, 0, 2, 16, true, 0, complain_overflow_signed, tic4x_relocation, "PCRWORD", true, 0x0000ffff, 0x0000ffff, false),
HOWTO(R_PCR24, 0, 2, 24, TRUE, 0, complain_overflow_signed, tic4x_relocation, "PCR24", TRUE, 0x00ffffff, 0x00ffffff, FALSE), HOWTO(R_PCR24, 0, 2, 24, true, 0, complain_overflow_signed, tic4x_relocation, "PCR24", true, 0x00ffffff, 0x00ffffff, false),
HOWTO(R_PARTLS16, 0, 2, 16, FALSE, 0, complain_overflow_dont, tic4x_relocation, "PARTLS16", TRUE, 0x0000ffff, 0x0000ffff, FALSE), HOWTO(R_PARTLS16, 0, 2, 16, false, 0, complain_overflow_dont, tic4x_relocation, "PARTLS16", true, 0x0000ffff, 0x0000ffff, false),
HOWTO(R_PARTMS8, 16, 2, 16, FALSE, 0, complain_overflow_dont, tic4x_relocation, "PARTMS8", TRUE, 0x0000ffff, 0x0000ffff, FALSE), HOWTO(R_PARTMS8, 16, 2, 16, false, 0, complain_overflow_dont, tic4x_relocation, "PARTMS8", true, 0x0000ffff, 0x0000ffff, false),
HOWTO(R_RELWORD, 0, 2, 16, FALSE, 0, complain_overflow_signed, tic4x_relocation, "ARELWORD", TRUE, 0x0000ffff, 0x0000ffff, FALSE), HOWTO(R_RELWORD, 0, 2, 16, false, 0, complain_overflow_signed, tic4x_relocation, "ARELWORD", true, 0x0000ffff, 0x0000ffff, false),
HOWTO(R_REL24, 0, 2, 24, FALSE, 0, complain_overflow_signed, tic4x_relocation, "AREL24", TRUE, 0x00ffffff, 0x00ffffff, FALSE), HOWTO(R_REL24, 0, 2, 24, false, 0, complain_overflow_signed, tic4x_relocation, "AREL24", true, 0x00ffffff, 0x00ffffff, false),
HOWTO(R_RELLONG, 0, 2, 32, FALSE, 0, complain_overflow_signed, tic4x_relocation, "ARELLONG", TRUE, 0xffffffff, 0xffffffff, FALSE), HOWTO(R_RELLONG, 0, 2, 32, false, 0, complain_overflow_signed, tic4x_relocation, "ARELLONG", true, 0xffffffff, 0xffffffff, false),
HOWTO(R_PCRWORD, 0, 2, 16, TRUE, 0, complain_overflow_signed, tic4x_relocation, "APCRWORD", TRUE, 0x0000ffff, 0x0000ffff, FALSE), HOWTO(R_PCRWORD, 0, 2, 16, true, 0, complain_overflow_signed, tic4x_relocation, "APCRWORD", true, 0x0000ffff, 0x0000ffff, false),
HOWTO(R_PCR24, 0, 2, 24, TRUE, 0, complain_overflow_signed, tic4x_relocation, "APCR24", TRUE, 0x00ffffff, 0x00ffffff, FALSE), HOWTO(R_PCR24, 0, 2, 24, true, 0, complain_overflow_signed, tic4x_relocation, "APCR24", true, 0x00ffffff, 0x00ffffff, false),
HOWTO(R_PARTLS16, 0, 2, 16, FALSE, 0, complain_overflow_dont, tic4x_relocation, "APARTLS16", TRUE, 0x0000ffff, 0x0000ffff, FALSE), HOWTO(R_PARTLS16, 0, 2, 16, false, 0, complain_overflow_dont, tic4x_relocation, "APARTLS16", true, 0x0000ffff, 0x0000ffff, false),
HOWTO(R_PARTMS8, 16, 2, 16, FALSE, 0, complain_overflow_dont, tic4x_relocation, "APARTMS8", TRUE, 0x0000ffff, 0x0000ffff, FALSE), HOWTO(R_PARTMS8, 16, 2, 16, false, 0, complain_overflow_dont, tic4x_relocation, "APARTMS8", true, 0x0000ffff, 0x0000ffff, false),
}; };
#define HOWTO_SIZE (sizeof(tic4x_howto_table) / sizeof(tic4x_howto_table[0])) #define HOWTO_SIZE (sizeof(tic4x_howto_table) / sizeof(tic4x_howto_table[0]))

View File

@ -112,7 +112,7 @@ bfd_ticoff_get_section_load_page (asection *sect)
/* Set the architecture appropriately. Allow unkown architectures /* Set the architecture appropriately. Allow unkown architectures
(e.g. binary). */ (e.g. binary). */
static bfd_boolean static bool
tic54x_set_arch_mach (bfd *abfd, tic54x_set_arch_mach (bfd *abfd,
enum bfd_architecture arch, enum bfd_architecture arch,
unsigned long machine) unsigned long machine)
@ -121,7 +121,7 @@ tic54x_set_arch_mach (bfd *abfd,
arch = bfd_arch_tic54x; arch = bfd_arch_tic54x;
else if (arch != bfd_arch_tic54x) else if (arch != bfd_arch_tic54x)
return FALSE; return false;
return bfd_default_set_arch_mach (abfd, arch, machine); return bfd_default_set_arch_mach (abfd, arch, machine);
} }
@ -154,59 +154,59 @@ reloc_howto_type tic54x_howto_table[] =
/* NORMAL BANK */ /* NORMAL BANK */
/* 16-bit direct reference to symbol's address. */ /* 16-bit direct reference to symbol's address. */
HOWTO (R_RELWORD,0,1,16,FALSE,0,complain_overflow_dont, HOWTO (R_RELWORD,0,1,16,false,0,complain_overflow_dont,
tic54x_relocation,"REL16",FALSE,0xFFFF,0xFFFF,FALSE), tic54x_relocation,"REL16",false,0xFFFF,0xFFFF,false),
/* 7 LSBs of an address */ /* 7 LSBs of an address */
HOWTO (R_PARTLS7,0,1,7,FALSE,0,complain_overflow_dont, HOWTO (R_PARTLS7,0,1,7,false,0,complain_overflow_dont,
tic54x_relocation,"LS7",FALSE,0x007F,0x007F,FALSE), tic54x_relocation,"LS7",false,0x007F,0x007F,false),
/* 9 MSBs of an address */ /* 9 MSBs of an address */
/* TI assembler doesn't shift its encoding, and is thus incompatible */ /* TI assembler doesn't shift its encoding, and is thus incompatible */
HOWTO (R_PARTMS9,7,1,9,FALSE,0,complain_overflow_dont, HOWTO (R_PARTMS9,7,1,9,false,0,complain_overflow_dont,
tic54x_relocation,"MS9",FALSE,0x01FF,0x01FF,FALSE), tic54x_relocation,"MS9",false,0x01FF,0x01FF,false),
/* 23-bit relocation */ /* 23-bit relocation */
HOWTO (R_EXTWORD,0,2,23,FALSE,0,complain_overflow_dont, HOWTO (R_EXTWORD,0,2,23,false,0,complain_overflow_dont,
tic54x_relocation,"RELEXT",FALSE,0x7FFFFF,0x7FFFFF,FALSE), tic54x_relocation,"RELEXT",false,0x7FFFFF,0x7FFFFF,false),
/* 16 bits of 23-bit extended address */ /* 16 bits of 23-bit extended address */
HOWTO (R_EXTWORD16,0,1,16,FALSE,0,complain_overflow_dont, HOWTO (R_EXTWORD16,0,1,16,false,0,complain_overflow_dont,
tic54x_relocation,"RELEXT16",FALSE,0x7FFFFF,0x7FFFFF,FALSE), tic54x_relocation,"RELEXT16",false,0x7FFFFF,0x7FFFFF,false),
/* upper 7 bits of 23-bit extended address */ /* upper 7 bits of 23-bit extended address */
HOWTO (R_EXTWORDMS7,16,1,7,FALSE,0,complain_overflow_dont, HOWTO (R_EXTWORDMS7,16,1,7,false,0,complain_overflow_dont,
tic54x_relocation,"RELEXTMS7",FALSE,0x7F,0x7F,FALSE), tic54x_relocation,"RELEXTMS7",false,0x7F,0x7F,false),
/* ABSOLUTE BANK */ /* ABSOLUTE BANK */
/* 16-bit direct reference to symbol's address, absolute */ /* 16-bit direct reference to symbol's address, absolute */
HOWTO (R_RELWORD,0,1,16,FALSE,0,complain_overflow_dont, HOWTO (R_RELWORD,0,1,16,false,0,complain_overflow_dont,
tic54x_relocation,"AREL16",FALSE,0xFFFF,0xFFFF,FALSE), tic54x_relocation,"AREL16",false,0xFFFF,0xFFFF,false),
/* 7 LSBs of an address, absolute */ /* 7 LSBs of an address, absolute */
HOWTO (R_PARTLS7,0,1,7,FALSE,0,complain_overflow_dont, HOWTO (R_PARTLS7,0,1,7,false,0,complain_overflow_dont,
tic54x_relocation,"ALS7",FALSE,0x007F,0x007F,FALSE), tic54x_relocation,"ALS7",false,0x007F,0x007F,false),
/* 9 MSBs of an address, absolute */ /* 9 MSBs of an address, absolute */
/* TI assembler doesn't shift its encoding, and is thus incompatible */ /* TI assembler doesn't shift its encoding, and is thus incompatible */
HOWTO (R_PARTMS9,7,1,9,FALSE,0,complain_overflow_dont, HOWTO (R_PARTMS9,7,1,9,false,0,complain_overflow_dont,
tic54x_relocation,"AMS9",FALSE,0x01FF,0x01FF,FALSE), tic54x_relocation,"AMS9",false,0x01FF,0x01FF,false),
/* 23-bit direct reference, absolute */ /* 23-bit direct reference, absolute */
HOWTO (R_EXTWORD,0,2,23,FALSE,0,complain_overflow_dont, HOWTO (R_EXTWORD,0,2,23,false,0,complain_overflow_dont,
tic54x_relocation,"ARELEXT",FALSE,0x7FFFFF,0x7FFFFF,FALSE), tic54x_relocation,"ARELEXT",false,0x7FFFFF,0x7FFFFF,false),
/* 16 bits of 23-bit extended address, absolute */ /* 16 bits of 23-bit extended address, absolute */
HOWTO (R_EXTWORD16,0,1,16,FALSE,0,complain_overflow_dont, HOWTO (R_EXTWORD16,0,1,16,false,0,complain_overflow_dont,
tic54x_relocation,"ARELEXT16",FALSE,0x7FFFFF,0x7FFFFF,FALSE), tic54x_relocation,"ARELEXT16",false,0x7FFFFF,0x7FFFFF,false),
/* upper 7 bits of 23-bit extended address, absolute */ /* upper 7 bits of 23-bit extended address, absolute */
HOWTO (R_EXTWORDMS7,16,1,7,FALSE,0,complain_overflow_dont, HOWTO (R_EXTWORDMS7,16,1,7,false,0,complain_overflow_dont,
tic54x_relocation,"ARELEXTMS7",FALSE,0x7F,0x7F,FALSE), tic54x_relocation,"ARELEXTMS7",false,0x7F,0x7F,false),
/* 32-bit relocation exclusively for stabs */ /* 32-bit relocation exclusively for stabs */
HOWTO (R_RELLONG,0,2,32,FALSE,0,complain_overflow_dont, HOWTO (R_RELLONG,0,2,32,false,0,complain_overflow_dont,
tic54x_relocation,"STAB",FALSE,0xFFFFFFFF,0xFFFFFFFF,FALSE), tic54x_relocation,"STAB",false,0xFFFFFFFF,0xFFFFFFFF,false),
}; };
#define coff_bfd_reloc_type_lookup tic54x_coff_reloc_type_lookup #define coff_bfd_reloc_type_lookup tic54x_coff_reloc_type_lookup
@ -312,13 +312,13 @@ coff_tic54x_rtype_to_howto (bfd *abfd,
/* Replace the stock _bfd_coff_is_local_label_name to recognize TI COFF local /* Replace the stock _bfd_coff_is_local_label_name to recognize TI COFF local
labels. */ labels. */
static bfd_boolean static bool
ticoff_bfd_is_local_label_name (bfd *abfd ATTRIBUTE_UNUSED, ticoff_bfd_is_local_label_name (bfd *abfd ATTRIBUTE_UNUSED,
const char *name) const char *name)
{ {
if (TICOFF_LOCAL_LABEL_P(name)) if (TICOFF_LOCAL_LABEL_P(name))
return TRUE; return true;
return FALSE; return false;
} }
#define coff_bfd_is_local_label_name ticoff_bfd_is_local_label_name #define coff_bfd_is_local_label_name ticoff_bfd_is_local_label_name
@ -335,7 +335,7 @@ ticoff_bfd_is_local_label_name (bfd *abfd ATTRIBUTE_UNUSED,
#include "coffcode.h" #include "coffcode.h"
static bfd_boolean static bool
tic54x_set_section_contents (bfd *abfd, tic54x_set_section_contents (bfd *abfd,
sec_ptr section, sec_ptr section,
const void * location, const void * location,
@ -474,9 +474,9 @@ const bfd_target tic54x_coff0_beh_vec =
15, /* ar_max_namelen */ 15, /* ar_max_namelen */
0, /* match priority. */ 0, /* match priority. */
#ifdef TARGET_KEEP_UNUSED_SECTION_SYMBOLS #ifdef TARGET_KEEP_UNUSED_SECTION_SYMBOLS
TRUE, /* keep unused section symbols. */ true, /* keep unused section symbols. */
#else #else
FALSE, /* keep unused section symbols. */ false, /* keep unused section symbols. */
#endif #endif
bfd_getl64, bfd_getl_signed_64, bfd_putl64, bfd_getl64, bfd_getl_signed_64, bfd_putl64,
tic54x_getl32, tic54x_getl_signed_32, tic54x_putl32, tic54x_getl32, tic54x_getl_signed_32, tic54x_putl32,
@ -537,9 +537,9 @@ const bfd_target tic54x_coff1_vec =
15, /* ar_max_namelen */ 15, /* ar_max_namelen */
0, /* match priority. */ 0, /* match priority. */
#ifdef TARGET_KEEP_UNUSED_SECTION_SYMBOLS #ifdef TARGET_KEEP_UNUSED_SECTION_SYMBOLS
TRUE, /* keep unused section symbols. */ true, /* keep unused section symbols. */
#else #else
FALSE, /* keep unused section symbols. */ false, /* keep unused section symbols. */
#endif #endif
bfd_getl64, bfd_getl_signed_64, bfd_putl64, bfd_getl64, bfd_getl_signed_64, bfd_putl64,
tic54x_getl32, tic54x_getl_signed_32, tic54x_putl32, tic54x_getl32, tic54x_getl_signed_32, tic54x_putl32,
@ -600,9 +600,9 @@ const bfd_target tic54x_coff1_beh_vec =
15, /* ar_max_namelen */ 15, /* ar_max_namelen */
0, /* match priority. */ 0, /* match priority. */
#ifdef TARGET_KEEP_UNUSED_SECTION_SYMBOLS #ifdef TARGET_KEEP_UNUSED_SECTION_SYMBOLS
TRUE, /* keep unused section symbols. */ true, /* keep unused section symbols. */
#else #else
FALSE, /* keep unused section symbols. */ false, /* keep unused section symbols. */
#endif #endif
bfd_getl64, bfd_getl_signed_64, bfd_putl64, bfd_getl64, bfd_getl_signed_64, bfd_putl64,
tic54x_getl32, tic54x_getl_signed_32, tic54x_putl32, tic54x_getl32, tic54x_getl_signed_32, tic54x_putl32,
@ -663,9 +663,9 @@ const bfd_target tic54x_coff2_vec =
15, /* ar_max_namelen */ 15, /* ar_max_namelen */
0, /* match priority. */ 0, /* match priority. */
#ifdef TARGET_KEEP_UNUSED_SECTION_SYMBOLS #ifdef TARGET_KEEP_UNUSED_SECTION_SYMBOLS
TRUE, /* keep unused section symbols. */ true, /* keep unused section symbols. */
#else #else
FALSE, /* keep unused section symbols. */ false, /* keep unused section symbols. */
#endif #endif
bfd_getl64, bfd_getl_signed_64, bfd_putl64, bfd_getl64, bfd_getl_signed_64, bfd_putl64,
tic54x_getl32, tic54x_getl_signed_32, tic54x_putl32, tic54x_getl32, tic54x_getl_signed_32, tic54x_putl32,
@ -726,9 +726,9 @@ const bfd_target tic54x_coff2_beh_vec =
15, /* ar_max_namelen */ 15, /* ar_max_namelen */
0, /* match priority. */ 0, /* match priority. */
#ifdef TARGET_KEEP_UNUSED_SECTION_SYMBOLS #ifdef TARGET_KEEP_UNUSED_SECTION_SYMBOLS
TRUE, /* keep unused section symbols. */ true, /* keep unused section symbols. */
#else #else
FALSE, /* keep unused section symbols. */ false, /* keep unused section symbols. */
#endif #endif
bfd_getl64, bfd_getl_signed_64, bfd_putl64, bfd_getl64, bfd_getl_signed_64, bfd_putl64,
tic54x_getl32, tic54x_getl_signed_32, tic54x_putl32, tic54x_getl32, tic54x_getl_signed_32, tic54x_putl32,

View File

@ -148,7 +148,7 @@ coff_amd64_reloc (bfd *abfd,
if (link_info == NULL) if (link_info == NULL)
return bfd_reloc_dangerous; return bfd_reloc_dangerous;
h = bfd_link_hash_lookup (link_info->hash, "__ImageBase", h = bfd_link_hash_lookup (link_info->hash, "__ImageBase",
FALSE, FALSE, FALSE); false, false, false);
if (h == NULL) if (h == NULL)
return bfd_reloc_dangerous; return bfd_reloc_dangerous;
while (h->type == bfd_link_hash_indirect) while (h->type == bfd_link_hash_indirect)
@ -226,7 +226,7 @@ coff_amd64_reloc (bfd *abfd,
/* Return TRUE if this relocation should appear in the output .reloc /* Return TRUE if this relocation should appear in the output .reloc
section. */ section. */
static bfd_boolean static bool
in_reloc_p (bfd *abfd ATTRIBUTE_UNUSED, reloc_howto_type *howto) in_reloc_p (bfd *abfd ATTRIBUTE_UNUSED, reloc_howto_type *howto)
{ {
return ! howto->pc_relative && howto->type != R_AMD64_IMAGEBASE return ! howto->pc_relative && howto->type != R_AMD64_IMAGEBASE
@ -235,7 +235,7 @@ in_reloc_p (bfd *abfd ATTRIBUTE_UNUSED, reloc_howto_type *howto)
#endif /* COFF_WITH_PE */ #endif /* COFF_WITH_PE */
#ifndef PCRELOFFSET #ifndef PCRELOFFSET
#define PCRELOFFSET TRUE #define PCRELOFFSET true
#endif #endif
static reloc_howto_type howto_table[] = static reloc_howto_type howto_table[] =
@ -245,53 +245,53 @@ static reloc_howto_type howto_table[] =
0, /* rightshift */ 0, /* rightshift */
4, /* size (0 = byte, 1 = short, 2 = long, 4 = long long) */ 4, /* size (0 = byte, 1 = short, 2 = long, 4 = long long) */
64, /* bitsize */ 64, /* bitsize */
FALSE, /* pc_relative */ false, /* pc_relative */
0, /* bitpos */ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */ complain_overflow_bitfield, /* complain_on_overflow */
coff_amd64_reloc, /* special_function */ coff_amd64_reloc, /* special_function */
"IMAGE_REL_AMD64_ADDR64", /* name */ "IMAGE_REL_AMD64_ADDR64", /* name */
TRUE, /* partial_inplace */ true, /* partial_inplace */
0xffffffffffffffffll, /* src_mask */ 0xffffffffffffffffll, /* src_mask */
0xffffffffffffffffll, /* dst_mask */ 0xffffffffffffffffll, /* dst_mask */
TRUE), /* pcrel_offset */ true), /* pcrel_offset */
HOWTO (R_AMD64_DIR32, /* type 2 */ HOWTO (R_AMD64_DIR32, /* type 2 */
0, /* rightshift */ 0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */ 2, /* size (0 = byte, 1 = short, 2 = long) */
32, /* bitsize */ 32, /* bitsize */
FALSE, /* pc_relative */ false, /* pc_relative */
0, /* bitpos */ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */ complain_overflow_bitfield, /* complain_on_overflow */
coff_amd64_reloc, /* special_function */ coff_amd64_reloc, /* special_function */
"IMAGE_REL_AMD64_ADDR32", /* name */ "IMAGE_REL_AMD64_ADDR32", /* name */
TRUE, /* partial_inplace */ true, /* partial_inplace */
0xffffffff, /* src_mask */ 0xffffffff, /* src_mask */
0xffffffff, /* dst_mask */ 0xffffffff, /* dst_mask */
TRUE), /* pcrel_offset */ true), /* pcrel_offset */
/* PE IMAGE_REL_AMD64_ADDR32NB relocation (3). */ /* PE IMAGE_REL_AMD64_ADDR32NB relocation (3). */
HOWTO (R_AMD64_IMAGEBASE, /* type */ HOWTO (R_AMD64_IMAGEBASE, /* type */
0, /* rightshift */ 0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */ 2, /* size (0 = byte, 1 = short, 2 = long) */
32, /* bitsize */ 32, /* bitsize */
FALSE, /* pc_relative */ false, /* pc_relative */
0, /* bitpos */ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */ complain_overflow_bitfield, /* complain_on_overflow */
coff_amd64_reloc, /* special_function */ coff_amd64_reloc, /* special_function */
"IMAGE_REL_AMD64_ADDR32NB", /* name */ "IMAGE_REL_AMD64_ADDR32NB", /* name */
TRUE, /* partial_inplace */ true, /* partial_inplace */
0xffffffff, /* src_mask */ 0xffffffff, /* src_mask */
0xffffffff, /* dst_mask */ 0xffffffff, /* dst_mask */
FALSE), /* pcrel_offset */ false), /* pcrel_offset */
/* 32-bit longword PC relative relocation (4). */ /* 32-bit longword PC relative relocation (4). */
HOWTO (R_AMD64_PCRLONG, /* type 4 */ HOWTO (R_AMD64_PCRLONG, /* type 4 */
0, /* rightshift */ 0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */ 2, /* size (0 = byte, 1 = short, 2 = long) */
32, /* bitsize */ 32, /* bitsize */
TRUE, /* pc_relative */ true, /* pc_relative */
0, /* bitpos */ 0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */ complain_overflow_signed, /* complain_on_overflow */
coff_amd64_reloc, /* special_function */ coff_amd64_reloc, /* special_function */
"IMAGE_REL_AMD64_REL32", /* name */ "IMAGE_REL_AMD64_REL32", /* name */
TRUE, /* partial_inplace */ true, /* partial_inplace */
0xffffffff, /* src_mask */ 0xffffffff, /* src_mask */
0xffffffff, /* dst_mask */ 0xffffffff, /* dst_mask */
PCRELOFFSET), /* pcrel_offset */ PCRELOFFSET), /* pcrel_offset */
@ -300,12 +300,12 @@ static reloc_howto_type howto_table[] =
0, /* rightshift */ 0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */ 2, /* size (0 = byte, 1 = short, 2 = long) */
32, /* bitsize */ 32, /* bitsize */
TRUE, /* pc_relative */ true, /* pc_relative */
0, /* bitpos */ 0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */ complain_overflow_signed, /* complain_on_overflow */
coff_amd64_reloc, /* special_function */ coff_amd64_reloc, /* special_function */
"IMAGE_REL_AMD64_REL32_1", /* name */ "IMAGE_REL_AMD64_REL32_1", /* name */
TRUE, /* partial_inplace */ true, /* partial_inplace */
0xffffffff, /* src_mask */ 0xffffffff, /* src_mask */
0xffffffff, /* dst_mask */ 0xffffffff, /* dst_mask */
PCRELOFFSET), /* pcrel_offset */ PCRELOFFSET), /* pcrel_offset */
@ -313,12 +313,12 @@ static reloc_howto_type howto_table[] =
0, /* rightshift */ 0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */ 2, /* size (0 = byte, 1 = short, 2 = long) */
32, /* bitsize */ 32, /* bitsize */
TRUE, /* pc_relative */ true, /* pc_relative */
0, /* bitpos */ 0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */ complain_overflow_signed, /* complain_on_overflow */
coff_amd64_reloc, /* special_function */ coff_amd64_reloc, /* special_function */
"IMAGE_REL_AMD64_REL32_2", /* name */ "IMAGE_REL_AMD64_REL32_2", /* name */
TRUE, /* partial_inplace */ true, /* partial_inplace */
0xffffffff, /* src_mask */ 0xffffffff, /* src_mask */
0xffffffff, /* dst_mask */ 0xffffffff, /* dst_mask */
PCRELOFFSET), /* pcrel_offset */ PCRELOFFSET), /* pcrel_offset */
@ -326,12 +326,12 @@ static reloc_howto_type howto_table[] =
0, /* rightshift */ 0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */ 2, /* size (0 = byte, 1 = short, 2 = long) */
32, /* bitsize */ 32, /* bitsize */
TRUE, /* pc_relative */ true, /* pc_relative */
0, /* bitpos */ 0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */ complain_overflow_signed, /* complain_on_overflow */
coff_amd64_reloc, /* special_function */ coff_amd64_reloc, /* special_function */
"IMAGE_REL_AMD64_REL32_3", /* name */ "IMAGE_REL_AMD64_REL32_3", /* name */
TRUE, /* partial_inplace */ true, /* partial_inplace */
0xffffffff, /* src_mask */ 0xffffffff, /* src_mask */
0xffffffff, /* dst_mask */ 0xffffffff, /* dst_mask */
PCRELOFFSET), /* pcrel_offset */ PCRELOFFSET), /* pcrel_offset */
@ -339,12 +339,12 @@ static reloc_howto_type howto_table[] =
0, /* rightshift */ 0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */ 2, /* size (0 = byte, 1 = short, 2 = long) */
32, /* bitsize */ 32, /* bitsize */
TRUE, /* pc_relative */ true, /* pc_relative */
0, /* bitpos */ 0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */ complain_overflow_signed, /* complain_on_overflow */
coff_amd64_reloc, /* special_function */ coff_amd64_reloc, /* special_function */
"IMAGE_REL_AMD64_REL32_4", /* name */ "IMAGE_REL_AMD64_REL32_4", /* name */
TRUE, /* partial_inplace */ true, /* partial_inplace */
0xffffffff, /* src_mask */ 0xffffffff, /* src_mask */
0xffffffff, /* dst_mask */ 0xffffffff, /* dst_mask */
PCRELOFFSET), /* pcrel_offset */ PCRELOFFSET), /* pcrel_offset */
@ -352,12 +352,12 @@ static reloc_howto_type howto_table[] =
0, /* rightshift */ 0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */ 2, /* size (0 = byte, 1 = short, 2 = long) */
32, /* bitsize */ 32, /* bitsize */
TRUE, /* pc_relative */ true, /* pc_relative */
0, /* bitpos */ 0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */ complain_overflow_signed, /* complain_on_overflow */
coff_amd64_reloc, /* special_function */ coff_amd64_reloc, /* special_function */
"IMAGE_REL_AMD64_REL32_5", /* name */ "IMAGE_REL_AMD64_REL32_5", /* name */
TRUE, /* partial_inplace */ true, /* partial_inplace */
0xffffffff, /* src_mask */ 0xffffffff, /* src_mask */
0xffffffff, /* dst_mask */ 0xffffffff, /* dst_mask */
PCRELOFFSET), /* pcrel_offset */ PCRELOFFSET), /* pcrel_offset */
@ -368,15 +368,15 @@ static reloc_howto_type howto_table[] =
0, /* rightshift */ 0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */ 2, /* size (0 = byte, 1 = short, 2 = long) */
32, /* bitsize */ 32, /* bitsize */
FALSE, /* pc_relative */ false, /* pc_relative */
0, /* bitpos */ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */ complain_overflow_bitfield, /* complain_on_overflow */
coff_amd64_reloc, /* special_function */ coff_amd64_reloc, /* special_function */
"IMAGE_REL_AMD64_SECREL", /* name */ "IMAGE_REL_AMD64_SECREL", /* name */
TRUE, /* partial_inplace */ true, /* partial_inplace */
0xffffffff, /* src_mask */ 0xffffffff, /* src_mask */
0xffffffff, /* dst_mask */ 0xffffffff, /* dst_mask */
TRUE), /* pcrel_offset */ true), /* pcrel_offset */
#else #else
EMPTY_HOWTO (11), EMPTY_HOWTO (11),
#endif #endif
@ -387,12 +387,12 @@ static reloc_howto_type howto_table[] =
0, /* rightshift */ 0, /* rightshift */
4, /* size (0 = byte, 1 = short, 2 = long) */ 4, /* size (0 = byte, 1 = short, 2 = long) */
64, /* bitsize */ 64, /* bitsize */
TRUE, /* pc_relative */ true, /* pc_relative */
0, /* bitpos */ 0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */ complain_overflow_signed, /* complain_on_overflow */
coff_amd64_reloc, /* special_function */ coff_amd64_reloc, /* special_function */
"R_X86_64_PC64", /* name */ "R_X86_64_PC64", /* name */
TRUE, /* partial_inplace */ true, /* partial_inplace */
0xffffffffffffffffll, /* src_mask */ 0xffffffffffffffffll, /* src_mask */
0xffffffffffffffffll, /* dst_mask */ 0xffffffffffffffffll, /* dst_mask */
PCRELOFFSET), /* pcrel_offset */ PCRELOFFSET), /* pcrel_offset */
@ -404,12 +404,12 @@ static reloc_howto_type howto_table[] =
0, /* rightshift */ 0, /* rightshift */
0, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* size (0 = byte, 1 = short, 2 = long) */
8, /* bitsize */ 8, /* bitsize */
FALSE, /* pc_relative */ false, /* pc_relative */
0, /* bitpos */ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */ complain_overflow_bitfield, /* complain_on_overflow */
coff_amd64_reloc, /* special_function */ coff_amd64_reloc, /* special_function */
"R_X86_64_8", /* name */ "R_X86_64_8", /* name */
TRUE, /* partial_inplace */ true, /* partial_inplace */
0x000000ff, /* src_mask */ 0x000000ff, /* src_mask */
0x000000ff, /* dst_mask */ 0x000000ff, /* dst_mask */
PCRELOFFSET), /* pcrel_offset */ PCRELOFFSET), /* pcrel_offset */
@ -418,12 +418,12 @@ static reloc_howto_type howto_table[] =
0, /* rightshift */ 0, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */ 1, /* size (0 = byte, 1 = short, 2 = long) */
16, /* bitsize */ 16, /* bitsize */
FALSE, /* pc_relative */ false, /* pc_relative */
0, /* bitpos */ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */ complain_overflow_bitfield, /* complain_on_overflow */
coff_amd64_reloc, /* special_function */ coff_amd64_reloc, /* special_function */
"R_X86_64_16", /* name */ "R_X86_64_16", /* name */
TRUE, /* partial_inplace */ true, /* partial_inplace */
0x0000ffff, /* src_mask */ 0x0000ffff, /* src_mask */
0x0000ffff, /* dst_mask */ 0x0000ffff, /* dst_mask */
PCRELOFFSET), /* pcrel_offset */ PCRELOFFSET), /* pcrel_offset */
@ -432,12 +432,12 @@ static reloc_howto_type howto_table[] =
0, /* rightshift */ 0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */ 2, /* size (0 = byte, 1 = short, 2 = long) */
32, /* bitsize */ 32, /* bitsize */
FALSE, /* pc_relative */ false, /* pc_relative */
0, /* bitpos */ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */ complain_overflow_bitfield, /* complain_on_overflow */
coff_amd64_reloc, /* special_function */ coff_amd64_reloc, /* special_function */
"R_X86_64_32S", /* name */ "R_X86_64_32S", /* name */
TRUE, /* partial_inplace */ true, /* partial_inplace */
0xffffffff, /* src_mask */ 0xffffffff, /* src_mask */
0xffffffff, /* dst_mask */ 0xffffffff, /* dst_mask */
PCRELOFFSET), /* pcrel_offset */ PCRELOFFSET), /* pcrel_offset */
@ -446,12 +446,12 @@ static reloc_howto_type howto_table[] =
0, /* rightshift */ 0, /* rightshift */
0, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* size (0 = byte, 1 = short, 2 = long) */
8, /* bitsize */ 8, /* bitsize */
TRUE, /* pc_relative */ true, /* pc_relative */
0, /* bitpos */ 0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */ complain_overflow_signed, /* complain_on_overflow */
coff_amd64_reloc, /* special_function */ coff_amd64_reloc, /* special_function */
"R_X86_64_PC8", /* name */ "R_X86_64_PC8", /* name */
TRUE, /* partial_inplace */ true, /* partial_inplace */
0x000000ff, /* src_mask */ 0x000000ff, /* src_mask */
0x000000ff, /* dst_mask */ 0x000000ff, /* dst_mask */
PCRELOFFSET), /* pcrel_offset */ PCRELOFFSET), /* pcrel_offset */
@ -460,12 +460,12 @@ static reloc_howto_type howto_table[] =
0, /* rightshift */ 0, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */ 1, /* size (0 = byte, 1 = short, 2 = long) */
16, /* bitsize */ 16, /* bitsize */
TRUE, /* pc_relative */ true, /* pc_relative */
0, /* bitpos */ 0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */ complain_overflow_signed, /* complain_on_overflow */
coff_amd64_reloc, /* special_function */ coff_amd64_reloc, /* special_function */
"R_X86_64_PC16", /* name */ "R_X86_64_PC16", /* name */
TRUE, /* partial_inplace */ true, /* partial_inplace */
0x0000ffff, /* src_mask */ 0x0000ffff, /* src_mask */
0x0000ffff, /* dst_mask */ 0x0000ffff, /* dst_mask */
PCRELOFFSET), /* pcrel_offset */ PCRELOFFSET), /* pcrel_offset */
@ -474,12 +474,12 @@ static reloc_howto_type howto_table[] =
0, /* rightshift */ 0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */ 2, /* size (0 = byte, 1 = short, 2 = long) */
32, /* bitsize */ 32, /* bitsize */
TRUE, /* pc_relative */ true, /* pc_relative */
0, /* bitpos */ 0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */ complain_overflow_signed, /* complain_on_overflow */
coff_amd64_reloc, /* special_function */ coff_amd64_reloc, /* special_function */
"R_X86_64_PC32", /* name */ "R_X86_64_PC32", /* name */
TRUE, /* partial_inplace */ true, /* partial_inplace */
0xffffffff, /* src_mask */ 0xffffffff, /* src_mask */
0xffffffff, /* dst_mask */ 0xffffffff, /* dst_mask */
PCRELOFFSET) /* pcrel_offset */ PCRELOFFSET) /* pcrel_offset */
@ -554,7 +554,7 @@ static reloc_howto_type howto_table[] =
and the regular routine is that we don't want to do anything for a and the regular routine is that we don't want to do anything for a
relocatable link. */ relocatable link. */
static bfd_boolean static bool
coff_pe_amd64_relocate_section (bfd *output_bfd, coff_pe_amd64_relocate_section (bfd *output_bfd,
struct bfd_link_info *info, struct bfd_link_info *info,
bfd *input_bfd, bfd *input_bfd,
@ -565,7 +565,7 @@ coff_pe_amd64_relocate_section (bfd *output_bfd,
asection **sections) asection **sections)
{ {
if (bfd_link_relocatable (info)) if (bfd_link_relocatable (info))
return TRUE; return true;
return _bfd_coff_generic_relocate_section (output_bfd, info, input_bfd,input_section, contents,relocs, syms, sections); return _bfd_coff_generic_relocate_section (output_bfd, info, input_bfd,input_section, contents,relocs, syms, sections);
} }
@ -750,11 +750,11 @@ coff_amd64_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
a leading dot for local labels, so if TARGET_UNDERSCORE is defined a leading dot for local labels, so if TARGET_UNDERSCORE is defined
we treat all symbols starting with L as local. */ we treat all symbols starting with L as local. */
static bfd_boolean static bool
coff_amd64_is_local_label_name (bfd *abfd, const char *name) coff_amd64_is_local_label_name (bfd *abfd, const char *name)
{ {
if (name[0] == 'L') if (name[0] == 'L')
return TRUE; return true;
return _bfd_coff_is_local_label_name (abfd, name); return _bfd_coff_is_local_label_name (abfd, name);
} }

View File

@ -47,195 +47,195 @@ static bfd_howto_type howto_table[] =
0, /* rightshift */ 0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */ 2, /* size (0 = byte, 1 = short, 2 = long) */
32, /* bitsize */ 32, /* bitsize */
FALSE, /* pc_relative */ false, /* pc_relative */
0, /* bitpos */ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */ complain_overflow_bitfield, /* complain_on_overflow */
0, /* special_function */ 0, /* special_function */
"r_imm32", /* name */ "r_imm32", /* name */
FALSE, /* partial_inplace */ false, /* partial_inplace */
0xffffffff, /* src_mask */ 0xffffffff, /* src_mask */
0xffffffff, /* dst_mask */ 0xffffffff, /* dst_mask */
FALSE), /* pcrel_offset */ false), /* pcrel_offset */
BFD_HOWTO (BFD_RELOC_24, BFD_HOWTO (BFD_RELOC_24,
R_IMM24, /* type */ R_IMM24, /* type */
0, /* rightshift */ 0, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */ 1, /* size (0 = byte, 1 = short, 2 = long) */
24, /* bitsize */ 24, /* bitsize */
FALSE, /* pc_relative */ false, /* pc_relative */
0, /* bitpos */ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */ complain_overflow_bitfield, /* complain_on_overflow */
0, /* special_function */ 0, /* special_function */
"r_imm24", /* name */ "r_imm24", /* name */
FALSE, /* partial_inplace */ false, /* partial_inplace */
0x00ffffff, /* src_mask */ 0x00ffffff, /* src_mask */
0x00ffffff, /* dst_mask */ 0x00ffffff, /* dst_mask */
FALSE), /* pcrel_offset */ false), /* pcrel_offset */
BFD_HOWTO (BFD_RELOC_16, BFD_HOWTO (BFD_RELOC_16,
R_IMM16, /* type */ R_IMM16, /* type */
0, /* rightshift */ 0, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */ 1, /* size (0 = byte, 1 = short, 2 = long) */
16, /* bitsize */ 16, /* bitsize */
FALSE, /* pc_relative */ false, /* pc_relative */
0, /* bitpos */ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */ complain_overflow_bitfield, /* complain_on_overflow */
0, /* special_function */ 0, /* special_function */
"r_imm16", /* name */ "r_imm16", /* name */
FALSE, /* partial_inplace */ false, /* partial_inplace */
0x0000ffff, /* src_mask */ 0x0000ffff, /* src_mask */
0x0000ffff, /* dst_mask */ 0x0000ffff, /* dst_mask */
FALSE), /* pcrel_offset */ false), /* pcrel_offset */
BFD_HOWTO (BFD_RELOC_8, BFD_HOWTO (BFD_RELOC_8,
R_IMM8, /* type */ R_IMM8, /* type */
0, /* rightshift */ 0, /* rightshift */
0, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* size (0 = byte, 1 = short, 2 = long) */
8, /* bitsize */ 8, /* bitsize */
FALSE, /* pc_relative */ false, /* pc_relative */
0, /* bitpos */ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */ complain_overflow_bitfield, /* complain_on_overflow */
0, /* special_function */ 0, /* special_function */
"r_imm8", /* name */ "r_imm8", /* name */
FALSE, /* partial_inplace */ false, /* partial_inplace */
0x000000ff, /* src_mask */ 0x000000ff, /* src_mask */
0x000000ff, /* dst_mask */ 0x000000ff, /* dst_mask */
FALSE), /* pcrel_offset */ false), /* pcrel_offset */
BFD_HOWTO (BFD_RELOC_8_PCREL, BFD_HOWTO (BFD_RELOC_8_PCREL,
R_JR, /* type */ R_JR, /* type */
0, /* rightshift */ 0, /* rightshift */
0, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* size (0 = byte, 1 = short, 2 = long) */
8, /* bitsize */ 8, /* bitsize */
TRUE, /* pc_relative */ true, /* pc_relative */
0, /* bitpos */ 0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */ complain_overflow_signed, /* complain_on_overflow */
0, /* special_function */ 0, /* special_function */
"r_jr", /* name */ "r_jr", /* name */
FALSE, /* partial_inplace */ false, /* partial_inplace */
0, /* src_mask */ 0, /* src_mask */
0xFF, /* dst_mask */ 0xFF, /* dst_mask */
TRUE), /* pcrel_offset */ true), /* pcrel_offset */
BFD_HOWTO (BFD_RELOC_Z80_DISP8, BFD_HOWTO (BFD_RELOC_Z80_DISP8,
R_OFF8, /* type */ R_OFF8, /* type */
0, /* rightshift */ 0, /* rightshift */
0, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* size (0 = byte, 1 = short, 2 = long) */
8, /* bitsize */ 8, /* bitsize */
FALSE, /* pc_relative */ false, /* pc_relative */
0, /* bitpos */ 0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */ complain_overflow_signed, /* complain_on_overflow */
0, /* special_function */ 0, /* special_function */
"r_off8", /* name */ "r_off8", /* name */
FALSE, /* partial_inplace */ false, /* partial_inplace */
0, /* src_mask */ 0, /* src_mask */
0xff, /* dst_mask */ 0xff, /* dst_mask */
FALSE), /* pcrel_offset */ false), /* pcrel_offset */
BFD_HOWTO (BFD_RELOC_Z80_BYTE0, BFD_HOWTO (BFD_RELOC_Z80_BYTE0,
R_BYTE0, /* type */ R_BYTE0, /* type */
0, /* rightshift */ 0, /* rightshift */
0, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* size (0 = byte, 1 = short, 2 = long) */
8, /* bitsize */ 8, /* bitsize */
FALSE, /* pc_relative */ false, /* pc_relative */
0, /* bitpos */ 0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */ complain_overflow_dont, /* complain_on_overflow */
0, /* special_function */ 0, /* special_function */
"r_byte0", /* name */ "r_byte0", /* name */
FALSE, /* partial_inplace */ false, /* partial_inplace */
0, /* src_mask */ 0, /* src_mask */
0xff, /* dst_mask */ 0xff, /* dst_mask */
FALSE), /* pcrel_offset */ false), /* pcrel_offset */
BFD_HOWTO (BFD_RELOC_Z80_BYTE1, BFD_HOWTO (BFD_RELOC_Z80_BYTE1,
R_BYTE1, /* type */ R_BYTE1, /* type */
8, /* rightshift */ 8, /* rightshift */
0, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* size (0 = byte, 1 = short, 2 = long) */
8, /* bitsize */ 8, /* bitsize */
FALSE, /* pc_relative */ false, /* pc_relative */
0, /* bitpos */ 0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */ complain_overflow_dont, /* complain_on_overflow */
0, /* special_function */ 0, /* special_function */
"r_byte1", /* name */ "r_byte1", /* name */
FALSE, /* partial_inplace */ false, /* partial_inplace */
0, /* src_mask */ 0, /* src_mask */
0xff, /* dst_mask */ 0xff, /* dst_mask */
FALSE), /* pcrel_offset */ false), /* pcrel_offset */
BFD_HOWTO (BFD_RELOC_Z80_BYTE2, BFD_HOWTO (BFD_RELOC_Z80_BYTE2,
R_BYTE2, /* type */ R_BYTE2, /* type */
16, /* rightshift */ 16, /* rightshift */
0, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* size (0 = byte, 1 = short, 2 = long) */
8, /* bitsize */ 8, /* bitsize */
FALSE, /* pc_relative */ false, /* pc_relative */
0, /* bitpos */ 0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */ complain_overflow_dont, /* complain_on_overflow */
0, /* special_function */ 0, /* special_function */
"r_byte2", /* name */ "r_byte2", /* name */
FALSE, /* partial_inplace */ false, /* partial_inplace */
0, /* src_mask */ 0, /* src_mask */
0xff, /* dst_mask */ 0xff, /* dst_mask */
FALSE), /* pcrel_offset */ false), /* pcrel_offset */
BFD_HOWTO (BFD_RELOC_Z80_BYTE3, BFD_HOWTO (BFD_RELOC_Z80_BYTE3,
R_BYTE3, /* type */ R_BYTE3, /* type */
24, /* rightshift */ 24, /* rightshift */
0, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* size (0 = byte, 1 = short, 2 = long) */
8, /* bitsize */ 8, /* bitsize */
FALSE, /* pc_relative */ false, /* pc_relative */
0, /* bitpos */ 0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */ complain_overflow_dont, /* complain_on_overflow */
0, /* special_function */ 0, /* special_function */
"r_byte3", /* name */ "r_byte3", /* name */
FALSE, /* partial_inplace */ false, /* partial_inplace */
0, /* src_mask */ 0, /* src_mask */
0xff, /* dst_mask */ 0xff, /* dst_mask */
FALSE), /* pcrel_offset */ false), /* pcrel_offset */
BFD_HOWTO (BFD_RELOC_Z80_WORD0, BFD_HOWTO (BFD_RELOC_Z80_WORD0,
R_WORD0, /* type */ R_WORD0, /* type */
0, /* rightshift */ 0, /* rightshift */
0, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* size (0 = byte, 1 = short, 2 = long) */
16, /* bitsize */ 16, /* bitsize */
FALSE, /* pc_relative */ false, /* pc_relative */
0, /* bitpos */ 0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */ complain_overflow_dont, /* complain_on_overflow */
0, /* special_function */ 0, /* special_function */
"r_word0", /* name */ "r_word0", /* name */
FALSE, /* partial_inplace */ false, /* partial_inplace */
0, /* src_mask */ 0, /* src_mask */
0xffff, /* dst_mask */ 0xffff, /* dst_mask */
FALSE), /* pcrel_offset */ false), /* pcrel_offset */
BFD_HOWTO (BFD_RELOC_Z80_WORD1, BFD_HOWTO (BFD_RELOC_Z80_WORD1,
R_WORD1, /* type */ R_WORD1, /* type */
16, /* rightshift */ 16, /* rightshift */
0, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* size (0 = byte, 1 = short, 2 = long) */
16, /* bitsize */ 16, /* bitsize */
FALSE, /* pc_relative */ false, /* pc_relative */
0, /* bitpos */ 0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */ complain_overflow_dont, /* complain_on_overflow */
0, /* special_function */ 0, /* special_function */
"r_word1", /* name */ "r_word1", /* name */
FALSE, /* partial_inplace */ false, /* partial_inplace */
0, /* src_mask */ 0, /* src_mask */
0xffff, /* dst_mask */ 0xffff, /* dst_mask */
FALSE), /* pcrel_offset */ false), /* pcrel_offset */
BFD_HOWTO (BFD_RELOC_Z80_16_BE, BFD_HOWTO (BFD_RELOC_Z80_16_BE,
R_IMM16BE, /* type */ R_IMM16BE, /* type */
0, /* rightshift */ 0, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */ 1, /* size (0 = byte, 1 = short, 2 = long) */
16, /* bitsize */ 16, /* bitsize */
FALSE, /* pc_relative */ false, /* pc_relative */
0, /* bitpos */ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */ complain_overflow_bitfield, /* complain_on_overflow */
0, /* special_function */ 0, /* special_function */
"r_imm16be", /* name */ "r_imm16be", /* name */
FALSE, /* partial_inplace */ false, /* partial_inplace */
0x0000ffff, /* src_mask */ 0x0000ffff, /* src_mask */
0x0000ffff, /* dst_mask */ 0x0000ffff, /* dst_mask */
FALSE), /* pcrel_offset */ false), /* pcrel_offset */
}; };
#define NUM_HOWTOS ARRAY_SIZE (howto_table) #define NUM_HOWTOS ARRAY_SIZE (howto_table)
@ -452,7 +452,7 @@ extra_case (bfd *in_abfd,
} }
} }
static bfd_boolean static bool
z80_is_local_label_name (bfd * abfd ATTRIBUTE_UNUSED, z80_is_local_label_name (bfd * abfd ATTRIBUTE_UNUSED,
const char * name) const char * name)
{ {

View File

@ -31,40 +31,40 @@
#define COFF_DEFAULT_SECTION_ALIGNMENT_POWER (1) #define COFF_DEFAULT_SECTION_ALIGNMENT_POWER (1)
static reloc_howto_type r_imm32 = static reloc_howto_type r_imm32 =
HOWTO (R_IMM32, 0, 2, 32, FALSE, 0, HOWTO (R_IMM32, 0, 2, 32, false, 0,
complain_overflow_bitfield, 0, "r_imm32", TRUE, 0xffffffff, complain_overflow_bitfield, 0, "r_imm32", true, 0xffffffff,
0xffffffff, FALSE); 0xffffffff, false);
static reloc_howto_type r_imm4l = static reloc_howto_type r_imm4l =
HOWTO (R_IMM4L, 0, 0, 4, FALSE, 0, HOWTO (R_IMM4L, 0, 0, 4, false, 0,
complain_overflow_bitfield, 0, "r_imm4l", TRUE, 0xf, 0xf, FALSE); complain_overflow_bitfield, 0, "r_imm4l", true, 0xf, 0xf, false);
static reloc_howto_type r_da = static reloc_howto_type r_da =
HOWTO (R_IMM16, 0, 1, 16, FALSE, 0, HOWTO (R_IMM16, 0, 1, 16, false, 0,
complain_overflow_bitfield, 0, "r_da", TRUE, 0x0000ffff, 0x0000ffff, complain_overflow_bitfield, 0, "r_da", true, 0x0000ffff, 0x0000ffff,
FALSE); false);
static reloc_howto_type r_imm8 = static reloc_howto_type r_imm8 =
HOWTO (R_IMM8, 0, 0, 8, FALSE, 0, HOWTO (R_IMM8, 0, 0, 8, false, 0,
complain_overflow_bitfield, 0, "r_imm8", TRUE, 0x000000ff, 0x000000ff, complain_overflow_bitfield, 0, "r_imm8", true, 0x000000ff, 0x000000ff,
FALSE); false);
static reloc_howto_type r_rel16 = static reloc_howto_type r_rel16 =
HOWTO (R_REL16, 0, 1, 16, FALSE, 0, HOWTO (R_REL16, 0, 1, 16, false, 0,
complain_overflow_bitfield, 0, "r_rel16", TRUE, 0x0000ffff, 0x0000ffff, complain_overflow_bitfield, 0, "r_rel16", true, 0x0000ffff, 0x0000ffff,
TRUE); true);
static reloc_howto_type r_jr = static reloc_howto_type r_jr =
HOWTO (R_JR, 1, 0, 8, TRUE, 0, complain_overflow_signed, 0, HOWTO (R_JR, 1, 0, 8, true, 0, complain_overflow_signed, 0,
"r_jr", TRUE, 0xff, 0xff, TRUE); "r_jr", true, 0xff, 0xff, true);
static reloc_howto_type r_disp7 = static reloc_howto_type r_disp7 =
HOWTO (R_DISP7, 0, 0, 7, TRUE, 0, complain_overflow_bitfield, 0, HOWTO (R_DISP7, 0, 0, 7, true, 0, complain_overflow_bitfield, 0,
"r_disp7", TRUE, 0x7f, 0x7f, TRUE); "r_disp7", true, 0x7f, 0x7f, true);
static reloc_howto_type r_callr = static reloc_howto_type r_callr =
HOWTO (R_CALLR, 1, 1, 12, TRUE, 0, complain_overflow_signed, 0, HOWTO (R_CALLR, 1, 1, 12, true, 0, complain_overflow_signed, 0,
"r_callr", TRUE, 0xfff, 0xfff, TRUE); "r_callr", true, 0xfff, 0xfff, true);
#define BADMAG(x) Z8KBADMAG(x) #define BADMAG(x) Z8KBADMAG(x)
#define Z8K 1 /* Customize coffcode.h. */ #define Z8K 1 /* Customize coffcode.h. */

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -46,14 +46,14 @@
/* Take a section header read from a coff file (in HOST byte order), /* Take a section header read from a coff file (in HOST byte order),
and make a BFD "section" out of it. This is used by ECOFF. */ and make a BFD "section" out of it. This is used by ECOFF. */
static bfd_boolean static bool
make_a_section_from_file (bfd *abfd, make_a_section_from_file (bfd *abfd,
struct internal_scnhdr *hdr, struct internal_scnhdr *hdr,
unsigned int target_index) unsigned int target_index)
{ {
asection *return_section; asection *return_section;
char *name; char *name;
bfd_boolean result = TRUE; bool result = true;
flagword flags; flagword flags;
name = NULL; name = NULL;
@ -76,7 +76,7 @@ make_a_section_from_file (bfd *abfd,
expect them to be off by default. This won't directly affect the expect them to be off by default. This won't directly affect the
format of any output BFD created from this one, but the information format of any output BFD created from this one, but the information
can be used to decide what to do. */ can be used to decide what to do. */
bfd_coff_set_long_section_names (abfd, TRUE); bfd_coff_set_long_section_names (abfd, true);
memcpy (buf, hdr->s_name + 1, SCNNMLEN - 1); memcpy (buf, hdr->s_name + 1, SCNNMLEN - 1);
buf[SCNNMLEN - 1] = '\0'; buf[SCNNMLEN - 1] = '\0';
strindex = strtol (buf, &p, 10); strindex = strtol (buf, &p, 10);
@ -84,14 +84,14 @@ make_a_section_from_file (bfd *abfd,
{ {
strings = _bfd_coff_read_string_table (abfd); strings = _bfd_coff_read_string_table (abfd);
if (strings == NULL) if (strings == NULL)
return FALSE; return false;
if ((bfd_size_type)(strindex + 2) >= obj_coff_strings_len (abfd)) if ((bfd_size_type)(strindex + 2) >= obj_coff_strings_len (abfd))
return FALSE; return false;
strings += strindex; strings += strindex;
name = (char *) bfd_alloc (abfd, name = (char *) bfd_alloc (abfd,
(bfd_size_type) strlen (strings) + 1 + 1); (bfd_size_type) strlen (strings) + 1 + 1);
if (name == NULL) if (name == NULL)
return FALSE; return false;
strcpy (name, strings); strcpy (name, strings);
} }
} }
@ -102,14 +102,14 @@ make_a_section_from_file (bfd *abfd,
name = (char *) bfd_alloc (abfd, name = (char *) bfd_alloc (abfd,
(bfd_size_type) sizeof (hdr->s_name) + 1 + 1); (bfd_size_type) sizeof (hdr->s_name) + 1 + 1);
if (name == NULL) if (name == NULL)
return FALSE; return false;
strncpy (name, (char *) &hdr->s_name[0], sizeof (hdr->s_name)); strncpy (name, (char *) &hdr->s_name[0], sizeof (hdr->s_name));
name[sizeof (hdr->s_name)] = 0; name[sizeof (hdr->s_name)] = 0;
} }
return_section = bfd_make_section_anyway (abfd, name); return_section = bfd_make_section_anyway (abfd, name);
if (return_section == NULL) if (return_section == NULL)
return FALSE; return false;
return_section->vma = hdr->s_vaddr; return_section->vma = hdr->s_vaddr;
return_section->lma = hdr->s_paddr; return_section->lma = hdr->s_paddr;
@ -129,7 +129,7 @@ make_a_section_from_file (bfd *abfd,
if (! bfd_coff_styp_to_sec_flags_hook (abfd, hdr, name, return_section, if (! bfd_coff_styp_to_sec_flags_hook (abfd, hdr, name, return_section,
& flags)) & flags))
result = FALSE; result = false;
return_section->flags = flags; return_section->flags = flags;
@ -178,7 +178,7 @@ make_a_section_from_file (bfd *abfd,
/* xgettext: c-format */ /* xgettext: c-format */
(_("%pB: unable to initialize compress status for section %s"), (_("%pB: unable to initialize compress status for section %s"),
abfd, name); abfd, name);
return FALSE; return false;
} }
if (return_section->compress_status == COMPRESS_SECTION_DONE) if (return_section->compress_status == COMPRESS_SECTION_DONE)
{ {
@ -188,7 +188,7 @@ make_a_section_from_file (bfd *abfd,
new_name = bfd_alloc (abfd, len + 2); new_name = bfd_alloc (abfd, len + 2);
if (new_name == NULL) if (new_name == NULL)
return FALSE; return false;
new_name[0] = '.'; new_name[0] = '.';
new_name[1] = 'z'; new_name[1] = 'z';
memcpy (new_name + 2, name + 1, len); memcpy (new_name + 2, name + 1, len);
@ -202,7 +202,7 @@ make_a_section_from_file (bfd *abfd,
/* xgettext: c-format */ /* xgettext: c-format */
(_("%pB: unable to initialize decompress status for section %s"), (_("%pB: unable to initialize decompress status for section %s"),
abfd, name); abfd, name);
return FALSE; return false;
} }
if (name[1] == 'z') if (name[1] == 'z')
{ {
@ -210,7 +210,7 @@ make_a_section_from_file (bfd *abfd,
new_name = bfd_alloc (abfd, len); new_name = bfd_alloc (abfd, len);
if (new_name == NULL) if (new_name == NULL)
return FALSE; return false;
new_name[0] = '.'; new_name[0] = '.';
memcpy (new_name + 1, name + 2, len - 1); memcpy (new_name + 1, name + 2, len - 1);
} }
@ -486,9 +486,9 @@ _bfd_coff_internal_syment_name (bfd *abfd,
struct internal_reloc * struct internal_reloc *
_bfd_coff_read_internal_relocs (bfd *abfd, _bfd_coff_read_internal_relocs (bfd *abfd,
asection *sec, asection *sec,
bfd_boolean cache, bool cache,
bfd_byte *external_relocs, bfd_byte *external_relocs,
bfd_boolean require_internal, bool require_internal,
struct internal_reloc *internal_relocs) struct internal_reloc *internal_relocs)
{ {
bfd_size_type relsz; bfd_size_type relsz;
@ -685,7 +685,7 @@ fixup_symbol_value (bfd *abfd,
chain, and that the last one points to the first external symbol. We chain, and that the last one points to the first external symbol. We
do that here too. */ do that here too. */
bfd_boolean bool
coff_renumber_symbols (bfd *bfd_ptr, int *first_undef) coff_renumber_symbols (bfd *bfd_ptr, int *first_undef)
{ {
unsigned int symbol_count = bfd_get_symcount (bfd_ptr); unsigned int symbol_count = bfd_get_symcount (bfd_ptr);
@ -712,7 +712,7 @@ coff_renumber_symbols (bfd *bfd_ptr, int *first_undef)
amt = sizeof (asymbol *) * ((bfd_size_type) symbol_count + 1); amt = sizeof (asymbol *) * ((bfd_size_type) symbol_count + 1);
newsyms = (asymbol **) bfd_alloc (bfd_ptr, amt); newsyms = (asymbol **) bfd_alloc (bfd_ptr, amt);
if (!newsyms) if (!newsyms)
return FALSE; return false;
bfd_ptr->outsymbols = newsyms; bfd_ptr->outsymbols = newsyms;
for (i = 0; i < symbol_count; i++) for (i = 0; i < symbol_count; i++)
if ((symbol_ptr_ptr[i]->flags & BSF_NOT_AT_END) != 0 if ((symbol_ptr_ptr[i]->flags & BSF_NOT_AT_END) != 0
@ -774,7 +774,7 @@ coff_renumber_symbols (bfd *bfd_ptr, int *first_undef)
obj_conv_table_size (bfd_ptr) = native_index; obj_conv_table_size (bfd_ptr) = native_index;
return TRUE; return true;
} }
/* Run thorough the symbol table again, and fix it so that all /* Run thorough the symbol table again, and fix it so that all
@ -968,7 +968,7 @@ coff_fix_symbol_name (bfd *abfd,
/* Write a symbol out to a COFF file. */ /* Write a symbol out to a COFF file. */
static bfd_boolean static bool
coff_write_symbol (bfd *abfd, coff_write_symbol (bfd *abfd,
asymbol *symbol, asymbol *symbol,
combined_entry_type *native, combined_entry_type *native,
@ -1011,10 +1011,10 @@ coff_write_symbol (bfd *abfd,
symesz = bfd_coff_symesz (abfd); symesz = bfd_coff_symesz (abfd);
buf = bfd_alloc (abfd, symesz); buf = bfd_alloc (abfd, symesz);
if (!buf) if (!buf)
return FALSE; return false;
bfd_coff_swap_sym_out (abfd, &native->u.syment, buf); bfd_coff_swap_sym_out (abfd, &native->u.syment, buf);
if (bfd_bwrite (buf, symesz, abfd) != symesz) if (bfd_bwrite (buf, symesz, abfd) != symesz)
return FALSE; return false;
bfd_release (abfd, buf); bfd_release (abfd, buf);
if (native->u.syment.n_numaux > 0) if (native->u.syment.n_numaux > 0)
@ -1025,7 +1025,7 @@ coff_write_symbol (bfd *abfd,
auxesz = bfd_coff_auxesz (abfd); auxesz = bfd_coff_auxesz (abfd);
buf = bfd_alloc (abfd, auxesz); buf = bfd_alloc (abfd, auxesz);
if (!buf) if (!buf)
return FALSE; return false;
for (j = 0; j < native->u.syment.n_numaux; j++) for (j = 0; j < native->u.syment.n_numaux; j++)
{ {
BFD_ASSERT (! (native + j + 1)->is_sym); BFD_ASSERT (! (native + j + 1)->is_sym);
@ -1035,7 +1035,7 @@ coff_write_symbol (bfd *abfd,
native->u.syment.n_numaux, native->u.syment.n_numaux,
buf); buf);
if (bfd_bwrite (buf, auxesz, abfd) != auxesz) if (bfd_bwrite (buf, auxesz, abfd) != auxesz)
return FALSE; return false;
} }
bfd_release (abfd, buf); bfd_release (abfd, buf);
} }
@ -1044,14 +1044,14 @@ coff_write_symbol (bfd *abfd,
set_index (symbol, *written); set_index (symbol, *written);
*written += numaux + 1; *written += numaux + 1;
return TRUE; return true;
} }
/* Write out a symbol to a COFF file that does not come from a COFF /* Write out a symbol to a COFF file that does not come from a COFF
file originally. This symbol may have been created by the linker, file originally. This symbol may have been created by the linker,
or we may be linking a non COFF file to a COFF file. */ or we may be linking a non COFF file to a COFF file. */
bfd_boolean bool
coff_write_alien_symbol (bfd *abfd, coff_write_alien_symbol (bfd *abfd,
asymbol *symbol, asymbol *symbol,
struct internal_syment *isym, struct internal_syment *isym,
@ -1067,7 +1067,7 @@ coff_write_alien_symbol (bfd *abfd,
? symbol->section->output_section ? symbol->section->output_section
: symbol->section; : symbol->section;
struct bfd_link_info *link_info = coff_data (abfd)->link_info; struct bfd_link_info *link_info = coff_data (abfd)->link_info;
bfd_boolean ret; bool ret;
if ((!link_info || link_info->strip_discarded) if ((!link_info || link_info->strip_discarded)
&& !bfd_is_abs_section (symbol->section) && !bfd_is_abs_section (symbol->section)
@ -1076,11 +1076,11 @@ coff_write_alien_symbol (bfd *abfd,
symbol->name = ""; symbol->name = "";
if (isym != NULL) if (isym != NULL)
memset (isym, 0, sizeof (*isym)); memset (isym, 0, sizeof (*isym));
return TRUE; return true;
} }
native = dummy; native = dummy;
native->is_sym = TRUE; native->is_sym = true;
native[1].is_sym = FALSE; native[1].is_sym = false;
native->u.syment.n_type = T_NULL; native->u.syment.n_type = T_NULL;
native->u.syment.n_flags = 0; native->u.syment.n_flags = 0;
native->u.syment.n_numaux = 0; native->u.syment.n_numaux = 0;
@ -1108,7 +1108,7 @@ coff_write_alien_symbol (bfd *abfd,
symbol->name = ""; symbol->name = "";
if (isym != NULL) if (isym != NULL)
memset (isym, 0, sizeof (*isym)); memset (isym, 0, sizeof (*isym));
return TRUE; return true;
} }
else else
{ {
@ -1148,7 +1148,7 @@ coff_write_alien_symbol (bfd *abfd,
/* Write a native symbol to a COFF file. */ /* Write a native symbol to a COFF file. */
static bfd_boolean static bool
coff_write_native_symbol (bfd *abfd, coff_write_native_symbol (bfd *abfd,
coff_symbol_type *symbol, coff_symbol_type *symbol,
bfd_vma *written, bfd_vma *written,
@ -1165,7 +1165,7 @@ coff_write_native_symbol (bfd *abfd,
&& symbol->symbol.section->output_section == bfd_abs_section_ptr) && symbol->symbol.section->output_section == bfd_abs_section_ptr)
{ {
symbol->symbol.name = ""; symbol->symbol.name = "";
return TRUE; return true;
} }
BFD_ASSERT (native->is_sym); BFD_ASSERT (native->is_sym);
@ -1194,7 +1194,7 @@ coff_write_native_symbol (bfd *abfd,
+ symbol->symbol.section->output_offset); + symbol->symbol.section->output_offset);
count++; count++;
} }
symbol->done_lineno = TRUE; symbol->done_lineno = true;
if (! bfd_is_const_section (symbol->symbol.section->output_section)) if (! bfd_is_const_section (symbol->symbol.section->output_section))
symbol->symbol.section->output_section->moving_line_filepos += symbol->symbol.section->output_section->moving_line_filepos +=
@ -1214,7 +1214,7 @@ null_error_handler (const char *fmt ATTRIBUTE_UNUSED,
/* Write out the COFF symbols. */ /* Write out the COFF symbols. */
bfd_boolean bool
coff_write_symbols (bfd *abfd) coff_write_symbols (bfd *abfd)
{ {
bfd_size_type string_size; bfd_size_type string_size;
@ -1249,7 +1249,7 @@ coff_write_symbols (bfd *abfd)
/* Seek to the right place. */ /* Seek to the right place. */
if (bfd_seek (abfd, obj_sym_filepos (abfd), SEEK_SET) != 0) if (bfd_seek (abfd, obj_sym_filepos (abfd), SEEK_SET) != 0)
return FALSE; return false;
/* Output all the symbols we have. */ /* Output all the symbols we have. */
written = 0; written = 0;
@ -1264,7 +1264,7 @@ coff_write_symbols (bfd *abfd)
if (!coff_write_alien_symbol (abfd, symbol, NULL, NULL, &written, if (!coff_write_alien_symbol (abfd, symbol, NULL, NULL, &written,
&string_size, &debug_string_section, &string_size, &debug_string_section,
&debug_string_size)) &debug_string_size))
return FALSE; return false;
} }
else else
{ {
@ -1309,7 +1309,7 @@ coff_write_symbols (bfd *abfd)
if (!coff_write_native_symbol (abfd, c_symbol, &written, if (!coff_write_native_symbol (abfd, c_symbol, &written,
&string_size, &debug_string_section, &string_size, &debug_string_section,
&debug_string_size)) &debug_string_size))
return FALSE; return false;
} }
} }
@ -1328,7 +1328,7 @@ coff_write_symbols (bfd *abfd)
#endif #endif
if (bfd_bwrite ((void *) buffer, (bfd_size_type) sizeof (buffer), abfd) if (bfd_bwrite ((void *) buffer, (bfd_size_type) sizeof (buffer), abfd)
!= sizeof (buffer)) != sizeof (buffer))
return FALSE; return false;
/* Handle long section names. This code must handle section /* Handle long section names. This code must handle section
names just as they are handled in coff_write_object_contents. */ names just as they are handled in coff_write_object_contents. */
@ -1345,7 +1345,7 @@ coff_write_symbols (bfd *abfd)
{ {
if (bfd_bwrite (o->name, (bfd_size_type) (len + 1), abfd) if (bfd_bwrite (o->name, (bfd_size_type) (len + 1), abfd)
!= len + 1) != len + 1)
return FALSE; return false;
} }
} }
} }
@ -1387,7 +1387,7 @@ coff_write_symbols (bfd *abfd)
if (bfd_coff_force_symnames_in_strings (abfd)) if (bfd_coff_force_symnames_in_strings (abfd))
{ {
if (bfd_bwrite (".file", (bfd_size_type) 6, abfd) != 6) if (bfd_bwrite (".file", (bfd_size_type) 6, abfd) != 6)
return FALSE; return false;
} }
maxlen = bfd_coff_filnmlen (abfd); maxlen = bfd_coff_filnmlen (abfd);
} }
@ -1398,7 +1398,7 @@ coff_write_symbols (bfd *abfd)
{ {
if (bfd_bwrite ((void *) (q->name), (bfd_size_type) name_length + 1, if (bfd_bwrite ((void *) (q->name), (bfd_size_type) name_length + 1,
abfd) != name_length + 1) abfd) != name_length + 1)
return FALSE; return false;
} }
} }
} }
@ -1417,7 +1417,7 @@ coff_write_symbols (bfd *abfd)
#endif #endif
if (bfd_bwrite ((void *) buffer, (bfd_size_type) STRING_SIZE_SIZE, abfd) if (bfd_bwrite ((void *) buffer, (bfd_size_type) STRING_SIZE_SIZE, abfd)
!= STRING_SIZE_SIZE) != STRING_SIZE_SIZE)
return FALSE; return false;
} }
/* Make sure the .debug section was created to be the correct size. /* Make sure the .debug section was created to be the correct size.
@ -1431,10 +1431,10 @@ coff_write_symbols (bfd *abfd)
1 << debug_string_section->alignment_power) 1 << debug_string_section->alignment_power)
== debug_string_section->size))); == debug_string_section->size)));
return TRUE; return true;
} }
bfd_boolean bool
coff_write_linenumbers (bfd *abfd) coff_write_linenumbers (bfd *abfd)
{ {
asection *s; asection *s;
@ -1444,14 +1444,14 @@ coff_write_linenumbers (bfd *abfd)
linesz = bfd_coff_linesz (abfd); linesz = bfd_coff_linesz (abfd);
buff = bfd_alloc (abfd, linesz); buff = bfd_alloc (abfd, linesz);
if (!buff) if (!buff)
return FALSE; return false;
for (s = abfd->sections; s != (asection *) NULL; s = s->next) for (s = abfd->sections; s != (asection *) NULL; s = s->next)
{ {
if (s->lineno_count) if (s->lineno_count)
{ {
asymbol **q = abfd->outsymbols; asymbol **q = abfd->outsymbols;
if (bfd_seek (abfd, s->line_filepos, SEEK_SET) != 0) if (bfd_seek (abfd, s->line_filepos, SEEK_SET) != 0)
return FALSE; return false;
/* Find all the linenumbers in this section. */ /* Find all the linenumbers in this section. */
while (*q) while (*q)
{ {
@ -1472,7 +1472,7 @@ coff_write_linenumbers (bfd *abfd)
bfd_coff_swap_lineno_out (abfd, &out, buff); bfd_coff_swap_lineno_out (abfd, &out, buff);
if (bfd_bwrite (buff, (bfd_size_type) linesz, abfd) if (bfd_bwrite (buff, (bfd_size_type) linesz, abfd)
!= linesz) != linesz)
return FALSE; return false;
l++; l++;
while (l->line_number) while (l->line_number)
{ {
@ -1481,7 +1481,7 @@ coff_write_linenumbers (bfd *abfd)
bfd_coff_swap_lineno_out (abfd, &out, buff); bfd_coff_swap_lineno_out (abfd, &out, buff);
if (bfd_bwrite (buff, (bfd_size_type) linesz, abfd) if (bfd_bwrite (buff, (bfd_size_type) linesz, abfd)
!= linesz) != linesz)
return FALSE; return false;
l++; l++;
} }
} }
@ -1491,7 +1491,7 @@ coff_write_linenumbers (bfd *abfd)
} }
} }
bfd_release (abfd, buff); bfd_release (abfd, buff);
return TRUE; return true;
} }
alent * alent *
@ -1621,7 +1621,7 @@ copy_name (bfd *abfd, char *name, size_t maxlen)
/* Read in the external symbols. */ /* Read in the external symbols. */
bfd_boolean bool
_bfd_coff_get_external_symbols (bfd *abfd) _bfd_coff_get_external_symbols (bfd *abfd)
{ {
size_t symesz; size_t symesz;
@ -1629,20 +1629,20 @@ _bfd_coff_get_external_symbols (bfd *abfd)
void * syms; void * syms;
if (obj_coff_external_syms (abfd) != NULL) if (obj_coff_external_syms (abfd) != NULL)
return TRUE; return true;
symesz = bfd_coff_symesz (abfd); symesz = bfd_coff_symesz (abfd);
if (_bfd_mul_overflow (obj_raw_syment_count (abfd), symesz, &size)) if (_bfd_mul_overflow (obj_raw_syment_count (abfd), symesz, &size))
{ {
bfd_set_error (bfd_error_file_truncated); bfd_set_error (bfd_error_file_truncated);
return FALSE; return false;
} }
if (size == 0) if (size == 0)
return TRUE; return true;
if (bfd_seek (abfd, obj_sym_filepos (abfd), SEEK_SET) != 0) if (bfd_seek (abfd, obj_sym_filepos (abfd), SEEK_SET) != 0)
return FALSE; return false;
syms = _bfd_malloc_and_read (abfd, size, size); syms = _bfd_malloc_and_read (abfd, size, size);
obj_coff_external_syms (abfd) = syms; obj_coff_external_syms (abfd) = syms;
return syms != NULL; return syms != NULL;
@ -1732,11 +1732,11 @@ _bfd_coff_read_string_table (bfd *abfd)
/* Free up the external symbols and strings read from a COFF file. */ /* Free up the external symbols and strings read from a COFF file. */
bfd_boolean bool
_bfd_coff_free_symbols (bfd *abfd) _bfd_coff_free_symbols (bfd *abfd)
{ {
if (! bfd_family_coff (abfd)) if (! bfd_family_coff (abfd))
return FALSE; return false;
if (obj_coff_external_syms (abfd) != NULL if (obj_coff_external_syms (abfd) != NULL
&& ! obj_coff_keep_syms (abfd)) && ! obj_coff_keep_syms (abfd))
@ -1753,7 +1753,7 @@ _bfd_coff_free_symbols (bfd *abfd)
obj_coff_strings_len (abfd) = 0; obj_coff_strings_len (abfd) = 0;
} }
return TRUE; return true;
} }
/* Read a symbol table into freshly bfd_allocated memory, swap it, and /* Read a symbol table into freshly bfd_allocated memory, swap it, and
@ -1811,7 +1811,7 @@ coff_get_normalized_symtab (bfd *abfd)
bfd_coff_swap_sym_in (abfd, (void *) raw_src, bfd_coff_swap_sym_in (abfd, (void *) raw_src,
(void *) & internal_ptr->u.syment); (void *) & internal_ptr->u.syment);
symbol_ptr = internal_ptr; symbol_ptr = internal_ptr;
internal_ptr->is_sym = TRUE; internal_ptr->is_sym = true;
/* PR 17512: Prevent buffer overrun. */ /* PR 17512: Prevent buffer overrun. */
if (symbol_ptr->u.syment.n_numaux > ((raw_end - 1) - raw_src) / symesz) if (symbol_ptr->u.syment.n_numaux > ((raw_end - 1) - raw_src) / symesz)
@ -1833,7 +1833,7 @@ coff_get_normalized_symtab (bfd *abfd)
(int) i, symbol_ptr->u.syment.n_numaux, (int) i, symbol_ptr->u.syment.n_numaux,
&(internal_ptr->u.auxent)); &(internal_ptr->u.auxent));
internal_ptr->is_sym = FALSE; internal_ptr->is_sym = false;
coff_pointerize_aux (abfd, internal, symbol_ptr, i, coff_pointerize_aux (abfd, internal, symbol_ptr, i,
internal_ptr, internal_end); internal_ptr, internal_end);
} }
@ -1999,7 +1999,7 @@ coff_make_empty_symbol (bfd *abfd)
new_symbol->symbol.section = 0; new_symbol->symbol.section = 0;
new_symbol->native = NULL; new_symbol->native = NULL;
new_symbol->lineno = NULL; new_symbol->lineno = NULL;
new_symbol->done_lineno = FALSE; new_symbol->done_lineno = false;
new_symbol->symbol.the_bfd = abfd; new_symbol->symbol.the_bfd = abfd;
return & new_symbol->symbol; return & new_symbol->symbol;
@ -2023,11 +2023,11 @@ coff_bfd_make_debug_symbol (bfd *abfd,
new_symbol->native = (combined_entry_type *) bfd_zalloc (abfd, amt); new_symbol->native = (combined_entry_type *) bfd_zalloc (abfd, amt);
if (!new_symbol->native) if (!new_symbol->native)
return NULL; return NULL;
new_symbol->native->is_sym = TRUE; new_symbol->native->is_sym = true;
new_symbol->symbol.section = bfd_abs_section_ptr; new_symbol->symbol.section = bfd_abs_section_ptr;
new_symbol->symbol.flags = BSF_DEBUGGING; new_symbol->symbol.flags = BSF_DEBUGGING;
new_symbol->lineno = NULL; new_symbol->lineno = NULL;
new_symbol->done_lineno = FALSE; new_symbol->done_lineno = false;
new_symbol->symbol.the_bfd = abfd; new_symbol->symbol.the_bfd = abfd;
return & new_symbol->symbol; return & new_symbol->symbol;
@ -2207,7 +2207,7 @@ coff_print_symbol (bfd *abfd,
function for the is_local_label_name entry point, but some may function for the is_local_label_name entry point, but some may
override it. */ override it. */
bfd_boolean bool
_bfd_coff_is_local_label_name (bfd *abfd ATTRIBUTE_UNUSED, _bfd_coff_is_local_label_name (bfd *abfd ATTRIBUTE_UNUSED,
const char *name) const char *name)
{ {
@ -2218,7 +2218,7 @@ _bfd_coff_is_local_label_name (bfd *abfd ATTRIBUTE_UNUSED,
section, calculate and return the name of the source file and the line section, calculate and return the name of the source file and the line
nearest to the wanted location. */ nearest to the wanted location. */
bfd_boolean bool
coff_find_nearest_line_with_names (bfd *abfd, coff_find_nearest_line_with_names (bfd *abfd,
asymbol **symbols, asymbol **symbols,
asection *section, asection *section,
@ -2228,7 +2228,7 @@ coff_find_nearest_line_with_names (bfd *abfd,
unsigned int *line_ptr, unsigned int *line_ptr,
const struct dwarf_debug_section *debug_sections) const struct dwarf_debug_section *debug_sections)
{ {
bfd_boolean found; bool found;
unsigned int i; unsigned int i;
unsigned int line_base; unsigned int line_base;
coff_data_type *cof = coff_data (abfd); coff_data_type *cof = coff_data (abfd);
@ -2245,17 +2245,17 @@ coff_find_nearest_line_with_names (bfd *abfd,
&found, filename_ptr, &found, filename_ptr,
functionname_ptr, line_ptr, functionname_ptr, line_ptr,
&coff_data(abfd)->line_info)) &coff_data(abfd)->line_info))
return FALSE; return false;
if (found) if (found)
return TRUE; return true;
/* Also try examining DWARF2 debugging information. */ /* Also try examining DWARF2 debugging information. */
if (_bfd_dwarf2_find_nearest_line (abfd, symbols, NULL, section, offset, if (_bfd_dwarf2_find_nearest_line (abfd, symbols, NULL, section, offset,
filename_ptr, functionname_ptr, filename_ptr, functionname_ptr,
line_ptr, NULL, debug_sections, line_ptr, NULL, debug_sections,
&coff_data(abfd)->dwarf2_find_line_info)) &coff_data(abfd)->dwarf2_find_line_info))
return TRUE; return true;
sec_data = coff_section_data (abfd, section); sec_data = coff_section_data (abfd, section);
@ -2284,7 +2284,7 @@ coff_find_nearest_line_with_names (bfd *abfd,
if (sec_data) if (sec_data)
{ {
sec_data->saved_bias = TRUE; sec_data->saved_bias = true;
sec_data->bias = bias; sec_data->bias = bias;
} }
} }
@ -2295,7 +2295,7 @@ coff_find_nearest_line_with_names (bfd *abfd,
filename_ptr, functionname_ptr, filename_ptr, functionname_ptr,
line_ptr, NULL, debug_sections, line_ptr, NULL, debug_sections,
&coff_data(abfd)->dwarf2_find_line_info)) &coff_data(abfd)->dwarf2_find_line_info))
return TRUE; return true;
} }
*filename_ptr = 0; *filename_ptr = 0;
@ -2304,15 +2304,15 @@ coff_find_nearest_line_with_names (bfd *abfd,
/* Don't try and find line numbers in a non coff file. */ /* Don't try and find line numbers in a non coff file. */
if (!bfd_family_coff (abfd)) if (!bfd_family_coff (abfd))
return FALSE; return false;
if (cof == NULL) if (cof == NULL)
return FALSE; return false;
/* Find the first C_FILE symbol. */ /* Find the first C_FILE symbol. */
p = cof->raw_syments; p = cof->raw_syments;
if (!p) if (!p)
return FALSE; return false;
pend = p + cof->raw_syment_count; pend = p + cof->raw_syment_count;
while (p < pend) while (p < pend)
@ -2389,7 +2389,7 @@ coff_find_nearest_line_with_names (bfd *abfd,
{ {
*functionname_ptr = NULL; *functionname_ptr = NULL;
*line_ptr = 0; *line_ptr = 0;
return TRUE; return true;
} }
/* Now wander though the raw linenumbers of the section. /* Now wander though the raw linenumbers of the section.
@ -2493,10 +2493,10 @@ coff_find_nearest_line_with_names (bfd *abfd,
sec_data->line_base = line_base; sec_data->line_base = line_base;
} }
return TRUE; return true;
} }
bfd_boolean bool
coff_find_nearest_line (bfd *abfd, coff_find_nearest_line (bfd *abfd,
asymbol **symbols, asymbol **symbols,
asection *section, asection *section,
@ -2513,13 +2513,13 @@ coff_find_nearest_line (bfd *abfd,
line_ptr, dwarf_debug_sections); line_ptr, dwarf_debug_sections);
} }
bfd_boolean bool
coff_find_inliner_info (bfd *abfd, coff_find_inliner_info (bfd *abfd,
const char **filename_ptr, const char **filename_ptr,
const char **functionname_ptr, const char **functionname_ptr,
unsigned int *line_ptr) unsigned int *line_ptr)
{ {
bfd_boolean found; bool found;
found = _bfd_dwarf2_find_inliner_info (abfd, filename_ptr, found = _bfd_dwarf2_find_inliner_info (abfd, filename_ptr,
functionname_ptr, line_ptr, functionname_ptr, line_ptr,
@ -2543,7 +2543,7 @@ coff_sizeof_headers (bfd *abfd, struct bfd_link_info *info)
/* Change the class of a coff symbol held by BFD. */ /* Change the class of a coff symbol held by BFD. */
bfd_boolean bool
bfd_coff_set_symbol_class (bfd * abfd, bfd_coff_set_symbol_class (bfd * abfd,
asymbol * symbol, asymbol * symbol,
unsigned int symbol_class) unsigned int symbol_class)
@ -2554,7 +2554,7 @@ bfd_coff_set_symbol_class (bfd * abfd,
if (csym == NULL) if (csym == NULL)
{ {
bfd_set_error (bfd_error_invalid_operation); bfd_set_error (bfd_error_invalid_operation);
return FALSE; return false;
} }
else if (csym->native == NULL) else if (csym->native == NULL)
{ {
@ -2568,9 +2568,9 @@ bfd_coff_set_symbol_class (bfd * abfd,
native = (combined_entry_type *) bfd_zalloc (abfd, amt); native = (combined_entry_type *) bfd_zalloc (abfd, amt);
if (native == NULL) if (native == NULL)
return FALSE; return false;
native->is_sym = TRUE; native->is_sym = true;
native->u.syment.n_type = T_NULL; native->u.syment.n_type = T_NULL;
native->u.syment.n_sclass = symbol_class; native->u.syment.n_sclass = symbol_class;
@ -2603,10 +2603,10 @@ bfd_coff_set_symbol_class (bfd * abfd,
else else
csym->native->u.syment.n_sclass = symbol_class; csym->native->u.syment.n_sclass = symbol_class;
return TRUE; return true;
} }
bfd_boolean bool
_bfd_coff_section_already_linked (bfd *abfd, _bfd_coff_section_already_linked (bfd *abfd,
asection *sec, asection *sec,
struct bfd_link_info *info) struct bfd_link_info *info)
@ -2618,15 +2618,15 @@ _bfd_coff_section_already_linked (bfd *abfd,
struct coff_comdat_info *s_comdat; struct coff_comdat_info *s_comdat;
if (sec->output_section == bfd_abs_section_ptr) if (sec->output_section == bfd_abs_section_ptr)
return FALSE; return false;
flags = sec->flags; flags = sec->flags;
if ((flags & SEC_LINK_ONCE) == 0) if ((flags & SEC_LINK_ONCE) == 0)
return FALSE; return false;
/* The COFF backend linker doesn't support group sections. */ /* The COFF backend linker doesn't support group sections. */
if ((flags & SEC_GROUP) != 0) if ((flags & SEC_GROUP) != 0)
return FALSE; return false;
name = bfd_section_name (sec); name = bfd_section_name (sec);
s_comdat = bfd_coff_get_comdat_section (abfd, sec); s_comdat = bfd_coff_get_comdat_section (abfd, sec);
@ -2674,12 +2674,12 @@ _bfd_coff_section_already_linked (bfd *abfd,
/* This is the first section with this name. Record it. */ /* This is the first section with this name. Record it. */
if (!bfd_section_already_linked_table_insert (already_linked_list, sec)) if (!bfd_section_already_linked_table_insert (already_linked_list, sec))
info->callbacks->einfo (_("%F%P: already_linked_table: %E\n")); info->callbacks->einfo (_("%F%P: already_linked_table: %E\n"));
return FALSE; return false;
} }
/* Initialize COOKIE for input bfd ABFD. */ /* Initialize COOKIE for input bfd ABFD. */
static bfd_boolean static bool
init_reloc_cookie (struct coff_reloc_cookie *cookie, init_reloc_cookie (struct coff_reloc_cookie *cookie,
struct bfd_link_info *info ATTRIBUTE_UNUSED, struct bfd_link_info *info ATTRIBUTE_UNUSED,
bfd *abfd) bfd *abfd)
@ -2692,7 +2692,7 @@ init_reloc_cookie (struct coff_reloc_cookie *cookie,
cookie->symbols = obj_symbols (abfd); cookie->symbols = obj_symbols (abfd);
return TRUE; return true;
} }
/* Free the memory allocated by init_reloc_cookie, if appropriate. */ /* Free the memory allocated by init_reloc_cookie, if appropriate. */
@ -2707,7 +2707,7 @@ fini_reloc_cookie (struct coff_reloc_cookie *cookie ATTRIBUTE_UNUSED,
/* Initialize the relocation information in COOKIE for input section SEC /* Initialize the relocation information in COOKIE for input section SEC
of input bfd ABFD. */ of input bfd ABFD. */
static bfd_boolean static bool
init_reloc_cookie_rels (struct coff_reloc_cookie *cookie, init_reloc_cookie_rels (struct coff_reloc_cookie *cookie,
struct bfd_link_info *info ATTRIBUTE_UNUSED, struct bfd_link_info *info ATTRIBUTE_UNUSED,
bfd *abfd, bfd *abfd,
@ -2718,17 +2718,18 @@ init_reloc_cookie_rels (struct coff_reloc_cookie *cookie,
cookie->rels = NULL; cookie->rels = NULL;
cookie->relend = NULL; cookie->relend = NULL;
cookie->rel = NULL; cookie->rel = NULL;
return TRUE; return true;
} }
cookie->rels = _bfd_coff_read_internal_relocs (abfd, sec, FALSE, NULL, 0, NULL); cookie->rels = _bfd_coff_read_internal_relocs (abfd, sec, false, NULL,
0, NULL);
if (cookie->rels == NULL) if (cookie->rels == NULL)
return FALSE; return false;
cookie->rel = cookie->rels; cookie->rel = cookie->rels;
cookie->relend = (cookie->rels + sec->reloc_count); cookie->relend = (cookie->rels + sec->reloc_count);
return TRUE; return true;
} }
/* Free the memory allocated by init_reloc_cookie_rels, /* Free the memory allocated by init_reloc_cookie_rels,
@ -2750,20 +2751,20 @@ fini_reloc_cookie_rels (struct coff_reloc_cookie *cookie,
/* Initialize the whole of COOKIE for input section SEC. */ /* Initialize the whole of COOKIE for input section SEC. */
static bfd_boolean static bool
init_reloc_cookie_for_section (struct coff_reloc_cookie *cookie, init_reloc_cookie_for_section (struct coff_reloc_cookie *cookie,
struct bfd_link_info *info, struct bfd_link_info *info,
asection *sec) asection *sec)
{ {
if (!init_reloc_cookie (cookie, info, sec->owner)) if (!init_reloc_cookie (cookie, info, sec->owner))
return FALSE; return false;
if (!init_reloc_cookie_rels (cookie, info, sec->owner, sec)) if (!init_reloc_cookie_rels (cookie, info, sec->owner, sec))
{ {
fini_reloc_cookie (cookie, sec->owner); fini_reloc_cookie (cookie, sec->owner);
return FALSE; return false;
} }
return TRUE; return true;
} }
/* Free the memory allocated by init_reloc_cookie_for_section, /* Free the memory allocated by init_reloc_cookie_for_section,
@ -2846,14 +2847,14 @@ _bfd_coff_gc_mark_rsec (struct bfd_link_info *info, asection *sec,
+ obj_convert (sec->owner)[cookie->rel->r_symndx])->native->u.syment); + obj_convert (sec->owner)[cookie->rel->r_symndx])->native->u.syment);
} }
static bfd_boolean _bfd_coff_gc_mark static bool _bfd_coff_gc_mark
(struct bfd_link_info *, asection *, coff_gc_mark_hook_fn); (struct bfd_link_info *, asection *, coff_gc_mark_hook_fn);
/* COOKIE->rel describes a relocation against section SEC, which is /* COOKIE->rel describes a relocation against section SEC, which is
a section we've decided to keep. Mark the section that contains a section we've decided to keep. Mark the section that contains
the relocation symbol. */ the relocation symbol. */
static bfd_boolean static bool
_bfd_coff_gc_mark_reloc (struct bfd_link_info *info, _bfd_coff_gc_mark_reloc (struct bfd_link_info *info,
asection *sec, asection *sec,
coff_gc_mark_hook_fn gc_mark_hook, coff_gc_mark_hook_fn gc_mark_hook,
@ -2867,21 +2868,21 @@ _bfd_coff_gc_mark_reloc (struct bfd_link_info *info,
if (bfd_get_flavour (rsec->owner) != bfd_target_coff_flavour) if (bfd_get_flavour (rsec->owner) != bfd_target_coff_flavour)
rsec->gc_mark = 1; rsec->gc_mark = 1;
else if (!_bfd_coff_gc_mark (info, rsec, gc_mark_hook)) else if (!_bfd_coff_gc_mark (info, rsec, gc_mark_hook))
return FALSE; return false;
} }
return TRUE; return true;
} }
/* The mark phase of garbage collection. For a given section, mark /* The mark phase of garbage collection. For a given section, mark
it and any sections in this section's group, and all the sections it and any sections in this section's group, and all the sections
which define symbols to which it refers. */ which define symbols to which it refers. */
static bfd_boolean static bool
_bfd_coff_gc_mark (struct bfd_link_info *info, _bfd_coff_gc_mark (struct bfd_link_info *info,
asection *sec, asection *sec,
coff_gc_mark_hook_fn gc_mark_hook) coff_gc_mark_hook_fn gc_mark_hook)
{ {
bfd_boolean ret = TRUE; bool ret = true;
sec->gc_mark = 1; sec->gc_mark = 1;
@ -2892,14 +2893,14 @@ _bfd_coff_gc_mark (struct bfd_link_info *info,
struct coff_reloc_cookie cookie; struct coff_reloc_cookie cookie;
if (!init_reloc_cookie_for_section (&cookie, info, sec)) if (!init_reloc_cookie_for_section (&cookie, info, sec))
ret = FALSE; ret = false;
else else
{ {
for (; cookie.rel < cookie.relend; cookie.rel++) for (; cookie.rel < cookie.relend; cookie.rel++)
{ {
if (!_bfd_coff_gc_mark_reloc (info, sec, gc_mark_hook, &cookie)) if (!_bfd_coff_gc_mark_reloc (info, sec, gc_mark_hook, &cookie))
{ {
ret = FALSE; ret = false;
break; break;
} }
} }
@ -2910,7 +2911,7 @@ _bfd_coff_gc_mark (struct bfd_link_info *info,
return ret; return ret;
} }
static bfd_boolean static bool
_bfd_coff_gc_mark_extra_sections (struct bfd_link_info *info, _bfd_coff_gc_mark_extra_sections (struct bfd_link_info *info,
coff_gc_mark_hook_fn mark_hook ATTRIBUTE_UNUSED) coff_gc_mark_hook_fn mark_hook ATTRIBUTE_UNUSED)
{ {
@ -2919,20 +2920,20 @@ _bfd_coff_gc_mark_extra_sections (struct bfd_link_info *info,
for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link.next) for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link.next)
{ {
asection *isec; asection *isec;
bfd_boolean some_kept; bool some_kept;
if (bfd_get_flavour (ibfd) != bfd_target_coff_flavour) if (bfd_get_flavour (ibfd) != bfd_target_coff_flavour)
continue; continue;
/* Ensure all linker created sections are kept, and see whether /* Ensure all linker created sections are kept, and see whether
any other section is already marked. */ any other section is already marked. */
some_kept = FALSE; some_kept = false;
for (isec = ibfd->sections; isec != NULL; isec = isec->next) for (isec = ibfd->sections; isec != NULL; isec = isec->next)
{ {
if ((isec->flags & SEC_LINKER_CREATED) != 0) if ((isec->flags & SEC_LINKER_CREATED) != 0)
isec->gc_mark = 1; isec->gc_mark = 1;
else if (isec->gc_mark) else if (isec->gc_mark)
some_kept = TRUE; some_kept = true;
} }
/* If no section in this file will be kept, then we can /* If no section in this file will be kept, then we can
@ -2947,12 +2948,12 @@ _bfd_coff_gc_mark_extra_sections (struct bfd_link_info *info,
|| (isec->flags & (SEC_ALLOC | SEC_LOAD | SEC_RELOC)) == 0) || (isec->flags & (SEC_ALLOC | SEC_LOAD | SEC_RELOC)) == 0)
isec->gc_mark = 1; isec->gc_mark = 1;
} }
return TRUE; return true;
} }
/* Sweep symbols in swept sections. Called via coff_link_hash_traverse. */ /* Sweep symbols in swept sections. Called via coff_link_hash_traverse. */
static bfd_boolean static bool
coff_gc_sweep_symbol (struct coff_link_hash_entry *h, coff_gc_sweep_symbol (struct coff_link_hash_entry *h,
void *data ATTRIBUTE_UNUSED) void *data ATTRIBUTE_UNUSED)
{ {
@ -2969,15 +2970,15 @@ coff_gc_sweep_symbol (struct coff_link_hash_entry *h,
h->symbol_class = C_HIDDEN; h->symbol_class = C_HIDDEN;
} }
return TRUE; return true;
} }
/* The sweep phase of garbage collection. Remove all garbage sections. */ /* The sweep phase of garbage collection. Remove all garbage sections. */
typedef bfd_boolean (*gc_sweep_hook_fn) typedef bool (*gc_sweep_hook_fn)
(bfd *, struct bfd_link_info *, asection *, const struct internal_reloc *); (bfd *, struct bfd_link_info *, asection *, const struct internal_reloc *);
static bfd_boolean static bool
coff_gc_sweep (bfd *abfd ATTRIBUTE_UNUSED, struct bfd_link_info *info) coff_gc_sweep (bfd *abfd ATTRIBUTE_UNUSED, struct bfd_link_info *info)
{ {
bfd *sub; bfd *sub;
@ -3026,13 +3027,13 @@ coff_gc_sweep (bfd *abfd ATTRIBUTE_UNUSED, struct bfd_link_info *info)
&& !bfd_is_abs_section (o->output_section)) && !bfd_is_abs_section (o->output_section))
{ {
struct internal_reloc *internal_relocs; struct internal_reloc *internal_relocs;
bfd_boolean r; bool r;
internal_relocs internal_relocs
= _bfd_coff_link_read_relocs (o->owner, o, NULL, NULL, = _bfd_coff_link_read_relocs (o->owner, o, NULL, NULL,
info->keep_memory); info->keep_memory);
if (internal_relocs == NULL) if (internal_relocs == NULL)
return FALSE; return false;
r = (*gc_sweep_hook) (o->owner, info, o, internal_relocs); r = (*gc_sweep_hook) (o->owner, info, o, internal_relocs);
@ -3040,7 +3041,7 @@ coff_gc_sweep (bfd *abfd ATTRIBUTE_UNUSED, struct bfd_link_info *info)
free (internal_relocs); free (internal_relocs);
if (!r) if (!r)
return FALSE; return false;
} }
#endif #endif
} }
@ -3051,7 +3052,7 @@ coff_gc_sweep (bfd *abfd ATTRIBUTE_UNUSED, struct bfd_link_info *info)
coff_link_hash_traverse (coff_hash_table (info), coff_gc_sweep_symbol, coff_link_hash_traverse (coff_hash_table (info), coff_gc_sweep_symbol,
NULL); NULL);
return TRUE; return true;
} }
/* Keep all sections containing symbols undefined on the command-line, /* Keep all sections containing symbols undefined on the command-line,
@ -3067,7 +3068,7 @@ _bfd_coff_gc_keep (struct bfd_link_info *info)
struct coff_link_hash_entry *h; struct coff_link_hash_entry *h;
h = coff_link_hash_lookup (coff_hash_table (info), sym->name, h = coff_link_hash_lookup (coff_hash_table (info), sym->name,
FALSE, FALSE, FALSE); false, false, false);
if (h != NULL if (h != NULL
&& (h->root.type == bfd_link_hash_defined && (h->root.type == bfd_link_hash_defined
@ -3079,7 +3080,7 @@ _bfd_coff_gc_keep (struct bfd_link_info *info)
/* Do mark and sweep of unused sections. */ /* Do mark and sweep of unused sections. */
bfd_boolean bool
bfd_coff_gc_sections (bfd *abfd ATTRIBUTE_UNUSED, struct bfd_link_info *info) bfd_coff_gc_sections (bfd *abfd ATTRIBUTE_UNUSED, struct bfd_link_info *info)
{ {
bfd *sub; bfd *sub;
@ -3092,7 +3093,7 @@ bfd_coff_gc_sections (bfd *abfd ATTRIBUTE_UNUSED, struct bfd_link_info *info)
|| !is_coff_hash_table (info->hash)) || !is_coff_hash_table (info->hash))
{ {
_bfd_error_handler(_("warning: gc-sections option ignored")); _bfd_error_handler(_("warning: gc-sections option ignored"));
return TRUE; return true;
} }
#endif #endif
@ -3115,7 +3116,7 @@ bfd_coff_gc_sections (bfd *abfd ATTRIBUTE_UNUSED, struct bfd_link_info *info)
&& !o->gc_mark) && !o->gc_mark)
{ {
if (!_bfd_coff_gc_mark (info, o, _bfd_coff_gc_mark_hook)) if (!_bfd_coff_gc_mark (info, o, _bfd_coff_gc_mark_hook))
return FALSE; return false;
} }
} }
} }
@ -3138,7 +3139,7 @@ bfd_coff_group_name (bfd *abfd, const asection *sec)
return NULL; return NULL;
} }
bfd_boolean bool
_bfd_coff_close_and_cleanup (bfd *abfd) _bfd_coff_close_and_cleanup (bfd *abfd)
{ {
struct coff_tdata *tdata = coff_data (abfd); struct coff_tdata *tdata = coff_data (abfd);
@ -3152,7 +3153,7 @@ _bfd_coff_close_and_cleanup (bfd *abfd)
if (bfd_get_format (abfd) == bfd_object if (bfd_get_format (abfd) == bfd_object
&& bfd_family_coff (abfd) && bfd_family_coff (abfd)
&& !_bfd_coff_free_symbols (abfd)) && !_bfd_coff_free_symbols (abfd))
return FALSE; return false;
if (bfd_get_format (abfd) == bfd_object if (bfd_get_format (abfd) == bfd_object
|| bfd_get_format (abfd) == bfd_core) || bfd_get_format (abfd) == bfd_core)

File diff suppressed because it is too large Load Diff

View File

@ -26,7 +26,7 @@
#define MAX_COMPRESSION_HEADER_SIZE 24 #define MAX_COMPRESSION_HEADER_SIZE 24
static bfd_boolean static bool
decompress_contents (bfd_byte *compressed_buffer, decompress_contents (bfd_byte *compressed_buffer,
bfd_size_type compressed_size, bfd_size_type compressed_size,
bfd_byte *uncompressed_buffer, bfd_byte *uncompressed_buffer,
@ -79,13 +79,13 @@ bfd_compress_section_contents (bfd *abfd, sec_ptr sec,
uLong compressed_size; uLong compressed_size;
bfd_byte *buffer; bfd_byte *buffer;
bfd_size_type buffer_size; bfd_size_type buffer_size;
bfd_boolean decompress; bool decompress;
int zlib_size = 0; int zlib_size = 0;
int orig_compression_header_size; int orig_compression_header_size;
bfd_size_type orig_uncompressed_size; bfd_size_type orig_uncompressed_size;
unsigned int orig_uncompressed_alignment_pow; unsigned int orig_uncompressed_alignment_pow;
int header_size = bfd_get_compression_header_size (abfd, NULL); int header_size = bfd_get_compression_header_size (abfd, NULL);
bfd_boolean compressed bool compressed
= bfd_is_section_compressed_with_header (abfd, sec, = bfd_is_section_compressed_with_header (abfd, sec,
&orig_compression_header_size, &orig_compression_header_size,
&orig_uncompressed_size, &orig_uncompressed_size,
@ -128,12 +128,12 @@ bfd_compress_section_contents (bfd *abfd, sec_ptr sec,
/* Uncompress if it leads to smaller size. */ /* Uncompress if it leads to smaller size. */
if (compressed && compressed_size > orig_uncompressed_size) if (compressed && compressed_size > orig_uncompressed_size)
{ {
decompress = TRUE; decompress = true;
buffer_size = orig_uncompressed_size; buffer_size = orig_uncompressed_size;
} }
else else
{ {
decompress = FALSE; decompress = false;
buffer_size = compressed_size; buffer_size = compressed_size;
} }
buffer = (bfd_byte *) bfd_alloc (abfd, buffer_size); buffer = (bfd_byte *) bfd_alloc (abfd, buffer_size);
@ -209,7 +209,7 @@ FUNCTION
bfd_get_full_section_contents bfd_get_full_section_contents
SYNOPSIS SYNOPSIS
bfd_boolean bfd_get_full_section_contents bool bfd_get_full_section_contents
(bfd *abfd, asection *section, bfd_byte **ptr); (bfd *abfd, asection *section, bfd_byte **ptr);
DESCRIPTION DESCRIPTION
@ -222,12 +222,12 @@ DESCRIPTION
returns @code{TRUE} but @var{*ptr} is set to NULL. returns @code{TRUE} but @var{*ptr} is set to NULL.
*/ */
bfd_boolean bool
bfd_get_full_section_contents (bfd *abfd, sec_ptr sec, bfd_byte **ptr) bfd_get_full_section_contents (bfd *abfd, sec_ptr sec, bfd_byte **ptr)
{ {
bfd_size_type sz; bfd_size_type sz;
bfd_byte *p = *ptr; bfd_byte *p = *ptr;
bfd_boolean ret; bool ret;
bfd_size_type save_size; bfd_size_type save_size;
bfd_size_type save_rawsize; bfd_size_type save_rawsize;
bfd_byte *compressed_buffer; bfd_byte *compressed_buffer;
@ -240,7 +240,7 @@ bfd_get_full_section_contents (bfd *abfd, sec_ptr sec, bfd_byte **ptr)
if (sz == 0) if (sz == 0)
{ {
*ptr = NULL; *ptr = NULL;
return TRUE; return true;
} }
switch (sec->compress_status) switch (sec->compress_status)
@ -269,7 +269,7 @@ bfd_get_full_section_contents (bfd *abfd, sec_ptr sec, bfd_byte **ptr)
/* xgettext:c-format */ /* xgettext:c-format */
(_("error: %pB(%pA) section size (%#" PRIx64 " bytes) is larger than file size (%#" PRIx64 " bytes)"), (_("error: %pB(%pA) section size (%#" PRIx64 " bytes) is larger than file size (%#" PRIx64 " bytes)"),
abfd, sec, (uint64_t) sz, (uint64_t) filesize); abfd, sec, (uint64_t) sz, (uint64_t) filesize);
return FALSE; return false;
} }
p = (bfd_byte *) bfd_malloc (sz); p = (bfd_byte *) bfd_malloc (sz);
if (p == NULL) if (p == NULL)
@ -280,7 +280,7 @@ bfd_get_full_section_contents (bfd *abfd, sec_ptr sec, bfd_byte **ptr)
/* xgettext:c-format */ /* xgettext:c-format */
(_("error: %pB(%pA) is too large (%#" PRIx64 " bytes)"), (_("error: %pB(%pA) is too large (%#" PRIx64 " bytes)"),
abfd, sec, (uint64_t) sz); abfd, sec, (uint64_t) sz);
return FALSE; return false;
} }
} }
@ -288,16 +288,16 @@ bfd_get_full_section_contents (bfd *abfd, sec_ptr sec, bfd_byte **ptr)
{ {
if (*ptr != p) if (*ptr != p)
free (p); free (p);
return FALSE; return false;
} }
*ptr = p; *ptr = p;
return TRUE; return true;
case DECOMPRESS_SECTION_SIZED: case DECOMPRESS_SECTION_SIZED:
/* Read in the full compressed section contents. */ /* Read in the full compressed section contents. */
compressed_buffer = (bfd_byte *) bfd_malloc (sec->compressed_size); compressed_buffer = (bfd_byte *) bfd_malloc (sec->compressed_size);
if (compressed_buffer == NULL) if (compressed_buffer == NULL)
return FALSE; return false;
save_rawsize = sec->rawsize; save_rawsize = sec->rawsize;
save_size = sec->size; save_size = sec->size;
/* Clear rawsize, set size to compressed size and set compress_status /* Clear rawsize, set size to compressed size and set compress_status
@ -333,27 +333,27 @@ bfd_get_full_section_contents (bfd *abfd, sec_ptr sec, bfd_byte **ptr)
free (p); free (p);
fail_compressed: fail_compressed:
free (compressed_buffer); free (compressed_buffer);
return FALSE; return false;
} }
free (compressed_buffer); free (compressed_buffer);
*ptr = p; *ptr = p;
return TRUE; return true;
case COMPRESS_SECTION_DONE: case COMPRESS_SECTION_DONE:
if (sec->contents == NULL) if (sec->contents == NULL)
return FALSE; return false;
if (p == NULL) if (p == NULL)
{ {
p = (bfd_byte *) bfd_malloc (sz); p = (bfd_byte *) bfd_malloc (sz);
if (p == NULL) if (p == NULL)
return FALSE; return false;
*ptr = p; *ptr = p;
} }
/* PR 17512; file: 5bc29788. */ /* PR 17512; file: 5bc29788. */
if (p != sec->contents) if (p != sec->contents)
memcpy (p, sec->contents, sz); memcpy (p, sec->contents, sz);
return TRUE; return true;
default: default:
abort (); abort ();
@ -387,7 +387,7 @@ FUNCTION
bfd_is_section_compressed_with_header bfd_is_section_compressed_with_header
SYNOPSIS SYNOPSIS
bfd_boolean bfd_is_section_compressed_with_header bool bfd_is_section_compressed_with_header
(bfd *abfd, asection *section, (bfd *abfd, asection *section,
int *compression_header_size_p, int *compression_header_size_p,
bfd_size_type *uncompressed_size_p, bfd_size_type *uncompressed_size_p,
@ -403,7 +403,7 @@ DESCRIPTION
and uncompressed size is returned with 0. and uncompressed size is returned with 0.
*/ */
bfd_boolean bool
bfd_is_section_compressed_with_header (bfd *abfd, sec_ptr sec, bfd_is_section_compressed_with_header (bfd *abfd, sec_ptr sec,
int *compression_header_size_p, int *compression_header_size_p,
bfd_size_type *uncompressed_size_p, bfd_size_type *uncompressed_size_p,
@ -413,7 +413,7 @@ bfd_is_section_compressed_with_header (bfd *abfd, sec_ptr sec,
int compression_header_size; int compression_header_size;
int header_size; int header_size;
unsigned int saved = sec->compress_status; unsigned int saved = sec->compress_status;
bfd_boolean compressed; bool compressed;
*uncompressed_align_pow_p = 0; *uncompressed_align_pow_p = 0;
@ -433,10 +433,10 @@ bfd_is_section_compressed_with_header (bfd *abfd, sec_ptr sec,
section size, 8 bytes in big-endian order. */ section size, 8 bytes in big-endian order. */
compressed = startswith ((char*) header , "ZLIB"); compressed = startswith ((char*) header , "ZLIB");
else else
compressed = TRUE; compressed = true;
} }
else else
compressed = FALSE; compressed = false;
*uncompressed_size_p = sec->size; *uncompressed_size_p = sec->size;
if (compressed) if (compressed)
@ -454,7 +454,7 @@ bfd_is_section_compressed_with_header (bfd *abfd, sec_ptr sec,
have the first byte of its (big-endian) size be non-zero. */ have the first byte of its (big-endian) size be non-zero. */
else if (strcmp (sec->name, ".debug_str") == 0 else if (strcmp (sec->name, ".debug_str") == 0
&& ISPRINT (header[4])) && ISPRINT (header[4]))
compressed = FALSE; compressed = false;
else else
*uncompressed_size_p = bfd_getb64 (header + 4); *uncompressed_size_p = bfd_getb64 (header + 4);
} }
@ -470,14 +470,14 @@ FUNCTION
bfd_is_section_compressed bfd_is_section_compressed
SYNOPSIS SYNOPSIS
bfd_boolean bfd_is_section_compressed bool bfd_is_section_compressed
(bfd *abfd, asection *section); (bfd *abfd, asection *section);
DESCRIPTION DESCRIPTION
Return @code{TRUE} if @var{section} is compressed. Return @code{TRUE} if @var{section} is compressed.
*/ */
bfd_boolean bool
bfd_is_section_compressed (bfd *abfd, sec_ptr sec) bfd_is_section_compressed (bfd *abfd, sec_ptr sec)
{ {
int compression_header_size; int compression_header_size;
@ -496,7 +496,7 @@ FUNCTION
bfd_init_section_decompress_status bfd_init_section_decompress_status
SYNOPSIS SYNOPSIS
bfd_boolean bfd_init_section_decompress_status bool bfd_init_section_decompress_status
(bfd *abfd, asection *section); (bfd *abfd, asection *section);
DESCRIPTION DESCRIPTION
@ -508,7 +508,7 @@ DESCRIPTION
section. Otherwise, return @code{TRUE}. section. Otherwise, return @code{TRUE}.
*/ */
bfd_boolean bool
bfd_init_section_decompress_status (bfd *abfd, sec_ptr sec) bfd_init_section_decompress_status (bfd *abfd, sec_ptr sec)
{ {
bfd_byte header[MAX_COMPRESSION_HEADER_SIZE]; bfd_byte header[MAX_COMPRESSION_HEADER_SIZE];
@ -529,7 +529,7 @@ bfd_init_section_decompress_status (bfd *abfd, sec_ptr sec)
|| !bfd_get_section_contents (abfd, sec, header, 0, header_size)) || !bfd_get_section_contents (abfd, sec, header, 0, header_size))
{ {
bfd_set_error (bfd_error_invalid_operation); bfd_set_error (bfd_error_invalid_operation);
return FALSE; return false;
} }
if (compression_header_size == 0) if (compression_header_size == 0)
@ -539,7 +539,7 @@ bfd_init_section_decompress_status (bfd *abfd, sec_ptr sec)
if (! startswith ((char*) header, "ZLIB")) if (! startswith ((char*) header, "ZLIB"))
{ {
bfd_set_error (bfd_error_wrong_format); bfd_set_error (bfd_error_wrong_format);
return FALSE; return false;
} }
uncompressed_size = bfd_getb64 (header + 4); uncompressed_size = bfd_getb64 (header + 4);
} }
@ -548,7 +548,7 @@ bfd_init_section_decompress_status (bfd *abfd, sec_ptr sec)
&uncompressed_alignment_power)) &uncompressed_alignment_power))
{ {
bfd_set_error (bfd_error_wrong_format); bfd_set_error (bfd_error_wrong_format);
return FALSE; return false;
} }
sec->compressed_size = sec->size; sec->compressed_size = sec->size;
@ -556,7 +556,7 @@ bfd_init_section_decompress_status (bfd *abfd, sec_ptr sec)
bfd_set_section_alignment (sec, uncompressed_alignment_power); bfd_set_section_alignment (sec, uncompressed_alignment_power);
sec->compress_status = DECOMPRESS_SECTION_SIZED; sec->compress_status = DECOMPRESS_SECTION_SIZED;
return TRUE; return true;
} }
/* /*
@ -564,7 +564,7 @@ FUNCTION
bfd_init_section_compress_status bfd_init_section_compress_status
SYNOPSIS SYNOPSIS
bfd_boolean bfd_init_section_compress_status bool bfd_init_section_compress_status
(bfd *abfd, asection *section); (bfd *abfd, asection *section);
DESCRIPTION DESCRIPTION
@ -575,7 +575,7 @@ DESCRIPTION
section. Otherwise, return @code{TRUE}. section. Otherwise, return @code{TRUE}.
*/ */
bfd_boolean bool
bfd_init_section_compress_status (bfd *abfd, sec_ptr sec) bfd_init_section_compress_status (bfd *abfd, sec_ptr sec)
{ {
bfd_size_type uncompressed_size; bfd_size_type uncompressed_size;
@ -589,7 +589,7 @@ bfd_init_section_compress_status (bfd *abfd, sec_ptr sec)
|| sec->compress_status != COMPRESS_SECTION_NONE) || sec->compress_status != COMPRESS_SECTION_NONE)
{ {
bfd_set_error (bfd_error_invalid_operation); bfd_set_error (bfd_error_invalid_operation);
return FALSE; return false;
} }
/* Read in the full section contents and compress it. */ /* Read in the full section contents and compress it. */
@ -597,11 +597,11 @@ bfd_init_section_compress_status (bfd *abfd, sec_ptr sec)
uncompressed_buffer = (bfd_byte *) bfd_malloc (uncompressed_size); uncompressed_buffer = (bfd_byte *) bfd_malloc (uncompressed_size);
/* PR 21431 */ /* PR 21431 */
if (uncompressed_buffer == NULL) if (uncompressed_buffer == NULL)
return FALSE; return false;
if (!bfd_get_section_contents (abfd, sec, uncompressed_buffer, if (!bfd_get_section_contents (abfd, sec, uncompressed_buffer,
0, uncompressed_size)) 0, uncompressed_size))
return FALSE; return false;
uncompressed_size = bfd_compress_section_contents (abfd, sec, uncompressed_size = bfd_compress_section_contents (abfd, sec,
uncompressed_buffer, uncompressed_buffer,
@ -614,7 +614,7 @@ FUNCTION
bfd_compress_section bfd_compress_section
SYNOPSIS SYNOPSIS
bfd_boolean bfd_compress_section bool bfd_compress_section
(bfd *abfd, asection *section, bfd_byte *uncompressed_buffer); (bfd *abfd, asection *section, bfd_byte *uncompressed_buffer);
DESCRIPTION DESCRIPTION
@ -625,7 +625,7 @@ DESCRIPTION
@code{TRUE}. @code{TRUE}.
*/ */
bfd_boolean bool
bfd_compress_section (bfd *abfd, sec_ptr sec, bfd_byte *uncompressed_buffer) bfd_compress_section (bfd *abfd, sec_ptr sec, bfd_byte *uncompressed_buffer)
{ {
bfd_size_type uncompressed_size = sec->size; bfd_size_type uncompressed_size = sec->size;
@ -639,7 +639,7 @@ bfd_compress_section (bfd *abfd, sec_ptr sec, bfd_byte *uncompressed_buffer)
|| sec->compress_status != COMPRESS_SECTION_NONE) || sec->compress_status != COMPRESS_SECTION_NONE)
{ {
bfd_set_error (bfd_error_invalid_operation); bfd_set_error (bfd_error_invalid_operation);
return FALSE; return false;
} }
/* Compress it. */ /* Compress it. */

View File

@ -111,7 +111,7 @@ FUNCTION
core_file_matches_executable_p core_file_matches_executable_p
SYNOPSIS SYNOPSIS
bfd_boolean core_file_matches_executable_p bool core_file_matches_executable_p
(bfd *core_bfd, bfd *exec_bfd); (bfd *core_bfd, bfd *exec_bfd);
DESCRIPTION DESCRIPTION
@ -120,13 +120,13 @@ DESCRIPTION
@var{exec_bfd}, <<FALSE>> otherwise. @var{exec_bfd}, <<FALSE>> otherwise.
*/ */
bfd_boolean bool
core_file_matches_executable_p (bfd *core_bfd, bfd *exec_bfd) core_file_matches_executable_p (bfd *core_bfd, bfd *exec_bfd)
{ {
if (core_bfd->format != bfd_core || exec_bfd->format != bfd_object) if (core_bfd->format != bfd_core || exec_bfd->format != bfd_object)
{ {
bfd_set_error (bfd_error_wrong_format); bfd_set_error (bfd_error_wrong_format);
return FALSE; return false;
} }
return BFD_SEND (core_bfd, _core_file_matches_executable_p, return BFD_SEND (core_bfd, _core_file_matches_executable_p,
@ -138,7 +138,7 @@ FUNCTION
generic_core_file_matches_executable_p generic_core_file_matches_executable_p
SYNOPSIS SYNOPSIS
bfd_boolean generic_core_file_matches_executable_p bool generic_core_file_matches_executable_p
(bfd *core_bfd, bfd *exec_bfd); (bfd *core_bfd, bfd *exec_bfd);
DESCRIPTION DESCRIPTION
@ -154,7 +154,7 @@ DESCRIPTION
where we really don't know whether they match or not. where we really don't know whether they match or not.
*/ */
bfd_boolean bool
generic_core_file_matches_executable_p (bfd *core_bfd, bfd *exec_bfd) generic_core_file_matches_executable_p (bfd *core_bfd, bfd *exec_bfd)
{ {
const char *exec; const char *exec;
@ -162,7 +162,7 @@ generic_core_file_matches_executable_p (bfd *core_bfd, bfd *exec_bfd)
const char *last_slash; const char *last_slash;
if (exec_bfd == NULL || core_bfd == NULL) if (exec_bfd == NULL || core_bfd == NULL)
return TRUE; return true;
/* The cast below is to avoid a compiler warning due to the assignment /* The cast below is to avoid a compiler warning due to the assignment
of the const char * returned by bfd_core_file_failing_command to a of the const char * returned by bfd_core_file_failing_command to a
@ -171,11 +171,11 @@ generic_core_file_matches_executable_p (bfd *core_bfd, bfd *exec_bfd)
core = bfd_core_file_failing_command (core_bfd); core = bfd_core_file_failing_command (core_bfd);
if (core == NULL) if (core == NULL)
return TRUE; return true;
exec = bfd_get_filename (exec_bfd); exec = bfd_get_filename (exec_bfd);
if (exec == NULL) if (exec == NULL)
return TRUE; return true;
last_slash = strrchr (core, '/'); last_slash = strrchr (core, '/');
if (last_slash != NULL) if (last_slash != NULL)

View File

@ -76,14 +76,14 @@ processors[] =
{ bfd_mach_aarch64, "cortex-a77" } { bfd_mach_aarch64, "cortex-a77" }
}; };
static bfd_boolean static bool
scan (const struct bfd_arch_info *info, const char *string) scan (const struct bfd_arch_info *info, const char *string)
{ {
int i; int i;
/* First test for an exact match. */ /* First test for an exact match. */
if (strcasecmp (string, info->printable_name) == 0) if (strcasecmp (string, info->printable_name) == 0)
return TRUE; return true;
/* Next check for a processor name instead of an Architecture name. */ /* Next check for a processor name instead of an Architecture name. */
for (i = sizeof (processors) / sizeof (processors[0]); i--;) for (i = sizeof (processors) / sizeof (processors[0]); i--;)
@ -93,13 +93,13 @@ scan (const struct bfd_arch_info *info, const char *string)
} }
if (i != -1 && info->mach == processors[i].mach) if (i != -1 && info->mach == processors[i].mach)
return TRUE; return true;
/* Finally check for the default architecture. */ /* Finally check for the default architecture. */
if (strcasecmp (string, "aarch64") == 0) if (strcasecmp (string, "aarch64") == 0)
return info->the_default; return info->the_default;
return FALSE; return false;
} }
#define N(NUMBER, PRINT, WORDSIZE, DEFAULT, NEXT) \ #define N(NUMBER, PRINT, WORDSIZE, DEFAULT, NEXT) \
@ -108,26 +108,26 @@ scan (const struct bfd_arch_info *info, const char *string)
bfd_arch_default_fill, NEXT, 0 } bfd_arch_default_fill, NEXT, 0 }
static const bfd_arch_info_type bfd_aarch64_arch_v8_r = static const bfd_arch_info_type bfd_aarch64_arch_v8_r =
N (bfd_mach_aarch64_8R, "aarch64:armv8-r", 64, FALSE, NULL); N (bfd_mach_aarch64_8R, "aarch64:armv8-r", 64, false, NULL);
static const bfd_arch_info_type bfd_aarch64_arch_ilp32 = static const bfd_arch_info_type bfd_aarch64_arch_ilp32 =
N (bfd_mach_aarch64_ilp32, "aarch64:ilp32", 32, FALSE, N (bfd_mach_aarch64_ilp32, "aarch64:ilp32", 32, false,
&bfd_aarch64_arch_v8_r); &bfd_aarch64_arch_v8_r);
const bfd_arch_info_type bfd_aarch64_arch = const bfd_arch_info_type bfd_aarch64_arch =
N (0, "aarch64", 64, TRUE, &bfd_aarch64_arch_ilp32); N (0, "aarch64", 64, true, &bfd_aarch64_arch_ilp32);
bfd_boolean bool
bfd_is_aarch64_special_symbol_name (const char *name, int type) bfd_is_aarch64_special_symbol_name (const char *name, int type)
{ {
if (!name || name[0] != '$') if (!name || name[0] != '$')
return FALSE; return false;
if (name[1] == 'x' || name[1] == 'd') if (name[1] == 'x' || name[1] == 'd')
type &= BFD_AARCH64_SPECIAL_SYM_TYPE_MAP; type &= BFD_AARCH64_SPECIAL_SYM_TYPE_MAP;
else if (name[1] == 'm' || name[1] == 'f' || name[1] == 'p') else if (name[1] == 'm' || name[1] == 'f' || name[1] == 'p')
type &= BFD_AARCH64_SPECIAL_SYM_TYPE_TAG; type &= BFD_AARCH64_SPECIAL_SYM_TYPE_TAG;
else else
return FALSE; return false;
return (type != 0 && (name[2] == 0 || name[2] == '.')); return (type != 0 && (name[2] == 0 || name[2] == '.'));
} }

View File

@ -21,5 +21,5 @@
#define BFD_AARCH64_SPECIAL_SYM_TYPE_TAG (1 << 1) #define BFD_AARCH64_SPECIAL_SYM_TYPE_TAG (1 << 1)
#define BFD_AARCH64_SPECIAL_SYM_TYPE_OTHER (1 << 2) #define BFD_AARCH64_SPECIAL_SYM_TYPE_OTHER (1 << 2)
#define BFD_AARCH64_SPECIAL_SYM_TYPE_ANY (~0) #define BFD_AARCH64_SPECIAL_SYM_TYPE_ANY (~0)
extern bfd_boolean bfd_is_aarch64_special_symbol_name extern bool bfd_is_aarch64_special_symbol_name
(const char * name, int type); (const char * name, int type);

View File

@ -45,10 +45,10 @@
/* These exist only so that we can reasonably disassemble PALcode. */ /* These exist only so that we can reasonably disassemble PALcode. */
static const bfd_arch_info_type arch_info_struct[] = static const bfd_arch_info_type arch_info_struct[] =
{ {
N (64, 64, bfd_mach_alpha_ev4, "alpha:ev4", FALSE, NN(1)), N (64, 64, bfd_mach_alpha_ev4, "alpha:ev4", false, NN(1)),
N (64, 64, bfd_mach_alpha_ev5, "alpha:ev5", FALSE, NN(2)), N (64, 64, bfd_mach_alpha_ev5, "alpha:ev5", false, NN(2)),
N (64, 64, bfd_mach_alpha_ev6, "alpha:ev6", FALSE, 0), N (64, 64, bfd_mach_alpha_ev6, "alpha:ev6", false, 0),
}; };
const bfd_arch_info_type bfd_alpha_arch = const bfd_arch_info_type bfd_alpha_arch =
N (64, 64, 0, "alpha", TRUE, NN(0)); N (64, 64, 0, "alpha", true, NN(0));

View File

@ -46,17 +46,17 @@ arc_compatible (const bfd_arch_info_type *a, const bfd_arch_info_type *b);
static const bfd_arch_info_type arch_info_struct[] = static const bfd_arch_info_type arch_info_struct[] =
{ {
ARC (bfd_mach_arc_arc600, "A6" , FALSE, &arch_info_struct[1]), ARC (bfd_mach_arc_arc600, "A6" , false, &arch_info_struct[1]),
ARC (bfd_mach_arc_arc601, "ARC601", FALSE, &arch_info_struct[2]), ARC (bfd_mach_arc_arc601, "ARC601", false, &arch_info_struct[2]),
ARC (bfd_mach_arc_arc700, "ARC700", FALSE, &arch_info_struct[3]), ARC (bfd_mach_arc_arc700, "ARC700", false, &arch_info_struct[3]),
ARC (bfd_mach_arc_arc700, "A7", FALSE, &arch_info_struct[4]), ARC (bfd_mach_arc_arc700, "A7", false, &arch_info_struct[4]),
ARC (bfd_mach_arc_arcv2, "ARCv2", FALSE, &arch_info_struct[5]), ARC (bfd_mach_arc_arcv2, "ARCv2", false, &arch_info_struct[5]),
ARC (bfd_mach_arc_arcv2, "EM", FALSE, &arch_info_struct[6]), ARC (bfd_mach_arc_arcv2, "EM", false, &arch_info_struct[6]),
ARC (bfd_mach_arc_arcv2, "HS", FALSE, NULL), ARC (bfd_mach_arc_arcv2, "HS", false, NULL),
}; };
const bfd_arch_info_type bfd_arc_arch = const bfd_arch_info_type bfd_arc_arch =
ARC (bfd_mach_arc_arc600, "ARC600", TRUE, &arch_info_struct[0]); ARC (bfd_mach_arc_arc600, "ARC600", true, &arch_info_struct[0]);
/* ARC-specific "compatible" function. The general rule is that if A and B are /* ARC-specific "compatible" function. The general rule is that if A and B are
compatible, then this function should return architecture that is more compatible, then this function should return architecture that is more

View File

@ -198,14 +198,14 @@ processors[] =
{ bfd_mach_arm_unknown, "arm_any" } { bfd_mach_arm_unknown, "arm_any" }
}; };
static bfd_boolean static bool
scan (const struct bfd_arch_info *info, const char *string) scan (const struct bfd_arch_info *info, const char *string)
{ {
int i; int i;
/* First test for an exact match. */ /* First test for an exact match. */
if (strcasecmp (string, info->printable_name) == 0) if (strcasecmp (string, info->printable_name) == 0)
return TRUE; return true;
/* Next check for a processor name instead of an Architecture name. */ /* Next check for a processor name instead of an Architecture name. */
for (i = sizeof (processors) / sizeof (processors[0]); i--;) for (i = sizeof (processors) / sizeof (processors[0]); i--;)
@ -215,13 +215,13 @@ scan (const struct bfd_arch_info *info, const char *string)
} }
if (i != -1 && info->mach == processors [i].mach) if (i != -1 && info->mach == processors [i].mach)
return TRUE; return true;
/* Finally check for the default architecture. */ /* Finally check for the default architecture. */
if (strcasecmp (string, "arm") == 0) if (strcasecmp (string, "arm") == 0)
return info->the_default; return info->the_default;
return FALSE; return false;
} }
#define N(number, print, default, next) \ #define N(number, print, default, next) \
@ -230,38 +230,38 @@ scan (const struct bfd_arch_info *info, const char *string)
static const bfd_arch_info_type arch_info_struct[] = static const bfd_arch_info_type arch_info_struct[] =
{ {
N (bfd_mach_arm_2, "armv2", FALSE, & arch_info_struct[1]), N (bfd_mach_arm_2, "armv2", false, & arch_info_struct[1]),
N (bfd_mach_arm_2a, "armv2a", FALSE, & arch_info_struct[2]), N (bfd_mach_arm_2a, "armv2a", false, & arch_info_struct[2]),
N (bfd_mach_arm_3, "armv3", FALSE, & arch_info_struct[3]), N (bfd_mach_arm_3, "armv3", false, & arch_info_struct[3]),
N (bfd_mach_arm_3M, "armv3m", FALSE, & arch_info_struct[4]), N (bfd_mach_arm_3M, "armv3m", false, & arch_info_struct[4]),
N (bfd_mach_arm_4, "armv4", FALSE, & arch_info_struct[5]), N (bfd_mach_arm_4, "armv4", false, & arch_info_struct[5]),
N (bfd_mach_arm_4T, "armv4t", FALSE, & arch_info_struct[6]), N (bfd_mach_arm_4T, "armv4t", false, & arch_info_struct[6]),
N (bfd_mach_arm_5, "armv5", FALSE, & arch_info_struct[7]), N (bfd_mach_arm_5, "armv5", false, & arch_info_struct[7]),
N (bfd_mach_arm_5T, "armv5t", FALSE, & arch_info_struct[8]), N (bfd_mach_arm_5T, "armv5t", false, & arch_info_struct[8]),
N (bfd_mach_arm_5TE, "armv5te", FALSE, & arch_info_struct[9]), N (bfd_mach_arm_5TE, "armv5te", false, & arch_info_struct[9]),
N (bfd_mach_arm_XScale, "xscale", FALSE, & arch_info_struct[10]), N (bfd_mach_arm_XScale, "xscale", false, & arch_info_struct[10]),
N (bfd_mach_arm_ep9312, "ep9312", FALSE, & arch_info_struct[11]), N (bfd_mach_arm_ep9312, "ep9312", false, & arch_info_struct[11]),
N (bfd_mach_arm_iWMMXt, "iwmmxt", FALSE, & arch_info_struct[12]), N (bfd_mach_arm_iWMMXt, "iwmmxt", false, & arch_info_struct[12]),
N (bfd_mach_arm_iWMMXt2, "iwmmxt2", FALSE, & arch_info_struct[13]), N (bfd_mach_arm_iWMMXt2, "iwmmxt2", false, & arch_info_struct[13]),
N (bfd_mach_arm_5TEJ, "armv5tej", FALSE, & arch_info_struct[14]), N (bfd_mach_arm_5TEJ, "armv5tej", false, & arch_info_struct[14]),
N (bfd_mach_arm_6, "armv6", FALSE, & arch_info_struct[15]), N (bfd_mach_arm_6, "armv6", false, & arch_info_struct[15]),
N (bfd_mach_arm_6KZ, "armv6kz", FALSE, & arch_info_struct[16]), N (bfd_mach_arm_6KZ, "armv6kz", false, & arch_info_struct[16]),
N (bfd_mach_arm_6T2, "armv6t2", FALSE, & arch_info_struct[17]), N (bfd_mach_arm_6T2, "armv6t2", false, & arch_info_struct[17]),
N (bfd_mach_arm_6K, "armv6k", FALSE, & arch_info_struct[18]), N (bfd_mach_arm_6K, "armv6k", false, & arch_info_struct[18]),
N (bfd_mach_arm_7, "armv7", FALSE, & arch_info_struct[19]), N (bfd_mach_arm_7, "armv7", false, & arch_info_struct[19]),
N (bfd_mach_arm_6M, "armv6-m", FALSE, & arch_info_struct[20]), N (bfd_mach_arm_6M, "armv6-m", false, & arch_info_struct[20]),
N (bfd_mach_arm_6SM, "armv6s-m", FALSE, & arch_info_struct[21]), N (bfd_mach_arm_6SM, "armv6s-m", false, & arch_info_struct[21]),
N (bfd_mach_arm_7EM, "armv7e-m", FALSE, & arch_info_struct[22]), N (bfd_mach_arm_7EM, "armv7e-m", false, & arch_info_struct[22]),
N (bfd_mach_arm_8, "armv8-a", FALSE, & arch_info_struct[23]), N (bfd_mach_arm_8, "armv8-a", false, & arch_info_struct[23]),
N (bfd_mach_arm_8R, "armv8-r", FALSE, & arch_info_struct[24]), N (bfd_mach_arm_8R, "armv8-r", false, & arch_info_struct[24]),
N (bfd_mach_arm_8M_BASE, "armv8-m.base", FALSE, & arch_info_struct[25]), N (bfd_mach_arm_8M_BASE, "armv8-m.base", false, & arch_info_struct[25]),
N (bfd_mach_arm_8M_MAIN, "armv8-m.main", FALSE, & arch_info_struct[26]), N (bfd_mach_arm_8M_MAIN, "armv8-m.main", false, & arch_info_struct[26]),
N (bfd_mach_arm_8_1M_MAIN, "armv8.1-m.main", FALSE, & arch_info_struct[27]), N (bfd_mach_arm_8_1M_MAIN, "armv8.1-m.main", false, & arch_info_struct[27]),
N (bfd_mach_arm_unknown, "arm_any", FALSE, NULL) N (bfd_mach_arm_unknown, "arm_any", false, NULL)
}; };
const bfd_arch_info_type bfd_arm_arch = const bfd_arch_info_type bfd_arm_arch =
N (0, "arm", TRUE, & arch_info_struct[0]); N (0, "arm", true, & arch_info_struct[0]);
/* Support functions used by both the COFF and ELF versions of the ARM port. */ /* Support functions used by both the COFF and ELF versions of the ARM port. */
@ -270,7 +270,7 @@ const bfd_arch_info_type bfd_arm_arch =
different possible ARM architecture variants. different possible ARM architecture variants.
Returns TRUE if they were merged successfully or FALSE otherwise. */ Returns TRUE if they were merged successfully or FALSE otherwise. */
bfd_boolean bool
bfd_arm_merge_machines (bfd *ibfd, bfd *obfd) bfd_arm_merge_machines (bfd *ibfd, bfd *obfd)
{ {
unsigned int in = bfd_get_mach (ibfd); unsigned int in = bfd_get_mach (ibfd);
@ -308,7 +308,7 @@ bfd_arm_merge_machines (bfd *ibfd, bfd *obfd)
"whereas %pB is compiled for XScale"), "whereas %pB is compiled for XScale"),
ibfd, obfd); ibfd, obfd);
bfd_set_error (bfd_error_wrong_format); bfd_set_error (bfd_error_wrong_format);
return FALSE; return false;
} }
else if (out == bfd_mach_arm_ep9312 else if (out == bfd_mach_arm_ep9312
&& (in == bfd_mach_arm_XScale && (in == bfd_mach_arm_XScale
@ -320,14 +320,14 @@ bfd_arm_merge_machines (bfd *ibfd, bfd *obfd)
"whereas %pB is compiled for XScale"), "whereas %pB is compiled for XScale"),
obfd, ibfd); obfd, ibfd);
bfd_set_error (bfd_error_wrong_format); bfd_set_error (bfd_error_wrong_format);
return FALSE; return false;
} }
else if (in > out) else if (in > out)
bfd_set_arch_mach (obfd, bfd_arch_arm, in); bfd_set_arch_mach (obfd, bfd_arch_arm, in);
/* else /* else
Nothing to do. */ Nothing to do. */
return TRUE; return true;
} }
typedef struct typedef struct
@ -338,7 +338,7 @@ typedef struct
char name[1]; /* Start of the name+desc data. */ char name[1]; /* Start of the name+desc data. */
} arm_Note; } arm_Note;
static bfd_boolean static bool
arm_check_note (bfd *abfd, arm_check_note (bfd *abfd,
bfd_byte *buffer, bfd_byte *buffer,
bfd_size_type buffer_size, bfd_size_type buffer_size,
@ -351,7 +351,7 @@ arm_check_note (bfd *abfd,
char * descr; char * descr;
if (buffer_size < offsetof (arm_Note, name)) if (buffer_size < offsetof (arm_Note, name))
return FALSE; return false;
/* We have to extract the values this way to allow for a /* We have to extract the values this way to allow for a
host whose endian-ness is different from the target. */ host whose endian-ness is different from the target. */
@ -362,20 +362,20 @@ arm_check_note (bfd *abfd,
/* Check for buffer overflow. */ /* Check for buffer overflow. */
if (namesz + descsz + offsetof (arm_Note, name) > buffer_size) if (namesz + descsz + offsetof (arm_Note, name) > buffer_size)
return FALSE; return false;
if (expected_name == NULL) if (expected_name == NULL)
{ {
if (namesz != 0) if (namesz != 0)
return FALSE; return false;
} }
else else
{ {
if (namesz != ((strlen (expected_name) + 1 + 3) & ~3)) if (namesz != ((strlen (expected_name) + 1 + 3) & ~3))
return FALSE; return false;
if (strcmp (descr, expected_name) != 0) if (strcmp (descr, expected_name) != 0)
return FALSE; return false;
descr += (namesz + 3) & ~3; descr += (namesz + 3) & ~3;
} }
@ -386,12 +386,12 @@ arm_check_note (bfd *abfd,
if (description_return != NULL) if (description_return != NULL)
* description_return = descr; * description_return = descr;
return TRUE; return true;
} }
#define NOTE_ARCH_STRING "arch: " #define NOTE_ARCH_STRING "arch: "
bfd_boolean bool
bfd_arm_update_notes (bfd *abfd, const char *note_section) bfd_arm_update_notes (bfd *abfd, const char *note_section)
{ {
asection * arm_arch_section; asection * arm_arch_section;
@ -406,11 +406,11 @@ bfd_arm_update_notes (bfd *abfd, const char *note_section)
arm_arch_section = bfd_get_section_by_name (abfd, note_section); arm_arch_section = bfd_get_section_by_name (abfd, note_section);
if (arm_arch_section == NULL) if (arm_arch_section == NULL)
return TRUE; return true;
buffer_size = arm_arch_section->size; buffer_size = arm_arch_section->size;
if (buffer_size == 0) if (buffer_size == 0)
return FALSE; return false;
if (!bfd_malloc_and_get_section (abfd, arm_arch_section, &buffer)) if (!bfd_malloc_and_get_section (abfd, arm_arch_section, &buffer))
goto FAIL; goto FAIL;
@ -459,11 +459,11 @@ bfd_arm_update_notes (bfd *abfd, const char *note_section)
} }
free (buffer); free (buffer);
return TRUE; return true;
FAIL: FAIL:
free (buffer); free (buffer);
return FALSE; return false;
} }
@ -535,14 +535,14 @@ bfd_arm_get_mach_from_notes (bfd *abfd, const char *note_section)
return bfd_mach_arm_unknown; return bfd_mach_arm_unknown;
} }
bfd_boolean bool
bfd_is_arm_special_symbol_name (const char * name, int type) bfd_is_arm_special_symbol_name (const char * name, int type)
{ {
/* The ARM compiler outputs several obsolete forms. Recognize them /* The ARM compiler outputs several obsolete forms. Recognize them
in addition to the standard $a, $t and $d. We are somewhat loose in addition to the standard $a, $t and $d. We are somewhat loose
in what we accept here, since the full set is not documented. */ in what we accept here, since the full set is not documented. */
if (!name || name[0] != '$') if (!name || name[0] != '$')
return FALSE; return false;
if (name[1] == 'a' || name[1] == 't' || name[1] == 'd') if (name[1] == 'a' || name[1] == 't' || name[1] == 'd')
type &= BFD_ARM_SPECIAL_SYM_TYPE_MAP; type &= BFD_ARM_SPECIAL_SYM_TYPE_MAP;
else if (name[1] == 'm' || name[1] == 'f' || name[1] == 'p') else if (name[1] == 'm' || name[1] == 'f' || name[1] == 'p')
@ -550,7 +550,7 @@ bfd_is_arm_special_symbol_name (const char * name, int type)
else if (name[1] >= 'a' && name[1] <= 'z') else if (name[1] >= 'a' && name[1] <= 'z')
type &= BFD_ARM_SPECIAL_SYM_TYPE_OTHER; type &= BFD_ARM_SPECIAL_SYM_TYPE_OTHER;
else else
return FALSE; return false;
return (type != 0 && (name[2] == 0 || name[2] == '.')); return (type != 0 && (name[2] == 0 || name[2] == '.'));
} }

View File

@ -19,10 +19,10 @@
MA 02110-1301, USA. */ MA 02110-1301, USA. */
/* ARM Note section processing. */ /* ARM Note section processing. */
extern bfd_boolean bfd_arm_merge_machines extern bool bfd_arm_merge_machines
(bfd *, bfd *); (bfd *, bfd *);
extern bfd_boolean bfd_arm_update_notes extern bool bfd_arm_update_notes
(bfd *, const char *); (bfd *, const char *);
extern unsigned int bfd_arm_get_mach_from_notes extern unsigned int bfd_arm_get_mach_from_notes
@ -34,6 +34,6 @@ extern unsigned int bfd_arm_get_mach_from_notes
#define BFD_ARM_SPECIAL_SYM_TYPE_OTHER (1 << 2) #define BFD_ARM_SPECIAL_SYM_TYPE_OTHER (1 << 2)
#define BFD_ARM_SPECIAL_SYM_TYPE_ANY (~0) #define BFD_ARM_SPECIAL_SYM_TYPE_ANY (~0)
extern bfd_boolean bfd_is_arm_special_symbol_name extern bool bfd_is_arm_special_symbol_name
(const char *, int); (const char *, int);

View File

@ -101,64 +101,64 @@ compatible (const bfd_arch_info_type * a,
static const bfd_arch_info_type arch_info_struct[] = static const bfd_arch_info_type arch_info_struct[] =
{ {
/* Assembler only. */ /* Assembler only. */
N (16, bfd_mach_avr1, "avr:1", FALSE, & arch_info_struct[1]), N (16, bfd_mach_avr1, "avr:1", false, & arch_info_struct[1]),
/* Classic, <= 8K. */ /* Classic, <= 8K. */
N (16, bfd_mach_avr2, "avr:2", FALSE, & arch_info_struct[2]), N (16, bfd_mach_avr2, "avr:2", false, & arch_info_struct[2]),
/* Classic + MOVW, <= 8K. */ /* Classic + MOVW, <= 8K. */
N (16, bfd_mach_avr25, "avr:25", FALSE, & arch_info_struct[3]), N (16, bfd_mach_avr25, "avr:25", false, & arch_info_struct[3]),
/* Classic, > 8K, <= 64K. */ /* Classic, > 8K, <= 64K. */
/* TODO: addr_bits should be 16, but set to 22 for some following /* TODO: addr_bits should be 16, but set to 22 for some following
version of GCC (from 4.3) for backward compatibility. */ version of GCC (from 4.3) for backward compatibility. */
N (22, bfd_mach_avr3, "avr:3", FALSE, & arch_info_struct[4]), N (22, bfd_mach_avr3, "avr:3", false, & arch_info_struct[4]),
/* Classic, == 128K. */ /* Classic, == 128K. */
N (22, bfd_mach_avr31, "avr:31", FALSE, & arch_info_struct[5]), N (22, bfd_mach_avr31, "avr:31", false, & arch_info_struct[5]),
/* Classic + MOVW + JMP/CALL, > 8K, <= 64K. */ /* Classic + MOVW + JMP/CALL, > 8K, <= 64K. */
N (16, bfd_mach_avr35, "avr:35", FALSE, & arch_info_struct[6]), N (16, bfd_mach_avr35, "avr:35", false, & arch_info_struct[6]),
/* Enhanced, <= 8K. */ /* Enhanced, <= 8K. */
N (16, bfd_mach_avr4, "avr:4", FALSE, & arch_info_struct[7]), N (16, bfd_mach_avr4, "avr:4", false, & arch_info_struct[7]),
/* Enhanced, > 8K, <= 64K. */ /* Enhanced, > 8K, <= 64K. */
/* TODO: addr_bits should be 16, but set to 22 for some following /* TODO: addr_bits should be 16, but set to 22 for some following
version of GCC (from 4.3) for backward compatibility. */ version of GCC (from 4.3) for backward compatibility. */
N (22, bfd_mach_avr5, "avr:5", FALSE, & arch_info_struct[8]), N (22, bfd_mach_avr5, "avr:5", false, & arch_info_struct[8]),
/* Enhanced, == 128K. */ /* Enhanced, == 128K. */
N (22, bfd_mach_avr51, "avr:51", FALSE, & arch_info_struct[9]), N (22, bfd_mach_avr51, "avr:51", false, & arch_info_struct[9]),
/* 3-Byte PC. */ /* 3-Byte PC. */
N (22, bfd_mach_avr6, "avr:6", FALSE, & arch_info_struct[10]), N (22, bfd_mach_avr6, "avr:6", false, & arch_info_struct[10]),
/* Tiny core (AVR Tiny). */ /* Tiny core (AVR Tiny). */
N (16, bfd_mach_avrtiny, "avr:100", FALSE, & arch_info_struct[11]), N (16, bfd_mach_avrtiny, "avr:100", false, & arch_info_struct[11]),
/* Xmega 1. */ /* Xmega 1. */
N (24, bfd_mach_avrxmega1, "avr:101", FALSE, & arch_info_struct[12]), N (24, bfd_mach_avrxmega1, "avr:101", false, & arch_info_struct[12]),
/* Xmega 2. */ /* Xmega 2. */
N (24, bfd_mach_avrxmega2, "avr:102", FALSE, & arch_info_struct[13]), N (24, bfd_mach_avrxmega2, "avr:102", false, & arch_info_struct[13]),
/* Xmega 3. */ /* Xmega 3. */
N (24, bfd_mach_avrxmega3, "avr:103", FALSE, & arch_info_struct[14]), N (24, bfd_mach_avrxmega3, "avr:103", false, & arch_info_struct[14]),
/* Xmega 4. */ /* Xmega 4. */
N (24, bfd_mach_avrxmega4, "avr:104", FALSE, & arch_info_struct[15]), N (24, bfd_mach_avrxmega4, "avr:104", false, & arch_info_struct[15]),
/* Xmega 5. */ /* Xmega 5. */
N (24, bfd_mach_avrxmega5, "avr:105", FALSE, & arch_info_struct[16]), N (24, bfd_mach_avrxmega5, "avr:105", false, & arch_info_struct[16]),
/* Xmega 6. */ /* Xmega 6. */
N (24, bfd_mach_avrxmega6, "avr:106", FALSE, & arch_info_struct[17]), N (24, bfd_mach_avrxmega6, "avr:106", false, & arch_info_struct[17]),
/* Xmega 7. */ /* Xmega 7. */
N (24, bfd_mach_avrxmega7, "avr:107", FALSE, NULL) N (24, bfd_mach_avrxmega7, "avr:107", false, NULL)
}; };
const bfd_arch_info_type bfd_avr_arch = const bfd_arch_info_type bfd_avr_arch =
N (16, bfd_mach_avr2, "avr", TRUE, & arch_info_struct[0]); N (16, bfd_mach_avr2, "avr", true, & arch_info_struct[0]);

View File

@ -33,7 +33,7 @@ const bfd_arch_info_type bfd_bfin_arch =
"bfin", /* Arch name. */ "bfin", /* Arch name. */
"bfin", /* Arch printable name. */ "bfin", /* Arch printable name. */
4, /* Section align power. */ 4, /* Section align power. */
TRUE, /* The one and only. */ true, /* The one and only. */
bfd_default_compatible, bfd_default_compatible,
bfd_default_scan, bfd_default_scan,
bfd_arch_default_fill, bfd_arch_default_fill,

View File

@ -34,7 +34,7 @@ static const bfd_arch_info_type bfd_xbpf_arch =
"bpf", /* Architecture name. */ "bpf", /* Architecture name. */
"xbpf", /* Machine name. */ "xbpf", /* Machine name. */
3, /* Section align power. */ 3, /* Section align power. */
FALSE, /* The default ? */ false, /* The default ? */
bfd_default_compatible, /* Architecture comparison fn. */ bfd_default_compatible, /* Architecture comparison fn. */
bfd_default_scan, /* String to architecture convert fn. */ bfd_default_scan, /* String to architecture convert fn. */
bfd_arch_default_fill, /* Default fill. */ bfd_arch_default_fill, /* Default fill. */
@ -53,7 +53,7 @@ const bfd_arch_info_type bfd_bpf_arch =
"bpf", /* Architecture name. */ "bpf", /* Architecture name. */
"bpf", /* Machine name. */ "bpf", /* Machine name. */
3, /* Section align power. */ 3, /* Section align power. */
TRUE, /* The default ? */ true, /* The default ? */
bfd_default_compatible, /* Architecture comparison fn. */ bfd_default_compatible, /* Architecture comparison fn. */
bfd_default_scan, /* String to architecture convert fn. */ bfd_default_scan, /* String to architecture convert fn. */
bfd_arch_default_fill, /* Default fill. */ bfd_arch_default_fill, /* Default fill. */

View File

@ -33,7 +33,7 @@ const bfd_arch_info_type bfd_cr16_arch =
"cr16", /* Arch name. */ "cr16", /* Arch name. */
"cr16", /* Printable name. */ "cr16", /* Printable name. */
1, /* Section alignment power. */ 1, /* Section alignment power. */
TRUE, /* The one and only. */ true, /* The one and only. */
bfd_default_compatible, bfd_default_compatible,
bfd_default_scan, bfd_default_scan,
bfd_arch_default_fill, bfd_arch_default_fill,

View File

@ -66,7 +66,7 @@ get_compatible (const bfd_arch_info_type *a,
} }
#define N(NUMBER, PRINT, NEXT) \ #define N(NUMBER, PRINT, NEXT) \
{ 32, 32, 8, bfd_arch_cris, NUMBER, "cris", PRINT, 1, FALSE, \ { 32, 32, 8, bfd_arch_cris, NUMBER, "cris", PRINT, 1, false, \
get_compatible, bfd_default_scan, bfd_arch_default_fill, NEXT, 0 } get_compatible, bfd_default_scan, bfd_arch_default_fill, NEXT, 0 }
static const bfd_arch_info_type bfd_cris_arch_compat_v10_v32 = static const bfd_arch_info_type bfd_cris_arch_compat_v10_v32 =
@ -90,7 +90,7 @@ const bfd_arch_info_type bfd_cris_arch =
"cris", /* The printable name is the same. */ "cris", /* The printable name is the same. */
1, /* Section alignment power; each section 1, /* Section alignment power; each section
is aligned to (only) 2^1 bytes. */ is aligned to (only) 2^1 bytes. */
TRUE, /* This is the default "machine". */ true, /* This is the default "machine". */
get_compatible, /* A function for testing get_compatible, /* A function for testing
"machine" compatibility of two "machine" compatibility of two
bfd_arch_info_type. */ bfd_arch_info_type. */

View File

@ -33,7 +33,7 @@ const bfd_arch_info_type bfd_crx_arch =
"crx", /* Arch name. */ "crx", /* Arch name. */
"crx", /* Printable name. */ "crx", /* Printable name. */
1, /* Section alignment power. */ 1, /* Section alignment power. */
TRUE, /* The one and only. */ true, /* The one and only. */
bfd_default_compatible, bfd_default_compatible,
bfd_default_scan, bfd_default_scan,
bfd_arch_default_fill, bfd_arch_default_fill,

View File

@ -44,18 +44,18 @@
static const bfd_arch_info_type arch_info_struct[] = static const bfd_arch_info_type arch_info_struct[] =
{ {
/* ABI v1 processors. */ /* ABI v1 processors. */
N (bfd_mach_ck510, "csky:ck510", FALSE, & arch_info_struct[1]), N (bfd_mach_ck510, "csky:ck510", false, & arch_info_struct[1]),
N (bfd_mach_ck610, "csky:ck610", FALSE, & arch_info_struct[2]), N (bfd_mach_ck610, "csky:ck610", false, & arch_info_struct[2]),
/* ABI v2 processors. */ /* ABI v2 processors. */
N (bfd_mach_ck801, "csky:ck801", FALSE, & arch_info_struct[3]), N (bfd_mach_ck801, "csky:ck801", false, & arch_info_struct[3]),
N (bfd_mach_ck802, "csky:ck802", FALSE, & arch_info_struct[4]), N (bfd_mach_ck802, "csky:ck802", false, & arch_info_struct[4]),
N (bfd_mach_ck803, "csky:ck803", FALSE, & arch_info_struct[5]), N (bfd_mach_ck803, "csky:ck803", false, & arch_info_struct[5]),
N (bfd_mach_ck807, "csky:ck807", FALSE, & arch_info_struct[6]), N (bfd_mach_ck807, "csky:ck807", false, & arch_info_struct[6]),
N (bfd_mach_ck810, "csky:ck810", FALSE, & arch_info_struct[7]), N (bfd_mach_ck810, "csky:ck810", false, & arch_info_struct[7]),
N (bfd_mach_ck860, "csky:ck860", FALSE, & arch_info_struct[8]), N (bfd_mach_ck860, "csky:ck860", false, & arch_info_struct[8]),
N (bfd_mach_ck_unknown, "csky:any", FALSE, NULL) N (bfd_mach_ck_unknown, "csky:any", false, NULL)
}; };
const bfd_arch_info_type bfd_csky_arch = const bfd_arch_info_type bfd_csky_arch =
N (0, "csky", TRUE, & arch_info_struct[0]); N (0, "csky", true, & arch_info_struct[0]);

View File

@ -42,10 +42,10 @@
} }
static const bfd_arch_info_type d10v_ts3_info = static const bfd_arch_info_type d10v_ts3_info =
N (bfd_mach_d10v_ts3, "d10v:ts3", FALSE, NULL); N (bfd_mach_d10v_ts3, "d10v:ts3", false, NULL);
static const bfd_arch_info_type d10v_ts2_info = static const bfd_arch_info_type d10v_ts2_info =
N (bfd_mach_d10v_ts2, "d10v:ts2", FALSE, & d10v_ts3_info); N (bfd_mach_d10v_ts2, "d10v:ts2", false, & d10v_ts3_info);
const bfd_arch_info_type bfd_d10v_arch = const bfd_arch_info_type bfd_d10v_arch =
N (bfd_mach_d10v, "d10v", TRUE, & d10v_ts2_info); N (bfd_mach_d10v, "d10v", true, & d10v_ts2_info);

View File

@ -33,7 +33,7 @@ const bfd_arch_info_type bfd_d30v_arch =
"d30v", "d30v",
"d30v", "d30v",
4, /* Section alignment power. */ 4, /* Section alignment power. */
TRUE, true,
bfd_default_compatible, bfd_default_compatible,
bfd_default_scan, bfd_default_scan,
bfd_arch_default_fill, bfd_arch_default_fill,

View File

@ -33,7 +33,7 @@ const bfd_arch_info_type bfd_dlx_arch =
"dlx", "dlx",
"dlx", "dlx",
4, 4,
TRUE, /* The one and only. */ true, /* The one and only. */
bfd_default_compatible, bfd_default_compatible,
bfd_default_scan, bfd_default_scan,
bfd_arch_default_fill, bfd_arch_default_fill,

View File

@ -42,8 +42,7 @@
} }
const bfd_arch_info_type bfd_epiphany16_arch = const bfd_arch_info_type bfd_epiphany16_arch =
N (bfd_mach_epiphany16, "epiphany16", 1, FALSE, NULL); N (bfd_mach_epiphany16, "epiphany16", 1, false, NULL);
const bfd_arch_info_type bfd_epiphany_arch = const bfd_arch_info_type bfd_epiphany_arch =
N (bfd_mach_epiphany32, "epiphany32", 2, TRUE, & bfd_epiphany16_arch); N (bfd_mach_epiphany32, "epiphany32", 2, true, &bfd_epiphany16_arch);

View File

@ -32,7 +32,7 @@ const bfd_arch_info_type bfd_fr30_arch =
"fr30", /* Architecture name. */ "fr30", /* Architecture name. */
"fr30", /* Printable name. */ "fr30", /* Printable name. */
4, /* Section align power. */ 4, /* Section align power. */
TRUE, /* The default ? */ true, /* The default ? */
bfd_default_compatible, /* Architecture comparison fn. */ bfd_default_compatible, /* Architecture comparison fn. */
bfd_default_scan, /* String to architecture convert fn. */ bfd_default_scan, /* String to architecture convert fn. */
bfd_arch_default_fill, /* Default fill. */ bfd_arch_default_fill, /* Default fill. */

View File

@ -41,26 +41,26 @@
} }
static const bfd_arch_info_type arch_info_300 static const bfd_arch_info_type arch_info_300
= FRV_ARCH (bfd_mach_fr300, "fr300", FALSE, (bfd_arch_info_type *)0); = FRV_ARCH (bfd_mach_fr300, "fr300", false, (bfd_arch_info_type *)0);
static const bfd_arch_info_type arch_info_400 static const bfd_arch_info_type arch_info_400
= FRV_ARCH (bfd_mach_fr400, "fr400", FALSE, &arch_info_300); = FRV_ARCH (bfd_mach_fr400, "fr400", false, &arch_info_300);
static const bfd_arch_info_type arch_info_450 static const bfd_arch_info_type arch_info_450
= FRV_ARCH (bfd_mach_fr450, "fr450", FALSE, &arch_info_400); = FRV_ARCH (bfd_mach_fr450, "fr450", false, &arch_info_400);
static const bfd_arch_info_type arch_info_500 static const bfd_arch_info_type arch_info_500
= FRV_ARCH (bfd_mach_fr500, "fr500", FALSE, &arch_info_450); = FRV_ARCH (bfd_mach_fr500, "fr500", false, &arch_info_450);
static const bfd_arch_info_type arch_info_550 static const bfd_arch_info_type arch_info_550
= FRV_ARCH (bfd_mach_fr550, "fr550", FALSE, &arch_info_500); = FRV_ARCH (bfd_mach_fr550, "fr550", false, &arch_info_500);
static const bfd_arch_info_type arch_info_simple static const bfd_arch_info_type arch_info_simple
= FRV_ARCH (bfd_mach_frvsimple, "simple", FALSE, &arch_info_550); = FRV_ARCH (bfd_mach_frvsimple, "simple", false, &arch_info_550);
static const bfd_arch_info_type arch_info_tomcat static const bfd_arch_info_type arch_info_tomcat
= FRV_ARCH (bfd_mach_frvtomcat, "tomcat", FALSE, &arch_info_simple); = FRV_ARCH (bfd_mach_frvtomcat, "tomcat", false, &arch_info_simple);
const bfd_arch_info_type bfd_frv_arch const bfd_arch_info_type bfd_frv_arch
= FRV_ARCH (bfd_mach_frv, "frv", TRUE, &arch_info_tomcat); = FRV_ARCH (bfd_mach_frv, "frv", true, &arch_info_tomcat);

View File

@ -43,10 +43,10 @@
static const bfd_arch_info_type arch_info_struct[] = static const bfd_arch_info_type arch_info_struct[] =
{ {
N (bfd_mach_ft32, "ft32", FALSE, &arch_info_struct[1]), N (bfd_mach_ft32, "ft32", false, &arch_info_struct[1]),
N (bfd_mach_ft32b, "ft32b", FALSE, NULL) N (bfd_mach_ft32b, "ft32b", false, NULL)
}; };
const bfd_arch_info_type bfd_ft32_arch = const bfd_arch_info_type bfd_ft32_arch =
N (bfd_mach_ft32, "ft32", TRUE, arch_info_struct); N (bfd_mach_ft32, "ft32", true, arch_info_struct);

View File

@ -24,28 +24,28 @@
#include "libbfd.h" #include "libbfd.h"
#include "cpu-h8300.h" #include "cpu-h8300.h"
static bfd_boolean static bool
h8300_scan (const struct bfd_arch_info *info, const char *string) h8300_scan (const struct bfd_arch_info *info, const char *string)
{ {
if (*string != 'h' && *string != 'H') if (*string != 'h' && *string != 'H')
return FALSE; return false;
string++; string++;
if (*string != '8') if (*string != '8')
return FALSE; return false;
string++; string++;
if (*string == '/') if (*string == '/')
string++; string++;
if (*string != '3') if (*string != '3')
return FALSE; return false;
string++; string++;
if (*string != '0') if (*string != '0')
return FALSE; return false;
string++; string++;
if (*string != '0') if (*string != '0')
return FALSE; return false;
string++; string++;
if (*string == '-') if (*string == '-')
string++; string++;
@ -119,25 +119,25 @@ compatible (const bfd_arch_info_type *in, const bfd_arch_info_type *out)
compatible, h8300_scan, bfd_arch_default_fill, next, 0 } compatible, h8300_scan, bfd_arch_default_fill, next, 0 }
static const bfd_arch_info_type h8300sxn_info_struct = static const bfd_arch_info_type h8300sxn_info_struct =
N (32, 16, bfd_mach_h8300sxn, "h8300sxn", "h8300sxn", FALSE, NULL); N (32, 16, bfd_mach_h8300sxn, "h8300sxn", "h8300sxn", false, NULL);
static const bfd_arch_info_type h8300sx_info_struct = static const bfd_arch_info_type h8300sx_info_struct =
N (32, 32, bfd_mach_h8300sx, "h8300sx", "h8300sx", FALSE, &h8300sxn_info_struct); N (32, 32, bfd_mach_h8300sx, "h8300sx", "h8300sx", false, &h8300sxn_info_struct);
static const bfd_arch_info_type h8300sn_info_struct = static const bfd_arch_info_type h8300sn_info_struct =
N (32, 16, bfd_mach_h8300sn, "h8300sn", "h8300sn", FALSE, &h8300sx_info_struct); N (32, 16, bfd_mach_h8300sn, "h8300sn", "h8300sn", false, &h8300sx_info_struct);
static const bfd_arch_info_type h8300hn_info_struct = static const bfd_arch_info_type h8300hn_info_struct =
N (32, 16, bfd_mach_h8300hn, "h8300hn", "h8300hn", FALSE, &h8300sn_info_struct); N (32, 16, bfd_mach_h8300hn, "h8300hn", "h8300hn", false, &h8300sn_info_struct);
static const bfd_arch_info_type h8300s_info_struct = static const bfd_arch_info_type h8300s_info_struct =
N (32, 32, bfd_mach_h8300s, "h8300s", "h8300s", FALSE, & h8300hn_info_struct); N (32, 32, bfd_mach_h8300s, "h8300s", "h8300s", false, & h8300hn_info_struct);
static const bfd_arch_info_type h8300h_info_struct = static const bfd_arch_info_type h8300h_info_struct =
N (32, 32, bfd_mach_h8300h, "h8300h", "h8300h", FALSE, &h8300s_info_struct); N (32, 32, bfd_mach_h8300h, "h8300h", "h8300h", false, &h8300s_info_struct);
const bfd_arch_info_type bfd_h8300_arch = const bfd_arch_info_type bfd_h8300_arch =
N (16, 16, bfd_mach_h8300, "h8300", "h8300", TRUE, &h8300h_info_struct); N (16, 16, bfd_mach_h8300, "h8300", "h8300", true, &h8300h_info_struct);
/* Pad the given address to 32 bits, converting 16-bit and 24-bit /* Pad the given address to 32 bits, converting 16-bit and 24-bit
addresses into the values they would have had on a h8s target. */ addresses into the values they would have had on a h8s target. */

View File

@ -42,15 +42,15 @@
static const bfd_arch_info_type bfd_hppa10_arch = static const bfd_arch_info_type bfd_hppa10_arch =
N (32, bfd_mach_hppa10, "hppa1.0", TRUE, NULL); N (32, bfd_mach_hppa10, "hppa1.0", true, NULL);
/* PA2.0 in narrow mode. */ /* PA2.0 in narrow mode. */
static const bfd_arch_info_type bfd_hppa20_arch = static const bfd_arch_info_type bfd_hppa20_arch =
N (32, bfd_mach_hppa20, "hppa2.0", FALSE, &bfd_hppa10_arch); N (32, bfd_mach_hppa20, "hppa2.0", false, &bfd_hppa10_arch);
/* PA2.0 in wide mode. */ /* PA2.0 in wide mode. */
static const bfd_arch_info_type bfd_hppa20w_arch = static const bfd_arch_info_type bfd_hppa20w_arch =
N (64, bfd_mach_hppa20w, "hppa2.0w", FALSE, &bfd_hppa20_arch); N (64, bfd_mach_hppa20w, "hppa2.0w", false, &bfd_hppa20_arch);
const bfd_arch_info_type bfd_hppa_arch = const bfd_arch_info_type bfd_hppa_arch =
N (32, bfd_mach_hppa11, "hppa1.1", FALSE, &bfd_hppa20w_arch); N (32, bfd_mach_hppa11, "hppa1.1", false, &bfd_hppa20w_arch);

View File

@ -23,8 +23,8 @@
#include "libbfd.h" #include "libbfd.h"
#include "libiberty.h" #include "libiberty.h"
extern void * bfd_arch_i386_short_nop_fill (bfd_size_type, bfd_boolean, extern void * bfd_arch_i386_short_nop_fill (bfd_size_type, bool,
bfd_boolean); bool);
static const bfd_arch_info_type * static const bfd_arch_info_type *
bfd_i386_compatible (const bfd_arch_info_type *a, bfd_i386_compatible (const bfd_arch_info_type *a,
@ -44,8 +44,8 @@ bfd_i386_compatible (const bfd_arch_info_type *a,
multi byte nop instructions if LONG_NOP is TRUE. */ multi byte nop instructions if LONG_NOP is TRUE. */
static void * static void *
bfd_arch_i386_fill (bfd_size_type count, bfd_boolean code, bfd_arch_i386_fill (bfd_size_type count, bool code,
bfd_boolean long_nop) bool long_nop)
{ {
/* nop */ /* nop */
static const char nop_1[] = { 0x90 }; static const char nop_1[] = { 0x90 };
@ -97,24 +97,24 @@ bfd_arch_i386_fill (bfd_size_type count, bfd_boolean code,
return fill; return fill;
} }
/* Fill the buffer with zero or short nop instruction if CODE is TRUE. */ /* Fill the buffer with zero or short nop instruction if CODE is true. */
void * void *
bfd_arch_i386_short_nop_fill (bfd_size_type count, bfd_arch_i386_short_nop_fill (bfd_size_type count,
bfd_boolean is_bigendian ATTRIBUTE_UNUSED, bool is_bigendian ATTRIBUTE_UNUSED,
bfd_boolean code) bool code)
{ {
return bfd_arch_i386_fill (count, code, FALSE); return bfd_arch_i386_fill (count, code, false);
} }
/* Fill the buffer with zero or long nop instruction if CODE is TRUE. */ /* Fill the buffer with zero or long nop instruction if CODE is TRUE. */
static void * static void *
bfd_arch_i386_long_nop_fill (bfd_size_type count, bfd_arch_i386_long_nop_fill (bfd_size_type count,
bfd_boolean is_bigendian ATTRIBUTE_UNUSED, bool is_bigendian ATTRIBUTE_UNUSED,
bfd_boolean code) bool code)
{ {
return bfd_arch_i386_fill (count, code, TRUE); return bfd_arch_i386_fill (count, code, true);
} }
#define N(BITS, MACH, NAME, PRINT, DEF, FILL, NEXT) \ #define N(BITS, MACH, NAME, PRINT, DEF, FILL, NEXT) \
@ -137,29 +137,29 @@ bfd_arch_i386_long_nop_fill (bfd_size_type count,
static const bfd_arch_info_type bfd_x64_32_arch_intel_syntax = static const bfd_arch_info_type bfd_x64_32_arch_intel_syntax =
N (64, bfd_mach_x64_32_intel_syntax, "i386:intel", "i386:x64-32:intel", N (64, bfd_mach_x64_32_intel_syntax, "i386:intel", "i386:x64-32:intel",
FALSE, bfd_arch_i386_long_nop_fill, NULL); false, bfd_arch_i386_long_nop_fill, NULL);
static const bfd_arch_info_type bfd_x86_64_arch_intel_syntax = static const bfd_arch_info_type bfd_x86_64_arch_intel_syntax =
N (64, bfd_mach_x86_64_intel_syntax, "i386:intel", "i386:x86-64:intel", N (64, bfd_mach_x86_64_intel_syntax, "i386:intel", "i386:x86-64:intel",
FALSE, bfd_arch_i386_long_nop_fill, &bfd_x64_32_arch_intel_syntax); false, bfd_arch_i386_long_nop_fill, &bfd_x64_32_arch_intel_syntax);
static const bfd_arch_info_type bfd_i386_arch_intel_syntax = static const bfd_arch_info_type bfd_i386_arch_intel_syntax =
N (32, bfd_mach_i386_i386_intel_syntax, "i386:intel", "i386:intel", N (32, bfd_mach_i386_i386_intel_syntax, "i386:intel", "i386:intel",
TRUE, bfd_arch_i386_short_nop_fill, &bfd_x86_64_arch_intel_syntax); true, bfd_arch_i386_short_nop_fill, &bfd_x86_64_arch_intel_syntax);
static const bfd_arch_info_type i8086_arch = static const bfd_arch_info_type i8086_arch =
N (32, bfd_mach_i386_i8086, "i8086", "i8086", N (32, bfd_mach_i386_i8086, "i8086", "i8086",
FALSE, bfd_arch_i386_short_nop_fill, &bfd_i386_arch_intel_syntax); false, bfd_arch_i386_short_nop_fill, &bfd_i386_arch_intel_syntax);
static const bfd_arch_info_type bfd_x64_32_arch = static const bfd_arch_info_type bfd_x64_32_arch =
N (64, bfd_mach_x64_32, "i386", "i386:x64-32", N (64, bfd_mach_x64_32, "i386", "i386:x64-32",
FALSE, bfd_arch_i386_long_nop_fill, &i8086_arch); false, bfd_arch_i386_long_nop_fill, &i8086_arch);
static const bfd_arch_info_type bfd_x86_64_arch = static const bfd_arch_info_type bfd_x86_64_arch =
N (64, bfd_mach_x86_64, "i386", "i386:x86-64", N (64, bfd_mach_x86_64, "i386", "i386:x86-64",
FALSE, bfd_arch_i386_long_nop_fill, &bfd_x64_32_arch); false, bfd_arch_i386_long_nop_fill, &bfd_x64_32_arch);
const bfd_arch_info_type bfd_i386_arch = const bfd_arch_info_type bfd_i386_arch =
N (32, bfd_mach_i386_i386, "i386", "i386", N (32, bfd_mach_i386_i386, "i386", "i386",
TRUE, bfd_arch_i386_short_nop_fill, &bfd_x86_64_arch); true, bfd_arch_i386_short_nop_fill, &bfd_x86_64_arch);

View File

@ -42,9 +42,9 @@
} }
const bfd_arch_info_type bfd_ia64_elf32_arch = const bfd_arch_info_type bfd_ia64_elf32_arch =
N (32, bfd_mach_ia64_elf32, "ia64-elf32", FALSE, NULL); N (32, bfd_mach_ia64_elf32, "ia64-elf32", false, NULL);
const bfd_arch_info_type bfd_ia64_arch = const bfd_arch_info_type bfd_ia64_arch =
N (64, bfd_mach_ia64_elf64, "ia64-elf64", TRUE, &bfd_ia64_elf32_arch); N (64, bfd_mach_ia64_elf64, "ia64-elf64", true, &bfd_ia64_elf32_arch);
#include "cpu-ia64-opc.c" #include "cpu-ia64-opc.c"

View File

@ -22,11 +22,10 @@
#include "bfd.h" #include "bfd.h"
#include "libbfd.h" #include "libbfd.h"
extern void * bfd_arch_i386_short_nop_fill (bfd_size_type, bfd_boolean, extern void *bfd_arch_i386_short_nop_fill (bfd_size_type, bool, bool);
bfd_boolean);
#define N(number, name, print, next) \ #define N(number, name, print, next) \
{ 32, 32, 8, bfd_arch_iamcu, number, name, print, 3, TRUE, \ { 32, 32, 8, bfd_arch_iamcu, number, name, print, 3, true, \
bfd_default_compatible, bfd_default_scan, \ bfd_default_compatible, bfd_default_scan, \
bfd_arch_i386_short_nop_fill, next, 0 } bfd_arch_i386_short_nop_fill, next, 0 }

View File

@ -41,8 +41,8 @@
} }
const bfd_arch_info_type bfd_ip2k_nonext_arch = const bfd_arch_info_type bfd_ip2k_nonext_arch =
N (bfd_mach_ip2022, "ip2022", FALSE, NULL); N (bfd_mach_ip2022, "ip2022", false, NULL);
const bfd_arch_info_type bfd_ip2k_arch = const bfd_arch_info_type bfd_ip2k_arch =
N (bfd_mach_ip2022ext, "ip2022ext", TRUE, & bfd_ip2k_nonext_arch); N (bfd_mach_ip2022ext, "ip2022ext", true, & bfd_ip2k_nonext_arch);

View File

@ -41,8 +41,8 @@
} }
static const bfd_arch_info_type arch_info_struct = static const bfd_arch_info_type arch_info_struct =
N (bfd_mach_iq10, "iq10", FALSE, NULL); N (bfd_mach_iq10, "iq10", false, NULL);
const bfd_arch_info_type bfd_iq2000_arch = const bfd_arch_info_type bfd_iq2000_arch =
N (bfd_mach_iq2000, "iq2000", TRUE, &arch_info_struct); N (bfd_mach_iq2000, "iq2000", true, &arch_info_struct);

View File

@ -22,11 +22,10 @@
#include "bfd.h" #include "bfd.h"
#include "libbfd.h" #include "libbfd.h"
extern void * bfd_arch_i386_short_nop_fill (bfd_size_type, bfd_boolean, extern void *bfd_arch_i386_short_nop_fill (bfd_size_type, bool, bool);
bfd_boolean);
#define N(number, name, print, next) \ #define N(number, name, print, next) \
{ 64, 64, 8, bfd_arch_k1om, number, name, print, 3, TRUE, \ { 64, 64, 8, bfd_arch_k1om, number, name, print, 3, true, \
bfd_default_compatible, bfd_default_scan, \ bfd_default_compatible, bfd_default_scan, \
bfd_arch_i386_short_nop_fill, next, 9 } bfd_arch_i386_short_nop_fill, next, 9 }

View File

@ -22,11 +22,10 @@
#include "bfd.h" #include "bfd.h"
#include "libbfd.h" #include "libbfd.h"
extern void * bfd_arch_i386_short_nop_fill (bfd_size_type, bfd_boolean, extern void *bfd_arch_i386_short_nop_fill (bfd_size_type, bool, bool);
bfd_boolean);
#define N(number, name, print, next) \ #define N(number, name, print, next) \
{ 64, 64, 8, bfd_arch_l1om, number, name, print, 3, TRUE, \ { 64, 64, 8, bfd_arch_l1om, number, name, print, 3, true, \
bfd_default_compatible, bfd_default_scan, \ bfd_default_compatible, bfd_default_scan, \
bfd_arch_i386_short_nop_fill, next, 0 } bfd_arch_i386_short_nop_fill, next, 0 }

View File

@ -33,7 +33,7 @@ const bfd_arch_info_type bfd_lm32_arch =
"lm32", /* Architecture name. */ "lm32", /* Architecture name. */
"lm32", /* Printable name. */ "lm32", /* Printable name. */
4, /* Alignment. */ 4, /* Alignment. */
TRUE, /* Is this the default machine for the target. */ true, /* Is this the default machine for the target. */
bfd_default_compatible, /* Function callback to test if two files have compatible machines. */ bfd_default_compatible, /* Function callback to test if two files have compatible machines. */
bfd_default_scan, bfd_default_scan,
bfd_arch_default_fill, bfd_arch_default_fill,

View File

@ -32,7 +32,7 @@ const bfd_arch_info_type bfd_mn10200_arch =
"mn10200", "mn10200",
"mn10200", "mn10200",
2, 2,
TRUE, /* The one and only. */ true, /* The one and only. */
bfd_default_compatible, bfd_default_compatible,
bfd_default_scan, bfd_default_scan,
bfd_arch_default_fill, bfd_arch_default_fill,

View File

@ -41,10 +41,10 @@
} }
const bfd_arch_info_type bfd_am33_2_arch = const bfd_arch_info_type bfd_am33_2_arch =
N (bfd_mach_am33_2, "am33_2", "am33-2", FALSE, NULL); N (bfd_mach_am33_2, "am33_2", "am33-2", false, NULL);
const bfd_arch_info_type bfd_am33_arch = const bfd_arch_info_type bfd_am33_arch =
N (bfd_mach_am33, "am33", "am33", FALSE, &bfd_am33_2_arch); N (bfd_mach_am33, "am33", "am33", false, &bfd_am33_2_arch);
const bfd_arch_info_type bfd_mn10300_arch = const bfd_arch_info_type bfd_mn10300_arch =
N (bfd_mach_mn10300, "mn10300", "mn10300", TRUE, &bfd_am33_arch); N (bfd_mach_mn10300, "mn10300", "mn10300", true, &bfd_am33_arch);

View File

@ -25,12 +25,12 @@
/* Like bfd_default_scan but if the string is just "m32c" then /* Like bfd_default_scan but if the string is just "m32c" then
skip the m16c architecture. */ skip the m16c architecture. */
static bfd_boolean static bool
m32c_scan (const bfd_arch_info_type * info, const char * string) m32c_scan (const bfd_arch_info_type * info, const char * string)
{ {
if (strcmp (string, "m32c") == 0 if (strcmp (string, "m32c") == 0
&& info->mach == bfd_mach_m16c) && info->mach == bfd_mach_m16c)
return FALSE; return false;
return bfd_default_scan (info, string); return bfd_default_scan (info, string);
} }
@ -40,8 +40,8 @@ m32c_scan (const bfd_arch_info_type * info, const char * string)
bfd_default_compatible, m32c_scan, bfd_arch_default_fill, next, 0 } bfd_default_compatible, m32c_scan, bfd_arch_default_fill, next, 0 }
static const bfd_arch_info_type arch_info_struct = static const bfd_arch_info_type arch_info_struct =
N (bfd_mach_m32c, "m32c", 3, FALSE, NULL); N (bfd_mach_m32c, "m32c", 3, false, NULL);
const bfd_arch_info_type bfd_m32c_arch = const bfd_arch_info_type bfd_m32c_arch =
N (bfd_mach_m16c, "m16c", 4, TRUE, &arch_info_struct); N (bfd_mach_m16c, "m16c", 4, true, &arch_info_struct);

View File

@ -31,9 +31,9 @@
static const bfd_arch_info_type arch_info_struct[] = static const bfd_arch_info_type arch_info_struct[] =
{ {
N (bfd_mach_m32rx, "m32rx", FALSE, M32R2_NEXT) , N (bfd_mach_m32rx, "m32rx", false, M32R2_NEXT) ,
N (bfd_mach_m32r2, "m32r2", FALSE, NULL) N (bfd_mach_m32r2, "m32r2", false, NULL)
}; };
const bfd_arch_info_type bfd_m32r_arch = const bfd_arch_info_type bfd_m32r_arch =
N (bfd_mach_m32r, "m32r", TRUE, NEXT); N (bfd_mach_m32r, "m32r", true, NEXT);

View File

@ -32,7 +32,7 @@ const bfd_arch_info_type bfd_m68hc11_arch =
"m68hc11", "m68hc11",
"m68hc11", "m68hc11",
4, /* Section alignment power. */ 4, /* Section alignment power. */
TRUE, true,
bfd_default_compatible, bfd_default_compatible,
bfd_default_scan, bfd_default_scan,
bfd_arch_default_fill, bfd_arch_default_fill,

View File

@ -41,8 +41,8 @@
} }
const bfd_arch_info_type bfd_m68hc12s_arch = const bfd_arch_info_type bfd_m68hc12s_arch =
N (bfd_mach_m6812s, "m68hc12:HCS12", FALSE, NULL); N (bfd_mach_m6812s, "m68hc12:HCS12", false, NULL);
const bfd_arch_info_type bfd_m68hc12_arch = const bfd_arch_info_type bfd_m68hc12_arch =
N (bfd_mach_m6812_default, "m68hc12", TRUE, &bfd_m68hc12s_arch); N (bfd_mach_m6812_default, "m68hc12", true, &bfd_m68hc12s_arch);

View File

@ -35,79 +35,79 @@ bfd_m68k_compatible (const bfd_arch_info_type *a,
static const bfd_arch_info_type arch_info_struct[] = static const bfd_arch_info_type arch_info_struct[] =
{ {
N(bfd_mach_m68000, "m68k:68000", FALSE, &arch_info_struct[1]), N(bfd_mach_m68000, "m68k:68000", false, &arch_info_struct[1]),
N(bfd_mach_m68008, "m68k:68008", FALSE, &arch_info_struct[2]), N(bfd_mach_m68008, "m68k:68008", false, &arch_info_struct[2]),
N(bfd_mach_m68010, "m68k:68010", FALSE, &arch_info_struct[3]), N(bfd_mach_m68010, "m68k:68010", false, &arch_info_struct[3]),
N(bfd_mach_m68020, "m68k:68020", FALSE, &arch_info_struct[4]), N(bfd_mach_m68020, "m68k:68020", false, &arch_info_struct[4]),
N(bfd_mach_m68030, "m68k:68030", FALSE, &arch_info_struct[5]), N(bfd_mach_m68030, "m68k:68030", false, &arch_info_struct[5]),
N(bfd_mach_m68040, "m68k:68040", FALSE, &arch_info_struct[6]), N(bfd_mach_m68040, "m68k:68040", false, &arch_info_struct[6]),
N(bfd_mach_m68060, "m68k:68060", FALSE, &arch_info_struct[7]), N(bfd_mach_m68060, "m68k:68060", false, &arch_info_struct[7]),
N(bfd_mach_cpu32, "m68k:cpu32", FALSE, &arch_info_struct[8]), N(bfd_mach_cpu32, "m68k:cpu32", false, &arch_info_struct[8]),
N(bfd_mach_fido, "m68k:fido", FALSE, &arch_info_struct[9]), N(bfd_mach_fido, "m68k:fido", false, &arch_info_struct[9]),
/* Various combinations of CF architecture features */ /* Various combinations of CF architecture features */
N(bfd_mach_mcf_isa_a_nodiv, "m68k:isa-a:nodiv", N(bfd_mach_mcf_isa_a_nodiv, "m68k:isa-a:nodiv",
FALSE, &arch_info_struct[10]), false, &arch_info_struct[10]),
N(bfd_mach_mcf_isa_a, "m68k:isa-a", N(bfd_mach_mcf_isa_a, "m68k:isa-a",
FALSE, &arch_info_struct[11]), false, &arch_info_struct[11]),
N(bfd_mach_mcf_isa_a_mac, "m68k:isa-a:mac", N(bfd_mach_mcf_isa_a_mac, "m68k:isa-a:mac",
FALSE, &arch_info_struct[12]), false, &arch_info_struct[12]),
N(bfd_mach_mcf_isa_a_emac, "m68k:isa-a:emac", N(bfd_mach_mcf_isa_a_emac, "m68k:isa-a:emac",
FALSE, &arch_info_struct[13]), false, &arch_info_struct[13]),
N(bfd_mach_mcf_isa_aplus, "m68k:isa-aplus", N(bfd_mach_mcf_isa_aplus, "m68k:isa-aplus",
FALSE, &arch_info_struct[14]), false, &arch_info_struct[14]),
N(bfd_mach_mcf_isa_aplus_mac, "m68k:isa-aplus:mac", N(bfd_mach_mcf_isa_aplus_mac, "m68k:isa-aplus:mac",
FALSE, &arch_info_struct[15]), false, &arch_info_struct[15]),
N(bfd_mach_mcf_isa_aplus_emac, "m68k:isa-aplus:emac", N(bfd_mach_mcf_isa_aplus_emac, "m68k:isa-aplus:emac",
FALSE, &arch_info_struct[16]), false, &arch_info_struct[16]),
N(bfd_mach_mcf_isa_b_nousp, "m68k:isa-b:nousp", N(bfd_mach_mcf_isa_b_nousp, "m68k:isa-b:nousp",
FALSE, &arch_info_struct[17]), false, &arch_info_struct[17]),
N(bfd_mach_mcf_isa_b_nousp_mac, "m68k:isa-b:nousp:mac", N(bfd_mach_mcf_isa_b_nousp_mac, "m68k:isa-b:nousp:mac",
FALSE, &arch_info_struct[18]), false, &arch_info_struct[18]),
N(bfd_mach_mcf_isa_b_nousp_emac, "m68k:isa-b:nousp:emac", N(bfd_mach_mcf_isa_b_nousp_emac, "m68k:isa-b:nousp:emac",
FALSE, &arch_info_struct[19]), false, &arch_info_struct[19]),
N(bfd_mach_mcf_isa_b, "m68k:isa-b", N(bfd_mach_mcf_isa_b, "m68k:isa-b",
FALSE, &arch_info_struct[20]), false, &arch_info_struct[20]),
N(bfd_mach_mcf_isa_b_mac, "m68k:isa-b:mac", N(bfd_mach_mcf_isa_b_mac, "m68k:isa-b:mac",
FALSE, &arch_info_struct[21]), false, &arch_info_struct[21]),
N(bfd_mach_mcf_isa_b_emac, "m68k:isa-b:emac", N(bfd_mach_mcf_isa_b_emac, "m68k:isa-b:emac",
FALSE, &arch_info_struct[22]), false, &arch_info_struct[22]),
N(bfd_mach_mcf_isa_b_float, "m68k:isa-b:float", N(bfd_mach_mcf_isa_b_float, "m68k:isa-b:float",
FALSE, &arch_info_struct[23]), false, &arch_info_struct[23]),
N(bfd_mach_mcf_isa_b_float_mac, "m68k:isa-b:float:mac", N(bfd_mach_mcf_isa_b_float_mac, "m68k:isa-b:float:mac",
FALSE, &arch_info_struct[24]), false, &arch_info_struct[24]),
N(bfd_mach_mcf_isa_b_float_emac, "m68k:isa-b:float:emac", N(bfd_mach_mcf_isa_b_float_emac, "m68k:isa-b:float:emac",
FALSE, &arch_info_struct[25]), false, &arch_info_struct[25]),
N(bfd_mach_mcf_isa_c, "m68k:isa-c", N(bfd_mach_mcf_isa_c, "m68k:isa-c",
FALSE, &arch_info_struct[26]), false, &arch_info_struct[26]),
N(bfd_mach_mcf_isa_c_mac, "m68k:isa-c:mac", N(bfd_mach_mcf_isa_c_mac, "m68k:isa-c:mac",
FALSE, &arch_info_struct[27]), false, &arch_info_struct[27]),
N(bfd_mach_mcf_isa_c_emac, "m68k:isa-c:emac", N(bfd_mach_mcf_isa_c_emac, "m68k:isa-c:emac",
FALSE, &arch_info_struct[28]), false, &arch_info_struct[28]),
N(bfd_mach_mcf_isa_c_nodiv, "m68k:isa-c:nodiv", N(bfd_mach_mcf_isa_c_nodiv, "m68k:isa-c:nodiv",
FALSE, &arch_info_struct[29]), false, &arch_info_struct[29]),
N(bfd_mach_mcf_isa_c_nodiv_mac, "m68k:isa-c:nodiv:mac", N(bfd_mach_mcf_isa_c_nodiv_mac, "m68k:isa-c:nodiv:mac",
FALSE, &arch_info_struct[30]), false, &arch_info_struct[30]),
N(bfd_mach_mcf_isa_c_nodiv_emac, "m68k:isa-c:nodiv:emac", N(bfd_mach_mcf_isa_c_nodiv_emac, "m68k:isa-c:nodiv:emac",
FALSE, &arch_info_struct[31]), false, &arch_info_struct[31]),
/* Legacy names for CF architectures */ /* Legacy names for CF architectures */
N(bfd_mach_mcf_isa_a_nodiv, "m68k:5200", FALSE, &arch_info_struct[32]), N(bfd_mach_mcf_isa_a_nodiv, "m68k:5200", false, &arch_info_struct[32]),
N(bfd_mach_mcf_isa_a_mac,"m68k:5206e", FALSE, &arch_info_struct[33]), N(bfd_mach_mcf_isa_a_mac,"m68k:5206e", false, &arch_info_struct[33]),
N(bfd_mach_mcf_isa_a_mac, "m68k:5307", FALSE, &arch_info_struct[34]), N(bfd_mach_mcf_isa_a_mac, "m68k:5307", false, &arch_info_struct[34]),
N(bfd_mach_mcf_isa_b_nousp_mac, "m68k:5407", FALSE, &arch_info_struct[35]), N(bfd_mach_mcf_isa_b_nousp_mac, "m68k:5407", false, &arch_info_struct[35]),
N(bfd_mach_mcf_isa_aplus_emac, "m68k:528x", FALSE, &arch_info_struct[36]), N(bfd_mach_mcf_isa_aplus_emac, "m68k:528x", false, &arch_info_struct[36]),
N(bfd_mach_mcf_isa_aplus_emac, "m68k:521x", FALSE, &arch_info_struct[37]), N(bfd_mach_mcf_isa_aplus_emac, "m68k:521x", false, &arch_info_struct[37]),
N(bfd_mach_mcf_isa_a_emac, "m68k:5249", FALSE, &arch_info_struct[38]), N(bfd_mach_mcf_isa_a_emac, "m68k:5249", false, &arch_info_struct[38]),
N(bfd_mach_mcf_isa_b_float_emac, "m68k:547x", N(bfd_mach_mcf_isa_b_float_emac, "m68k:547x",
FALSE, &arch_info_struct[39]), false, &arch_info_struct[39]),
N(bfd_mach_mcf_isa_b_float_emac, "m68k:548x", N(bfd_mach_mcf_isa_b_float_emac, "m68k:548x",
FALSE, &arch_info_struct[40]), false, &arch_info_struct[40]),
N(bfd_mach_mcf_isa_b_float_emac, "m68k:cfv4e", FALSE, 0), N(bfd_mach_mcf_isa_b_float_emac, "m68k:cfv4e", false, 0),
}; };
const bfd_arch_info_type bfd_m68k_arch = const bfd_arch_info_type bfd_m68k_arch =
N(0, "m68k", TRUE, &arch_info_struct[0]); N(0, "m68k", true, &arch_info_struct[0]);
/* Table indexed by bfd_mach_arch number indicating which /* Table indexed by bfd_mach_arch number indicating which
architectural features are supported. */ architectural features are supported. */

View File

@ -32,7 +32,7 @@ const bfd_arch_info_type bfd_m9s12x_arch =
"m9s12x", "m9s12x",
"m9s12x", "m9s12x",
4, /* Section alignment power. */ 4, /* Section alignment power. */
TRUE, true,
bfd_default_compatible, bfd_default_compatible,
bfd_default_scan, bfd_default_scan,
bfd_arch_default_fill, bfd_arch_default_fill,

View File

@ -32,7 +32,7 @@ const bfd_arch_info_type bfd_m9s12xg_arch =
"m9s12xg", "m9s12xg",
"m9s12xg", "m9s12xg",
4, /* Section alignment power. */ 4, /* Section alignment power. */
TRUE, true,
bfd_default_compatible, bfd_default_compatible,
bfd_default_scan, bfd_default_scan,
bfd_arch_default_fill, bfd_arch_default_fill,

View File

@ -32,7 +32,7 @@ const bfd_arch_info_type bfd_mcore_arch =
"MCore", /* Architecture name. */ "MCore", /* Architecture name. */
"MCore", /* Machine name. */ "MCore", /* Machine name. */
3, /* Section align power. */ 3, /* Section align power. */
TRUE, /* Is this the default architecture ? */ true, /* Is this the default architecture ? */
bfd_default_compatible, /* Architecture comparison function. */ bfd_default_compatible, /* Architecture comparison function. */
bfd_default_scan, /* String to architecture conversion. */ bfd_default_scan, /* String to architecture conversion. */
bfd_arch_default_fill, /* Default fill. */ bfd_arch_default_fill, /* Default fill. */

View File

@ -25,6 +25,6 @@
2, def, bfd_default_compatible, bfd_default_scan, \ 2, def, bfd_default_compatible, bfd_default_scan, \
bfd_arch_default_fill, y, 0 } bfd_arch_default_fill, y, 0 }
static const bfd_arch_info_type bfd_c5_arch = MA (bfd_mach_mep_c5, "c5", FALSE, NULL); static const bfd_arch_info_type bfd_c5_arch = MA (bfd_mach_mep_c5, "c5", false, NULL);
static const bfd_arch_info_type bfd_h1_arch = MA (bfd_mach_mep_h1, "h1", FALSE, & bfd_c5_arch); static const bfd_arch_info_type bfd_h1_arch = MA (bfd_mach_mep_h1, "h1", false, & bfd_c5_arch);
const bfd_arch_info_type bfd_mep_arch = MA (bfd_mach_mep, "mep", TRUE, & bfd_h1_arch); const bfd_arch_info_type bfd_mep_arch = MA (bfd_mach_mep, "mep", true, & bfd_h1_arch);

View File

@ -33,7 +33,7 @@ const bfd_arch_info_type bfd_metag_arch =
"metag", /* Architecture name. */ "metag", /* Architecture name. */
"metag", /* Printable name. */ "metag", /* Printable name. */
4, /* Section align power. */ 4, /* Section align power. */
TRUE, /* The default ? */ true, /* The default ? */
bfd_default_compatible, /* Architecture comparison fn. */ bfd_default_compatible, /* Architecture comparison fn. */
bfd_default_scan, /* String to architecture convert fn. */ bfd_default_scan, /* String to architecture convert fn. */
bfd_arch_default_fill, /* Default fill. */ bfd_arch_default_fill, /* Default fill. */

View File

@ -33,7 +33,7 @@ const bfd_arch_info_type bfd_microblaze_arch =
"microblaze", /* Architecture name. */ "microblaze", /* Architecture name. */
"MicroBlaze", /* Printable name. */ "MicroBlaze", /* Printable name. */
3, /* Section align power. */ 3, /* Section align power. */
TRUE, /* Is this the default architecture ? */ true, /* Is this the default architecture ? */
bfd_default_compatible, /* Architecture comparison function. */ bfd_default_compatible, /* Architecture comparison function. */
bfd_default_scan, /* String to architecture conversion. */ bfd_default_scan, /* String to architecture conversion. */
bfd_arch_default_fill, /* Default fill. */ bfd_arch_default_fill, /* Default fill. */

View File

@ -115,55 +115,55 @@ enum
static const bfd_arch_info_type arch_info_struct[] = static const bfd_arch_info_type arch_info_struct[] =
{ {
N (32, 32, bfd_mach_mips3000, "mips:3000", FALSE, NN(I_mips3000)), N (32, 32, bfd_mach_mips3000, "mips:3000", false, NN(I_mips3000)),
N (32, 32, bfd_mach_mips3900, "mips:3900", FALSE, NN(I_mips3900)), N (32, 32, bfd_mach_mips3900, "mips:3900", false, NN(I_mips3900)),
N (64, 64, bfd_mach_mips4000, "mips:4000", FALSE, NN(I_mips4000)), N (64, 64, bfd_mach_mips4000, "mips:4000", false, NN(I_mips4000)),
N (32, 32, bfd_mach_mips4010, "mips:4010", FALSE, NN(I_mips4010)), N (32, 32, bfd_mach_mips4010, "mips:4010", false, NN(I_mips4010)),
N (64, 64, bfd_mach_mips4100, "mips:4100", FALSE, NN(I_mips4100)), N (64, 64, bfd_mach_mips4100, "mips:4100", false, NN(I_mips4100)),
N (64, 64, bfd_mach_mips4111, "mips:4111", FALSE, NN(I_mips4111)), N (64, 64, bfd_mach_mips4111, "mips:4111", false, NN(I_mips4111)),
N (64, 64, bfd_mach_mips4120, "mips:4120", FALSE, NN(I_mips4120)), N (64, 64, bfd_mach_mips4120, "mips:4120", false, NN(I_mips4120)),
N (64, 64, bfd_mach_mips4300, "mips:4300", FALSE, NN(I_mips4300)), N (64, 64, bfd_mach_mips4300, "mips:4300", false, NN(I_mips4300)),
N (64, 64, bfd_mach_mips4400, "mips:4400", FALSE, NN(I_mips4400)), N (64, 64, bfd_mach_mips4400, "mips:4400", false, NN(I_mips4400)),
N (64, 64, bfd_mach_mips4600, "mips:4600", FALSE, NN(I_mips4600)), N (64, 64, bfd_mach_mips4600, "mips:4600", false, NN(I_mips4600)),
N (64, 64, bfd_mach_mips4650, "mips:4650", FALSE, NN(I_mips4650)), N (64, 64, bfd_mach_mips4650, "mips:4650", false, NN(I_mips4650)),
N (64, 64, bfd_mach_mips5000, "mips:5000", FALSE, NN(I_mips5000)), N (64, 64, bfd_mach_mips5000, "mips:5000", false, NN(I_mips5000)),
N (64, 64, bfd_mach_mips5400, "mips:5400", FALSE, NN(I_mips5400)), N (64, 64, bfd_mach_mips5400, "mips:5400", false, NN(I_mips5400)),
N (64, 64, bfd_mach_mips5500, "mips:5500", FALSE, NN(I_mips5500)), N (64, 64, bfd_mach_mips5500, "mips:5500", false, NN(I_mips5500)),
N (64, 32, bfd_mach_mips5900, "mips:5900", FALSE, NN(I_mips5900)), N (64, 32, bfd_mach_mips5900, "mips:5900", false, NN(I_mips5900)),
N (32, 32, bfd_mach_mips6000, "mips:6000", FALSE, NN(I_mips6000)), N (32, 32, bfd_mach_mips6000, "mips:6000", false, NN(I_mips6000)),
N (64, 64, bfd_mach_mips7000, "mips:7000", FALSE, NN(I_mips7000)), N (64, 64, bfd_mach_mips7000, "mips:7000", false, NN(I_mips7000)),
N (64, 64, bfd_mach_mips8000, "mips:8000", FALSE, NN(I_mips8000)), N (64, 64, bfd_mach_mips8000, "mips:8000", false, NN(I_mips8000)),
N (64, 64, bfd_mach_mips9000, "mips:9000", FALSE, NN(I_mips9000)), N (64, 64, bfd_mach_mips9000, "mips:9000", false, NN(I_mips9000)),
N (64, 64, bfd_mach_mips10000,"mips:10000", FALSE, NN(I_mips10000)), N (64, 64, bfd_mach_mips10000,"mips:10000", false, NN(I_mips10000)),
N (64, 64, bfd_mach_mips12000,"mips:12000", FALSE, NN(I_mips12000)), N (64, 64, bfd_mach_mips12000,"mips:12000", false, NN(I_mips12000)),
N (64, 64, bfd_mach_mips14000,"mips:14000", FALSE, NN(I_mips14000)), N (64, 64, bfd_mach_mips14000,"mips:14000", false, NN(I_mips14000)),
N (64, 64, bfd_mach_mips16000,"mips:16000", FALSE, NN(I_mips16000)), N (64, 64, bfd_mach_mips16000,"mips:16000", false, NN(I_mips16000)),
N (64, 64, bfd_mach_mips16, "mips:16", FALSE, NN(I_mips16)), N (64, 64, bfd_mach_mips16, "mips:16", false, NN(I_mips16)),
N (64, 64, bfd_mach_mips5, "mips:mips5", FALSE, NN(I_mips5)), N (64, 64, bfd_mach_mips5, "mips:mips5", false, NN(I_mips5)),
N (32, 32, bfd_mach_mipsisa32, "mips:isa32", FALSE, NN(I_mipsisa32)), N (32, 32, bfd_mach_mipsisa32, "mips:isa32", false, NN(I_mipsisa32)),
N (32, 32, bfd_mach_mipsisa32r2,"mips:isa32r2", FALSE, NN(I_mipsisa32r2)), N (32, 32, bfd_mach_mipsisa32r2,"mips:isa32r2", false, NN(I_mipsisa32r2)),
N (32, 32, bfd_mach_mipsisa32r3,"mips:isa32r3", FALSE, NN(I_mipsisa32r3)), N (32, 32, bfd_mach_mipsisa32r3,"mips:isa32r3", false, NN(I_mipsisa32r3)),
N (32, 32, bfd_mach_mipsisa32r5,"mips:isa32r5", FALSE, NN(I_mipsisa32r5)), N (32, 32, bfd_mach_mipsisa32r5,"mips:isa32r5", false, NN(I_mipsisa32r5)),
N (32, 32, bfd_mach_mipsisa32r6,"mips:isa32r6", FALSE, NN(I_mipsisa32r6)), N (32, 32, bfd_mach_mipsisa32r6,"mips:isa32r6", false, NN(I_mipsisa32r6)),
N (64, 64, bfd_mach_mipsisa64, "mips:isa64", FALSE, NN(I_mipsisa64)), N (64, 64, bfd_mach_mipsisa64, "mips:isa64", false, NN(I_mipsisa64)),
N (64, 64, bfd_mach_mipsisa64r2,"mips:isa64r2", FALSE, NN(I_mipsisa64r2)), N (64, 64, bfd_mach_mipsisa64r2,"mips:isa64r2", false, NN(I_mipsisa64r2)),
N (64, 64, bfd_mach_mipsisa64r3,"mips:isa64r3", FALSE, NN(I_mipsisa64r3)), N (64, 64, bfd_mach_mipsisa64r3,"mips:isa64r3", false, NN(I_mipsisa64r3)),
N (64, 64, bfd_mach_mipsisa64r5,"mips:isa64r5", FALSE, NN(I_mipsisa64r5)), N (64, 64, bfd_mach_mipsisa64r5,"mips:isa64r5", false, NN(I_mipsisa64r5)),
N (64, 64, bfd_mach_mipsisa64r6,"mips:isa64r6", FALSE, NN(I_mipsisa64r6)), N (64, 64, bfd_mach_mipsisa64r6,"mips:isa64r6", false, NN(I_mipsisa64r6)),
N (64, 64, bfd_mach_mips_sb1, "mips:sb1", FALSE, NN(I_sb1)), N (64, 64, bfd_mach_mips_sb1, "mips:sb1", false, NN(I_sb1)),
N (64, 64, bfd_mach_mips_loongson_2e, "mips:loongson_2e", FALSE, NN(I_loongson_2e)), N (64, 64, bfd_mach_mips_loongson_2e, "mips:loongson_2e", false, NN(I_loongson_2e)),
N (64, 64, bfd_mach_mips_loongson_2f, "mips:loongson_2f", FALSE, NN(I_loongson_2f)), N (64, 64, bfd_mach_mips_loongson_2f, "mips:loongson_2f", false, NN(I_loongson_2f)),
N (64, 64, bfd_mach_mips_gs464, "mips:gs464", FALSE, NN(I_gs464)), N (64, 64, bfd_mach_mips_gs464, "mips:gs464", false, NN(I_gs464)),
N (64, 64, bfd_mach_mips_gs464e, "mips:gs464e", FALSE, NN(I_gs464e)), N (64, 64, bfd_mach_mips_gs464e, "mips:gs464e", false, NN(I_gs464e)),
N (64, 64, bfd_mach_mips_gs264e, "mips:gs264e", FALSE, NN(I_gs264e)), N (64, 64, bfd_mach_mips_gs264e, "mips:gs264e", false, NN(I_gs264e)),
N (64, 64, bfd_mach_mips_octeon,"mips:octeon", FALSE, NN(I_mipsocteon)), N (64, 64, bfd_mach_mips_octeon,"mips:octeon", false, NN(I_mipsocteon)),
N (64, 64, bfd_mach_mips_octeonp,"mips:octeon+", FALSE, NN(I_mipsocteonp)), N (64, 64, bfd_mach_mips_octeonp,"mips:octeon+", false, NN(I_mipsocteonp)),
N (64, 64, bfd_mach_mips_octeon2,"mips:octeon2", FALSE, NN(I_mipsocteon2)), N (64, 64, bfd_mach_mips_octeon2,"mips:octeon2", false, NN(I_mipsocteon2)),
N (64, 64, bfd_mach_mips_octeon3, "mips:octeon3", FALSE, NN(I_mipsocteon3)), N (64, 64, bfd_mach_mips_octeon3, "mips:octeon3", false, NN(I_mipsocteon3)),
N (64, 64, bfd_mach_mips_xlr, "mips:xlr", FALSE, NN(I_xlr)), N (64, 64, bfd_mach_mips_xlr, "mips:xlr", false, NN(I_xlr)),
N (32, 32, bfd_mach_mips_interaptiv_mr2, "mips:interaptiv-mr2", FALSE, N (32, 32, bfd_mach_mips_interaptiv_mr2, "mips:interaptiv-mr2", false,
NN(I_interaptiv_mr2)), NN(I_interaptiv_mr2)),
N (64, 64, bfd_mach_mips_micromips, "mips:micromips", FALSE, NULL) N (64, 64, bfd_mach_mips_micromips, "mips:micromips", false, NULL)
}; };
/* The default architecture is mips:3000, but with a machine number of /* The default architecture is mips:3000, but with a machine number of
@ -171,4 +171,4 @@ static const bfd_arch_info_type arch_info_struct[] =
of mips, and an explicit setting of mips:3000. */ of mips, and an explicit setting of mips:3000. */
const bfd_arch_info_type bfd_mips_arch = const bfd_arch_info_type bfd_mips_arch =
N (32, 32, 0, "mips", TRUE, &arch_info_struct[0]); N (32, 32, 0, "mips", true, &arch_info_struct[0]);

View File

@ -35,7 +35,7 @@ bfd_mmix_arch =
"mmix", /* Architecture name. */ "mmix", /* Architecture name. */
"mmix", /* Printable name. */ "mmix", /* Printable name. */
3, /* Section align power. */ 3, /* Section align power. */
TRUE, /* This is the default architecture. */ true, /* This is the default architecture. */
bfd_default_compatible, /* Architecture comparison function. */ bfd_default_compatible, /* Architecture comparison function. */
bfd_default_scan, /* String to architecture conversion. */ bfd_default_scan, /* String to architecture conversion. */
bfd_arch_default_fill, /* Default fill. */ bfd_arch_default_fill, /* Default fill. */

View File

@ -33,7 +33,7 @@ const bfd_arch_info_type bfd_moxie_arch =
"moxie", /* Arch name. */ "moxie", /* Arch name. */
"moxie", /* Printable name. */ "moxie", /* Printable name. */
2, /* Section alignment power. */ 2, /* Section alignment power. */
TRUE, /* The one and only. */ true, /* The one and only. */
bfd_default_compatible, bfd_default_compatible,
bfd_default_scan, bfd_default_scan,
bfd_arch_default_fill, bfd_arch_default_fill,

View File

@ -62,78 +62,78 @@ compatible (const bfd_arch_info_type * a,
static const bfd_arch_info_type arch_info_struct[] = static const bfd_arch_info_type arch_info_struct[] =
{ {
/* msp430x11x. */ /* msp430x11x. */
N (16, bfd_mach_msp11, "MSP430", FALSE, & arch_info_struct[1]), N (16, bfd_mach_msp11, "MSP430", false, & arch_info_struct[1]),
/* msp430x11x1. */ /* msp430x11x1. */
N (16, bfd_mach_msp110, "MSP430x11x1", FALSE, & arch_info_struct[2]), N (16, bfd_mach_msp110, "MSP430x11x1", false, & arch_info_struct[2]),
/* msp430x12x. */ /* msp430x12x. */
N (16, bfd_mach_msp12, "MSP430x12", FALSE, & arch_info_struct[3]), N (16, bfd_mach_msp12, "MSP430x12", false, & arch_info_struct[3]),
/* msp430x13x. */ /* msp430x13x. */
N (16, bfd_mach_msp13, "MSP430x13", FALSE, & arch_info_struct[4]), N (16, bfd_mach_msp13, "MSP430x13", false, & arch_info_struct[4]),
/* msp430x14x. */ /* msp430x14x. */
N (16, bfd_mach_msp14, "MSP430x14", FALSE, & arch_info_struct[5]), N (16, bfd_mach_msp14, "MSP430x14", false, & arch_info_struct[5]),
/* msp430x15x. */ /* msp430x15x. */
N (16, bfd_mach_msp15, "MSP430x15", FALSE, & arch_info_struct[6]), N (16, bfd_mach_msp15, "MSP430x15", false, & arch_info_struct[6]),
/* msp430x16x. */ /* msp430x16x. */
N (16, bfd_mach_msp16, "MSP430x16", FALSE, & arch_info_struct[7]), N (16, bfd_mach_msp16, "MSP430x16", false, & arch_info_struct[7]),
/* msp430x20x. */ /* msp430x20x. */
N (16, bfd_mach_msp20, "MSP430x20", FALSE, & arch_info_struct[8]), N (16, bfd_mach_msp20, "MSP430x20", false, & arch_info_struct[8]),
/* msp430x21x. */ /* msp430x21x. */
N (16, bfd_mach_msp21, "MSP430x21", FALSE, & arch_info_struct[9]), N (16, bfd_mach_msp21, "MSP430x21", false, & arch_info_struct[9]),
/* msp430x22x. */ /* msp430x22x. */
N (16, bfd_mach_msp22, "MSP430x22", FALSE, & arch_info_struct[10]), N (16, bfd_mach_msp22, "MSP430x22", false, & arch_info_struct[10]),
/* msp430x23x. */ /* msp430x23x. */
N (16, bfd_mach_msp23, "MSP430x23", FALSE, & arch_info_struct[11]), N (16, bfd_mach_msp23, "MSP430x23", false, & arch_info_struct[11]),
/* msp430x24x. */ /* msp430x24x. */
N (16, bfd_mach_msp24, "MSP430x24", FALSE, & arch_info_struct[12]), N (16, bfd_mach_msp24, "MSP430x24", false, & arch_info_struct[12]),
/* msp430x26x. */ /* msp430x26x. */
N (16, bfd_mach_msp26, "MSP430x26", FALSE, & arch_info_struct[13]), N (16, bfd_mach_msp26, "MSP430x26", false, & arch_info_struct[13]),
/* msp430x31x. */ /* msp430x31x. */
N (16, bfd_mach_msp31, "MSP430x31", FALSE, & arch_info_struct[14]), N (16, bfd_mach_msp31, "MSP430x31", false, & arch_info_struct[14]),
/* msp430x32x. */ /* msp430x32x. */
N (16, bfd_mach_msp32, "MSP430x32", FALSE, & arch_info_struct[15]), N (16, bfd_mach_msp32, "MSP430x32", false, & arch_info_struct[15]),
/* msp430x33x. */ /* msp430x33x. */
N (16, bfd_mach_msp33, "MSP430x33", FALSE, & arch_info_struct[16]), N (16, bfd_mach_msp33, "MSP430x33", false, & arch_info_struct[16]),
/* msp430x41x. */ /* msp430x41x. */
N (16, bfd_mach_msp41, "MSP430x41", FALSE, & arch_info_struct[17]), N (16, bfd_mach_msp41, "MSP430x41", false, & arch_info_struct[17]),
/* msp430x42x. */ /* msp430x42x. */
N (16, bfd_mach_msp42, "MSP430x42", FALSE, & arch_info_struct[18]), N (16, bfd_mach_msp42, "MSP430x42", false, & arch_info_struct[18]),
/* msp430x43x. */ /* msp430x43x. */
N (16, bfd_mach_msp43, "MSP430x43", FALSE, & arch_info_struct[19]), N (16, bfd_mach_msp43, "MSP430x43", false, & arch_info_struct[19]),
/* msp430x44x. */ /* msp430x44x. */
N (16, bfd_mach_msp43, "MSP430x44", FALSE, & arch_info_struct[20]), N (16, bfd_mach_msp43, "MSP430x44", false, & arch_info_struct[20]),
/* msp430x46x. */ /* msp430x46x. */
N (16, bfd_mach_msp46, "MSP430x46", FALSE, & arch_info_struct[21]), N (16, bfd_mach_msp46, "MSP430x46", false, & arch_info_struct[21]),
/* msp430x47x. */ /* msp430x47x. */
N (16, bfd_mach_msp47, "MSP430x47", FALSE, & arch_info_struct[22]), N (16, bfd_mach_msp47, "MSP430x47", false, & arch_info_struct[22]),
/* msp430x54x. */ /* msp430x54x. */
N (16, bfd_mach_msp54, "MSP430x54", FALSE, & arch_info_struct[23]), N (16, bfd_mach_msp54, "MSP430x54", false, & arch_info_struct[23]),
N (32, bfd_mach_msp430x, "MSP430X", FALSE, NULL) N (32, bfd_mach_msp430x, "MSP430X", false, NULL)
}; };
const bfd_arch_info_type bfd_msp430_arch = const bfd_arch_info_type bfd_msp430_arch =
N (16, bfd_mach_msp14, "msp:14", TRUE, & arch_info_struct[0]); N (16, bfd_mach_msp14, "msp:14", true, & arch_info_struct[0]);

View File

@ -42,11 +42,11 @@
const bfd_arch_info_type arch_info_struct[2] = const bfd_arch_info_type arch_info_struct[2] =
{ {
N (bfd_mach_mrisc2, "ms1-003", FALSE, arch_info_struct + 1), N (bfd_mach_mrisc2, "ms1-003", false, arch_info_struct + 1),
N (bfd_mach_ms2, "ms2", FALSE, NULL) N (bfd_mach_ms2, "ms2", false, NULL)
}; };
const bfd_arch_info_type bfd_mt_arch = const bfd_arch_info_type bfd_mt_arch =
N (bfd_mach_ms1, "ms1", TRUE, arch_info_struct); N (bfd_mach_ms1, "ms1", true, arch_info_struct);

View File

@ -35,11 +35,11 @@
static const bfd_arch_info_type arch_info_struct[] = static const bfd_arch_info_type arch_info_struct[] =
{ {
N (bfd_mach_n1h, "n1h", FALSE, NDS32V2_NEXT), N (bfd_mach_n1h, "n1h", false, NDS32V2_NEXT),
N (bfd_mach_n1h_v2, "n1h_v2", FALSE, NDS32V3_NEXT), N (bfd_mach_n1h_v2, "n1h_v2", false, NDS32V3_NEXT),
N (bfd_mach_n1h_v3, "n1h_v3", FALSE, NDS32V3M_NEXT), N (bfd_mach_n1h_v3, "n1h_v3", false, NDS32V3M_NEXT),
N (bfd_mach_n1h_v3m, "n1h_v3m", FALSE, NULL), N (bfd_mach_n1h_v3m, "n1h_v3m", false, NULL),
}; };
const bfd_arch_info_type bfd_nds32_arch = const bfd_arch_info_type bfd_nds32_arch =
N (bfd_mach_n1, "n1h", TRUE, NEXT); N (bfd_mach_n1, "n1h", true, NEXT);

View File

@ -55,7 +55,7 @@ bfd_nfp_compatible (const bfd_arch_info_type * a,
} }
static const bfd_arch_info_type arch_info_struct = static const bfd_arch_info_type arch_info_struct =
N (bfd_mach_nfp3200, "NFP-32xx", FALSE, NULL); N (bfd_mach_nfp3200, "NFP-32xx", false, NULL);
const bfd_arch_info_type bfd_nfp_arch = const bfd_arch_info_type bfd_nfp_arch =
N (bfd_mach_nfp6000, "NFP-6xxx", TRUE, &arch_info_struct); N (bfd_mach_nfp6000, "NFP-6xxx", true, &arch_info_struct);

View File

@ -67,9 +67,9 @@ nios2_compatible (const bfd_arch_info_type *a,
static const bfd_arch_info_type arch_info_struct[2] = static const bfd_arch_info_type arch_info_struct[2] =
{ {
N (bfd_mach_nios2r1, "nios2:r1", FALSE, NIOS2R2_NEXT), N (bfd_mach_nios2r1, "nios2:r1", false, NIOS2R2_NEXT),
N (bfd_mach_nios2r2, "nios2:r2", FALSE, NULL), N (bfd_mach_nios2r2, "nios2:r2", false, NULL),
}; };
const bfd_arch_info_type bfd_nios2_arch = const bfd_arch_info_type bfd_nios2_arch =
N (bfd_mach_nios2, "nios2", TRUE, NIOS2R1_NEXT); N (bfd_mach_nios2, "nios2", true, NIOS2R1_NEXT);

View File

@ -31,11 +31,11 @@
static const bfd_arch_info_type arch_info_struct[] = static const bfd_arch_info_type arch_info_struct[] =
{ {
N (32532, "ns32k:32532", TRUE, 0), /* The word ns32k will match this too. */ N (32532, "ns32k:32532", true, 0), /* The word ns32k will match this too. */
}; };
const bfd_arch_info_type bfd_ns32k_arch = const bfd_arch_info_type bfd_ns32k_arch =
N (32032, "ns32k:32032", FALSE, &arch_info_struct[0]); N (32032, "ns32k:32032", false, &arch_info_struct[0]);
bfd_vma bfd_vma
_bfd_ns32k_get_displacement (bfd_byte *buffer, int size) _bfd_ns32k_get_displacement (bfd_byte *buffer, int size)
@ -572,7 +572,7 @@ _bfd_do_ns32k_reloc_contents (reloc_howto_type *howto,
{ {
int size; int size;
bfd_vma x; bfd_vma x;
bfd_boolean overflow; bool overflow;
if (howto->negate) if (howto->negate)
relocation = -relocation; relocation = -relocation;
@ -599,7 +599,7 @@ _bfd_do_ns32k_reloc_contents (reloc_howto_type *howto,
which we don't check for. We must either check at every single which we don't check for. We must either check at every single
operation, which would be tedious, or we must do the computations operation, which would be tedious, or we must do the computations
in a type larger than bfd_vma, which would be inefficient. */ in a type larger than bfd_vma, which would be inefficient. */
overflow = FALSE; overflow = false;
if (howto->complain_on_overflow != complain_overflow_dont) if (howto->complain_on_overflow != complain_overflow_dont)
{ {
bfd_vma check; bfd_vma check;
@ -674,7 +674,7 @@ _bfd_do_ns32k_reloc_contents (reloc_howto_type *howto,
if (signed_check > reloc_signed_max if (signed_check > reloc_signed_max
|| signed_check < reloc_signed_min) || signed_check < reloc_signed_min)
overflow = TRUE; overflow = true;
} }
break; break;
case complain_overflow_unsigned: case complain_overflow_unsigned:
@ -686,7 +686,7 @@ _bfd_do_ns32k_reloc_contents (reloc_howto_type *howto,
(((1 << (howto->bitsize - 1)) - 1) << 1) | 1; (((1 << (howto->bitsize - 1)) - 1) << 1) | 1;
if (check > reloc_unsigned_max) if (check > reloc_unsigned_max)
overflow = TRUE; overflow = true;
} }
break; break;
case complain_overflow_bitfield: case complain_overflow_bitfield:
@ -699,7 +699,7 @@ _bfd_do_ns32k_reloc_contents (reloc_howto_type *howto,
if ((check & ~reloc_bits) != 0 if ((check & ~reloc_bits) != 0
&& (((bfd_vma) signed_check & ~reloc_bits) && (((bfd_vma) signed_check & ~reloc_bits)
!= (-(bfd_vma) 1 & ~reloc_bits))) != (-(bfd_vma) 1 & ~reloc_bits)))
overflow = TRUE; overflow = true;
} }
break; break;
default: default:

View File

@ -41,7 +41,7 @@
const bfd_arch_info_type bfd_or1knd_arch = const bfd_arch_info_type bfd_or1knd_arch =
N (bfd_mach_or1knd, "or1knd", FALSE, NULL); N (bfd_mach_or1knd, "or1knd", false, NULL);
const bfd_arch_info_type bfd_or1k_arch = const bfd_arch_info_type bfd_or1k_arch =
N (bfd_mach_or1k, "or1k", TRUE, &bfd_or1knd_arch); N (bfd_mach_or1k, "or1k", true, &bfd_or1knd_arch);

View File

@ -32,7 +32,7 @@ const bfd_arch_info_type bfd_pdp11_arch =
"pdp11", "pdp11",
"pdp11", "pdp11",
1, /* Alignment = 16 bit. */ 1, /* Alignment = 16 bit. */
TRUE, /* The one and only. */ true, /* The one and only. */
bfd_default_compatible, bfd_default_compatible,
bfd_default_scan, bfd_default_scan,
bfd_arch_default_fill, bfd_arch_default_fill,

View File

@ -33,7 +33,7 @@ const bfd_arch_info_type bfd_pj_arch =
"pj", /* Arch_name. */ "pj", /* Arch_name. */
"pj", /* Printable name. */ "pj", /* Printable name. */
1, 1,
TRUE, /* The default machine. */ true, /* The default machine. */
bfd_default_compatible, bfd_default_compatible,
bfd_default_scan, bfd_default_scan,
bfd_arch_default_fill, bfd_arch_default_fill,

View File

@ -54,8 +54,8 @@ powerpc_compatible (const bfd_arch_info_type *a,
static void * static void *
bfd_arch_ppc_nop_fill (bfd_size_type count, bfd_arch_ppc_nop_fill (bfd_size_type count,
bfd_boolean is_bigendian, bool is_bigendian,
bfd_boolean code) bool code)
{ {
bfd_byte *fill; bfd_byte *fill;
@ -107,34 +107,34 @@ const bfd_arch_info_type bfd_powerpc_archs[] =
{ {
#if BFD_DEFAULT_TARGET_SIZE == 64 #if BFD_DEFAULT_TARGET_SIZE == 64
/* Default for 64 bit target. */ /* Default for 64 bit target. */
N (64, bfd_mach_ppc64, "powerpc:common64", TRUE, bfd_powerpc_archs + 1), N (64, bfd_mach_ppc64, "powerpc:common64", true, bfd_powerpc_archs + 1),
/* elf32-ppc:ppc_elf_object_p relies on the default 32 bit arch /* elf32-ppc:ppc_elf_object_p relies on the default 32 bit arch
being immediately after the 64 bit default. */ being immediately after the 64 bit default. */
N (32, bfd_mach_ppc, "powerpc:common", FALSE, bfd_powerpc_archs + 2), N (32, bfd_mach_ppc, "powerpc:common", false, bfd_powerpc_archs + 2),
#else #else
/* Default arch must come first. */ /* Default arch must come first. */
N (32, bfd_mach_ppc, "powerpc:common", TRUE, bfd_powerpc_archs + 1), N (32, bfd_mach_ppc, "powerpc:common", true, bfd_powerpc_archs + 1),
/* elf64-ppc:ppc64_elf_object_p relies on the default 64 bit arch /* elf64-ppc:ppc64_elf_object_p relies on the default 64 bit arch
being immediately after the 32 bit default. */ being immediately after the 32 bit default. */
N (64, bfd_mach_ppc64, "powerpc:common64", FALSE, bfd_powerpc_archs + 2), N (64, bfd_mach_ppc64, "powerpc:common64", false, bfd_powerpc_archs + 2),
#endif #endif
N (32, bfd_mach_ppc_603, "powerpc:603", FALSE, bfd_powerpc_archs + 3), N (32, bfd_mach_ppc_603, "powerpc:603", false, bfd_powerpc_archs + 3),
N (32, bfd_mach_ppc_ec603e, "powerpc:EC603e", FALSE, bfd_powerpc_archs + 4), N (32, bfd_mach_ppc_ec603e, "powerpc:EC603e", false, bfd_powerpc_archs + 4),
N (32, bfd_mach_ppc_604, "powerpc:604", FALSE, bfd_powerpc_archs + 5), N (32, bfd_mach_ppc_604, "powerpc:604", false, bfd_powerpc_archs + 5),
N (32, bfd_mach_ppc_403, "powerpc:403", FALSE, bfd_powerpc_archs + 6), N (32, bfd_mach_ppc_403, "powerpc:403", false, bfd_powerpc_archs + 6),
N (32, bfd_mach_ppc_601, "powerpc:601", FALSE, bfd_powerpc_archs + 7), N (32, bfd_mach_ppc_601, "powerpc:601", false, bfd_powerpc_archs + 7),
N (64, bfd_mach_ppc_620, "powerpc:620", FALSE, bfd_powerpc_archs + 8), N (64, bfd_mach_ppc_620, "powerpc:620", false, bfd_powerpc_archs + 8),
N (64, bfd_mach_ppc_630, "powerpc:630", FALSE, bfd_powerpc_archs + 9), N (64, bfd_mach_ppc_630, "powerpc:630", false, bfd_powerpc_archs + 9),
N (64, bfd_mach_ppc_a35, "powerpc:a35", FALSE, bfd_powerpc_archs + 10), N (64, bfd_mach_ppc_a35, "powerpc:a35", false, bfd_powerpc_archs + 10),
N (64, bfd_mach_ppc_rs64ii, "powerpc:rs64ii", FALSE, bfd_powerpc_archs + 11), N (64, bfd_mach_ppc_rs64ii, "powerpc:rs64ii", false, bfd_powerpc_archs + 11),
N (64, bfd_mach_ppc_rs64iii, "powerpc:rs64iii", FALSE, bfd_powerpc_archs + 12), N (64, bfd_mach_ppc_rs64iii, "powerpc:rs64iii", false, bfd_powerpc_archs + 12),
N (32, bfd_mach_ppc_7400, "powerpc:7400", FALSE, bfd_powerpc_archs + 13), N (32, bfd_mach_ppc_7400, "powerpc:7400", false, bfd_powerpc_archs + 13),
N (32, bfd_mach_ppc_e500, "powerpc:e500", FALSE, bfd_powerpc_archs + 14), N (32, bfd_mach_ppc_e500, "powerpc:e500", false, bfd_powerpc_archs + 14),
N (32, bfd_mach_ppc_e500mc, "powerpc:e500mc", FALSE, bfd_powerpc_archs + 15), N (32, bfd_mach_ppc_e500mc, "powerpc:e500mc", false, bfd_powerpc_archs + 15),
N (64, bfd_mach_ppc_e500mc64, "powerpc:e500mc64",FALSE, bfd_powerpc_archs + 16), N (64, bfd_mach_ppc_e500mc64, "powerpc:e500mc64",false, bfd_powerpc_archs + 16),
N (32, bfd_mach_ppc_860, "powerpc:MPC8XX", FALSE, bfd_powerpc_archs + 17), N (32, bfd_mach_ppc_860, "powerpc:MPC8XX", false, bfd_powerpc_archs + 17),
N (32, bfd_mach_ppc_750, "powerpc:750", FALSE, bfd_powerpc_archs + 18), N (32, bfd_mach_ppc_750, "powerpc:750", false, bfd_powerpc_archs + 18),
N (32, bfd_mach_ppc_titan, "powerpc:titan", FALSE, bfd_powerpc_archs + 19), N (32, bfd_mach_ppc_titan, "powerpc:titan", false, bfd_powerpc_archs + 19),
{ {
16, /* Bits in a word. */ 16, /* Bits in a word. */
@ -145,7 +145,7 @@ const bfd_arch_info_type bfd_powerpc_archs[] =
"powerpc", "powerpc",
"powerpc:vle", "powerpc:vle",
3, 3,
FALSE, /* Not the default. */ false, /* Not the default. */
powerpc_compatible, powerpc_compatible,
bfd_default_scan, bfd_default_scan,
bfd_arch_default_fill, bfd_arch_default_fill,
@ -153,6 +153,6 @@ const bfd_arch_info_type bfd_powerpc_archs[] =
0 /* Maximum offset of a reloc from the start of an insn. */ 0 /* Maximum offset of a reloc from the start of an insn. */
}, },
N (64, bfd_mach_ppc_e5500, "powerpc:e5500", FALSE, bfd_powerpc_archs + 21), N (64, bfd_mach_ppc_e5500, "powerpc:e5500", false, bfd_powerpc_archs + 21),
N (64, bfd_mach_ppc_e6500, "powerpc:e6500", FALSE, NULL) N (64, bfd_mach_ppc_e6500, "powerpc:e6500", false, NULL)
}; };

View File

@ -41,4 +41,4 @@
0 /* Maximum offset of a reloc from the start of an insn. */ \ 0 /* Maximum offset of a reloc from the start of an insn. */ \
} }
const bfd_arch_info_type bfd_pru_arch = N (32, 32, 0, "pru", TRUE, NULL); const bfd_arch_info_type bfd_pru_arch = N (32, 32, 0, "pru", true, NULL);

View File

@ -39,11 +39,11 @@ riscv_compatible (const bfd_arch_info_type *a, const bfd_arch_info_type *b)
/* Return TRUE if STRING matches the architecture described by INFO. */ /* Return TRUE if STRING matches the architecture described by INFO. */
static bfd_boolean static bool
riscv_scan (const struct bfd_arch_info *info, const char *string) riscv_scan (const struct bfd_arch_info *info, const char *string)
{ {
if (bfd_default_scan (info, string)) if (bfd_default_scan (info, string))
return TRUE; return true;
/* The incoming STRING might take the form of riscv:rvXXzzz, where XX is /* The incoming STRING might take the form of riscv:rvXXzzz, where XX is
32 or 64, and zzz are one or more extension characters. As we 32 or 64, and zzz are one or more extension characters. As we
@ -59,9 +59,9 @@ riscv_scan (const struct bfd_arch_info *info, const char *string)
if (!info->the_default if (!info->the_default
&& strncasecmp (string, info->printable_name, && strncasecmp (string, info->printable_name,
strlen (info->printable_name)) == 0) strlen (info->printable_name)) == 0)
return TRUE; return true;
return FALSE; return false;
} }
#define N(BITS, NUMBER, PRINT, DEFAULT, NEXT) \ #define N(BITS, NUMBER, PRINT, DEFAULT, NEXT) \
@ -95,13 +95,13 @@ enum
and each entry except the last should end with NN (my enum value). */ and each entry except the last should end with NN (my enum value). */
static const bfd_arch_info_type arch_info_struct[] = static const bfd_arch_info_type arch_info_struct[] =
{ {
N (64, bfd_mach_riscv64, "riscv:rv64", FALSE, NN (I_riscv64)), N (64, bfd_mach_riscv64, "riscv:rv64", false, NN (I_riscv64)),
N (32, bfd_mach_riscv32, "riscv:rv32", FALSE, NULL) N (32, bfd_mach_riscv32, "riscv:rv32", false, NULL)
}; };
/* The default architecture is riscv:rv64. */ /* The default architecture is riscv:rv64. */
const bfd_arch_info_type bfd_riscv_arch = const bfd_arch_info_type bfd_riscv_arch =
N (64, 0, "riscv", TRUE, &arch_info_struct[0]); N (64, 0, "riscv", true, &arch_info_struct[0]);
/* List for all supported ISA spec versions. */ /* List for all supported ISA spec versions. */
const struct riscv_spec riscv_isa_specs[] = const struct riscv_spec riscv_isa_specs[] =

View File

@ -32,7 +32,7 @@ const bfd_arch_info_type bfd_rl78_arch =
"rl78", /* Architecture name. */ "rl78", /* Architecture name. */
"rl78", /* Printable name. */ "rl78", /* Printable name. */
4, /* Section align power. */ 4, /* Section align power. */
TRUE, /* The default ? */ true, /* The default ? */
bfd_default_compatible, /* Architecture comparison fn. */ bfd_default_compatible, /* Architecture comparison fn. */
bfd_default_scan, /* String to architecture convert fn. */ bfd_default_scan, /* String to architecture convert fn. */
bfd_arch_default_fill, /* Default fill. */ bfd_arch_default_fill, /* Default fill. */

Some files were not shown because too many files have changed in this diff Show More