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:
parent
faa7a26040
commit
0a1b45a20e
331 changed files with 28318 additions and 28257 deletions
|
@ -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>
|
||||
|
||||
* bfd-in.h: Include stdbool.h.
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
#include "bfd.h"
|
||||
|
||||
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 *);
|
||||
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. */
|
||||
|
||||
bfd_boolean
|
||||
bool
|
||||
xcoff64_core_file_matches_executable_p (bfd *core_bfd, bfd *exec_bfd)
|
||||
{
|
||||
struct core_dumpxx core;
|
||||
char *path, *s;
|
||||
size_t alloc;
|
||||
const char *str1, *str2;
|
||||
bfd_boolean return_value = FALSE;
|
||||
bool return_value = false;
|
||||
|
||||
/* Get the header. */
|
||||
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);
|
||||
|
||||
if (strcmp (str1, str2) == 0)
|
||||
return_value = TRUE;
|
||||
return_value = true;
|
||||
|
||||
xcoff64_core_file_matches_executable_p_end_1:
|
||||
free (path);
|
||||
|
@ -335,7 +335,7 @@ xcoff64_core_p (bfd *abfd ATTRIBUTE_UNUSED)
|
|||
return 0;
|
||||
}
|
||||
|
||||
bfd_boolean
|
||||
bool
|
||||
xcoff64_core_file_matches_executable_p (bfd *core_bfd, bfd *exec_bfd)
|
||||
{
|
||||
return generic_core_file_matches_executable_p (core_bfd, exec_bfd);
|
||||
|
|
|
@ -69,7 +69,7 @@
|
|||
#define MY_exec_hdr_flags 1
|
||||
|
||||
#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. */
|
||||
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);
|
||||
|
||||
#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
|
||||
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. */
|
||||
|
||||
static bfd_boolean
|
||||
static bool
|
||||
MY (write_object_contents) (bfd *abfd)
|
||||
{
|
||||
struct external_exec exec_bytes;
|
||||
|
@ -131,7 +131,7 @@ MY (write_object_contents) (bfd *abfd)
|
|||
|
||||
WRITE_HEADERS (abfd, execp);
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
/* 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
|
||||
NAME (aout, set_arch_mach) in aoutx. */
|
||||
|
||||
static bfd_boolean
|
||||
static bool
|
||||
MY (set_sizes) (bfd *abfd)
|
||||
{
|
||||
/* 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;
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
|
||||
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 *);
|
||||
bfd_boolean MYNS (write_object_contents) (bfd *);
|
||||
bool MYNS (write_object_contents) (bfd *);
|
||||
|
||||
/* Avoid multiple definitions from aoutx if supporting
|
||||
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)[] =
|
||||
{
|
||||
/* 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",
|
||||
TRUE, 0x000000ff,0x000000ff, FALSE),
|
||||
HOWTO (BFD_RELOC_NS32K_IMM_16, 0, 1, 16, FALSE, 0, complain_overflow_signed,
|
||||
true, 0x000000ff,0x000000ff, false),
|
||||
HOWTO (BFD_RELOC_NS32K_IMM_16, 0, 1, 16, false, 0, complain_overflow_signed,
|
||||
_bfd_ns32k_reloc_imm, "NS32K_IMM_16",
|
||||
TRUE, 0x0000ffff,0x0000ffff, FALSE),
|
||||
HOWTO (BFD_RELOC_NS32K_IMM_32, 0, 2, 32, FALSE, 0, complain_overflow_signed,
|
||||
true, 0x0000ffff,0x0000ffff, false),
|
||||
HOWTO (BFD_RELOC_NS32K_IMM_32, 0, 2, 32, false, 0, complain_overflow_signed,
|
||||
_bfd_ns32k_reloc_imm, "NS32K_IMM_32",
|
||||
TRUE, 0xffffffff,0xffffffff, FALSE),
|
||||
HOWTO (BFD_RELOC_NS32K_IMM_8_PCREL, 0, 0, 8, TRUE, 0, complain_overflow_signed,
|
||||
true, 0xffffffff,0xffffffff, false),
|
||||
HOWTO (BFD_RELOC_NS32K_IMM_8_PCREL, 0, 0, 8, true, 0, complain_overflow_signed,
|
||||
_bfd_ns32k_reloc_imm, "PCREL_NS32K_IMM_8",
|
||||
TRUE, 0x000000ff, 0x000000ff, FALSE),
|
||||
HOWTO (BFD_RELOC_NS32K_IMM_16_PCREL, 0, 1, 16, TRUE, 0, complain_overflow_signed,
|
||||
true, 0x000000ff, 0x000000ff, false),
|
||||
HOWTO (BFD_RELOC_NS32K_IMM_16_PCREL, 0, 1, 16, true, 0, complain_overflow_signed,
|
||||
_bfd_ns32k_reloc_imm, "PCREL_NS32K_IMM_16",
|
||||
TRUE, 0x0000ffff,0x0000ffff, FALSE),
|
||||
HOWTO (BFD_RELOC_NS32K_IMM_32_PCREL, 0, 2, 32, TRUE, 0, complain_overflow_signed,
|
||||
true, 0x0000ffff,0x0000ffff, false),
|
||||
HOWTO (BFD_RELOC_NS32K_IMM_32_PCREL, 0, 2, 32, true, 0, complain_overflow_signed,
|
||||
_bfd_ns32k_reloc_imm, "PCREL_NS32K_IMM_32",
|
||||
TRUE, 0xffffffff,0xffffffff, FALSE),
|
||||
true, 0xffffffff,0xffffffff, false),
|
||||
|
||||
/* 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",
|
||||
TRUE, 0x000000ff,0x000000ff, FALSE),
|
||||
HOWTO (BFD_RELOC_NS32K_DISP_16, 0, 1, 14, FALSE, 0, complain_overflow_signed,
|
||||
true, 0x000000ff,0x000000ff, false),
|
||||
HOWTO (BFD_RELOC_NS32K_DISP_16, 0, 1, 14, false, 0, complain_overflow_signed,
|
||||
_bfd_ns32k_reloc_disp, "NS32K_DISP_16",
|
||||
TRUE, 0x0000ffff, 0x0000ffff, FALSE),
|
||||
HOWTO (BFD_RELOC_NS32K_DISP_32, 0, 2, 30, FALSE, 0, complain_overflow_signed,
|
||||
true, 0x0000ffff, 0x0000ffff, false),
|
||||
HOWTO (BFD_RELOC_NS32K_DISP_32, 0, 2, 30, false, 0, complain_overflow_signed,
|
||||
_bfd_ns32k_reloc_disp, "NS32K_DISP_32",
|
||||
TRUE, 0xffffffff, 0xffffffff, FALSE),
|
||||
HOWTO (BFD_RELOC_NS32K_DISP_8_PCREL, 0, 0, 7, TRUE, 0, complain_overflow_signed,
|
||||
true, 0xffffffff, 0xffffffff, false),
|
||||
HOWTO (BFD_RELOC_NS32K_DISP_8_PCREL, 0, 0, 7, true, 0, complain_overflow_signed,
|
||||
_bfd_ns32k_reloc_disp, "PCREL_NS32K_DISP_8",
|
||||
TRUE, 0x000000ff,0x000000ff, FALSE),
|
||||
HOWTO (BFD_RELOC_NS32K_DISP_16_PCREL, 0, 1, 14, TRUE, 0, complain_overflow_signed,
|
||||
true, 0x000000ff,0x000000ff, false),
|
||||
HOWTO (BFD_RELOC_NS32K_DISP_16_PCREL, 0, 1, 14, true, 0, complain_overflow_signed,
|
||||
_bfd_ns32k_reloc_disp, "PCREL_NS32K_DISP_16",
|
||||
TRUE, 0x0000ffff,0x0000ffff, FALSE),
|
||||
HOWTO (BFD_RELOC_NS32K_DISP_32_PCREL, 0, 2, 30, TRUE, 0, complain_overflow_signed,
|
||||
true, 0x0000ffff,0x0000ffff, false),
|
||||
HOWTO (BFD_RELOC_NS32K_DISP_32_PCREL, 0, 2, 30, true, 0, complain_overflow_signed,
|
||||
_bfd_ns32k_reloc_disp, "PCREL_NS32K_DISP_32",
|
||||
TRUE, 0xffffffff,0xffffffff, FALSE),
|
||||
true, 0xffffffff,0xffffffff, false),
|
||||
|
||||
/* Normal 2's complement. */
|
||||
HOWTO (BFD_RELOC_8, 0, 0, 8, FALSE, 0, complain_overflow_bitfield,0,
|
||||
"8", TRUE, 0x000000ff,0x000000ff, FALSE),
|
||||
HOWTO (BFD_RELOC_16, 0, 1, 16, FALSE, 0, complain_overflow_bitfield,0,
|
||||
"16", TRUE, 0x0000ffff,0x0000ffff, FALSE),
|
||||
HOWTO (BFD_RELOC_32, 0, 2, 32, FALSE, 0, complain_overflow_bitfield,0,
|
||||
"32", TRUE, 0xffffffff,0xffffffff, FALSE),
|
||||
HOWTO (BFD_RELOC_8_PCREL, 0, 0, 8, TRUE, 0, complain_overflow_signed, 0,
|
||||
"PCREL_8", TRUE, 0x000000ff,0x000000ff, FALSE),
|
||||
HOWTO (BFD_RELOC_16_PCREL, 0, 1, 16, TRUE, 0, complain_overflow_signed, 0,
|
||||
"PCREL_16", TRUE, 0x0000ffff,0x0000ffff, FALSE),
|
||||
HOWTO (BFD_RELOC_32_PCREL, 0, 2, 32, TRUE, 0, complain_overflow_signed, 0,
|
||||
"PCREL_32", TRUE, 0xffffffff,0xffffffff, FALSE),
|
||||
HOWTO (BFD_RELOC_8, 0, 0, 8, false, 0, complain_overflow_bitfield,0,
|
||||
"8", true, 0x000000ff,0x000000ff, false),
|
||||
HOWTO (BFD_RELOC_16, 0, 1, 16, false, 0, complain_overflow_bitfield,0,
|
||||
"16", true, 0x0000ffff,0x0000ffff, false),
|
||||
HOWTO (BFD_RELOC_32, 0, 2, 32, false, 0, complain_overflow_bitfield,0,
|
||||
"32", true, 0xffffffff,0xffffffff, false),
|
||||
HOWTO (BFD_RELOC_8_PCREL, 0, 0, 8, true, 0, complain_overflow_signed, 0,
|
||||
"PCREL_8", true, 0x000000ff,0x000000ff, false),
|
||||
HOWTO (BFD_RELOC_16_PCREL, 0, 1, 16, true, 0, complain_overflow_signed, 0,
|
||||
"PCREL_16", true, 0x0000ffff,0x0000ffff, false),
|
||||
HOWTO (BFD_RELOC_32_PCREL, 0, 2, 32, true, 0, complain_overflow_signed, 0,
|
||||
"PCREL_32", true, 0xffffffff,0xffffffff, false),
|
||||
};
|
||||
|
||||
#define CTOR_TABLE_RELOC_HOWTO(BFD) (MY (howto_table) + 14)
|
||||
|
|
|
@ -193,7 +193,7 @@ MY (object_p) (bfd *abfd)
|
|||
|
||||
#ifndef MY_mkobject
|
||||
|
||||
static bfd_boolean
|
||||
static bool
|
||||
MY (mkobject) (bfd *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
|
||||
after the section contents have been set. */
|
||||
|
||||
static bfd_boolean
|
||||
static bool
|
||||
MY_bfd_copy_private_section_data (bfd *ibfd,
|
||||
asection *isec ATTRIBUTE_UNUSED,
|
||||
bfd *obfd,
|
||||
|
@ -219,7 +219,7 @@ MY_bfd_copy_private_section_data (bfd *ibfd,
|
|||
if (bfd_get_flavour (ibfd) == bfd_target_aout_flavour
|
||||
&& bfd_get_flavour (obfd) == bfd_target_aout_flavour)
|
||||
obj_aout_subformat (obfd) = obj_aout_subformat (ibfd);
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -230,7 +230,7 @@ MY_bfd_copy_private_section_data (bfd *ibfd,
|
|||
|
||||
#ifndef MY_write_object_contents
|
||||
|
||||
static bfd_boolean
|
||||
static bool
|
||||
MY (write_object_contents) (bfd *abfd)
|
||||
{
|
||||
struct external_exec exec_bytes;
|
||||
|
@ -240,14 +240,14 @@ MY (write_object_contents) (bfd *abfd)
|
|||
|
||||
WRITE_HEADERS (abfd, execp);
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
#define MY_write_object_contents MY (write_object_contents)
|
||||
#endif
|
||||
|
||||
#ifndef MY_set_sizes
|
||||
|
||||
static bfd_boolean
|
||||
static bool
|
||||
MY (set_sizes) (bfd *abfd)
|
||||
{
|
||||
adata(abfd).page_size = TARGET_PAGE_SIZE;
|
||||
|
@ -260,7 +260,7 @@ MY (set_sizes) (bfd *abfd)
|
|||
#endif
|
||||
|
||||
adata(abfd).exec_bytes_size = EXEC_BYTES_SIZE;
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
#define MY_set_sizes MY (set_sizes)
|
||||
#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
|
||||
offsets in the output file. */
|
||||
|
||||
static bfd_boolean
|
||||
static bool
|
||||
MY_bfd_final_link (bfd *abfd, struct bfd_link_info *info)
|
||||
{
|
||||
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. */
|
||||
|
||||
static bfd_boolean
|
||||
static bool
|
||||
MY_close_and_cleanup (bfd *abfd)
|
||||
{
|
||||
if (!MY_bfd_free_cached_info (abfd))
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
return _bfd_generic_close_and_cleanup (abfd);
|
||||
}
|
||||
|
|
619
bfd/aoutx.h
619
bfd/aoutx.h
File diff suppressed because it is too large
Load diff
|
@ -49,8 +49,8 @@ struct got_entry
|
|||
struct got_entry *next;
|
||||
enum tls_type_e type;
|
||||
bfd_vma offset;
|
||||
bfd_boolean processed;
|
||||
bfd_boolean created_dyn_relocation;
|
||||
bool processed;
|
||||
bool created_dyn_relocation;
|
||||
enum tls_got_entries existing_entries;
|
||||
};
|
||||
|
||||
|
@ -114,8 +114,8 @@ new_got_entry_to_list (struct got_entry **list,
|
|||
entry->type = type;
|
||||
entry->offset = offset;
|
||||
entry->next = NULL;
|
||||
entry->processed = FALSE;
|
||||
entry->created_dyn_relocation = FALSE;
|
||||
entry->processed = false;
|
||||
entry->created_dyn_relocation = false;
|
||||
entry->existing_entries = existing_entries;
|
||||
|
||||
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->dynindx == -1 && !H->forced_local) \
|
||||
if (! bfd_elf_link_record_dynamic_symbol (info, H)) \
|
||||
return FALSE; \
|
||||
return false; \
|
||||
htab->s##SECNAME->size += 4; \
|
||||
} \
|
||||
|
||||
static bfd_boolean
|
||||
static bool
|
||||
arc_fill_got_info_for_reloc (enum tls_type_e type,
|
||||
struct got_entry **list,
|
||||
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);
|
||||
|
||||
if (got_entry_for_type (list, type) != NULL)
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
switch (type)
|
||||
{
|
||||
|
@ -240,9 +240,9 @@ arc_fill_got_info_for_reloc (enum tls_type_e type,
|
|||
case GOT_TLS_GD:
|
||||
{
|
||||
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
|
||||
= 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);
|
||||
}
|
||||
break;
|
||||
|
@ -250,16 +250,16 @@ arc_fill_got_info_for_reloc (enum tls_type_e type,
|
|||
case GOT_TLS_LE:
|
||||
{
|
||||
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);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
return FALSE;
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
@ -284,7 +284,7 @@ relocate_fix_got_relocs_for_got_info (struct got_entry ** list_p,
|
|||
BFD_ASSERT (entry);
|
||||
|
||||
if (h == NULL
|
||||
|| h->forced_local == TRUE
|
||||
|| h->forced_local == true
|
||||
|| (! elf_hash_table (info)->dynamic_sections_created
|
||||
|| (bfd_link_pic (info)
|
||||
&& SYMBOL_REFERENCES_LOCAL (info, h))))
|
||||
|
@ -425,7 +425,7 @@ relocate_fix_got_relocs_for_got_info (struct got_entry ** list_p,
|
|||
BFD_ASSERT (0);
|
||||
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);
|
||||
}
|
||||
list->created_dyn_relocation = TRUE;
|
||||
list->created_dyn_relocation = true;
|
||||
}
|
||||
else if (list->existing_entries != TLS_GOT_NONE
|
||||
&& !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),
|
||||
(long) dynindx, (long) addend);
|
||||
}
|
||||
list->created_dyn_relocation = TRUE;
|
||||
list->created_dyn_relocation = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
250
bfd/archive.c
250
bfd/archive.c
|
@ -186,7 +186,7 @@ _bfd_ar_spacepad (char *p, size_t n, const char *fmt, long val)
|
|||
memcpy (p, buf, n);
|
||||
}
|
||||
|
||||
bfd_boolean
|
||||
bool
|
||||
_bfd_ar_sizepad (char *p, size_t n, bfd_size_type size)
|
||||
{
|
||||
char buf[21];
|
||||
|
@ -197,7 +197,7 @@ _bfd_ar_sizepad (char *p, size_t n, bfd_size_type size)
|
|||
if (len > n)
|
||||
{
|
||||
bfd_set_error (bfd_error_file_too_big);
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
if (len < n)
|
||||
{
|
||||
|
@ -206,17 +206,17 @@ _bfd_ar_sizepad (char *p, size_t n, bfd_size_type size)
|
|||
}
|
||||
else
|
||||
memcpy (p, buf, n);
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
bfd_boolean
|
||||
bool
|
||||
_bfd_generic_mkarchive (bfd *abfd)
|
||||
{
|
||||
size_t amt = sizeof (struct artdata);
|
||||
|
||||
abfd->tdata.aout_ar_data = (struct artdata *) bfd_zalloc (abfd, amt);
|
||||
if (bfd_ardata (abfd) == NULL)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
/* Already cleared by bfd_zalloc above.
|
||||
bfd_ardata (abfd)->cache = NULL;
|
||||
|
@ -226,7 +226,7 @@ _bfd_generic_mkarchive (bfd *abfd)
|
|||
bfd_ardata (abfd)->extended_names_size = 0;
|
||||
bfd_ardata (abfd)->tdata = NULL; */
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -284,18 +284,18 @@ FUNCTION
|
|||
bfd_set_archive_head
|
||||
|
||||
SYNOPSIS
|
||||
bfd_boolean bfd_set_archive_head (bfd *output, bfd *new_head);
|
||||
bool bfd_set_archive_head (bfd *output, bfd *new_head);
|
||||
|
||||
DESCRIPTION
|
||||
Set the head of the chain of
|
||||
BFDs contained in the archive @var{output} to @var{new_head}.
|
||||
*/
|
||||
|
||||
bfd_boolean
|
||||
bool
|
||||
bfd_set_archive_head (bfd *output_archive, bfd *new_head)
|
||||
{
|
||||
output_archive->archive_head = new_head;
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
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. */
|
||||
|
||||
bfd_boolean
|
||||
bool
|
||||
_bfd_add_bfd_to_archive_cache (bfd *arch_bfd, file_ptr filepos, bfd *new_elt)
|
||||
{
|
||||
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,
|
||||
NULL, _bfd_calloc_wrapper, free);
|
||||
if (hash_table == NULL)
|
||||
return FALSE;
|
||||
return false;
|
||||
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)->key = filepos;
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
static bfd *
|
||||
|
@ -924,7 +924,7 @@ bfd_generic_archive_p (bfd *abfd)
|
|||
abfd->no_element_cache = save;
|
||||
if (first != NULL)
|
||||
{
|
||||
first->target_defaulted = FALSE;
|
||||
first->target_defaulted = false;
|
||||
if (bfd_check_format (first, bfd_object)
|
||||
&& first->xvec != abfd->xvec)
|
||||
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,
|
||||
TRUE otherwise. */
|
||||
|
||||
static bfd_boolean
|
||||
static bool
|
||||
do_slurp_bsd_armap (bfd *abfd)
|
||||
{
|
||||
struct areltdata *mapdata;
|
||||
|
@ -969,7 +969,7 @@ do_slurp_bsd_armap (bfd *abfd)
|
|||
|
||||
mapdata = (struct areltdata *) _bfd_read_ar_hdr (abfd);
|
||||
if (mapdata == NULL)
|
||||
return FALSE;
|
||||
return false;
|
||||
parsed_size = mapdata->parsed_size;
|
||||
free (mapdata);
|
||||
/* 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)
|
||||
{
|
||||
bfd_set_error (bfd_error_malformed_archive);
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
raw_armap = (bfd_byte *) _bfd_alloc_and_read (abfd, parsed_size, parsed_size);
|
||||
if (raw_armap == NULL)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
parsed_size -= BSD_SYMDEF_COUNT_SIZE + BSD_STRING_COUNT_SIZE;
|
||||
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
|
||||
we are done using the strings from it. For now, it seems
|
||||
to be allocated on an objalloc anyway... */
|
||||
abfd->has_armap = TRUE;
|
||||
return TRUE;
|
||||
abfd->has_armap = true;
|
||||
return true;
|
||||
|
||||
release_armap:
|
||||
ardata->symdef_count = 0;
|
||||
ardata->symdefs = NULL;
|
||||
bfd_release (abfd, raw_armap);
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
/* Read a COFF archive symbol table. Returns FALSE on error, TRUE
|
||||
otherwise. */
|
||||
|
||||
static bfd_boolean
|
||||
static bool
|
||||
do_slurp_coff_armap (bfd *abfd)
|
||||
{
|
||||
struct areltdata *mapdata;
|
||||
|
@ -1060,12 +1060,12 @@ do_slurp_coff_armap (bfd *abfd)
|
|||
|
||||
mapdata = (struct areltdata *) _bfd_read_ar_hdr (abfd);
|
||||
if (mapdata == NULL)
|
||||
return FALSE;
|
||||
return false;
|
||||
parsed_size = mapdata->parsed_size;
|
||||
free (mapdata);
|
||||
|
||||
if (bfd_bread (int_buf, 4, abfd) != 4)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
/* It seems that all numeric information in a coff archive is always
|
||||
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))
|
||||
{
|
||||
bfd_set_error (bfd_error_no_memory);
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
filesize = bfd_get_file_size (abfd);
|
||||
|
@ -1088,7 +1088,7 @@ do_slurp_coff_armap (bfd *abfd)
|
|||
|| parsed_size - 4 < ptrsize)
|
||||
{
|
||||
bfd_set_error (bfd_error_malformed_archive);
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
stringsize = parsed_size - ptrsize - 4;
|
||||
|
@ -1096,13 +1096,13 @@ do_slurp_coff_armap (bfd *abfd)
|
|||
if (carsym_size + stringsize + 1 <= carsym_size)
|
||||
{
|
||||
bfd_set_error (bfd_error_no_memory);
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
/* Allocate and read in the raw offsets. */
|
||||
raw_armap = (int *) _bfd_malloc_and_read (abfd, ptrsize, ptrsize);
|
||||
if (raw_armap == NULL)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
ardata->symdefs = (struct carsym *) bfd_alloc (abfd,
|
||||
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)
|
||||
goto release_symdefs;
|
||||
|
||||
abfd->has_armap = TRUE;
|
||||
abfd->has_armap = true;
|
||||
free (raw_armap);
|
||||
|
||||
/* Check for a second archive header (as used by PE). */
|
||||
|
@ -1149,31 +1149,31 @@ do_slurp_coff_armap (bfd *abfd)
|
|||
free (tmp);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
release_symdefs:
|
||||
bfd_release (abfd, (ardata)->symdefs);
|
||||
free_armap:
|
||||
free (raw_armap);
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
/* This routine can handle either coff-style or bsd-style armaps
|
||||
(archive symbol table). Returns FALSE on error, TRUE otherwise */
|
||||
|
||||
bfd_boolean
|
||||
bool
|
||||
bfd_slurp_armap (bfd *abfd)
|
||||
{
|
||||
char nextname[17];
|
||||
int i = bfd_bread (nextname, 16, abfd);
|
||||
|
||||
if (i == 0)
|
||||
return TRUE;
|
||||
return true;
|
||||
if (i != 16)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
if (bfd_seek (abfd, (file_ptr) -16, SEEK_CUR) != 0)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
if (startswith (nextname, "__.SYMDEF ")
|
||||
|| startswith (nextname, "__.SYMDEF/ ")) /* Old Linux archives. */
|
||||
|
@ -1187,7 +1187,7 @@ bfd_slurp_armap (bfd *abfd)
|
|||
return _bfd_archive_64_bit_slurp_armap (abfd);
|
||||
#else
|
||||
bfd_set_error (bfd_error_wrong_format);
|
||||
return FALSE;
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
else if (startswith (nextname, "#1/20 "))
|
||||
|
@ -1199,20 +1199,20 @@ bfd_slurp_armap (bfd *abfd)
|
|||
char extname[21];
|
||||
|
||||
if (bfd_bread (&hdr, sizeof (hdr), abfd) != sizeof (hdr))
|
||||
return FALSE;
|
||||
return false;
|
||||
/* Read the extended name. We know its length. */
|
||||
if (bfd_bread (extname, 20, abfd) != 20)
|
||||
return FALSE;
|
||||
return false;
|
||||
if (bfd_seek (abfd, -(file_ptr) (sizeof (hdr) + 20), SEEK_CUR) != 0)
|
||||
return FALSE;
|
||||
return false;
|
||||
extname[20] = 0;
|
||||
if (startswith (extname, "__.SYMDEF SORTED")
|
||||
|| startswith (extname, "__.SYMDEF"))
|
||||
return do_slurp_bsd_armap (abfd);
|
||||
}
|
||||
|
||||
abfd->has_armap = FALSE;
|
||||
return TRUE;
|
||||
abfd->has_armap = false;
|
||||
return true;
|
||||
}
|
||||
|
||||
/** Extended name table.
|
||||
|
@ -1227,7 +1227,7 @@ bfd_slurp_armap (bfd *abfd)
|
|||
|
||||
/* Returns FALSE on error, TRUE otherwise. */
|
||||
|
||||
bfd_boolean
|
||||
bool
|
||||
_bfd_slurp_extended_name_table (bfd *abfd)
|
||||
{
|
||||
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,
|
||||
we probably don't want to return TRUE. */
|
||||
if (bfd_seek (abfd, bfd_ardata (abfd)->first_file_filepos, SEEK_SET) != 0)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
if (bfd_bread (nextname, 16, abfd) == 16)
|
||||
{
|
||||
|
@ -1244,19 +1244,19 @@ _bfd_slurp_extended_name_table (bfd *abfd)
|
|||
ufile_ptr filesize;
|
||||
|
||||
if (bfd_seek (abfd, (file_ptr) -16, SEEK_CUR) != 0)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
if (! startswith (nextname, "ARFILENAMES/ ")
|
||||
&& ! startswith (nextname, "// "))
|
||||
{
|
||||
bfd_ardata (abfd)->extended_names = NULL;
|
||||
bfd_ardata (abfd)->extended_names_size = 0;
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
namedata = (struct areltdata *) _bfd_read_ar_hdr (abfd);
|
||||
if (namedata == NULL)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
filesize = bfd_get_file_size (abfd);
|
||||
amt = namedata->parsed_size;
|
||||
|
@ -1274,7 +1274,7 @@ _bfd_slurp_extended_name_table (bfd *abfd)
|
|||
free (namedata);
|
||||
bfd_ardata (abfd)->extended_names = NULL;
|
||||
bfd_ardata (abfd)->extended_names_size = 0;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (bfd_bread (bfd_ardata (abfd)->extended_names, amt, abfd) != amt)
|
||||
|
@ -1314,7 +1314,7 @@ _bfd_slurp_extended_name_table (bfd *abfd)
|
|||
|
||||
free (namedata);
|
||||
}
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
#ifdef VMS
|
||||
|
@ -1497,35 +1497,35 @@ adjust_relative_path (const char * path, const char * ref_path)
|
|||
|
||||
/* Build a BFD style extended name table. */
|
||||
|
||||
bfd_boolean
|
||||
bool
|
||||
_bfd_archive_bsd_construct_extended_name_table (bfd *abfd,
|
||||
char **tabloc,
|
||||
bfd_size_type *tablen,
|
||||
const char **name)
|
||||
{
|
||||
*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. */
|
||||
|
||||
bfd_boolean
|
||||
bool
|
||||
_bfd_archive_coff_construct_extended_name_table (bfd *abfd,
|
||||
char **tabloc,
|
||||
bfd_size_type *tablen,
|
||||
const char **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,
|
||||
char **tabloc ATTRIBUTE_UNUSED,
|
||||
bfd_size_type *len ATTRIBUTE_UNUSED,
|
||||
const char **name ATTRIBUTE_UNUSED)
|
||||
{
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
/* 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
|
||||
zero-length tablen! */
|
||||
|
||||
bfd_boolean
|
||||
bool
|
||||
_bfd_construct_extended_name_table (bfd *abfd,
|
||||
bfd_boolean trailing_slash,
|
||||
bool trailing_slash,
|
||||
char **tabloc,
|
||||
bfd_size_type *tablen)
|
||||
{
|
||||
|
@ -1598,7 +1598,7 @@ _bfd_construct_extended_name_table (bfd *abfd,
|
|||
|
||||
normal = normalize (abfd, bfd_get_filename (current));
|
||||
if (normal == NULL)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
thislen = strlen (normal);
|
||||
|
||||
|
@ -1634,11 +1634,11 @@ _bfd_construct_extended_name_table (bfd *abfd,
|
|||
}
|
||||
|
||||
if (total_namelen == 0)
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
*tabloc = (char *) bfd_alloc (abfd, total_namelen);
|
||||
if (*tabloc == NULL)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
*tablen = total_namelen;
|
||||
strptr = *tabloc;
|
||||
|
@ -1679,7 +1679,7 @@ _bfd_construct_extended_name_table (bfd *abfd,
|
|||
{
|
||||
normal = normalize (abfd, filename);
|
||||
if (normal == NULL)
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
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
|
||||
its extended form. */
|
||||
|
||||
bfd_boolean
|
||||
bool
|
||||
_bfd_archive_bsd44_construct_extended_name_table (bfd *abfd,
|
||||
char **tabloc,
|
||||
bfd_size_type *tablen,
|
||||
|
@ -1744,7 +1744,7 @@ _bfd_archive_bsd44_construct_extended_name_table (bfd *abfd,
|
|||
unsigned int len;
|
||||
|
||||
if (normal == NULL)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
for (len = 0; normal[len]; 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. */
|
||||
|
||||
bfd_boolean
|
||||
bool
|
||||
_bfd_generic_write_ar_hdr (bfd *archive, bfd *abfd)
|
||||
{
|
||||
struct ar_hdr *hdr = arch_hdr (abfd);
|
||||
|
||||
if (bfd_bwrite (hdr, sizeof (*hdr), archive) != sizeof (*hdr))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
/* Write an archive header using BSD4.4 convention. */
|
||||
|
||||
bfd_boolean
|
||||
bool
|
||||
_bfd_bsd44_write_ar_hdr (bfd *archive, bfd *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),
|
||||
arch_eltdata (abfd)->parsed_size + padded_len))
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
if (bfd_bwrite (hdr, sizeof (*hdr), archive) != sizeof (*hdr))
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
if (bfd_bwrite (fullname, len, archive) != len)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
if (len & 3)
|
||||
{
|
||||
|
@ -1807,18 +1807,18 @@ _bfd_bsd44_write_ar_hdr (bfd *archive, bfd *abfd)
|
|||
|
||||
len = 4 - (len & 3);
|
||||
if (bfd_bwrite (pad, len, archive) != len)
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
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)
|
||||
{
|
||||
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. */
|
||||
|
||||
bfd_boolean
|
||||
bool
|
||||
_bfd_write_archive_contents (bfd *arch)
|
||||
{
|
||||
bfd *current;
|
||||
char *etable = NULL;
|
||||
bfd_size_type elength = 0;
|
||||
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. */
|
||||
bfd_boolean hasobjects = FALSE;
|
||||
bool hasobjects = false;
|
||||
bfd_size_type wrote;
|
||||
int tries;
|
||||
char *armag;
|
||||
|
@ -2143,27 +2143,27 @@ _bfd_write_archive_contents (bfd *arch)
|
|||
if (makemap && ! hasobjects)
|
||||
{ /* Don't bother if we won't make a map! */
|
||||
if ((bfd_check_format (current, bfd_object)))
|
||||
hasobjects = TRUE;
|
||||
hasobjects = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (!BFD_SEND (arch, _bfd_construct_extended_name_table,
|
||||
(arch, &etable, &elength, &ename)))
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
if (bfd_seek (arch, (file_ptr) 0, SEEK_SET) != 0)
|
||||
return FALSE;
|
||||
return false;
|
||||
armag = ARMAG;
|
||||
if (bfd_is_thin_archive (arch))
|
||||
armag = ARMAGT;
|
||||
wrote = bfd_bwrite (armag, SARMAG, arch);
|
||||
if (wrote != SARMAG)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
if (makemap && hasobjects)
|
||||
{
|
||||
if (! _bfd_compute_and_write_armap (arch, (unsigned int) elength))
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (elength != 0)
|
||||
|
@ -2175,16 +2175,16 @@ _bfd_write_archive_contents (bfd *arch)
|
|||
/* Round size up to even number in archive header. */
|
||||
if (!_bfd_ar_sizepad (hdr.ar_size, sizeof (hdr.ar_size),
|
||||
(elength + 1) & ~(bfd_size_type) 1))
|
||||
return FALSE;
|
||||
return false;
|
||||
memcpy (hdr.ar_fmag, ARFMAG, 2);
|
||||
if ((bfd_bwrite (&hdr, sizeof (struct ar_hdr), arch)
|
||||
!= sizeof (struct ar_hdr))
|
||||
|| bfd_bwrite (etable, elength, arch) != elength)
|
||||
return FALSE;
|
||||
return false;
|
||||
if ((elength % 2) == 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. */
|
||||
if (!_bfd_write_ar_hdr (arch, current))
|
||||
return FALSE;
|
||||
return false;
|
||||
if (bfd_is_thin_archive (arch))
|
||||
continue;
|
||||
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)
|
||||
goto input_err;
|
||||
if (bfd_bwrite (buffer, amt, arch) != amt)
|
||||
return FALSE;
|
||||
return false;
|
||||
remaining -= amt;
|
||||
}
|
||||
|
||||
if ((arelt_size (current) % 2) == 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);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
input_err:
|
||||
bfd_set_input_error (current, bfd_get_error ());
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
/* Note that the namidx for the first symbol is 0. */
|
||||
|
||||
bfd_boolean
|
||||
bool
|
||||
_bfd_compute_and_write_armap (bfd *arch, unsigned int elength)
|
||||
{
|
||||
char *first_name = NULL;
|
||||
|
@ -2264,9 +2264,9 @@ _bfd_compute_and_write_armap (bfd *arch, unsigned int elength)
|
|||
int stridx = 0;
|
||||
asymbol **syms = NULL;
|
||||
long syms_max = 0;
|
||||
bfd_boolean ret;
|
||||
bool ret;
|
||||
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... */
|
||||
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)
|
||||
{
|
||||
report_plugin_err = FALSE;
|
||||
report_plugin_err = false;
|
||||
_bfd_error_handler
|
||||
(_("%pB: plugin needed to handle lto object"),
|
||||
current);
|
||||
|
@ -2363,7 +2363,7 @@ _bfd_compute_and_write_armap (bfd *arch, unsigned int elength)
|
|||
"__gnu_lto_slim") == 0
|
||||
&& report_plugin_err)
|
||||
{
|
||||
report_plugin_err = FALSE;
|
||||
report_plugin_err = false;
|
||||
_bfd_error_handler
|
||||
(_("%pB: plugin needed to handle lto object"),
|
||||
current);
|
||||
|
@ -2411,10 +2411,10 @@ _bfd_compute_and_write_armap (bfd *arch, unsigned int elength)
|
|||
if (first_name != NULL)
|
||||
bfd_release (arch, first_name);
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
bfd_boolean
|
||||
bool
|
||||
_bfd_bsd_write_armap (bfd *arch,
|
||||
unsigned int elength,
|
||||
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_gid, sizeof (hdr.ar_gid), "%ld", gid);
|
||||
if (!_bfd_ar_sizepad (hdr.ar_size, sizeof (hdr.ar_size), mapsize))
|
||||
return FALSE;
|
||||
return false;
|
||||
memcpy (hdr.ar_fmag, ARFMAG, 2);
|
||||
if (bfd_bwrite (&hdr, sizeof (struct ar_hdr), arch)
|
||||
!= sizeof (struct ar_hdr))
|
||||
return FALSE;
|
||||
return false;
|
||||
H_PUT_32 (arch, ranlibsize, temp);
|
||||
if (bfd_bwrite (temp, sizeof (temp), arch) != sizeof (temp))
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
firstreal = first;
|
||||
current = arch->archive_head;
|
||||
|
@ -2536,7 +2536,7 @@ _bfd_bsd_write_armap (bfd *arch,
|
|||
if (firstreal != (file_ptr) offset)
|
||||
{
|
||||
bfd_set_error (bfd_error_file_truncated);
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
last_elt = current;
|
||||
|
@ -2544,19 +2544,19 @@ _bfd_bsd_write_armap (bfd *arch,
|
|||
H_PUT_32 (arch, firstreal, buf + BSD_SYMDEF_OFFSET_SIZE);
|
||||
if (bfd_bwrite (buf, BSD_SYMDEF_SIZE, arch)
|
||||
!= BSD_SYMDEF_SIZE)
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
/* Now write the strings themselves. */
|
||||
H_PUT_32 (arch, stringsize, temp);
|
||||
if (bfd_bwrite (temp, sizeof (temp), arch) != sizeof (temp))
|
||||
return FALSE;
|
||||
return false;
|
||||
for (count = 0; count < orl_count; count++)
|
||||
{
|
||||
size_t len = strlen (*map[count].name) + 1;
|
||||
|
||||
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
|
||||
|
@ -2564,10 +2564,10 @@ _bfd_bsd_write_armap (bfd *arch,
|
|||
if (padit)
|
||||
{
|
||||
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
|
||||
|
@ -2576,7 +2576,7 @@ _bfd_bsd_write_armap (bfd *arch,
|
|||
Return TRUE if the timestamp was OK, or an unusual problem happened.
|
||||
Return FALSE if we updated the timestamp. */
|
||||
|
||||
bfd_boolean
|
||||
bool
|
||||
_bfd_archive_bsd_update_armap_timestamp (bfd *arch)
|
||||
{
|
||||
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 ((arch->flags & BFD_DETERMINISTIC_OUTPUT) != 0)
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
/* Flush writes, get last-write timestamp from file, and compare it
|
||||
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"));
|
||||
|
||||
/* Can't read mod time for some reason. */
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
if (((long) archstat.st_mtime) <= bfd_ardata (arch)->armap_timestamp)
|
||||
/* OK by the linker's rules. */
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
/* Update the timestamp. */
|
||||
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"));
|
||||
|
||||
/* Some error while writing. */
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
/* We updated the timestamp successfully. */
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
/* A coff armap looks like :
|
||||
|
@ -2638,7 +2638,7 @@ _bfd_archive_bsd_update_armap_timestamp (bfd *arch)
|
|||
|
||||
symbol name n-1 */
|
||||
|
||||
bfd_boolean
|
||||
bool
|
||||
_bfd_coff_write_armap (bfd *arch,
|
||||
unsigned int elength,
|
||||
struct orl *map,
|
||||
|
@ -2701,7 +2701,7 @@ _bfd_coff_write_armap (bfd *arch,
|
|||
memset (&hdr, ' ', sizeof (struct ar_hdr));
|
||||
hdr.ar_name[0] = '/';
|
||||
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",
|
||||
((arch->flags & BFD_DETERMINISTIC_OUTPUT) == 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. */
|
||||
if (bfd_bwrite (&hdr, sizeof (struct ar_hdr), arch)
|
||||
!= sizeof (struct ar_hdr))
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
if (!bfd_write_bigendian_4byte_int (arch, symbol_count))
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
/* Two passes, first write the file offsets for each symbol -
|
||||
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)
|
||||
{
|
||||
bfd_set_error (bfd_error_file_truncated);
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
if (!bfd_write_bigendian_4byte_int (arch, offset))
|
||||
return FALSE;
|
||||
return false;
|
||||
count++;
|
||||
}
|
||||
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;
|
||||
|
||||
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
|
||||
|
@ -2772,13 +2772,13 @@ _bfd_coff_write_armap (bfd *arch,
|
|||
if (padit)
|
||||
{
|
||||
if (bfd_bwrite ("", 1, arch) != 1)
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
bfd_boolean
|
||||
bool
|
||||
_bfd_noarchive_write_armap
|
||||
(bfd *arch ATTRIBUTE_UNUSED,
|
||||
unsigned int elength ATTRIBUTE_UNUSED,
|
||||
|
@ -2786,7 +2786,7 @@ _bfd_noarchive_write_armap
|
|||
unsigned int orl_count ATTRIBUTE_UNUSED,
|
||||
int stridx ATTRIBUTE_UNUSED)
|
||||
{
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -2822,7 +2822,7 @@ _bfd_unlink_from_archive_parent (bfd *abfd)
|
|||
}
|
||||
}
|
||||
|
||||
bfd_boolean
|
||||
bool
|
||||
_bfd_archive_close_and_cleanup (bfd *abfd)
|
||||
{
|
||||
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)
|
||||
(*abfd->link.hash->hash_table_free) (abfd);
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
|
||||
/* Read an Irix 6 armap. */
|
||||
|
||||
bfd_boolean
|
||||
bool
|
||||
_bfd_archive_64_bit_slurp_armap (bfd *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. */
|
||||
i = bfd_bread (nextname, 16, abfd);
|
||||
if (i == 0)
|
||||
return TRUE;
|
||||
return true;
|
||||
if (i != 16)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
if (bfd_seek (abfd, (file_ptr) - 16, SEEK_CUR) != 0)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
/* Archives with traditional armaps are still permitted. */
|
||||
if (startswith (nextname, "/ "))
|
||||
|
@ -67,13 +67,13 @@ _bfd_archive_64_bit_slurp_armap (bfd *abfd)
|
|||
|
||||
if (! startswith (nextname, "/SYM64/ "))
|
||||
{
|
||||
abfd->has_armap = FALSE;
|
||||
return TRUE;
|
||||
abfd->has_armap = false;
|
||||
return true;
|
||||
}
|
||||
|
||||
mapdata = (struct areltdata *) _bfd_read_ar_hdr (abfd);
|
||||
if (mapdata == NULL)
|
||||
return FALSE;
|
||||
return false;
|
||||
parsed_size = mapdata->parsed_size;
|
||||
free (mapdata);
|
||||
|
||||
|
@ -81,14 +81,14 @@ _bfd_archive_64_bit_slurp_armap (bfd *abfd)
|
|||
if (filesize != 0 && parsed_size > filesize)
|
||||
{
|
||||
bfd_set_error (bfd_error_malformed_archive);
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (bfd_bread (int_buf, 8, abfd) != 8)
|
||||
{
|
||||
if (bfd_get_error () != bfd_error_system_call)
|
||||
bfd_set_error (bfd_error_malformed_archive);
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
nsymz = bfd_getb64 (int_buf);
|
||||
|
@ -108,11 +108,11 @@ _bfd_archive_64_bit_slurp_armap (bfd *abfd)
|
|||
|| amt <= stringsize)
|
||||
{
|
||||
bfd_set_error (bfd_error_malformed_archive);
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
ardata->symdefs = (struct carsym *) bfd_alloc (abfd, amt);
|
||||
if (ardata->symdefs == NULL)
|
||||
return FALSE;
|
||||
return false;
|
||||
carsyms = ardata->symdefs;
|
||||
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. */
|
||||
ardata->first_file_filepos += (ardata->first_file_filepos) % 2;
|
||||
|
||||
abfd->has_armap = TRUE;
|
||||
abfd->has_armap = true;
|
||||
bfd_release (abfd, raw_armap);
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
release_symdefs:
|
||||
bfd_release (abfd, ardata->symdefs);
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
/* 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
|
||||
linker crashes. */
|
||||
|
||||
bfd_boolean
|
||||
bool
|
||||
_bfd_archive_64_bit_write_armap (bfd *arch,
|
||||
unsigned int elength,
|
||||
struct orl *map,
|
||||
|
@ -185,7 +185,7 @@ _bfd_archive_64_bit_write_armap (bfd *arch,
|
|||
memset (&hdr, ' ', sizeof (struct ar_hdr));
|
||||
memcpy (hdr.ar_name, "/SYM64/", strlen ("/SYM64/"));
|
||||
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",
|
||||
time (NULL));
|
||||
/* 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)
|
||||
!= sizeof (struct ar_hdr))
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
bfd_putb64 ((bfd_vma) symbol_count, buf);
|
||||
if (bfd_bwrite (buf, 8, arch) != 8)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
/* Two passes, first write the file offsets for each symbol -
|
||||
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);
|
||||
if (bfd_bwrite (buf, 8, arch) != 8)
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
/* 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;
|
||||
|
||||
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.
|
||||
|
@ -248,9 +248,9 @@ _bfd_archive_64_bit_write_armap (bfd *arch,
|
|||
while (padding != 0)
|
||||
{
|
||||
if (bfd_bwrite ("", 1, arch) != 1)
|
||||
return FALSE;
|
||||
return false;
|
||||
--padding;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -581,17 +581,16 @@ DESCRIPTION
|
|||
. {* TRUE if this is the default machine for the architecture.
|
||||
. The default arch should be the first entry for an arch so that
|
||||
. 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 *);
|
||||
.
|
||||
. 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
|
||||
. IS_BIGENDIAN is TRUE, the order of bytes is big endian. If CODE is
|
||||
. TRUE, the buffer contains code. *}
|
||||
. void *(*fill) (bfd_size_type count, bfd_boolean is_bigendian,
|
||||
. bfd_boolean code);
|
||||
. void *(*fill) (bfd_size_type count, bool is_bigendian, bool code);
|
||||
.
|
||||
. const struct bfd_arch_info *next;
|
||||
.
|
||||
|
@ -892,7 +891,7 @@ FUNCTION
|
|||
|
||||
SYNOPSIS
|
||||
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
|
||||
Determine whether two BFDs' architectures and machine types
|
||||
|
@ -905,7 +904,7 @@ DESCRIPTION
|
|||
const bfd_arch_info_type *
|
||||
bfd_arch_get_compatible (const bfd *abfd,
|
||||
const bfd *bbfd,
|
||||
bfd_boolean accept_unknowns)
|
||||
bool accept_unknowns)
|
||||
{
|
||||
const bfd *ubfd, *kbfd;
|
||||
|
||||
|
@ -946,7 +945,7 @@ DESCRIPTION
|
|||
|
||||
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_scan,
|
||||
bfd_arch_default_fill,
|
||||
|
@ -975,7 +974,7 @@ FUNCTION
|
|||
bfd_default_set_arch_mach
|
||||
|
||||
SYNOPSIS
|
||||
bfd_boolean bfd_default_set_arch_mach
|
||||
bool bfd_default_set_arch_mach
|
||||
(bfd *abfd, enum bfd_architecture arch, unsigned long mach);
|
||||
|
||||
DESCRIPTION
|
||||
|
@ -985,18 +984,18 @@ DESCRIPTION
|
|||
pointer.
|
||||
*/
|
||||
|
||||
bfd_boolean
|
||||
bool
|
||||
bfd_default_set_arch_mach (bfd *abfd,
|
||||
enum bfd_architecture arch,
|
||||
unsigned long mach)
|
||||
{
|
||||
abfd->arch_info = bfd_lookup_arch (arch, mach);
|
||||
if (abfd->arch_info != NULL)
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
abfd->arch_info = &bfd_default_arch_struct;
|
||||
bfd_set_error (bfd_error_bad_value);
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1107,7 +1106,7 @@ INTERNAL_FUNCTION
|
|||
bfd_default_scan
|
||||
|
||||
SYNOPSIS
|
||||
bfd_boolean bfd_default_scan
|
||||
bool bfd_default_scan
|
||||
(const struct bfd_arch_info *info, const char *string);
|
||||
|
||||
DESCRIPTION
|
||||
|
@ -1115,7 +1114,7 @@ DESCRIPTION
|
|||
architecture hit and a machine hit.
|
||||
*/
|
||||
|
||||
bfd_boolean
|
||||
bool
|
||||
bfd_default_scan (const bfd_arch_info_type *info, const char *string)
|
||||
{
|
||||
const char *ptr_src;
|
||||
|
@ -1128,11 +1127,11 @@ bfd_default_scan (const bfd_arch_info_type *info, const char *string)
|
|||
default architecture? */
|
||||
if (strcasecmp (string, info->arch_name) == 0
|
||||
&& info->the_default)
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
/* Exact match of the machine name (PRINTABLE_NAME)? */
|
||||
if (strcasecmp (string, info->printable_name) == 0)
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
/* Given that printable_name contains no colon, attempt to match:
|
||||
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,
|
||||
info->printable_name) == 0)
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (strcasecmp (string + strlen_arch_name,
|
||||
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
|
||||
&& strcasecmp (string + colon_index,
|
||||
info->printable_name + colon_index + 1) == 0)
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
/* 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;
|
||||
|
||||
default:
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (arch != info->arch)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
if (number != info->mach)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1441,8 +1440,8 @@ INTERNAL_FUNCTION
|
|||
|
||||
SYNOPSIS
|
||||
void *bfd_arch_default_fill (bfd_size_type count,
|
||||
bfd_boolean is_bigendian,
|
||||
bfd_boolean code);
|
||||
bool is_bigendian,
|
||||
bool code);
|
||||
|
||||
DESCRIPTION
|
||||
Allocate via bfd_malloc and return a fill buffer of size COUNT.
|
||||
|
@ -1452,8 +1451,8 @@ DESCRIPTION
|
|||
|
||||
void *
|
||||
bfd_arch_default_fill (bfd_size_type count,
|
||||
bfd_boolean is_bigendian ATTRIBUTE_UNUSED,
|
||||
bfd_boolean code ATTRIBUTE_UNUSED)
|
||||
bool is_bigendian ATTRIBUTE_UNUSED,
|
||||
bool code ATTRIBUTE_UNUSED)
|
||||
{
|
||||
void *fill = bfd_malloc (count);
|
||||
if (fill != NULL)
|
||||
|
@ -1461,7 +1460,7 @@ bfd_arch_default_fill (bfd_size_type count,
|
|||
return fill;
|
||||
}
|
||||
|
||||
bfd_boolean
|
||||
bool
|
||||
_bfd_nowrite_set_arch_mach (bfd *abfd,
|
||||
enum bfd_architecture arch ATTRIBUTE_UNUSED,
|
||||
unsigned long mach ATTRIBUTE_UNUSED)
|
||||
|
|
29
bfd/bfd-in.h
29
bfd/bfd-in.h
|
@ -339,7 +339,7 @@ struct bfd_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_entry *(*) (struct bfd_hash_entry *,
|
||||
struct bfd_hash_table *,
|
||||
|
@ -347,7 +347,7 @@ extern bfd_boolean bfd_hash_table_init
|
|||
unsigned int);
|
||||
|
||||
/* 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_entry *(*) (struct bfd_hash_entry *,
|
||||
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
|
||||
into newly allocated memory when adding an entry. */
|
||||
extern struct bfd_hash_entry *bfd_hash_lookup
|
||||
(struct bfd_hash_table *, const char *, bfd_boolean create,
|
||||
bfd_boolean copy);
|
||||
(struct bfd_hash_table *, const char *, bool create, bool copy);
|
||||
|
||||
/* Insert an entry in a hash table. */
|
||||
extern struct bfd_hash_entry *bfd_hash_insert
|
||||
|
@ -392,7 +391,7 @@ extern void *bfd_hash_allocate
|
|||
INFO argument is passed to the function. */
|
||||
extern void bfd_hash_traverse
|
||||
(struct bfd_hash_table *,
|
||||
bfd_boolean (*) (struct bfd_hash_entry *, void *),
|
||||
bool (*) (struct bfd_hash_entry *, void *),
|
||||
void *info);
|
||||
|
||||
/* 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
|
||||
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);
|
||||
/* 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
|
||||
(bfd *, unsigned long, bfd_boolean, flagword, bfd_boolean, bfd_vma,
|
||||
bfd_boolean, bfd_boolean, unsigned int, struct bfd_section **);
|
||||
extern bool bfd_record_phdr
|
||||
(bfd *, unsigned long, bool, flagword, bool, bfd_vma,
|
||||
bool, bool, unsigned int, struct bfd_section **);
|
||||
|
||||
/* Byte swapping routines. */
|
||||
|
||||
|
@ -490,8 +489,8 @@ void bfd_putl16 (bfd_vma, void *);
|
|||
|
||||
/* Byte swapping routines which take size and endiannes as arguments. */
|
||||
|
||||
bfd_uint64_t bfd_get_bits (const void *, int, bfd_boolean);
|
||||
void bfd_put_bits (bfd_uint64_t, void *, int, bfd_boolean);
|
||||
bfd_uint64_t bfd_get_bits (const void *, int, bool);
|
||||
void bfd_put_bits (bfd_uint64_t, void *, int, bool);
|
||||
|
||||
|
||||
/* mmap hacks */
|
||||
|
@ -518,8 +517,8 @@ extern void bfd_init_window
|
|||
(bfd_window *);
|
||||
extern void bfd_free_window
|
||||
(bfd_window *);
|
||||
extern bfd_boolean bfd_get_file_window
|
||||
(bfd *, file_ptr, bfd_size_type, bfd_window *, bfd_boolean);
|
||||
extern bool bfd_get_file_window
|
||||
(bfd *, file_ptr, bfd_size_type, bfd_window *, bool);
|
||||
|
||||
/* Externally visible ELF routines. */
|
||||
|
||||
|
@ -551,7 +550,7 @@ struct bfd_link_hash_entry;
|
|||
|
||||
/* 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)
|
||||
{
|
||||
return strncmp (str, prefix, strlen (prefix)) == 0;
|
||||
|
|
435
bfd/bfd-in2.h
435
bfd/bfd-in2.h
File diff suppressed because it is too large
Load diff
118
bfd/bfd.c
118
bfd/bfd.c
|
@ -372,7 +372,7 @@ CODE_FRAGMENT
|
|||
. return abfd->filename;
|
||||
.}
|
||||
.
|
||||
.static inline bfd_boolean
|
||||
.static inline bool
|
||||
.bfd_get_cacheable (const bfd *abfd)
|
||||
.{
|
||||
. return abfd->cacheable;
|
||||
|
@ -420,13 +420,13 @@ CODE_FRAGMENT
|
|||
. return abfd->section_count;
|
||||
.}
|
||||
.
|
||||
.static inline bfd_boolean
|
||||
.static inline bool
|
||||
.bfd_has_map (const bfd *abfd)
|
||||
.{
|
||||
. return abfd->has_armap;
|
||||
.}
|
||||
.
|
||||
.static inline bfd_boolean
|
||||
.static inline bool
|
||||
.bfd_is_thin_archive (const bfd *abfd)
|
||||
.{
|
||||
. return abfd->is_thin_archive;
|
||||
|
@ -439,15 +439,15 @@ CODE_FRAGMENT
|
|||
.}
|
||||
.
|
||||
.{* See note beside bfd_set_section_userdata. *}
|
||||
.static inline bfd_boolean
|
||||
.bfd_set_cacheable (bfd * abfd, bfd_boolean val)
|
||||
.static inline bool
|
||||
.bfd_set_cacheable (bfd * abfd, bool val)
|
||||
.{
|
||||
. abfd->cacheable = val;
|
||||
. return TRUE;
|
||||
. return true;
|
||||
.}
|
||||
.
|
||||
.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;
|
||||
.}
|
||||
|
@ -582,7 +582,7 @@ CODE_FRAGMENT
|
|||
. abfd->sections = s;
|
||||
.}
|
||||
.
|
||||
.static inline bfd_boolean
|
||||
.static inline bool
|
||||
.bfd_section_removed_from_list (const bfd *abfd, const asection *s)
|
||||
.{
|
||||
. return s->next ? s->next->prev != s : abfd->section_last != s;
|
||||
|
@ -1615,7 +1615,7 @@ FUNCTION
|
|||
bfd_set_file_flags
|
||||
|
||||
SYNOPSIS
|
||||
bfd_boolean bfd_set_file_flags (bfd *abfd, flagword flags);
|
||||
bool bfd_set_file_flags (bfd *abfd, flagword flags);
|
||||
|
||||
DESCRIPTION
|
||||
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)
|
||||
{
|
||||
if (abfd->format != bfd_object)
|
||||
{
|
||||
bfd_set_error (bfd_error_wrong_format);
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (bfd_read_p (abfd))
|
||||
{
|
||||
bfd_set_error (bfd_error_invalid_operation);
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
abfd->flags = flags;
|
||||
if ((flags & bfd_applicable_file_flags (abfd)) != flags)
|
||||
{
|
||||
bfd_set_error (bfd_error_invalid_operation);
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -1769,7 +1769,7 @@ FUNCTION
|
|||
bfd_set_start_address
|
||||
|
||||
SYNOPSIS
|
||||
bfd_boolean bfd_set_start_address (bfd *abfd, bfd_vma vma);
|
||||
bool bfd_set_start_address (bfd *abfd, bfd_vma vma);
|
||||
|
||||
DESCRIPTION
|
||||
Make @var{vma} the entry point of output BFD @var{abfd}.
|
||||
|
@ -1778,11 +1778,11 @@ RETURNS
|
|||
Returns <<TRUE>> on success, <<FALSE>> otherwise.
|
||||
*/
|
||||
|
||||
bfd_boolean
|
||||
bool
|
||||
bfd_set_start_address (bfd *abfd, bfd_vma vma)
|
||||
{
|
||||
abfd->start_address = vma;
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1970,7 +1970,7 @@ FUNCTION
|
|||
bfd_copy_private_header_data
|
||||
|
||||
SYNOPSIS
|
||||
bfd_boolean bfd_copy_private_header_data (bfd *ibfd, bfd *obfd);
|
||||
bool bfd_copy_private_header_data (bfd *ibfd, bfd *obfd);
|
||||
|
||||
DESCRIPTION
|
||||
Copy private BFD header information from the BFD @var{ibfd} to the
|
||||
|
@ -1993,7 +1993,7 @@ FUNCTION
|
|||
bfd_copy_private_bfd_data
|
||||
|
||||
SYNOPSIS
|
||||
bfd_boolean bfd_copy_private_bfd_data (bfd *ibfd, bfd *obfd);
|
||||
bool bfd_copy_private_bfd_data (bfd *ibfd, bfd *obfd);
|
||||
|
||||
DESCRIPTION
|
||||
Copy private BFD information from the BFD @var{ibfd} to the
|
||||
|
@ -2014,7 +2014,7 @@ FUNCTION
|
|||
bfd_set_private_flags
|
||||
|
||||
SYNOPSIS
|
||||
bfd_boolean bfd_set_private_flags (bfd *abfd, flagword flags);
|
||||
bool bfd_set_private_flags (bfd *abfd, flagword flags);
|
||||
|
||||
DESCRIPTION
|
||||
Set private BFD flag information in the BFD @var{abfd}.
|
||||
|
@ -2132,7 +2132,7 @@ DESCRIPTION
|
|||
.
|
||||
.extern bfd_byte *bfd_get_relocated_section_contents
|
||||
. (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_order *link_order,
|
||||
bfd_byte *data,
|
||||
bfd_boolean relocatable,
|
||||
bool relocatable,
|
||||
asymbol **symbols)
|
||||
{
|
||||
bfd *abfd2;
|
||||
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)
|
||||
{
|
||||
|
@ -2165,15 +2165,15 @@ bfd_get_relocated_section_contents (bfd *abfd,
|
|||
|
||||
/* Record information about an ELF program header. */
|
||||
|
||||
bfd_boolean
|
||||
bool
|
||||
bfd_record_phdr (bfd *abfd,
|
||||
unsigned long type,
|
||||
bfd_boolean flags_valid,
|
||||
bool flags_valid,
|
||||
flagword flags,
|
||||
bfd_boolean at_valid,
|
||||
bool at_valid,
|
||||
bfd_vma at, /* Bytes. */
|
||||
bfd_boolean includes_filehdr,
|
||||
bfd_boolean includes_phdrs,
|
||||
bool includes_filehdr,
|
||||
bool includes_phdrs,
|
||||
unsigned int count,
|
||||
asection **secs)
|
||||
{
|
||||
|
@ -2182,13 +2182,13 @@ bfd_record_phdr (bfd *abfd,
|
|||
unsigned int opb = bfd_octets_per_byte (abfd, NULL);
|
||||
|
||||
if (bfd_get_flavour (abfd) != bfd_target_elf_flavour)
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
amt = sizeof (struct elf_segment_map);
|
||||
amt += ((bfd_size_type) count - 1) * sizeof (asection *);
|
||||
m = (struct elf_segment_map *) bfd_zalloc (abfd, amt);
|
||||
if (m == NULL)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
m->p_type = type;
|
||||
m->p_flags = flags;
|
||||
|
@ -2205,13 +2205,13 @@ bfd_record_phdr (bfd *abfd,
|
|||
;
|
||||
*pm = m;
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
#ifdef BFD64
|
||||
/* Return true iff this target is 32-bit. */
|
||||
|
||||
static bfd_boolean
|
||||
static bool
|
||||
is32bit (bfd *abfd)
|
||||
{
|
||||
if (bfd_get_flavour (abfd) == bfd_target_elf_flavour)
|
||||
|
@ -2259,7 +2259,7 @@ FUNCTION
|
|||
bfd_alt_mach_code
|
||||
|
||||
SYNOPSIS
|
||||
bfd_boolean bfd_alt_mach_code (bfd *abfd, int alternative);
|
||||
bool bfd_alt_mach_code (bfd *abfd, int alternative);
|
||||
|
||||
DESCRIPTION
|
||||
|
||||
|
@ -2270,7 +2270,7 @@ DESCRIPTION
|
|||
machine codes.
|
||||
*/
|
||||
|
||||
bfd_boolean
|
||||
bool
|
||||
bfd_alt_mach_code (bfd *abfd, int alternative)
|
||||
{
|
||||
if (bfd_get_flavour (abfd) == bfd_target_elf_flavour)
|
||||
|
@ -2286,25 +2286,25 @@ bfd_alt_mach_code (bfd *abfd, int alternative)
|
|||
case 1:
|
||||
code = get_elf_backend_data (abfd)->elf_machine_alt1;
|
||||
if (code == 0)
|
||||
return FALSE;
|
||||
return false;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
code = get_elf_backend_data (abfd)->elf_machine_alt2;
|
||||
if (code == 0)
|
||||
return FALSE;
|
||||
return false;
|
||||
break;
|
||||
|
||||
default:
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
elf_elfheader (abfd)->e_machine = code;
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -2340,7 +2340,7 @@ FUNCTION
|
|||
bfd_emul_get_commonpagesize
|
||||
|
||||
SYNOPSIS
|
||||
bfd_vma bfd_emul_get_commonpagesize (const char *, bfd_boolean);
|
||||
bfd_vma bfd_emul_get_commonpagesize (const char *, bool);
|
||||
|
||||
DESCRIPTION
|
||||
Returns the common page size, in bytes, as determined by
|
||||
|
@ -2351,7 +2351,7 @@ RETURNS
|
|||
*/
|
||||
|
||||
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;
|
||||
|
||||
|
@ -2391,7 +2391,7 @@ bfd_demangle (bfd *abfd, const char *name, int options)
|
|||
char *res, *alloc;
|
||||
const char *pre, *suf;
|
||||
size_t pre_len;
|
||||
bfd_boolean skip_lead;
|
||||
bool skip_lead;
|
||||
|
||||
skip_lead = (abfd != NULL
|
||||
&& *name != '\0'
|
||||
|
@ -2542,7 +2542,7 @@ bfd_update_compression_header (bfd *abfd, bfd_byte *contents,
|
|||
bfd_check_compression_header
|
||||
|
||||
SYNOPSIS
|
||||
bfd_boolean bfd_check_compression_header
|
||||
bool bfd_check_compression_header
|
||||
(bfd *abfd, bfd_byte *contents, asection *sec,
|
||||
bfd_size_type *uncompressed_size,
|
||||
unsigned int *uncompressed_alignment_power);
|
||||
|
@ -2557,7 +2557,7 @@ RETURNS
|
|||
Return TRUE if the compression header is valid.
|
||||
*/
|
||||
|
||||
bfd_boolean
|
||||
bool
|
||||
bfd_check_compression_header (bfd *abfd, bfd_byte *contents,
|
||||
asection *sec,
|
||||
bfd_size_type *uncompressed_size,
|
||||
|
@ -2587,11 +2587,11 @@ bfd_check_compression_header (bfd *abfd, bfd_byte *contents,
|
|||
{
|
||||
*uncompressed_size = chdr.ch_size;
|
||||
*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
|
||||
|
||||
SYNOPSIS
|
||||
bfd_boolean bfd_convert_section_contents
|
||||
bool bfd_convert_section_contents
|
||||
(bfd *ibfd, asection *isec, bfd *obfd,
|
||||
bfd_byte **ptr, bfd_size_type *ptr_size);
|
||||
|
||||
|
@ -2698,24 +2698,24 @@ DESCRIPTION
|
|||
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_byte **ptr, bfd_size_type *ptr_size)
|
||||
{
|
||||
bfd_byte *contents;
|
||||
bfd_size_type ihdr_size, ohdr_size, size;
|
||||
Elf_Internal_Chdr chdr;
|
||||
bfd_boolean use_memmove;
|
||||
bool use_memmove;
|
||||
|
||||
/* Do nothing if either input or output aren't ELF. */
|
||||
if (bfd_get_flavour (ibfd) != 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. */
|
||||
if (get_elf_backend_data (ibfd)->s->elfclass
|
||||
== get_elf_backend_data (obfd)->s->elfclass)
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
/* Convert GNU properties. */
|
||||
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. */
|
||||
if ((ibfd->flags & BFD_DECOMPRESS))
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
/* Do nothing if the input section isn't a SHF_COMPRESSED section. */
|
||||
ihdr_size = bfd_get_compression_header_size (ibfd, isec);
|
||||
if (ihdr_size == 0)
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
/* PR 25221. Check for corrupt input sections. */
|
||||
if (ihdr_size > bfd_get_section_limit (ibfd, isec))
|
||||
/* FIXME: Issue a warning about a corrupt
|
||||
compression header size field ? */
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
contents = *ptr;
|
||||
|
||||
|
@ -2751,13 +2751,13 @@ bfd_convert_section_contents (bfd *ibfd, sec_ptr isec, bfd *obfd,
|
|||
|
||||
ohdr_size = sizeof (Elf64_External_Chdr);
|
||||
|
||||
use_memmove = FALSE;
|
||||
use_memmove = false;
|
||||
}
|
||||
else if (ihdr_size != sizeof (Elf64_External_Chdr))
|
||||
{
|
||||
/* FIXME: Issue a warning about a corrupt
|
||||
compression header size field ? */
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
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);
|
||||
|
||||
ohdr_size = sizeof (Elf32_External_Chdr);
|
||||
use_memmove = TRUE;
|
||||
use_memmove = true;
|
||||
}
|
||||
|
||||
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);
|
||||
if (contents == NULL)
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
/* Write out the output compression header. */
|
||||
|
@ -2806,7 +2806,7 @@ bfd_convert_section_contents (bfd *ibfd, sec_ptr isec, bfd *obfd,
|
|||
}
|
||||
|
||||
*ptr_size = size;
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
/* Get the linker information. */
|
||||
|
|
14
bfd/bfdwin.c
14
bfd/bfdwin.c
|
@ -104,12 +104,12 @@ bfd_free_window (bfd_window *windowp)
|
|||
|
||||
static int ok_to_map = 1;
|
||||
|
||||
bfd_boolean
|
||||
bool
|
||||
bfd_get_file_window (bfd *abfd,
|
||||
file_ptr offset,
|
||||
bfd_size_type size,
|
||||
bfd_window *windowp,
|
||||
bfd_boolean writable)
|
||||
bool writable)
|
||||
{
|
||||
static size_t pagesize;
|
||||
bfd_window_internal *i = windowp->i;
|
||||
|
@ -131,7 +131,7 @@ bfd_get_file_window (bfd *abfd,
|
|||
{
|
||||
i = bfd_zmalloc (sizeof (bfd_window_internal));
|
||||
if (i == NULL)
|
||||
return FALSE;
|
||||
return false;
|
||||
i->data = NULL;
|
||||
}
|
||||
#ifdef HAVE_MMAP
|
||||
|
@ -199,7 +199,7 @@ bfd_get_file_window (bfd *abfd,
|
|||
i->mapped = 1;
|
||||
i->refcount = 1;
|
||||
windowp->i = i;
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
else if (debug_windows)
|
||||
{
|
||||
|
@ -231,7 +231,7 @@ bfd_get_file_window (bfd *abfd,
|
|||
if (size_to_alloc == 0)
|
||||
{
|
||||
windowp->i = i;
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
goto free_and_fail;
|
||||
}
|
||||
|
@ -254,12 +254,12 @@ bfd_get_file_window (bfd *abfd,
|
|||
windowp->data = i->data;
|
||||
windowp->size = i->size;
|
||||
windowp->i = i;
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
free_and_fail:
|
||||
/* We have a bfd_window_internal, but an error occurred. Free it. */
|
||||
free (i);
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
#endif /* USE_MMAP */
|
||||
|
|
26
bfd/binary.c
26
bfd/binary.c
|
@ -43,10 +43,10 @@
|
|||
|
||||
/* Create a binary object. Invoked via bfd_set_format. */
|
||||
|
||||
static bfd_boolean
|
||||
static bool
|
||||
binary_mkobject (bfd *abfd ATTRIBUTE_UNUSED)
|
||||
{
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
/* 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. */
|
||||
|
||||
static bfd_boolean
|
||||
static bool
|
||||
binary_get_section_contents (bfd *abfd,
|
||||
asection *section,
|
||||
void * location,
|
||||
|
@ -104,8 +104,8 @@ binary_get_section_contents (bfd *abfd,
|
|||
{
|
||||
if (bfd_seek (abfd, section->filepos + offset, SEEK_SET) != 0
|
||||
|| bfd_bread (location, count, abfd) != count)
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
/* 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. */
|
||||
|
||||
static bfd_boolean
|
||||
static bool
|
||||
binary_set_section_contents (bfd *abfd,
|
||||
asection *sec,
|
||||
const void * data,
|
||||
|
@ -226,18 +226,18 @@ binary_set_section_contents (bfd *abfd,
|
|||
bfd_size_type size)
|
||||
{
|
||||
if (size == 0)
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
if (! abfd->output_has_begun)
|
||||
{
|
||||
bfd_boolean found_low;
|
||||
bool found_low;
|
||||
bfd_vma low;
|
||||
asection *s;
|
||||
|
||||
/* 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
|
||||
sections. */
|
||||
found_low = FALSE;
|
||||
found_low = false;
|
||||
low = 0;
|
||||
for (s = abfd->sections; s != NULL; s = s->next)
|
||||
if (((s->flags
|
||||
|
@ -247,7 +247,7 @@ binary_set_section_contents (bfd *abfd,
|
|||
&& (! found_low || s->lma < low))
|
||||
{
|
||||
low = s->lma;
|
||||
found_low = TRUE;
|
||||
found_low = true;
|
||||
}
|
||||
|
||||
for (s = abfd->sections; s != NULL; s = s->next)
|
||||
|
@ -278,16 +278,16 @@ binary_set_section_contents (bfd *abfd,
|
|||
s);
|
||||
}
|
||||
|
||||
abfd->output_has_begun = TRUE;
|
||||
abfd->output_has_begun = true;
|
||||
}
|
||||
|
||||
/* We don't want to output anything for a section that is neither
|
||||
loaded nor allocated. The contents of such a section are not
|
||||
meaningful in the binary format. */
|
||||
if ((sec->flags & (SEC_LOAD | SEC_ALLOC)) == 0)
|
||||
return TRUE;
|
||||
return true;
|
||||
if ((sec->flags & SEC_NEVER_LOAD) != 0)
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
return _bfd_generic_set_section_contents (abfd, sec, data, offset, size);
|
||||
}
|
||||
|
|
38
bfd/cache.c
38
bfd/cache.c
|
@ -160,16 +160,16 @@ snip (bfd *abfd)
|
|||
|
||||
/* Close a BFD and remove it from the cache. */
|
||||
|
||||
static bfd_boolean
|
||||
static bool
|
||||
bfd_cache_delete (bfd *abfd)
|
||||
{
|
||||
bfd_boolean ret;
|
||||
bool ret;
|
||||
|
||||
if (fclose ((FILE *) abfd->iostream) == 0)
|
||||
ret = TRUE;
|
||||
ret = true;
|
||||
else
|
||||
{
|
||||
ret = FALSE;
|
||||
ret = false;
|
||||
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
|
||||
recently used cacheable BFD and close it. */
|
||||
|
||||
static bfd_boolean
|
||||
static bool
|
||||
close_one (void)
|
||||
{
|
||||
register bfd *to_kill;
|
||||
|
@ -208,7 +208,7 @@ close_one (void)
|
|||
if (to_kill == NULL)
|
||||
{
|
||||
/* There are no open cacheable BFD's. */
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
to_kill->where = _bfd_real_ftell ((FILE *) to_kill->iostream);
|
||||
|
@ -485,25 +485,25 @@ INTERNAL_FUNCTION
|
|||
bfd_cache_init
|
||||
|
||||
SYNOPSIS
|
||||
bfd_boolean bfd_cache_init (bfd *abfd);
|
||||
bool bfd_cache_init (bfd *abfd);
|
||||
|
||||
DESCRIPTION
|
||||
Add a newly opened BFD to the cache.
|
||||
*/
|
||||
|
||||
bfd_boolean
|
||||
bool
|
||||
bfd_cache_init (bfd *abfd)
|
||||
{
|
||||
BFD_ASSERT (abfd->iostream != NULL);
|
||||
if (open_files >= bfd_cache_max_open ())
|
||||
{
|
||||
if (! close_one ())
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
abfd->iovec = &cache_iovec;
|
||||
insert (abfd);
|
||||
++open_files;
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -511,7 +511,7 @@ INTERNAL_FUNCTION
|
|||
bfd_cache_close
|
||||
|
||||
SYNOPSIS
|
||||
bfd_boolean bfd_cache_close (bfd *abfd);
|
||||
bool bfd_cache_close (bfd *abfd);
|
||||
|
||||
DESCRIPTION
|
||||
Remove the BFD @var{abfd} from the cache. If the attached file is open,
|
||||
|
@ -522,15 +522,15 @@ RETURNS
|
|||
returned if all is well.
|
||||
*/
|
||||
|
||||
bfd_boolean
|
||||
bool
|
||||
bfd_cache_close (bfd *abfd)
|
||||
{
|
||||
if (abfd->iovec != &cache_iovec)
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
if (abfd->iostream == NULL)
|
||||
/* Previously closed. */
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
return bfd_cache_delete (abfd);
|
||||
}
|
||||
|
@ -540,7 +540,7 @@ FUNCTION
|
|||
bfd_cache_close_all
|
||||
|
||||
SYNOPSIS
|
||||
bfd_boolean bfd_cache_close_all (void);
|
||||
bool bfd_cache_close_all (void);
|
||||
|
||||
DESCRIPTION
|
||||
Remove all BFDs from the cache. If the attached file is open,
|
||||
|
@ -551,10 +551,10 @@ RETURNS
|
|||
returned if all is well.
|
||||
*/
|
||||
|
||||
bfd_boolean
|
||||
bool
|
||||
bfd_cache_close_all (void)
|
||||
{
|
||||
bfd_boolean ret = TRUE;
|
||||
bool ret = true;
|
||||
|
||||
while (bfd_last_cache != NULL)
|
||||
ret &= bfd_cache_close (bfd_last_cache);
|
||||
|
@ -580,7 +580,7 @@ DESCRIPTION
|
|||
FILE *
|
||||
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 ())
|
||||
{
|
||||
|
@ -634,7 +634,7 @@ bfd_open_file (bfd *abfd)
|
|||
#endif
|
||||
abfd->iostream = _bfd_real_fopen (bfd_get_filename (abfd),
|
||||
FOPEN_WUB);
|
||||
abfd->opened_once = TRUE;
|
||||
abfd->opened_once = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
184
bfd/coff-alpha.c
184
bfd/coff-alpha.c
|
@ -118,45 +118,45 @@ static reloc_howto_type alpha_howto_table[] =
|
|||
0, /* rightshift */
|
||||
0, /* size (0 = byte, 1 = short, 2 = long) */
|
||||
8, /* bitsize */
|
||||
TRUE, /* pc_relative */
|
||||
true, /* pc_relative */
|
||||
0, /* bitpos */
|
||||
complain_overflow_dont, /* complain_on_overflow */
|
||||
reloc_nil, /* special_function */
|
||||
"IGNORE", /* name */
|
||||
TRUE, /* partial_inplace */
|
||||
true, /* partial_inplace */
|
||||
0, /* src_mask */
|
||||
0, /* dst_mask */
|
||||
TRUE), /* pcrel_offset */
|
||||
true), /* pcrel_offset */
|
||||
|
||||
/* A 32 bit reference to a symbol. */
|
||||
HOWTO (ALPHA_R_REFLONG, /* type */
|
||||
0, /* rightshift */
|
||||
2, /* size (0 = byte, 1 = short, 2 = long) */
|
||||
32, /* bitsize */
|
||||
FALSE, /* pc_relative */
|
||||
false, /* pc_relative */
|
||||
0, /* bitpos */
|
||||
complain_overflow_bitfield, /* complain_on_overflow */
|
||||
0, /* special_function */
|
||||
"REFLONG", /* name */
|
||||
TRUE, /* partial_inplace */
|
||||
true, /* partial_inplace */
|
||||
0xffffffff, /* src_mask */
|
||||
0xffffffff, /* dst_mask */
|
||||
FALSE), /* pcrel_offset */
|
||||
false), /* pcrel_offset */
|
||||
|
||||
/* A 64 bit reference to a symbol. */
|
||||
HOWTO (ALPHA_R_REFQUAD, /* type */
|
||||
0, /* rightshift */
|
||||
4, /* size (0 = byte, 1 = short, 2 = long) */
|
||||
64, /* bitsize */
|
||||
FALSE, /* pc_relative */
|
||||
false, /* pc_relative */
|
||||
0, /* bitpos */
|
||||
complain_overflow_bitfield, /* complain_on_overflow */
|
||||
0, /* special_function */
|
||||
"REFQUAD", /* name */
|
||||
TRUE, /* partial_inplace */
|
||||
true, /* partial_inplace */
|
||||
MINUS_ONE, /* src_mask */
|
||||
MINUS_ONE, /* dst_mask */
|
||||
FALSE), /* pcrel_offset */
|
||||
false), /* pcrel_offset */
|
||||
|
||||
/* 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
|
||||
|
@ -165,15 +165,15 @@ static reloc_howto_type alpha_howto_table[] =
|
|||
0, /* rightshift */
|
||||
2, /* size (0 = byte, 1 = short, 2 = long) */
|
||||
32, /* bitsize */
|
||||
FALSE, /* pc_relative */
|
||||
false, /* pc_relative */
|
||||
0, /* bitpos */
|
||||
complain_overflow_bitfield, /* complain_on_overflow */
|
||||
0, /* special_function */
|
||||
"GPREL32", /* name */
|
||||
TRUE, /* partial_inplace */
|
||||
true, /* partial_inplace */
|
||||
0xffffffff, /* src_mask */
|
||||
0xffffffff, /* dst_mask */
|
||||
FALSE), /* pcrel_offset */
|
||||
false), /* pcrel_offset */
|
||||
|
||||
/* Used for an instruction that refers to memory off the GP
|
||||
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 */
|
||||
2, /* size (0 = byte, 1 = short, 2 = long) */
|
||||
16, /* bitsize */
|
||||
FALSE, /* pc_relative */
|
||||
false, /* pc_relative */
|
||||
0, /* bitpos */
|
||||
complain_overflow_signed, /* complain_on_overflow */
|
||||
0, /* special_function */
|
||||
"LITERAL", /* name */
|
||||
TRUE, /* partial_inplace */
|
||||
true, /* partial_inplace */
|
||||
0xffff, /* src_mask */
|
||||
0xffff, /* dst_mask */
|
||||
FALSE), /* pcrel_offset */
|
||||
false), /* pcrel_offset */
|
||||
|
||||
/* This reloc only appears immediately following a LITERAL reloc.
|
||||
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 */
|
||||
2, /* size (0 = byte, 1 = short, 2 = long) */
|
||||
32, /* bitsize */
|
||||
FALSE, /* pc_relative */
|
||||
false, /* pc_relative */
|
||||
0, /* bitpos */
|
||||
complain_overflow_dont, /* complain_on_overflow */
|
||||
reloc_nil, /* special_function */
|
||||
"LITUSE", /* name */
|
||||
FALSE, /* partial_inplace */
|
||||
false, /* partial_inplace */
|
||||
0, /* src_mask */
|
||||
0, /* dst_mask */
|
||||
FALSE), /* pcrel_offset */
|
||||
false), /* pcrel_offset */
|
||||
|
||||
/* 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
|
||||
|
@ -230,15 +230,15 @@ static reloc_howto_type alpha_howto_table[] =
|
|||
16, /* rightshift */
|
||||
2, /* size (0 = byte, 1 = short, 2 = long) */
|
||||
16, /* bitsize */
|
||||
TRUE, /* pc_relative */
|
||||
true, /* pc_relative */
|
||||
0, /* bitpos */
|
||||
complain_overflow_dont, /* complain_on_overflow */
|
||||
reloc_nil, /* special_function */
|
||||
"GPDISP", /* name */
|
||||
TRUE, /* partial_inplace */
|
||||
true, /* partial_inplace */
|
||||
0xffff, /* src_mask */
|
||||
0xffff, /* dst_mask */
|
||||
TRUE), /* pcrel_offset */
|
||||
true), /* pcrel_offset */
|
||||
|
||||
/* A 21 bit branch. The native assembler generates these for
|
||||
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, /* size (0 = byte, 1 = short, 2 = long) */
|
||||
21, /* bitsize */
|
||||
TRUE, /* pc_relative */
|
||||
true, /* pc_relative */
|
||||
0, /* bitpos */
|
||||
complain_overflow_signed, /* complain_on_overflow */
|
||||
0, /* special_function */
|
||||
"BRADDR", /* name */
|
||||
TRUE, /* partial_inplace */
|
||||
true, /* partial_inplace */
|
||||
0x1fffff, /* src_mask */
|
||||
0x1fffff, /* dst_mask */
|
||||
FALSE), /* pcrel_offset */
|
||||
false), /* pcrel_offset */
|
||||
|
||||
/* A hint for a jump to a register. */
|
||||
HOWTO (ALPHA_R_HINT, /* type */
|
||||
2, /* rightshift */
|
||||
2, /* size (0 = byte, 1 = short, 2 = long) */
|
||||
14, /* bitsize */
|
||||
TRUE, /* pc_relative */
|
||||
true, /* pc_relative */
|
||||
0, /* bitpos */
|
||||
complain_overflow_dont, /* complain_on_overflow */
|
||||
0, /* special_function */
|
||||
"HINT", /* name */
|
||||
TRUE, /* partial_inplace */
|
||||
true, /* partial_inplace */
|
||||
0x3fff, /* src_mask */
|
||||
0x3fff, /* dst_mask */
|
||||
FALSE), /* pcrel_offset */
|
||||
false), /* pcrel_offset */
|
||||
|
||||
/* 16 bit PC relative offset. */
|
||||
HOWTO (ALPHA_R_SREL16, /* type */
|
||||
0, /* rightshift */
|
||||
1, /* size (0 = byte, 1 = short, 2 = long) */
|
||||
16, /* bitsize */
|
||||
TRUE, /* pc_relative */
|
||||
true, /* pc_relative */
|
||||
0, /* bitpos */
|
||||
complain_overflow_signed, /* complain_on_overflow */
|
||||
0, /* special_function */
|
||||
"SREL16", /* name */
|
||||
TRUE, /* partial_inplace */
|
||||
true, /* partial_inplace */
|
||||
0xffff, /* src_mask */
|
||||
0xffff, /* dst_mask */
|
||||
FALSE), /* pcrel_offset */
|
||||
false), /* pcrel_offset */
|
||||
|
||||
/* 32 bit PC relative offset. */
|
||||
HOWTO (ALPHA_R_SREL32, /* type */
|
||||
0, /* rightshift */
|
||||
2, /* size (0 = byte, 1 = short, 2 = long) */
|
||||
32, /* bitsize */
|
||||
TRUE, /* pc_relative */
|
||||
true, /* pc_relative */
|
||||
0, /* bitpos */
|
||||
complain_overflow_signed, /* complain_on_overflow */
|
||||
0, /* special_function */
|
||||
"SREL32", /* name */
|
||||
TRUE, /* partial_inplace */
|
||||
true, /* partial_inplace */
|
||||
0xffffffff, /* src_mask */
|
||||
0xffffffff, /* dst_mask */
|
||||
FALSE), /* pcrel_offset */
|
||||
false), /* pcrel_offset */
|
||||
|
||||
/* A 64 bit PC relative offset. */
|
||||
HOWTO (ALPHA_R_SREL64, /* type */
|
||||
0, /* rightshift */
|
||||
4, /* size (0 = byte, 1 = short, 2 = long) */
|
||||
64, /* bitsize */
|
||||
TRUE, /* pc_relative */
|
||||
true, /* pc_relative */
|
||||
0, /* bitpos */
|
||||
complain_overflow_signed, /* complain_on_overflow */
|
||||
0, /* special_function */
|
||||
"SREL64", /* name */
|
||||
TRUE, /* partial_inplace */
|
||||
true, /* partial_inplace */
|
||||
MINUS_ONE, /* src_mask */
|
||||
MINUS_ONE, /* dst_mask */
|
||||
FALSE), /* pcrel_offset */
|
||||
false), /* pcrel_offset */
|
||||
|
||||
/* Push a value on the reloc evaluation stack. */
|
||||
HOWTO (ALPHA_R_OP_PUSH, /* type */
|
||||
0, /* rightshift */
|
||||
0, /* size (0 = byte, 1 = short, 2 = long) */
|
||||
0, /* bitsize */
|
||||
FALSE, /* pc_relative */
|
||||
false, /* pc_relative */
|
||||
0, /* bitpos */
|
||||
complain_overflow_dont, /* complain_on_overflow */
|
||||
0, /* special_function */
|
||||
"OP_PUSH", /* name */
|
||||
FALSE, /* partial_inplace */
|
||||
false, /* partial_inplace */
|
||||
0, /* src_mask */
|
||||
0, /* dst_mask */
|
||||
FALSE), /* pcrel_offset */
|
||||
false), /* pcrel_offset */
|
||||
|
||||
/* 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. */
|
||||
|
@ -338,15 +338,15 @@ static reloc_howto_type alpha_howto_table[] =
|
|||
0, /* rightshift */
|
||||
4, /* size (0 = byte, 1 = short, 2 = long) */
|
||||
64, /* bitsize */
|
||||
FALSE, /* pc_relative */
|
||||
false, /* pc_relative */
|
||||
0, /* bitpos */
|
||||
complain_overflow_dont, /* complain_on_overflow */
|
||||
0, /* special_function */
|
||||
"OP_STORE", /* name */
|
||||
FALSE, /* partial_inplace */
|
||||
false, /* partial_inplace */
|
||||
0, /* src_mask */
|
||||
MINUS_ONE, /* dst_mask */
|
||||
FALSE), /* pcrel_offset */
|
||||
false), /* pcrel_offset */
|
||||
|
||||
/* Subtract the reloc address from the value on the top of the
|
||||
relocation stack. */
|
||||
|
@ -354,15 +354,15 @@ static reloc_howto_type alpha_howto_table[] =
|
|||
0, /* rightshift */
|
||||
0, /* size (0 = byte, 1 = short, 2 = long) */
|
||||
0, /* bitsize */
|
||||
FALSE, /* pc_relative */
|
||||
false, /* pc_relative */
|
||||
0, /* bitpos */
|
||||
complain_overflow_dont, /* complain_on_overflow */
|
||||
0, /* special_function */
|
||||
"OP_PSUB", /* name */
|
||||
FALSE, /* partial_inplace */
|
||||
false, /* partial_inplace */
|
||||
0, /* src_mask */
|
||||
0, /* dst_mask */
|
||||
FALSE), /* pcrel_offset */
|
||||
false), /* pcrel_offset */
|
||||
|
||||
/* Shift the value on the top of the relocation stack right by the
|
||||
given value. */
|
||||
|
@ -370,30 +370,30 @@ static reloc_howto_type alpha_howto_table[] =
|
|||
0, /* rightshift */
|
||||
0, /* size (0 = byte, 1 = short, 2 = long) */
|
||||
0, /* bitsize */
|
||||
FALSE, /* pc_relative */
|
||||
false, /* pc_relative */
|
||||
0, /* bitpos */
|
||||
complain_overflow_dont, /* complain_on_overflow */
|
||||
0, /* special_function */
|
||||
"OP_PRSHIFT", /* name */
|
||||
FALSE, /* partial_inplace */
|
||||
false, /* partial_inplace */
|
||||
0, /* src_mask */
|
||||
0, /* dst_mask */
|
||||
FALSE), /* pcrel_offset */
|
||||
false), /* pcrel_offset */
|
||||
|
||||
/* Adjust the GP value for a new range in the object file. */
|
||||
HOWTO (ALPHA_R_GPVALUE, /* type */
|
||||
0, /* rightshift */
|
||||
0, /* size (0 = byte, 1 = short, 2 = long) */
|
||||
0, /* bitsize */
|
||||
FALSE, /* pc_relative */
|
||||
false, /* pc_relative */
|
||||
0, /* bitpos */
|
||||
complain_overflow_dont, /* complain_on_overflow */
|
||||
0, /* special_function */
|
||||
"GPVALUE", /* name */
|
||||
FALSE, /* partial_inplace */
|
||||
false, /* partial_inplace */
|
||||
0, /* src_mask */
|
||||
0, /* dst_mask */
|
||||
FALSE) /* pcrel_offset */
|
||||
false) /* pcrel_offset */
|
||||
};
|
||||
|
||||
/* Recognize an Alpha ECOFF file. */
|
||||
|
@ -436,14 +436,14 @@ alpha_ecoff_object_p (bfd *abfd)
|
|||
|
||||
/* See whether the magic number matches. */
|
||||
|
||||
static bfd_boolean
|
||||
static bool
|
||||
alpha_ecoff_bad_format_hook (bfd *abfd ATTRIBUTE_UNUSED,
|
||||
void * filehdr)
|
||||
{
|
||||
struct internal_filehdr *internal_f = (struct internal_filehdr *) filehdr;
|
||||
|
||||
if (! ALPHA_ECOFF_BADMAG (*internal_f))
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
if (ALPHA_ECOFF_COMPRESSEDMAG (*internal_f))
|
||||
_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"),
|
||||
abfd);
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
/* 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_order *link_order,
|
||||
bfd_byte *data,
|
||||
bfd_boolean relocatable,
|
||||
bool relocatable,
|
||||
asymbol **symbols)
|
||||
{
|
||||
bfd *input_bfd = link_order->u.indirect.section->owner;
|
||||
|
@ -737,7 +737,7 @@ alpha_ecoff_get_relocated_section_contents (bfd *abfd,
|
|||
long reloc_count;
|
||||
bfd *output_bfd = relocatable ? abfd : (bfd *) NULL;
|
||||
bfd_vma gp;
|
||||
bfd_boolean gp_undefined;
|
||||
bool gp_undefined;
|
||||
bfd_vma stack[RELOC_STACKSIZE];
|
||||
int tos = 0;
|
||||
|
||||
|
@ -766,7 +766,7 @@ alpha_ecoff_get_relocated_section_contents (bfd *abfd,
|
|||
goto successful_return;
|
||||
|
||||
/* Get the GP value for the output BFD. */
|
||||
gp_undefined = FALSE;
|
||||
gp_undefined = false;
|
||||
gp = _bfd_get_gp_value (abfd);
|
||||
if (gp == 0)
|
||||
{
|
||||
|
@ -794,11 +794,11 @@ alpha_ecoff_get_relocated_section_contents (bfd *abfd,
|
|||
{
|
||||
struct bfd_link_hash_entry *h;
|
||||
|
||||
h = bfd_link_hash_lookup (link_info->hash, "_gp", FALSE, FALSE,
|
||||
TRUE);
|
||||
h = bfd_link_hash_lookup (link_info->hash, "_gp", false, false,
|
||||
true);
|
||||
if (h == (struct bfd_link_hash_entry *) NULL
|
||||
|| h->type != bfd_link_hash_defined)
|
||||
gp_undefined = TRUE;
|
||||
gp_undefined = true;
|
||||
else
|
||||
{
|
||||
gp = (h->u.def.value
|
||||
|
@ -1086,7 +1086,7 @@ alpha_ecoff_get_relocated_section_contents (bfd *abfd,
|
|||
case ALPHA_R_GPVALUE:
|
||||
/* I really don't know if this does the right thing. */
|
||||
gp = rel->addend;
|
||||
gp_undefined = FALSE;
|
||||
gp_undefined = false;
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -1109,7 +1109,7 @@ alpha_ecoff_get_relocated_section_contents (bfd *abfd,
|
|||
case bfd_reloc_undefined:
|
||||
(*link_info->callbacks->undefined_symbol)
|
||||
(link_info, bfd_asymbol_name (*rel->sym_ptr_ptr),
|
||||
input_bfd, input_section, rel->address, TRUE);
|
||||
input_bfd, input_section, rel->address, true);
|
||||
break;
|
||||
case bfd_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
|
||||
could be combined somehow. */
|
||||
|
||||
static bfd_boolean
|
||||
static bool
|
||||
alpha_relocate_section (bfd *output_bfd,
|
||||
struct bfd_link_info *info,
|
||||
bfd *input_bfd,
|
||||
|
@ -1342,7 +1342,7 @@ alpha_relocate_section (bfd *output_bfd,
|
|||
asection **symndx_to_section, *lita_sec;
|
||||
struct ecoff_link_hash_entry **sym_hashes;
|
||||
bfd_vma gp;
|
||||
bfd_boolean gp_undefined;
|
||||
bool gp_undefined;
|
||||
bfd_vma stack[RELOC_STACKSIZE];
|
||||
int tos = 0;
|
||||
struct external_reloc *ext_rel;
|
||||
|
@ -1358,7 +1358,7 @@ alpha_relocate_section (bfd *output_bfd,
|
|||
amt = NUM_RELOC_SECTIONS * sizeof (asection *);
|
||||
symndx_to_section = (asection **) bfd_alloc (input_bfd, amt);
|
||||
if (!symndx_to_section)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
symndx_to_section[RELOC_SECTION_NONE] = NULL;
|
||||
symndx_to_section[RELOC_SECTION_TEXT] =
|
||||
|
@ -1447,7 +1447,7 @@ alpha_relocate_section (bfd *output_bfd,
|
|||
_("using multiple gp values"),
|
||||
(char *) NULL, output_bfd,
|
||||
(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)
|
||||
gp = lita_vma + lita_size - 0x8000;
|
||||
|
@ -1477,9 +1477,9 @@ alpha_relocate_section (bfd *output_bfd,
|
|||
int r_extern;
|
||||
int r_offset;
|
||||
int r_size;
|
||||
bfd_boolean relocatep;
|
||||
bfd_boolean adjust_addrp;
|
||||
bfd_boolean gp_usedp;
|
||||
bool relocatep;
|
||||
bool adjust_addrp;
|
||||
bool gp_usedp;
|
||||
bfd_vma addend;
|
||||
|
||||
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)
|
||||
>> RELOC_BITS3_SIZE_SH_LITTLE);
|
||||
|
||||
relocatep = FALSE;
|
||||
adjust_addrp = TRUE;
|
||||
gp_usedp = FALSE;
|
||||
relocatep = false;
|
||||
adjust_addrp = true;
|
||||
gp_usedp = false;
|
||||
addend = 0;
|
||||
|
||||
switch (r_type)
|
||||
|
@ -1530,13 +1530,13 @@ alpha_relocate_section (bfd *output_bfd,
|
|||
if (bfd_link_relocatable (info))
|
||||
H_PUT_64 (input_bfd, input_section->output_offset + r_vaddr,
|
||||
ext_rel->r_vaddr);
|
||||
adjust_addrp = FALSE;
|
||||
adjust_addrp = false;
|
||||
break;
|
||||
|
||||
case ALPHA_R_REFLONG:
|
||||
case ALPHA_R_REFQUAD:
|
||||
case ALPHA_R_HINT:
|
||||
relocatep = TRUE;
|
||||
relocatep = true;
|
||||
break;
|
||||
|
||||
case ALPHA_R_BRADDR:
|
||||
|
@ -1545,7 +1545,7 @@ alpha_relocate_section (bfd *output_bfd,
|
|||
case ALPHA_R_SREL64:
|
||||
if (r_extern)
|
||||
addend += - (r_vaddr + 4);
|
||||
relocatep = TRUE;
|
||||
relocatep = true;
|
||||
break;
|
||||
|
||||
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
|
||||
by the different between the original GP value and the
|
||||
current GP value. */
|
||||
relocatep = TRUE;
|
||||
relocatep = true;
|
||||
addend = ecoff_data (input_bfd)->gp - gp;
|
||||
gp_usedp = TRUE;
|
||||
gp_usedp = true;
|
||||
break;
|
||||
|
||||
case ALPHA_R_LITERAL:
|
||||
|
@ -1586,9 +1586,9 @@ alpha_relocate_section (bfd *output_bfd,
|
|||
|| ((insn >> 26) & 0x3f) == 0x28);
|
||||
}
|
||||
|
||||
relocatep = TRUE;
|
||||
relocatep = true;
|
||||
addend = ecoff_data (input_bfd)->gp - gp;
|
||||
gp_usedp = TRUE;
|
||||
gp_usedp = true;
|
||||
break;
|
||||
|
||||
case ALPHA_R_LITUSE:
|
||||
|
@ -1652,7 +1652,7 @@ alpha_relocate_section (bfd *output_bfd,
|
|||
bfd_put_32 (input_bfd, (bfd_vma) insn2,
|
||||
contents + r_vaddr - input_section->vma + r_symndx);
|
||||
|
||||
gp_usedp = TRUE;
|
||||
gp_usedp = true;
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -1695,7 +1695,7 @@ alpha_relocate_section (bfd *output_bfd,
|
|||
relocated. */
|
||||
(*info->callbacks->undefined_symbol)
|
||||
(info, h->root.root.string, input_bfd,
|
||||
input_section, (bfd_vma) 0, TRUE);
|
||||
input_section, (bfd_vma) 0, true);
|
||||
addend = 0;
|
||||
}
|
||||
}
|
||||
|
@ -1750,7 +1750,7 @@ alpha_relocate_section (bfd *output_bfd,
|
|||
}
|
||||
}
|
||||
|
||||
adjust_addrp = FALSE;
|
||||
adjust_addrp = false;
|
||||
break;
|
||||
|
||||
case ALPHA_R_OP_STORE:
|
||||
|
@ -1787,7 +1787,7 @@ alpha_relocate_section (bfd *output_bfd,
|
|||
case ALPHA_R_GPVALUE:
|
||||
/* I really don't know if this does the right thing. */
|
||||
gp = ecoff_data (input_bfd)->gp + r_symndx;
|
||||
gp_undefined = FALSE;
|
||||
gp_undefined = false;
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -1892,7 +1892,7 @@ alpha_relocate_section (bfd *output_bfd,
|
|||
{
|
||||
(*info->callbacks->undefined_symbol)
|
||||
(info, h->root.root.string, input_bfd, input_section,
|
||||
r_vaddr - input_section->vma, TRUE);
|
||||
r_vaddr - input_section->vma, true);
|
||||
relocation = 0;
|
||||
}
|
||||
}
|
||||
|
@ -1962,20 +1962,20 @@ alpha_relocate_section (bfd *output_bfd,
|
|||
/* Only give the error once per link. */
|
||||
gp = 4;
|
||||
_bfd_set_gp_value (output_bfd, gp);
|
||||
gp_undefined = FALSE;
|
||||
gp_undefined = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (tos != 0)
|
||||
abort ();
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
/* Do final adjustments to the filehdr and the aouthdr. This routine
|
||||
sets the dynamic bits in the file header. */
|
||||
|
||||
static bfd_boolean
|
||||
static bool
|
||||
alpha_adjust_headers (bfd *abfd,
|
||||
struct internal_filehdr *fhdr,
|
||||
struct internal_aouthdr *ahdr ATTRIBUTE_UNUSED)
|
||||
|
@ -1984,7 +1984,7 @@ alpha_adjust_headers (bfd *abfd,
|
|||
fhdr->f_flags |= F_ALPHA_CALL_SHARED;
|
||||
else if ((abfd->flags & DYNAMIC) != 0)
|
||||
fhdr->f_flags |= F_ALPHA_SHARABLE;
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
/* 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->buffer = buf;
|
||||
|
||||
nbfd->mtime_set = TRUE;
|
||||
nbfd->mtime_set = true;
|
||||
nbfd->mtime = strtol (hdr->ar_date, (char **) NULL, 10);
|
||||
|
||||
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_filehdr_out, alpha_ecoff_swap_aouthdr_out,
|
||||
alpha_ecoff_swap_scnhdr_out,
|
||||
FILHSZ, AOUTSZ, SCNHSZ, 0, 0, 0, 0, FILNMLEN, TRUE,
|
||||
ECOFF_NO_LONG_SECTION_NAMES, 4, FALSE, 2, 32768,
|
||||
FILHSZ, AOUTSZ, SCNHSZ, 0, 0, 0, 0, FILNMLEN, true,
|
||||
ECOFF_NO_LONG_SECTION_NAMES, 4, false, 2, 32768,
|
||||
alpha_ecoff_swap_filehdr_in, alpha_ecoff_swap_aouthdr_in,
|
||||
alpha_ecoff_swap_scnhdr_in, NULL,
|
||||
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
|
||||
Alpha. FALSE if .rdata is part of the data segment, as on the
|
||||
MIPS. */
|
||||
TRUE,
|
||||
true,
|
||||
/* Bitsize of constructor entries. */
|
||||
64,
|
||||
/* Reloc to use for constructor entries. */
|
||||
|
|
244
bfd/coff-arm.c
244
bfd/coff-arm.c
|
@ -167,7 +167,7 @@ coff_arm_reloc (bfd *abfd,
|
|||
#endif
|
||||
|
||||
#ifndef PCRELOFFSET
|
||||
#define PCRELOFFSET TRUE
|
||||
#define PCRELOFFSET true
|
||||
#endif
|
||||
|
||||
/* 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,
|
||||
24,
|
||||
TRUE,
|
||||
true,
|
||||
0,
|
||||
complain_overflow_dont,
|
||||
aoutarm_fix_pcrel_26_done,
|
||||
"ARM_26D",
|
||||
TRUE, /* partial_inplace. */
|
||||
true, /* partial_inplace. */
|
||||
0x00ffffff,
|
||||
0x0,
|
||||
PCRELOFFSET),
|
||||
|
@ -236,12 +236,12 @@ static reloc_howto_type aoutarm_std_reloc_howto[] =
|
|||
0,
|
||||
2,
|
||||
32,
|
||||
FALSE,
|
||||
false,
|
||||
0,
|
||||
complain_overflow_bitfield,
|
||||
coff_arm_reloc,
|
||||
"ARM_32",
|
||||
TRUE, /* partial_inplace. */
|
||||
true, /* partial_inplace. */
|
||||
0xffffffff,
|
||||
0xffffffff,
|
||||
PCRELOFFSET),
|
||||
|
@ -249,12 +249,12 @@ static reloc_howto_type aoutarm_std_reloc_howto[] =
|
|||
0,
|
||||
2,
|
||||
32,
|
||||
FALSE,
|
||||
false,
|
||||
0,
|
||||
complain_overflow_bitfield,
|
||||
coff_arm_reloc,
|
||||
"ARM_RVA32",
|
||||
TRUE, /* partial_inplace. */
|
||||
true, /* partial_inplace. */
|
||||
0xffffffff,
|
||||
0xffffffff,
|
||||
PCRELOFFSET),
|
||||
|
@ -262,12 +262,12 @@ static reloc_howto_type aoutarm_std_reloc_howto[] =
|
|||
2,
|
||||
2,
|
||||
24,
|
||||
TRUE,
|
||||
true,
|
||||
0,
|
||||
complain_overflow_signed,
|
||||
aoutarm_fix_pcrel_26 ,
|
||||
"ARM_26",
|
||||
FALSE,
|
||||
false,
|
||||
0x00ffffff,
|
||||
0x00ffffff,
|
||||
PCRELOFFSET),
|
||||
|
@ -275,12 +275,12 @@ static reloc_howto_type aoutarm_std_reloc_howto[] =
|
|||
1,
|
||||
1,
|
||||
11,
|
||||
TRUE,
|
||||
true,
|
||||
0,
|
||||
complain_overflow_signed,
|
||||
coff_thumb_pcrel_12 ,
|
||||
"ARM_THUMB12",
|
||||
FALSE,
|
||||
false,
|
||||
0x000007ff,
|
||||
0x000007ff,
|
||||
PCRELOFFSET),
|
||||
|
@ -297,12 +297,12 @@ static reloc_howto_type aoutarm_std_reloc_howto[] =
|
|||
0,
|
||||
1,
|
||||
16,
|
||||
FALSE,
|
||||
false,
|
||||
0,
|
||||
complain_overflow_bitfield,
|
||||
coff_arm_reloc,
|
||||
"ARM_SECTION",
|
||||
TRUE, /* partial_inplace. */
|
||||
true, /* partial_inplace. */
|
||||
0x0000ffff,
|
||||
0x0000ffff,
|
||||
PCRELOFFSET),
|
||||
|
@ -310,12 +310,12 @@ static reloc_howto_type aoutarm_std_reloc_howto[] =
|
|||
0,
|
||||
2,
|
||||
32,
|
||||
FALSE,
|
||||
false,
|
||||
0,
|
||||
complain_overflow_bitfield,
|
||||
coff_arm_reloc,
|
||||
"ARM_SECREL",
|
||||
TRUE, /* partial_inplace. */
|
||||
true, /* partial_inplace. */
|
||||
0xffffffff,
|
||||
0xffffffff,
|
||||
PCRELOFFSET),
|
||||
|
@ -324,12 +324,12 @@ static reloc_howto_type aoutarm_std_reloc_howto[] =
|
|||
0,
|
||||
0,
|
||||
8,
|
||||
FALSE,
|
||||
false,
|
||||
0,
|
||||
complain_overflow_bitfield,
|
||||
coff_arm_reloc,
|
||||
"ARM_8",
|
||||
TRUE,
|
||||
true,
|
||||
0x000000ff,
|
||||
0x000000ff,
|
||||
PCRELOFFSET),
|
||||
|
@ -337,12 +337,12 @@ static reloc_howto_type aoutarm_std_reloc_howto[] =
|
|||
0,
|
||||
1,
|
||||
16,
|
||||
FALSE,
|
||||
false,
|
||||
0,
|
||||
complain_overflow_bitfield,
|
||||
coff_arm_reloc,
|
||||
"ARM_16",
|
||||
TRUE,
|
||||
true,
|
||||
0x0000ffff,
|
||||
0x0000ffff,
|
||||
PCRELOFFSET),
|
||||
|
@ -350,12 +350,12 @@ static reloc_howto_type aoutarm_std_reloc_howto[] =
|
|||
0,
|
||||
2,
|
||||
32,
|
||||
FALSE,
|
||||
false,
|
||||
0,
|
||||
complain_overflow_bitfield,
|
||||
coff_arm_reloc,
|
||||
"ARM_32",
|
||||
TRUE,
|
||||
true,
|
||||
0xffffffff,
|
||||
0xffffffff,
|
||||
PCRELOFFSET),
|
||||
|
@ -363,12 +363,12 @@ static reloc_howto_type aoutarm_std_reloc_howto[] =
|
|||
2,
|
||||
2,
|
||||
24,
|
||||
TRUE,
|
||||
true,
|
||||
0,
|
||||
complain_overflow_signed,
|
||||
aoutarm_fix_pcrel_26 ,
|
||||
"ARM_26",
|
||||
FALSE,
|
||||
false,
|
||||
0x00ffffff,
|
||||
0x00ffffff,
|
||||
PCRELOFFSET),
|
||||
|
@ -376,92 +376,92 @@ static reloc_howto_type aoutarm_std_reloc_howto[] =
|
|||
0,
|
||||
0,
|
||||
8,
|
||||
TRUE,
|
||||
true,
|
||||
0,
|
||||
complain_overflow_signed,
|
||||
coff_arm_reloc,
|
||||
"ARM_DISP8",
|
||||
TRUE,
|
||||
true,
|
||||
0x000000ff,
|
||||
0x000000ff,
|
||||
TRUE),
|
||||
true),
|
||||
HOWTO (ARM_DISP16,
|
||||
0,
|
||||
1,
|
||||
16,
|
||||
TRUE,
|
||||
true,
|
||||
0,
|
||||
complain_overflow_signed,
|
||||
coff_arm_reloc,
|
||||
"ARM_DISP16",
|
||||
TRUE,
|
||||
true,
|
||||
0x0000ffff,
|
||||
0x0000ffff,
|
||||
TRUE),
|
||||
true),
|
||||
HOWTO (ARM_DISP32,
|
||||
0,
|
||||
2,
|
||||
32,
|
||||
TRUE,
|
||||
true,
|
||||
0,
|
||||
complain_overflow_signed,
|
||||
coff_arm_reloc,
|
||||
"ARM_DISP32",
|
||||
TRUE,
|
||||
true,
|
||||
0xffffffff,
|
||||
0xffffffff,
|
||||
TRUE),
|
||||
true),
|
||||
HOWTO (ARM_26D,
|
||||
2,
|
||||
2,
|
||||
24,
|
||||
FALSE,
|
||||
false,
|
||||
0,
|
||||
complain_overflow_dont,
|
||||
aoutarm_fix_pcrel_26_done,
|
||||
"ARM_26D",
|
||||
TRUE,
|
||||
true,
|
||||
0x00ffffff,
|
||||
0x0,
|
||||
FALSE),
|
||||
false),
|
||||
/* 8 is unused */
|
||||
EMPTY_HOWTO (-1),
|
||||
HOWTO (ARM_NEG16,
|
||||
0,
|
||||
-1,
|
||||
16,
|
||||
FALSE,
|
||||
false,
|
||||
0,
|
||||
complain_overflow_bitfield,
|
||||
coff_arm_reloc,
|
||||
"ARM_NEG16",
|
||||
TRUE,
|
||||
true,
|
||||
0x0000ffff,
|
||||
0x0000ffff,
|
||||
FALSE),
|
||||
false),
|
||||
HOWTO (ARM_NEG32,
|
||||
0,
|
||||
-2,
|
||||
32,
|
||||
FALSE,
|
||||
false,
|
||||
0,
|
||||
complain_overflow_bitfield,
|
||||
coff_arm_reloc,
|
||||
"ARM_NEG32",
|
||||
TRUE,
|
||||
true,
|
||||
0xffffffff,
|
||||
0xffffffff,
|
||||
FALSE),
|
||||
false),
|
||||
HOWTO (ARM_RVA32,
|
||||
0,
|
||||
2,
|
||||
32,
|
||||
FALSE,
|
||||
false,
|
||||
0,
|
||||
complain_overflow_bitfield,
|
||||
coff_arm_reloc,
|
||||
"ARM_RVA32",
|
||||
TRUE,
|
||||
true,
|
||||
0xffffffff,
|
||||
0xffffffff,
|
||||
PCRELOFFSET),
|
||||
|
@ -469,12 +469,12 @@ static reloc_howto_type aoutarm_std_reloc_howto[] =
|
|||
1,
|
||||
1,
|
||||
8,
|
||||
TRUE,
|
||||
true,
|
||||
0,
|
||||
complain_overflow_signed,
|
||||
coff_thumb_pcrel_9 ,
|
||||
"ARM_THUMB9",
|
||||
FALSE,
|
||||
false,
|
||||
0x000000ff,
|
||||
0x000000ff,
|
||||
PCRELOFFSET),
|
||||
|
@ -482,12 +482,12 @@ static reloc_howto_type aoutarm_std_reloc_howto[] =
|
|||
1,
|
||||
1,
|
||||
11,
|
||||
TRUE,
|
||||
true,
|
||||
0,
|
||||
complain_overflow_signed,
|
||||
coff_thumb_pcrel_12 ,
|
||||
"ARM_THUMB12",
|
||||
FALSE,
|
||||
false,
|
||||
0x000007ff,
|
||||
0x000007ff,
|
||||
PCRELOFFSET),
|
||||
|
@ -495,12 +495,12 @@ static reloc_howto_type aoutarm_std_reloc_howto[] =
|
|||
1,
|
||||
2,
|
||||
22,
|
||||
TRUE,
|
||||
true,
|
||||
0,
|
||||
complain_overflow_signed,
|
||||
coff_thumb_pcrel_23 ,
|
||||
"ARM_THUMB23",
|
||||
FALSE,
|
||||
false,
|
||||
0x07ff07ff,
|
||||
0x07ff07ff,
|
||||
PCRELOFFSET)
|
||||
|
@ -513,7 +513,7 @@ static reloc_howto_type aoutarm_std_reloc_howto[] =
|
|||
/* Return TRUE if this relocation should
|
||||
appear in the output .reloc section. */
|
||||
|
||||
static bfd_boolean
|
||||
static bool
|
||||
in_reloc_p (bfd * abfd ATTRIBUTE_UNUSED,
|
||||
reloc_howto_type * howto)
|
||||
{
|
||||
|
@ -942,7 +942,7 @@ coff_arm_link_hash_table_create (bfd * abfd)
|
|||
return & ret->root.root;
|
||||
}
|
||||
|
||||
static bfd_boolean
|
||||
static bool
|
||||
arm_emit_base_file_entry (struct bfd_link_info *info,
|
||||
bfd *output_bfd,
|
||||
asection *input_section,
|
||||
|
@ -956,10 +956,10 @@ arm_emit_base_file_entry (struct bfd_link_info *info,
|
|||
if (coff_data (output_bfd)->pe)
|
||||
addr -= pe_data (output_bfd)->pe_opthdr.ImageBase;
|
||||
if (fwrite (&addr, sizeof (addr), 1, (FILE *) info->base_file) == 1)
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
bfd_set_error (bfd_error_system_call);
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
#ifndef ARM_WINCE
|
||||
|
@ -1035,7 +1035,7 @@ find_thumb_glue (struct bfd_link_info *info,
|
|||
sprintf (tmp_name, THUMB2ARM_GLUE_ENTRY_NAME, name);
|
||||
|
||||
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)
|
||||
/* xgettext:c-format */
|
||||
|
@ -1064,7 +1064,7 @@ find_arm_glue (struct bfd_link_info *info,
|
|||
sprintf (tmp_name, ARM2THUMB_GLUE_ENTRY_NAME, name);
|
||||
|
||||
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)
|
||||
/* 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
|
||||
is different from the original. */
|
||||
|
||||
static bfd_boolean
|
||||
static bool
|
||||
coff_arm_relocate_section (bfd *output_bfd,
|
||||
struct bfd_link_info *info,
|
||||
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,
|
||||
sym, &addend);
|
||||
if (howto == NULL)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
/* The relocation_section function will skip pcrel_offset relocs
|
||||
when doing a relocatable link. However, we want to convert
|
||||
|
@ -1243,15 +1243,15 @@ coff_arm_relocate_section (bfd *output_bfd,
|
|||
2,
|
||||
2,
|
||||
24,
|
||||
TRUE,
|
||||
true,
|
||||
0,
|
||||
complain_overflow_signed,
|
||||
aoutarm_fix_pcrel_26 ,
|
||||
"ARM_26",
|
||||
TRUE,
|
||||
true,
|
||||
0x00ffffff,
|
||||
0x00ffffff,
|
||||
FALSE);
|
||||
false);
|
||||
|
||||
addend -= rel->r_vaddr - input_section->vma;
|
||||
#ifdef ARM_WINCE
|
||||
|
@ -1347,7 +1347,7 @@ coff_arm_relocate_section (bfd *output_bfd,
|
|||
|
||||
myh = find_arm_glue (info, name, input_bfd);
|
||||
if (myh == NULL)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
globals = coff_arm_hash_table (info);
|
||||
|
||||
|
@ -1389,7 +1389,7 @@ coff_arm_relocate_section (bfd *output_bfd,
|
|||
if (info->base_file
|
||||
&& !arm_emit_base_file_entry (info, output_bfd,
|
||||
s, my_offset + 8))
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
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);
|
||||
if (myh == NULL)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
globals = coff_arm_hash_table (info);
|
||||
|
||||
|
@ -1496,7 +1496,7 @@ coff_arm_relocate_section (bfd *output_bfd,
|
|||
&& !arm_emit_base_file_entry (info,
|
||||
output_bfd, s,
|
||||
my_offset + 16))
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1574,7 +1574,7 @@ coff_arm_relocate_section (bfd *output_bfd,
|
|||
else if (! bfd_link_relocatable (info))
|
||||
(*info->callbacks->undefined_symbol)
|
||||
(info, h->root.root.string, input_bfd, input_section,
|
||||
rel->r_vaddr - input_section->vma, TRUE);
|
||||
rel->r_vaddr - input_section->vma, true);
|
||||
}
|
||||
|
||||
/* 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)
|
||||
&& !arm_emit_base_file_entry (info, output_bfd, input_section,
|
||||
rel->r_vaddr))
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
if (done)
|
||||
rstat = bfd_reloc_ok;
|
||||
|
@ -1608,7 +1608,7 @@ coff_arm_relocate_section (bfd *output_bfd,
|
|||
{
|
||||
bfd_vma relocation = val + addend;
|
||||
int size = bfd_get_reloc_size (howto);
|
||||
bfd_boolean overflow = FALSE;
|
||||
bool overflow = false;
|
||||
bfd_byte *location = contents + address;
|
||||
bfd_vma x = bfd_get_32 (input_bfd, location);
|
||||
bfd_vma src_mask = 0x007FFFFE;
|
||||
|
@ -1674,7 +1674,7 @@ coff_arm_relocate_section (bfd *output_bfd,
|
|||
/* Assumes two's complement. */
|
||||
if ( signed_check > reloc_signed_max
|
||||
|| signed_check < reloc_signed_min)
|
||||
overflow = TRUE;
|
||||
overflow = true;
|
||||
|
||||
/* Put the relocation into the correct bits.
|
||||
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
|
||||
because the address is the address of a Thumb code symbol. */
|
||||
int patchit = FALSE;
|
||||
int patchit = false;
|
||||
|
||||
if (h != NULL
|
||||
&& ( h->symbol_class == C_THUMBSTATFUNC
|
||||
|| h->symbol_class == C_THUMBEXTFUNC))
|
||||
{
|
||||
patchit = TRUE;
|
||||
patchit = true;
|
||||
}
|
||||
else if (sym != NULL
|
||||
&& sym->n_scnum > N_UNDEF)
|
||||
|
@ -1732,7 +1732,7 @@ coff_arm_relocate_section (bfd *output_bfd,
|
|||
/* No hash entry - use the symbol instead. */
|
||||
if ( sym->n_sclass == C_THUMBSTATFUNC
|
||||
|| sym->n_sclass == C_THUMBEXTFUNC)
|
||||
patchit = TRUE;
|
||||
patchit = true;
|
||||
}
|
||||
|
||||
if (patchit)
|
||||
|
@ -1755,7 +1755,7 @@ coff_arm_relocate_section (bfd *output_bfd,
|
|||
/* xgettext:c-format */
|
||||
(_("%pB: bad reloc address %#" PRIx64 " in section `%pA'"),
|
||||
input_bfd, (uint64_t) rel->r_vaddr, input_section);
|
||||
return FALSE;
|
||||
return false;
|
||||
case bfd_reloc_overflow:
|
||||
{
|
||||
const char *name;
|
||||
|
@ -1769,7 +1769,7 @@ coff_arm_relocate_section (bfd *output_bfd,
|
|||
{
|
||||
name = _bfd_coff_internal_syment_name (input_bfd, sym, buf);
|
||||
if (name == NULL)
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
(*info->callbacks->reloc_overflow)
|
||||
|
@ -1780,12 +1780,12 @@ coff_arm_relocate_section (bfd *output_bfd,
|
|||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
#ifndef COFF_IMAGE_WITH_PE
|
||||
|
||||
bfd_boolean
|
||||
bool
|
||||
bfd_arm_allocate_interworking_sections (struct bfd_link_info * info)
|
||||
{
|
||||
asection * s;
|
||||
|
@ -1826,7 +1826,7 @@ bfd_arm_allocate_interworking_sections (struct bfd_link_info * info)
|
|||
s->contents = foo;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -1860,7 +1860,7 @@ record_arm_to_thumb_glue (struct bfd_link_info * info,
|
|||
sprintf (tmp_name, ARM2THUMB_GLUE_ENTRY_NAME, name);
|
||||
|
||||
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)
|
||||
{
|
||||
|
@ -1875,7 +1875,7 @@ record_arm_to_thumb_glue (struct bfd_link_info * info,
|
|||
bh = NULL;
|
||||
val = globals->arm_glue_size + 1;
|
||||
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);
|
||||
|
||||
|
@ -1916,7 +1916,7 @@ record_thumb_to_arm_glue (struct bfd_link_info * info,
|
|||
sprintf (tmp_name, THUMB2ARM_GLUE_ENTRY_NAME, name);
|
||||
|
||||
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)
|
||||
{
|
||||
|
@ -1928,7 +1928,7 @@ record_thumb_to_arm_glue (struct bfd_link_info * info,
|
|||
bh = NULL;
|
||||
val = globals->thumb_glue_size + 1;
|
||||
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. */
|
||||
myh = (struct coff_link_hash_entry *) bh;
|
||||
|
@ -1951,7 +1951,7 @@ record_thumb_to_arm_glue (struct bfd_link_info * info,
|
|||
bh = NULL;
|
||||
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,
|
||||
BSF_LOCAL, s, val, NULL, TRUE, FALSE, &bh);
|
||||
BSF_LOCAL, s, val, NULL, true, false, &bh);
|
||||
|
||||
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/
|
||||
{armcoff/pe}.em */
|
||||
|
||||
bfd_boolean
|
||||
bool
|
||||
bfd_arm_get_bfd_for_interworking (bfd * abfd,
|
||||
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
|
||||
getting a bfd to hold the glue. */
|
||||
if (bfd_link_relocatable (info))
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
globals = coff_arm_hash_table (info);
|
||||
|
||||
BFD_ASSERT (globals != NULL);
|
||||
|
||||
if (globals->bfd_of_glue_owner != NULL)
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
sec = bfd_get_section_by_name (abfd, ARM2THUMB_GLUE_SECTION_NAME);
|
||||
|
||||
|
@ -1995,7 +1995,7 @@ bfd_arm_get_bfd_for_interworking (bfd * abfd,
|
|||
flags);
|
||||
if (sec == NULL
|
||||
|| !bfd_set_section_alignment (sec, 2))
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
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
|
||||
|| !bfd_set_section_alignment (sec, 2))
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
/* Save the bfd for later use. */
|
||||
globals->bfd_of_glue_owner = abfd;
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
bfd_boolean
|
||||
bool
|
||||
bfd_arm_process_before_allocation (bfd * abfd,
|
||||
struct bfd_link_info * info,
|
||||
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
|
||||
to construct any glue. */
|
||||
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
|
||||
to do reloc rummaging, before section sizes are nailed down. */
|
||||
|
@ -2046,7 +2046,7 @@ bfd_arm_process_before_allocation (bfd * abfd,
|
|||
sec = abfd->sections;
|
||||
|
||||
if (sec == NULL)
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
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) */
|
||||
|
@ -2151,13 +2151,13 @@ bfd_arm_process_before_allocation (bfd * abfd,
|
|||
/* When doing a relocatable link, we want to convert ARM_26 relocs
|
||||
into ARM_26D relocs. */
|
||||
|
||||
static bfd_boolean
|
||||
static bool
|
||||
coff_arm_adjust_symndx (bfd *obfd ATTRIBUTE_UNUSED,
|
||||
struct bfd_link_info *info ATTRIBUTE_UNUSED,
|
||||
bfd *ibfd,
|
||||
asection *sec,
|
||||
struct internal_reloc *irel,
|
||||
bfd_boolean *adjustedp)
|
||||
bool *adjustedp)
|
||||
{
|
||||
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)
|
||||
irel->r_type = ARM_26D;
|
||||
}
|
||||
*adjustedp = FALSE;
|
||||
return TRUE;
|
||||
*adjustedp = false;
|
||||
return true;
|
||||
}
|
||||
|
||||
/* 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
|
||||
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)
|
||||
{
|
||||
bfd *obfd = info->output_bfd;
|
||||
BFD_ASSERT (ibfd != NULL && obfd != NULL);
|
||||
|
||||
if (ibfd == obfd)
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
/* If the two formats are different we cannot merge anything.
|
||||
This is not an error, since it is permissable to change the
|
||||
input and output formats. */
|
||||
if ( ibfd->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
|
||||
does not match the output ARM architecture. */
|
||||
if (! bfd_arm_merge_machines (ibfd, obfd))
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
/* Verify that the APCS is the same for the two BFDs. */
|
||||
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);
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
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);
|
||||
|
||||
bfd_set_error (bfd_error_wrong_format);
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
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);
|
||||
|
||||
bfd_set_error (bfd_error_wrong_format);
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
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. */
|
||||
|
||||
static bfd_boolean
|
||||
static bool
|
||||
coff_arm_print_private_bfd_data (bfd * abfd, void * ptr)
|
||||
{
|
||||
FILE * file = (FILE *) ptr;
|
||||
|
@ -2333,7 +2333,7 @@ coff_arm_print_private_bfd_data (bfd * abfd, void * ptr)
|
|||
|
||||
fputc ('\n', file);
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
/* 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
|
||||
called from both coffcode.h and peicode.h. */
|
||||
|
||||
static bfd_boolean
|
||||
static bool
|
||||
_bfd_coff_arm_set_private_flags (bfd * abfd, flagword flags)
|
||||
{
|
||||
flagword flag;
|
||||
|
@ -2359,7 +2359,7 @@ _bfd_coff_arm_set_private_flags (bfd * abfd, flagword flags)
|
|||
|| (APCS_FLOAT_FLAG (abfd) != (flags & F_APCS_FLOAT))
|
||||
|| (PIC_FLAG (abfd) != (flags & F_PIC))
|
||||
))
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
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);
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
/* Copy the important parts of the target specific data
|
||||
from one instance of a BFD to another. */
|
||||
|
||||
static bfd_boolean
|
||||
static bool
|
||||
coff_arm_copy_private_bfd_data (bfd * src, bfd * dest)
|
||||
{
|
||||
BFD_ASSERT (src != NULL && dest != NULL);
|
||||
|
||||
if (src == dest)
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
/* If the destination is not in the same format as the source, do not do
|
||||
the copy. */
|
||||
if (src->xvec != dest->xvec)
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
/* Copy the flags field. */
|
||||
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 (APCS_26_FLAG (dest) != APCS_26_FLAG (src))
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
if (APCS_FLOAT_FLAG (dest) != APCS_FLOAT_FLAG (src))
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
if (PIC_FLAG (dest) != PIC_FLAG (src))
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
else
|
||||
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
|
||||
|
@ -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
|
||||
labels of the form Lxxx to be stripped. */
|
||||
|
||||
static bfd_boolean
|
||||
static bool
|
||||
coff_arm_is_local_label_name (bfd * abfd ATTRIBUTE_UNUSED,
|
||||
const char * name)
|
||||
{
|
||||
|
@ -2478,7 +2478,7 @@ coff_arm_is_local_label_name (bfd * abfd ATTRIBUTE_UNUSED,
|
|||
size_t len = strlen (USER_LABEL_PREFIX);
|
||||
|
||||
if (strncmp (name, USER_LABEL_PREFIX, len) == 0)
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -2491,7 +2491,7 @@ coff_arm_is_local_label_name (bfd * abfd ATTRIBUTE_UNUSED,
|
|||
size_t len = strlen (LOCAL_LABEL_PREFIX);
|
||||
|
||||
if (strncmp (name, LOCAL_LABEL_PREFIX, len) != 0)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
/* Perform the checks below for the rest of the name. */
|
||||
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
|
||||
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)
|
||||
{
|
||||
return (sub->output_has_begun
|
||||
|| 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,
|
||||
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 (! _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);
|
||||
|
|
|
@ -19,11 +19,11 @@
|
|||
MA 02110-1301, USA. */
|
||||
|
||||
/* 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 *);
|
||||
|
||||
extern bfd_boolean bfd_arm_process_before_allocation
|
||||
extern bool bfd_arm_process_before_allocation
|
||||
(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 *);
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
|
||||
/* Return the COFF syment for a symbol. */
|
||||
|
||||
bfd_boolean
|
||||
bool
|
||||
bfd_coff_get_syment (bfd *abfd,
|
||||
asymbol *symbol,
|
||||
struct internal_syment *psyment)
|
||||
|
@ -39,7 +39,7 @@ bfd_coff_get_syment (bfd *abfd,
|
|||
|| ! csym->native->is_sym)
|
||||
{
|
||||
bfd_set_error (bfd_error_invalid_operation);
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
*psyment = csym->native->u.syment;
|
||||
|
@ -50,12 +50,12 @@ bfd_coff_get_syment (bfd *abfd,
|
|||
|
||||
/* FIXME: We should handle fix_line here. */
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
/* Return the COFF auxent for a symbol. */
|
||||
|
||||
bfd_boolean
|
||||
bool
|
||||
bfd_coff_get_auxent (bfd *abfd,
|
||||
asymbol *symbol,
|
||||
int indx,
|
||||
|
@ -72,7 +72,7 @@ bfd_coff_get_auxent (bfd *abfd,
|
|||
|| indx >= csym->native->u.syment.n_numaux)
|
||||
{
|
||||
bfd_set_error (bfd_error_invalid_operation);
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
ent = csym->native + indx + 1;
|
||||
|
@ -95,5 +95,5 @@ bfd_coff_get_auxent (bfd *abfd,
|
|||
((combined_entry_type *) pauxent->x_csect.x_scnlen.p
|
||||
- obj_raw_syments (abfd));
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -44,13 +44,13 @@ struct coff_section_tdata
|
|||
/* The relocs, swapped into COFF internal form. This may be NULL. */
|
||||
struct internal_reloc *relocs;
|
||||
/* 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. */
|
||||
bfd_byte *contents;
|
||||
/* 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. */
|
||||
bfd_boolean saved_bias;
|
||||
bool saved_bias;
|
||||
bfd_signed_vma bias;
|
||||
bfd_vma offset;
|
||||
unsigned int i;
|
||||
|
@ -81,11 +81,11 @@ struct coff_section_tdata
|
|||
struct internal_syment;
|
||||
union internal_auxent;
|
||||
|
||||
extern bfd_boolean bfd_coff_get_syment
|
||||
extern bool bfd_coff_get_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 *);
|
||||
|
||||
extern bfd_boolean bfd_coff_set_symbol_class
|
||||
extern bool bfd_coff_set_symbol_class
|
||||
(bfd *, struct bfd_symbol *, unsigned int);
|
||||
|
|
|
@ -51,7 +51,7 @@
|
|||
|
||||
/* The following functions are not static, because they are also
|
||||
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 *);
|
||||
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"
|
||||
|
||||
bfd_boolean
|
||||
bool
|
||||
_bfd_go32_mkobject (bfd * abfd)
|
||||
{
|
||||
const bfd_size_type amt = sizeof (coff_data_type);
|
||||
|
||||
abfd->tdata.coff_obj_data = bfd_zalloc (abfd, amt);
|
||||
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
|
||||
|
|
|
@ -187,8 +187,8 @@ coff_i386_reloc (bfd *abfd,
|
|||
/* Return TRUE if this relocation should appear in the output .reloc
|
||||
section. */
|
||||
|
||||
static bfd_boolean in_reloc_p (bfd * abfd ATTRIBUTE_UNUSED,
|
||||
reloc_howto_type *howto)
|
||||
static bool
|
||||
in_reloc_p (bfd *abfd ATTRIBUTE_UNUSED, reloc_howto_type *howto)
|
||||
{
|
||||
return ! howto->pc_relative && howto->type != R_IMAGEBASE
|
||||
&& howto->type != R_SECREL32;
|
||||
|
@ -196,7 +196,7 @@ static bfd_boolean in_reloc_p (bfd * abfd ATTRIBUTE_UNUSED,
|
|||
#endif /* COFF_WITH_PE */
|
||||
|
||||
#ifndef PCRELOFFSET
|
||||
#define PCRELOFFSET FALSE
|
||||
#define PCRELOFFSET false
|
||||
#endif
|
||||
|
||||
static reloc_howto_type howto_table[] =
|
||||
|
@ -211,29 +211,29 @@ static reloc_howto_type howto_table[] =
|
|||
0, /* rightshift */
|
||||
2, /* size (0 = byte, 1 = short, 2 = long) */
|
||||
32, /* bitsize */
|
||||
FALSE, /* pc_relative */
|
||||
false, /* pc_relative */
|
||||
0, /* bitpos */
|
||||
complain_overflow_bitfield, /* complain_on_overflow */
|
||||
coff_i386_reloc, /* special_function */
|
||||
"dir32", /* name */
|
||||
TRUE, /* partial_inplace */
|
||||
true, /* partial_inplace */
|
||||
0xffffffff, /* src_mask */
|
||||
0xffffffff, /* dst_mask */
|
||||
TRUE), /* pcrel_offset */
|
||||
true), /* pcrel_offset */
|
||||
/* PE IMAGE_REL_I386_DIR32NB relocation (7). */
|
||||
HOWTO (R_IMAGEBASE, /* type */
|
||||
0, /* rightshift */
|
||||
2, /* size (0 = byte, 1 = short, 2 = long) */
|
||||
32, /* bitsize */
|
||||
FALSE, /* pc_relative */
|
||||
false, /* pc_relative */
|
||||
0, /* bitpos */
|
||||
complain_overflow_bitfield, /* complain_on_overflow */
|
||||
coff_i386_reloc, /* special_function */
|
||||
"rva32", /* name */
|
||||
TRUE, /* partial_inplace */
|
||||
true, /* partial_inplace */
|
||||
0xffffffff, /* src_mask */
|
||||
0xffffffff, /* dst_mask */
|
||||
FALSE), /* pcrel_offset */
|
||||
false), /* pcrel_offset */
|
||||
EMPTY_HOWTO (010),
|
||||
EMPTY_HOWTO (011),
|
||||
EMPTY_HOWTO (012),
|
||||
|
@ -243,15 +243,15 @@ static reloc_howto_type howto_table[] =
|
|||
0, /* rightshift */
|
||||
2, /* size (0 = byte, 1 = short, 2 = long) */
|
||||
32, /* bitsize */
|
||||
FALSE, /* pc_relative */
|
||||
false, /* pc_relative */
|
||||
0, /* bitpos */
|
||||
complain_overflow_bitfield, /* complain_on_overflow */
|
||||
coff_i386_reloc, /* special_function */
|
||||
"secrel32", /* name */
|
||||
TRUE, /* partial_inplace */
|
||||
true, /* partial_inplace */
|
||||
0xffffffff, /* src_mask */
|
||||
0xffffffff, /* dst_mask */
|
||||
TRUE), /* pcrel_offset */
|
||||
true), /* pcrel_offset */
|
||||
#else
|
||||
EMPTY_HOWTO (013),
|
||||
#endif
|
||||
|
@ -263,12 +263,12 @@ static reloc_howto_type howto_table[] =
|
|||
0, /* rightshift */
|
||||
0, /* size (0 = byte, 1 = short, 2 = long) */
|
||||
8, /* bitsize */
|
||||
FALSE, /* pc_relative */
|
||||
false, /* pc_relative */
|
||||
0, /* bitpos */
|
||||
complain_overflow_bitfield, /* complain_on_overflow */
|
||||
coff_i386_reloc, /* special_function */
|
||||
"8", /* name */
|
||||
TRUE, /* partial_inplace */
|
||||
true, /* partial_inplace */
|
||||
0x000000ff, /* src_mask */
|
||||
0x000000ff, /* dst_mask */
|
||||
PCRELOFFSET), /* pcrel_offset */
|
||||
|
@ -277,12 +277,12 @@ static reloc_howto_type howto_table[] =
|
|||
0, /* rightshift */
|
||||
1, /* size (0 = byte, 1 = short, 2 = long) */
|
||||
16, /* bitsize */
|
||||
FALSE, /* pc_relative */
|
||||
false, /* pc_relative */
|
||||
0, /* bitpos */
|
||||
complain_overflow_bitfield, /* complain_on_overflow */
|
||||
coff_i386_reloc, /* special_function */
|
||||
"16", /* name */
|
||||
TRUE, /* partial_inplace */
|
||||
true, /* partial_inplace */
|
||||
0x0000ffff, /* src_mask */
|
||||
0x0000ffff, /* dst_mask */
|
||||
PCRELOFFSET), /* pcrel_offset */
|
||||
|
@ -291,12 +291,12 @@ static reloc_howto_type howto_table[] =
|
|||
0, /* rightshift */
|
||||
2, /* size (0 = byte, 1 = short, 2 = long) */
|
||||
32, /* bitsize */
|
||||
FALSE, /* pc_relative */
|
||||
false, /* pc_relative */
|
||||
0, /* bitpos */
|
||||
complain_overflow_bitfield, /* complain_on_overflow */
|
||||
coff_i386_reloc, /* special_function */
|
||||
"32", /* name */
|
||||
TRUE, /* partial_inplace */
|
||||
true, /* partial_inplace */
|
||||
0xffffffff, /* src_mask */
|
||||
0xffffffff, /* dst_mask */
|
||||
PCRELOFFSET), /* pcrel_offset */
|
||||
|
@ -305,12 +305,12 @@ static reloc_howto_type howto_table[] =
|
|||
0, /* rightshift */
|
||||
0, /* size (0 = byte, 1 = short, 2 = long) */
|
||||
8, /* bitsize */
|
||||
TRUE, /* pc_relative */
|
||||
true, /* pc_relative */
|
||||
0, /* bitpos */
|
||||
complain_overflow_signed, /* complain_on_overflow */
|
||||
coff_i386_reloc, /* special_function */
|
||||
"DISP8", /* name */
|
||||
TRUE, /* partial_inplace */
|
||||
true, /* partial_inplace */
|
||||
0x000000ff, /* src_mask */
|
||||
0x000000ff, /* dst_mask */
|
||||
PCRELOFFSET), /* pcrel_offset */
|
||||
|
@ -319,12 +319,12 @@ static reloc_howto_type howto_table[] =
|
|||
0, /* rightshift */
|
||||
1, /* size (0 = byte, 1 = short, 2 = long) */
|
||||
16, /* bitsize */
|
||||
TRUE, /* pc_relative */
|
||||
true, /* pc_relative */
|
||||
0, /* bitpos */
|
||||
complain_overflow_signed, /* complain_on_overflow */
|
||||
coff_i386_reloc, /* special_function */
|
||||
"DISP16", /* name */
|
||||
TRUE, /* partial_inplace */
|
||||
true, /* partial_inplace */
|
||||
0x0000ffff, /* src_mask */
|
||||
0x0000ffff, /* dst_mask */
|
||||
PCRELOFFSET), /* pcrel_offset */
|
||||
|
@ -333,12 +333,12 @@ static reloc_howto_type howto_table[] =
|
|||
0, /* rightshift */
|
||||
2, /* size (0 = byte, 1 = short, 2 = long) */
|
||||
32, /* bitsize */
|
||||
TRUE, /* pc_relative */
|
||||
true, /* pc_relative */
|
||||
0, /* bitpos */
|
||||
complain_overflow_signed, /* complain_on_overflow */
|
||||
coff_i386_reloc, /* special_function */
|
||||
"DISP32", /* name */
|
||||
TRUE, /* partial_inplace */
|
||||
true, /* partial_inplace */
|
||||
0xffffffff, /* src_mask */
|
||||
0xffffffff, /* dst_mask */
|
||||
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
|
||||
relocatable link. */
|
||||
|
||||
static bfd_boolean
|
||||
static bool
|
||||
coff_pe_i386_relocate_section (bfd *output_bfd,
|
||||
struct bfd_link_info *info,
|
||||
bfd *input_bfd,
|
||||
|
@ -422,7 +422,7 @@ coff_pe_i386_relocate_section (bfd *output_bfd,
|
|||
asection **sections)
|
||||
{
|
||||
if (bfd_link_relocatable (info))
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
return _bfd_coff_generic_relocate_section (output_bfd, info, input_bfd,
|
||||
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
|
||||
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)
|
||||
{
|
||||
if (name[0] == 'L')
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
return _bfd_coff_is_local_label_name (abfd, name);
|
||||
}
|
||||
|
|
|
@ -53,11 +53,11 @@ static reloc_howto_type howto_table[] =
|
|||
/* Return TRUE if this relocation should
|
||||
appear in the output .reloc section. */
|
||||
|
||||
static bfd_boolean
|
||||
static bool
|
||||
in_reloc_p (bfd * abfd 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
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
|
||||
/* This file is compiled more than once, but we only compile the
|
||||
final_link routine once. */
|
||||
extern bfd_boolean mcore_bfd_coff_final_link
|
||||
extern bool mcore_bfd_coff_final_link
|
||||
(bfd *, struct bfd_link_info *);
|
||||
static bfd_reloc_status_type mcore_coff_unsupported_reloc
|
||||
(bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
|
||||
|
@ -63,29 +63,29 @@ static reloc_howto_type mcore_coff_howto_table[] =
|
|||
0, /* rightshift */
|
||||
0, /* size (0 = byte, 1 = short, 2 = long) */
|
||||
0, /* bitsize */
|
||||
FALSE, /* pc_relative */
|
||||
false, /* pc_relative */
|
||||
0, /* bitpos */
|
||||
complain_overflow_dont, /* dont complain_on_overflow */
|
||||
NULL, /* special_function */
|
||||
"ABSOLUTE", /* name */
|
||||
FALSE, /* partial_inplace */
|
||||
false, /* partial_inplace */
|
||||
0x00, /* src_mask */
|
||||
0x00, /* dst_mask */
|
||||
FALSE), /* pcrel_offset */
|
||||
false), /* pcrel_offset */
|
||||
|
||||
HOWTO (IMAGE_REL_MCORE_ADDR32,/* type */
|
||||
0, /* rightshift */
|
||||
2, /* size (0 = byte, 1 = short, 2 = long) */
|
||||
32, /* bitsize */
|
||||
FALSE, /* pc_relative */
|
||||
false, /* pc_relative */
|
||||
0, /* bitpos */
|
||||
complain_overflow_bitfield, /* complain_on_overflow */
|
||||
NULL, /* special_function */
|
||||
"ADDR32", /* name */
|
||||
TRUE, /* partial_inplace */
|
||||
true, /* partial_inplace */
|
||||
0xffffffff, /* src_mask */
|
||||
0xffffffff, /* dst_mask */
|
||||
FALSE), /* pcrel_offset */
|
||||
false), /* pcrel_offset */
|
||||
|
||||
/* 8 bits + 2 zero bits; jmpi/jsri/lrw instructions.
|
||||
Should not appear in object files. */
|
||||
|
@ -93,15 +93,15 @@ static reloc_howto_type mcore_coff_howto_table[] =
|
|||
2, /* rightshift */
|
||||
1, /* size (0 = byte, 1 = short, 2 = long) */
|
||||
8, /* bitsize */
|
||||
TRUE, /* pc_relative */
|
||||
true, /* pc_relative */
|
||||
0, /* bitpos */
|
||||
complain_overflow_bitfield, /* complain_on_overflow */
|
||||
mcore_coff_unsupported_reloc, /* special_function */
|
||||
"IMM8BY4", /* name */
|
||||
FALSE, /* partial_inplace */
|
||||
false, /* partial_inplace */
|
||||
0, /* src_mask */
|
||||
0, /* dst_mask */
|
||||
TRUE), /* pcrel_offset */
|
||||
true), /* pcrel_offset */
|
||||
|
||||
/* bsr/bt/bf/br instructions; 11 bits + 1 zero bit
|
||||
Span 2k instructions == 4k bytes.
|
||||
|
@ -110,45 +110,45 @@ static reloc_howto_type mcore_coff_howto_table[] =
|
|||
1, /* rightshift */
|
||||
1, /* size (0 = byte, 1 = short, 2 = long) */
|
||||
11, /* bitsize */
|
||||
TRUE, /* pc_relative */
|
||||
true, /* pc_relative */
|
||||
0, /* bitpos */
|
||||
complain_overflow_signed, /* complain_on_overflow */
|
||||
NULL, /* special_function */
|
||||
"IMM11BY2", /* name */
|
||||
FALSE, /* partial_inplace */
|
||||
false, /* partial_inplace */
|
||||
0x0, /* src_mask */
|
||||
0x7ff, /* dst_mask */
|
||||
TRUE), /* pcrel_offset */
|
||||
true), /* pcrel_offset */
|
||||
|
||||
/* 4 bits + 1 zero bit; 'loopt' instruction only; unsupported. */
|
||||
HOWTO (IMAGE_REL_MCORE_PCREL_IMM4BY2, /* type */
|
||||
1, /* rightshift */
|
||||
1, /* size (0 = byte, 1 = short, 2 = long) */
|
||||
4, /* bitsize */
|
||||
TRUE, /* pc_relative */
|
||||
true, /* pc_relative */
|
||||
0, /* bitpos */
|
||||
complain_overflow_bitfield, /* complain_on_overflow */
|
||||
mcore_coff_unsupported_reloc, /* special_function */
|
||||
"IMM4BY2", /* name */
|
||||
FALSE, /* partial_inplace */
|
||||
false, /* partial_inplace */
|
||||
0, /* src_mask */
|
||||
0, /* dst_mask */
|
||||
TRUE), /* pcrel_offset */
|
||||
true), /* pcrel_offset */
|
||||
|
||||
/* 32-bit pc-relative. Eventually this will help support PIC code. */
|
||||
HOWTO (IMAGE_REL_MCORE_PCREL_32,/* type */
|
||||
0, /* rightshift */
|
||||
2, /* size (0 = byte, 1 = short, 2 = long) */
|
||||
32, /* bitsize */
|
||||
TRUE, /* pc_relative */
|
||||
true, /* pc_relative */
|
||||
0, /* bitpos */
|
||||
complain_overflow_bitfield, /* complain_on_overflow */
|
||||
NULL, /* special_function */
|
||||
"PCREL_32", /* name */
|
||||
FALSE, /* partial_inplace */
|
||||
false, /* partial_inplace */
|
||||
0x0, /* src_mask */
|
||||
0xffffffff, /* dst_mask */
|
||||
TRUE), /* pcrel_offset */
|
||||
true), /* pcrel_offset */
|
||||
|
||||
/* Like PCREL_IMM11BY2, this relocation indicates that there is a
|
||||
'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, /* size (0 = byte, 1 = short, 2 = long) */
|
||||
11, /* bitsize */
|
||||
TRUE, /* pc_relative */
|
||||
true, /* pc_relative */
|
||||
0, /* bitpos */
|
||||
complain_overflow_signed, /* complain_on_overflow */
|
||||
NULL, /* special_function */
|
||||
"JSR_IMM11BY2", /* name */
|
||||
FALSE, /* partial_inplace */
|
||||
false, /* partial_inplace */
|
||||
0x0, /* src_mask */
|
||||
0x7ff, /* dst_mask */
|
||||
TRUE), /* pcrel_offset */
|
||||
true), /* pcrel_offset */
|
||||
|
||||
HOWTO (IMAGE_REL_MCORE_RVA, /* type */
|
||||
0, /* rightshift */
|
||||
2, /* size (0 = byte, 1 = short, 2 = long) */
|
||||
32, /* bitsize */
|
||||
FALSE, /* pc_relative */
|
||||
false, /* pc_relative */
|
||||
0, /* bitpos */
|
||||
complain_overflow_signed, /* complain_on_overflow */
|
||||
NULL, /* special_function */
|
||||
"MCORE_RVA", /* name */
|
||||
TRUE, /* partial_inplace */
|
||||
true, /* partial_inplace */
|
||||
0xffffffff, /* src_mask */
|
||||
0xffffffff, /* dst_mask */
|
||||
TRUE) /* pcrel_offset */
|
||||
true) /* pcrel_offset */
|
||||
};
|
||||
|
||||
/* 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. */
|
||||
|
||||
static bfd_boolean
|
||||
static bool
|
||||
mcore_emit_base_file_entry (struct bfd_link_info *info,
|
||||
bfd *output_bfd,
|
||||
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;
|
||||
|
||||
if (fwrite (&addr, sizeof (addr), 1, (FILE *) info->base_file) == 1)
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
bfd_set_error (bfd_error_system_call);
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
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.
|
||||
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)
|
||||
{
|
||||
return ! howto->pc_relative && howto->type != IMAGE_REL_MCORE_RVA;
|
||||
}
|
||||
|
||||
/* The reloc processing routine for the optimized COFF linker. */
|
||||
static bfd_boolean
|
||||
static bool
|
||||
coff_mcore_relocate_section (bfd * output_bfd,
|
||||
struct bfd_link_info * info,
|
||||
bfd * input_bfd,
|
||||
|
@ -360,7 +360,7 @@ coff_mcore_relocate_section (bfd * output_bfd,
|
|||
thing. The caller will take care of adjusting the reloc
|
||||
addresses and symbol indices. */
|
||||
if (bfd_link_relocatable (info))
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
/* Check if we have the same endianness */
|
||||
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_set_error (bfd_error_wrong_format);
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
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,
|
||||
sym, & addend);
|
||||
if (howto == NULL)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
val = 0;
|
||||
|
||||
|
@ -457,7 +457,7 @@ coff_mcore_relocate_section (bfd * output_bfd,
|
|||
else
|
||||
(*info->callbacks->undefined_symbol)
|
||||
(info, h->root.root.string, input_bfd, input_section,
|
||||
rel->r_vaddr - input_section->vma, TRUE);
|
||||
rel->r_vaddr - input_section->vma, true);
|
||||
|
||||
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"),
|
||||
input_bfd, r_type);
|
||||
bfd_set_error (bfd_error_bad_value);
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
case IMAGE_REL_MCORE_ABSOLUTE:
|
||||
_bfd_error_handler
|
||||
|
@ -508,7 +508,7 @@ coff_mcore_relocate_section (bfd * output_bfd,
|
|||
&& pe_data (output_bfd)->in_reloc_p (output_bfd, howto)
|
||||
&& !mcore_emit_base_file_entry (info, output_bfd, input_section,
|
||||
rel->r_vaddr))
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
switch (rstat)
|
||||
{
|
||||
|
@ -526,7 +526,7 @@ coff_mcore_relocate_section (bfd * output_bfd,
|
|||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
/* Tailor coffcode.h -- macro heaven. */
|
||||
|
|
100
bfd/coff-mips.c
100
bfd/coff-mips.c
|
@ -86,52 +86,52 @@ static reloc_howto_type mips_howto_table[] =
|
|||
0, /* rightshift */
|
||||
0, /* size (0 = byte, 1 = short, 2 = long) */
|
||||
8, /* bitsize */
|
||||
FALSE, /* pc_relative */
|
||||
false, /* pc_relative */
|
||||
0, /* bitpos */
|
||||
complain_overflow_dont, /* complain_on_overflow */
|
||||
0, /* special_function */
|
||||
"IGNORE", /* name */
|
||||
FALSE, /* partial_inplace */
|
||||
false, /* partial_inplace */
|
||||
0, /* src_mask */
|
||||
0, /* dst_mask */
|
||||
FALSE), /* pcrel_offset */
|
||||
false), /* pcrel_offset */
|
||||
|
||||
/* A 16 bit reference to a symbol, normally from a data section. */
|
||||
HOWTO (MIPS_R_REFHALF, /* type */
|
||||
0, /* rightshift */
|
||||
1, /* size (0 = byte, 1 = short, 2 = long) */
|
||||
16, /* bitsize */
|
||||
FALSE, /* pc_relative */
|
||||
false, /* pc_relative */
|
||||
0, /* bitpos */
|
||||
complain_overflow_bitfield, /* complain_on_overflow */
|
||||
mips_generic_reloc, /* special_function */
|
||||
"REFHALF", /* name */
|
||||
TRUE, /* partial_inplace */
|
||||
true, /* partial_inplace */
|
||||
0xffff, /* src_mask */
|
||||
0xffff, /* dst_mask */
|
||||
FALSE), /* pcrel_offset */
|
||||
false), /* pcrel_offset */
|
||||
|
||||
/* A 32 bit reference to a symbol, normally from a data section. */
|
||||
HOWTO (MIPS_R_REFWORD, /* type */
|
||||
0, /* rightshift */
|
||||
2, /* size (0 = byte, 1 = short, 2 = long) */
|
||||
32, /* bitsize */
|
||||
FALSE, /* pc_relative */
|
||||
false, /* pc_relative */
|
||||
0, /* bitpos */
|
||||
complain_overflow_bitfield, /* complain_on_overflow */
|
||||
mips_generic_reloc, /* special_function */
|
||||
"REFWORD", /* name */
|
||||
TRUE, /* partial_inplace */
|
||||
true, /* partial_inplace */
|
||||
0xffffffff, /* src_mask */
|
||||
0xffffffff, /* dst_mask */
|
||||
FALSE), /* pcrel_offset */
|
||||
false), /* pcrel_offset */
|
||||
|
||||
/* A 26 bit absolute jump address. */
|
||||
HOWTO (MIPS_R_JMPADDR, /* type */
|
||||
2, /* rightshift */
|
||||
2, /* size (0 = byte, 1 = short, 2 = long) */
|
||||
26, /* bitsize */
|
||||
FALSE, /* pc_relative */
|
||||
false, /* pc_relative */
|
||||
0, /* bitpos */
|
||||
complain_overflow_dont, /* complain_on_overflow */
|
||||
/* This needs complex overflow
|
||||
|
@ -139,10 +139,10 @@ static reloc_howto_type mips_howto_table[] =
|
|||
bits must match the PC. */
|
||||
mips_generic_reloc, /* special_function */
|
||||
"JMPADDR", /* name */
|
||||
TRUE, /* partial_inplace */
|
||||
true, /* partial_inplace */
|
||||
0x3ffffff, /* src_mask */
|
||||
0x3ffffff, /* dst_mask */
|
||||
FALSE), /* pcrel_offset */
|
||||
false), /* pcrel_offset */
|
||||
|
||||
/* The high 16 bits of a symbol value. Handled by the function
|
||||
mips_refhi_reloc. */
|
||||
|
@ -150,30 +150,30 @@ static reloc_howto_type mips_howto_table[] =
|
|||
16, /* rightshift */
|
||||
2, /* size (0 = byte, 1 = short, 2 = long) */
|
||||
16, /* bitsize */
|
||||
FALSE, /* pc_relative */
|
||||
false, /* pc_relative */
|
||||
0, /* bitpos */
|
||||
complain_overflow_bitfield, /* complain_on_overflow */
|
||||
mips_refhi_reloc, /* special_function */
|
||||
"REFHI", /* name */
|
||||
TRUE, /* partial_inplace */
|
||||
true, /* partial_inplace */
|
||||
0xffff, /* src_mask */
|
||||
0xffff, /* dst_mask */
|
||||
FALSE), /* pcrel_offset */
|
||||
false), /* pcrel_offset */
|
||||
|
||||
/* The low 16 bits of a symbol value. */
|
||||
HOWTO (MIPS_R_REFLO, /* type */
|
||||
0, /* rightshift */
|
||||
2, /* size (0 = byte, 1 = short, 2 = long) */
|
||||
16, /* bitsize */
|
||||
FALSE, /* pc_relative */
|
||||
false, /* pc_relative */
|
||||
0, /* bitpos */
|
||||
complain_overflow_dont, /* complain_on_overflow */
|
||||
mips_reflo_reloc, /* special_function */
|
||||
"REFLO", /* name */
|
||||
TRUE, /* partial_inplace */
|
||||
true, /* partial_inplace */
|
||||
0xffff, /* src_mask */
|
||||
0xffff, /* dst_mask */
|
||||
FALSE), /* pcrel_offset */
|
||||
false), /* pcrel_offset */
|
||||
|
||||
/* A reference to an offset from the gp register. Handled by the
|
||||
function mips_gprel_reloc. */
|
||||
|
@ -181,15 +181,15 @@ static reloc_howto_type mips_howto_table[] =
|
|||
0, /* rightshift */
|
||||
2, /* size (0 = byte, 1 = short, 2 = long) */
|
||||
16, /* bitsize */
|
||||
FALSE, /* pc_relative */
|
||||
false, /* pc_relative */
|
||||
0, /* bitpos */
|
||||
complain_overflow_signed, /* complain_on_overflow */
|
||||
mips_gprel_reloc, /* special_function */
|
||||
"GPREL", /* name */
|
||||
TRUE, /* partial_inplace */
|
||||
true, /* partial_inplace */
|
||||
0xffff, /* src_mask */
|
||||
0xffff, /* dst_mask */
|
||||
FALSE), /* pcrel_offset */
|
||||
false), /* pcrel_offset */
|
||||
|
||||
/* A reference to a literal using an offset from the gp register.
|
||||
Handled by the function mips_gprel_reloc. */
|
||||
|
@ -197,15 +197,15 @@ static reloc_howto_type mips_howto_table[] =
|
|||
0, /* rightshift */
|
||||
2, /* size (0 = byte, 1 = short, 2 = long) */
|
||||
16, /* bitsize */
|
||||
FALSE, /* pc_relative */
|
||||
false, /* pc_relative */
|
||||
0, /* bitpos */
|
||||
complain_overflow_signed, /* complain_on_overflow */
|
||||
mips_gprel_reloc, /* special_function */
|
||||
"LITERAL", /* name */
|
||||
TRUE, /* partial_inplace */
|
||||
true, /* partial_inplace */
|
||||
0xffff, /* src_mask */
|
||||
0xffff, /* dst_mask */
|
||||
FALSE), /* pcrel_offset */
|
||||
false), /* pcrel_offset */
|
||||
|
||||
EMPTY_HOWTO (8),
|
||||
EMPTY_HOWTO (9),
|
||||
|
@ -219,15 +219,15 @@ static reloc_howto_type mips_howto_table[] =
|
|||
2, /* rightshift */
|
||||
2, /* size (0 = byte, 1 = short, 2 = long) */
|
||||
16, /* bitsize */
|
||||
TRUE, /* pc_relative */
|
||||
true, /* pc_relative */
|
||||
0, /* bitpos */
|
||||
complain_overflow_signed, /* complain_on_overflow */
|
||||
mips_generic_reloc, /* special_function */
|
||||
"PCREL16", /* name */
|
||||
TRUE, /* partial_inplace */
|
||||
true, /* partial_inplace */
|
||||
0xffff, /* src_mask */
|
||||
0xffff, /* dst_mask */
|
||||
TRUE), /* pcrel_offset */
|
||||
true), /* pcrel_offset */
|
||||
};
|
||||
|
||||
#define MIPS_HOWTO_COUNT \
|
||||
|
@ -235,7 +235,7 @@ static reloc_howto_type mips_howto_table[] =
|
|||
|
||||
/* See whether the magic number matches. */
|
||||
|
||||
static bfd_boolean
|
||||
static bool
|
||||
mips_ecoff_bad_format_hook (bfd * abfd, void * 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:
|
||||
/* I don't know what endianness this implies. */
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
case MIPS_MAGIC_BIG:
|
||||
case MIPS_MAGIC_BIG2:
|
||||
|
@ -257,7 +257,7 @@ mips_ecoff_bad_format_hook (bfd * abfd, void * filehdr)
|
|||
return bfd_little_endian (abfd);
|
||||
|
||||
default:
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -562,7 +562,7 @@ mips_gprel_reloc (bfd *abfd ATTRIBUTE_UNUSED,
|
|||
bfd *output_bfd,
|
||||
char **error_message ATTRIBUTE_UNUSED)
|
||||
{
|
||||
bfd_boolean relocatable;
|
||||
bool relocatable;
|
||||
bfd_vma gp;
|
||||
bfd_vma relocation;
|
||||
unsigned long val;
|
||||
|
@ -581,10 +581,10 @@ mips_gprel_reloc (bfd *abfd ATTRIBUTE_UNUSED,
|
|||
}
|
||||
|
||||
if (output_bfd != (bfd *) NULL)
|
||||
relocatable = TRUE;
|
||||
relocatable = true;
|
||||
else
|
||||
{
|
||||
relocatable = FALSE;
|
||||
relocatable = false;
|
||||
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. */
|
||||
|
||||
static bfd_boolean
|
||||
static bool
|
||||
mips_relocate_section (bfd *output_bfd,
|
||||
struct bfd_link_info *info,
|
||||
bfd *input_bfd,
|
||||
|
@ -803,11 +803,11 @@ mips_relocate_section (bfd *output_bfd,
|
|||
asection **symndx_to_section;
|
||||
struct ecoff_link_hash_entry **sym_hashes;
|
||||
bfd_vma gp;
|
||||
bfd_boolean gp_undefined;
|
||||
bool gp_undefined;
|
||||
struct external_reloc *ext_rel;
|
||||
struct external_reloc *ext_rel_end;
|
||||
unsigned int i;
|
||||
bfd_boolean got_lo;
|
||||
bool got_lo;
|
||||
struct internal_reloc lo_int_rel;
|
||||
bfd_size_type amt;
|
||||
|
||||
|
@ -823,7 +823,7 @@ mips_relocate_section (bfd *output_bfd,
|
|||
amt = NUM_RELOC_SECTIONS * sizeof (asection *);
|
||||
symndx_to_section = (asection **) bfd_alloc (input_bfd, amt);
|
||||
if (!symndx_to_section)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
symndx_to_section[RELOC_SECTION_NONE] = NULL;
|
||||
symndx_to_section[RELOC_SECTION_TEXT] =
|
||||
|
@ -858,18 +858,18 @@ mips_relocate_section (bfd *output_bfd,
|
|||
|
||||
gp = _bfd_get_gp_value (output_bfd);
|
||||
if (gp == 0)
|
||||
gp_undefined = TRUE;
|
||||
gp_undefined = true;
|
||||
else
|
||||
gp_undefined = FALSE;
|
||||
gp_undefined = false;
|
||||
|
||||
got_lo = FALSE;
|
||||
got_lo = false;
|
||||
|
||||
ext_rel = (struct external_reloc *) external_relocs;
|
||||
ext_rel_end = ext_rel + input_section->reloc_count;
|
||||
for (i = 0; ext_rel < ext_rel_end; ext_rel++, i++)
|
||||
{
|
||||
struct internal_reloc int_rel;
|
||||
bfd_boolean use_lo = FALSE;
|
||||
bool use_lo = false;
|
||||
bfd_vma addend;
|
||||
reloc_howto_type *howto;
|
||||
struct ecoff_link_hash_entry *h = NULL;
|
||||
|
@ -882,7 +882,7 @@ mips_relocate_section (bfd *output_bfd,
|
|||
else
|
||||
{
|
||||
int_rel = lo_int_rel;
|
||||
got_lo = FALSE;
|
||||
got_lo = false;
|
||||
}
|
||||
|
||||
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_symndx == lo_int_rel.r_symndx)
|
||||
{
|
||||
use_lo = TRUE;
|
||||
use_lo = true;
|
||||
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. */
|
||||
gp = 4;
|
||||
_bfd_set_gp_value (output_bfd, gp);
|
||||
gp_undefined = FALSE;
|
||||
gp_undefined = false;
|
||||
}
|
||||
if (! int_rel.r_extern)
|
||||
{
|
||||
|
@ -1158,7 +1158,7 @@ mips_relocate_section (bfd *output_bfd,
|
|||
{
|
||||
(*info->callbacks->undefined_symbol)
|
||||
(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;
|
||||
}
|
||||
}
|
||||
|
@ -1236,7 +1236,7 @@ mips_relocate_section (bfd *output_bfd,
|
|||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
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_filehdr_out, mips_ecoff_swap_aouthdr_out,
|
||||
mips_ecoff_swap_scnhdr_out,
|
||||
FILHSZ, AOUTSZ, SCNHSZ, 0, 0, 0, 0, FILNMLEN, TRUE,
|
||||
ECOFF_NO_LONG_SECTION_NAMES, 4, FALSE, 2, 32768,
|
||||
FILHSZ, AOUTSZ, SCNHSZ, 0, 0, 0, 0, FILNMLEN, true,
|
||||
ECOFF_NO_LONG_SECTION_NAMES, 4, false, 2, 32768,
|
||||
mips_ecoff_swap_filehdr_in, mips_ecoff_swap_aouthdr_in,
|
||||
mips_ecoff_swap_scnhdr_in, NULL,
|
||||
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
|
||||
Alpha. FALSE if .rdata is part of the data segment, as on the
|
||||
MIPS. */
|
||||
FALSE,
|
||||
false,
|
||||
/* Bitsize of constructor entries. */
|
||||
32,
|
||||
/* Reloc to use for constructor entries. */
|
||||
|
|
File diff suppressed because it is too large
Load diff
368
bfd/coff-sh.c
368
bfd/coff-sh.c
File diff suppressed because it is too large
Load diff
|
@ -54,12 +54,12 @@
|
|||
#include "coff/msdos.h"
|
||||
|
||||
static bfd_cleanup go32exe_check_format (bfd *);
|
||||
static bfd_boolean go32exe_write_object_contents (bfd *);
|
||||
static bfd_boolean go32exe_mkobject (bfd *);
|
||||
static bfd_boolean go32exe_copy_private_bfd_data (bfd *, bfd *);
|
||||
static bool go32exe_write_object_contents (bfd *);
|
||||
static bool go32exe_mkobject (bfd *);
|
||||
static bool go32exe_copy_private_bfd_data (bfd *, bfd *);
|
||||
|
||||
/* 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 *);
|
||||
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
|
||||
to the new obfd. */
|
||||
|
||||
static bfd_boolean
|
||||
static bool
|
||||
go32exe_copy_private_bfd_data (bfd *ibfd, bfd *obfd)
|
||||
{
|
||||
/* Check if both are the same targets. */
|
||||
if (ibfd->xvec != obfd->xvec)
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
/* Make sure we have a source stub. */
|
||||
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)
|
||||
coff_data (obfd)->stub = bfd_alloc (obfd, coff_data (ibfd)->stub_size);
|
||||
if (coff_data (obfd)->stub == NULL)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
/* Now copy the 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;
|
||||
obfd->origin = coff_data (obfd)->stub_size;
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
/* 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. */
|
||||
|
||||
static bfd_boolean
|
||||
static bool
|
||||
go32exe_write_object_contents (bfd *abfd)
|
||||
{
|
||||
const bfd_size_type pos = bfd_tell (abfd);
|
||||
|
@ -345,14 +345,14 @@ go32exe_write_object_contents (bfd *abfd)
|
|||
/* Write the stub. */
|
||||
abfd->origin = 0;
|
||||
if (bfd_seek (abfd, 0, SEEK_SET) != 0)
|
||||
return FALSE;
|
||||
return false;
|
||||
if (bfd_bwrite (coff_data (abfd)->stub, stubsize, abfd) != stubsize)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
/* Seek back to where we were. */
|
||||
abfd->origin = stubsize;
|
||||
if (bfd_seek (abfd, pos, SEEK_SET) != 0)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
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
|
||||
coff_mkobject_hook etc from bfd_check_format. */
|
||||
|
||||
static bfd_boolean
|
||||
static bool
|
||||
go32exe_mkobject (bfd *abfd)
|
||||
{
|
||||
/* Don't output to an archive. */
|
||||
if (abfd->my_archive != NULL)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
if (!_bfd_go32_mkobject (abfd))
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
go32exe_create_stub (abfd);
|
||||
if (coff_data (abfd)->stub == NULL)
|
||||
{
|
||||
bfd_release (abfd, coff_data (abfd));
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
abfd->origin = coff_data (abfd)->stub_size;
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -31,16 +31,16 @@
|
|||
|
||||
reloc_howto_type tic30_coff_howto_table[] =
|
||||
{
|
||||
HOWTO (R_TIC30_ABS16, 2, 1, 16, FALSE, 0, 0, NULL,
|
||||
"16", FALSE, 0x0000FFFF, 0x0000FFFF, FALSE),
|
||||
HOWTO (R_TIC30_ABS24, 2, 2, 24, FALSE, 8, complain_overflow_bitfield, NULL,
|
||||
"24", FALSE, 0xFFFFFF00, 0xFFFFFF00, FALSE),
|
||||
HOWTO (R_TIC30_LDP, 18, 0, 24, FALSE, 0, complain_overflow_bitfield, NULL,
|
||||
"LDP", FALSE, 0x00FF0000, 0x000000FF, FALSE),
|
||||
HOWTO (R_TIC30_ABS32, 2, 2, 32, FALSE, 0, complain_overflow_bitfield, NULL,
|
||||
"32", FALSE, 0xFFFFFFFF, 0xFFFFFFFF, FALSE),
|
||||
HOWTO (R_TIC30_PC16, 2, 1, 16, TRUE, 0, complain_overflow_signed, NULL,
|
||||
"PCREL", FALSE, 0x0000FFFF, 0x0000FFFF, FALSE),
|
||||
HOWTO (R_TIC30_ABS16, 2, 1, 16, false, 0, 0, NULL,
|
||||
"16", false, 0x0000FFFF, 0x0000FFFF, false),
|
||||
HOWTO (R_TIC30_ABS24, 2, 2, 24, false, 8, complain_overflow_bitfield, NULL,
|
||||
"24", false, 0xFFFFFF00, 0xFFFFFF00, false),
|
||||
HOWTO (R_TIC30_LDP, 18, 0, 24, false, 0, complain_overflow_bitfield, NULL,
|
||||
"LDP", false, 0x00FF0000, 0x000000FF, false),
|
||||
HOWTO (R_TIC30_ABS32, 2, 2, 32, false, 0, complain_overflow_bitfield, NULL,
|
||||
"32", false, 0xFFFFFFFF, 0xFFFFFFFF, false),
|
||||
HOWTO (R_TIC30_PC16, 2, 1, 16, true, 0, complain_overflow_signed, NULL,
|
||||
"PCREL", false, 0x0000FFFF, 0x0000FFFF, false),
|
||||
EMPTY_HOWTO (-1)
|
||||
};
|
||||
|
||||
|
|
|
@ -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
|
||||
labels. */
|
||||
static bfd_boolean
|
||||
static bool
|
||||
ticoff_bfd_is_local_label_name (bfd *abfd ATTRIBUTE_UNUSED,
|
||||
const char *name)
|
||||
{
|
||||
if (TICOFF_LOCAL_LABEL_P(name))
|
||||
return TRUE;
|
||||
return FALSE;
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
#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[] =
|
||||
{
|
||||
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_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_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_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_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_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_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_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_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_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_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_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_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_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),
|
||||
};
|
||||
#define HOWTO_SIZE (sizeof(tic4x_howto_table) / sizeof(tic4x_howto_table[0]))
|
||||
|
||||
|
|
|
@ -112,7 +112,7 @@ bfd_ticoff_get_section_load_page (asection *sect)
|
|||
/* Set the architecture appropriately. Allow unkown architectures
|
||||
(e.g. binary). */
|
||||
|
||||
static bfd_boolean
|
||||
static bool
|
||||
tic54x_set_arch_mach (bfd *abfd,
|
||||
enum bfd_architecture arch,
|
||||
unsigned long machine)
|
||||
|
@ -121,7 +121,7 @@ tic54x_set_arch_mach (bfd *abfd,
|
|||
arch = bfd_arch_tic54x;
|
||||
|
||||
else if (arch != bfd_arch_tic54x)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
return bfd_default_set_arch_mach (abfd, arch, machine);
|
||||
}
|
||||
|
@ -154,59 +154,59 @@ reloc_howto_type tic54x_howto_table[] =
|
|||
|
||||
/* NORMAL BANK */
|
||||
/* 16-bit direct reference to symbol's address. */
|
||||
HOWTO (R_RELWORD,0,1,16,FALSE,0,complain_overflow_dont,
|
||||
tic54x_relocation,"REL16",FALSE,0xFFFF,0xFFFF,FALSE),
|
||||
HOWTO (R_RELWORD,0,1,16,false,0,complain_overflow_dont,
|
||||
tic54x_relocation,"REL16",false,0xFFFF,0xFFFF,false),
|
||||
|
||||
/* 7 LSBs of an address */
|
||||
HOWTO (R_PARTLS7,0,1,7,FALSE,0,complain_overflow_dont,
|
||||
tic54x_relocation,"LS7",FALSE,0x007F,0x007F,FALSE),
|
||||
HOWTO (R_PARTLS7,0,1,7,false,0,complain_overflow_dont,
|
||||
tic54x_relocation,"LS7",false,0x007F,0x007F,false),
|
||||
|
||||
/* 9 MSBs of an address */
|
||||
/* TI assembler doesn't shift its encoding, and is thus incompatible */
|
||||
HOWTO (R_PARTMS9,7,1,9,FALSE,0,complain_overflow_dont,
|
||||
tic54x_relocation,"MS9",FALSE,0x01FF,0x01FF,FALSE),
|
||||
HOWTO (R_PARTMS9,7,1,9,false,0,complain_overflow_dont,
|
||||
tic54x_relocation,"MS9",false,0x01FF,0x01FF,false),
|
||||
|
||||
/* 23-bit relocation */
|
||||
HOWTO (R_EXTWORD,0,2,23,FALSE,0,complain_overflow_dont,
|
||||
tic54x_relocation,"RELEXT",FALSE,0x7FFFFF,0x7FFFFF,FALSE),
|
||||
HOWTO (R_EXTWORD,0,2,23,false,0,complain_overflow_dont,
|
||||
tic54x_relocation,"RELEXT",false,0x7FFFFF,0x7FFFFF,false),
|
||||
|
||||
/* 16 bits of 23-bit extended address */
|
||||
HOWTO (R_EXTWORD16,0,1,16,FALSE,0,complain_overflow_dont,
|
||||
tic54x_relocation,"RELEXT16",FALSE,0x7FFFFF,0x7FFFFF,FALSE),
|
||||
HOWTO (R_EXTWORD16,0,1,16,false,0,complain_overflow_dont,
|
||||
tic54x_relocation,"RELEXT16",false,0x7FFFFF,0x7FFFFF,false),
|
||||
|
||||
/* upper 7 bits of 23-bit extended address */
|
||||
HOWTO (R_EXTWORDMS7,16,1,7,FALSE,0,complain_overflow_dont,
|
||||
tic54x_relocation,"RELEXTMS7",FALSE,0x7F,0x7F,FALSE),
|
||||
HOWTO (R_EXTWORDMS7,16,1,7,false,0,complain_overflow_dont,
|
||||
tic54x_relocation,"RELEXTMS7",false,0x7F,0x7F,false),
|
||||
|
||||
/* ABSOLUTE BANK */
|
||||
/* 16-bit direct reference to symbol's address, absolute */
|
||||
HOWTO (R_RELWORD,0,1,16,FALSE,0,complain_overflow_dont,
|
||||
tic54x_relocation,"AREL16",FALSE,0xFFFF,0xFFFF,FALSE),
|
||||
HOWTO (R_RELWORD,0,1,16,false,0,complain_overflow_dont,
|
||||
tic54x_relocation,"AREL16",false,0xFFFF,0xFFFF,false),
|
||||
|
||||
/* 7 LSBs of an address, absolute */
|
||||
HOWTO (R_PARTLS7,0,1,7,FALSE,0,complain_overflow_dont,
|
||||
tic54x_relocation,"ALS7",FALSE,0x007F,0x007F,FALSE),
|
||||
HOWTO (R_PARTLS7,0,1,7,false,0,complain_overflow_dont,
|
||||
tic54x_relocation,"ALS7",false,0x007F,0x007F,false),
|
||||
|
||||
/* 9 MSBs of an address, absolute */
|
||||
/* TI assembler doesn't shift its encoding, and is thus incompatible */
|
||||
HOWTO (R_PARTMS9,7,1,9,FALSE,0,complain_overflow_dont,
|
||||
tic54x_relocation,"AMS9",FALSE,0x01FF,0x01FF,FALSE),
|
||||
HOWTO (R_PARTMS9,7,1,9,false,0,complain_overflow_dont,
|
||||
tic54x_relocation,"AMS9",false,0x01FF,0x01FF,false),
|
||||
|
||||
/* 23-bit direct reference, absolute */
|
||||
HOWTO (R_EXTWORD,0,2,23,FALSE,0,complain_overflow_dont,
|
||||
tic54x_relocation,"ARELEXT",FALSE,0x7FFFFF,0x7FFFFF,FALSE),
|
||||
HOWTO (R_EXTWORD,0,2,23,false,0,complain_overflow_dont,
|
||||
tic54x_relocation,"ARELEXT",false,0x7FFFFF,0x7FFFFF,false),
|
||||
|
||||
/* 16 bits of 23-bit extended address, absolute */
|
||||
HOWTO (R_EXTWORD16,0,1,16,FALSE,0,complain_overflow_dont,
|
||||
tic54x_relocation,"ARELEXT16",FALSE,0x7FFFFF,0x7FFFFF,FALSE),
|
||||
HOWTO (R_EXTWORD16,0,1,16,false,0,complain_overflow_dont,
|
||||
tic54x_relocation,"ARELEXT16",false,0x7FFFFF,0x7FFFFF,false),
|
||||
|
||||
/* upper 7 bits of 23-bit extended address, absolute */
|
||||
HOWTO (R_EXTWORDMS7,16,1,7,FALSE,0,complain_overflow_dont,
|
||||
tic54x_relocation,"ARELEXTMS7",FALSE,0x7F,0x7F,FALSE),
|
||||
HOWTO (R_EXTWORDMS7,16,1,7,false,0,complain_overflow_dont,
|
||||
tic54x_relocation,"ARELEXTMS7",false,0x7F,0x7F,false),
|
||||
|
||||
/* 32-bit relocation exclusively for stabs */
|
||||
HOWTO (R_RELLONG,0,2,32,FALSE,0,complain_overflow_dont,
|
||||
tic54x_relocation,"STAB",FALSE,0xFFFFFFFF,0xFFFFFFFF,FALSE),
|
||||
HOWTO (R_RELLONG,0,2,32,false,0,complain_overflow_dont,
|
||||
tic54x_relocation,"STAB",false,0xFFFFFFFF,0xFFFFFFFF,false),
|
||||
};
|
||||
|
||||
#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
|
||||
labels. */
|
||||
|
||||
static bfd_boolean
|
||||
static bool
|
||||
ticoff_bfd_is_local_label_name (bfd *abfd ATTRIBUTE_UNUSED,
|
||||
const char *name)
|
||||
{
|
||||
if (TICOFF_LOCAL_LABEL_P(name))
|
||||
return TRUE;
|
||||
return FALSE;
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
#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"
|
||||
|
||||
static bfd_boolean
|
||||
static bool
|
||||
tic54x_set_section_contents (bfd *abfd,
|
||||
sec_ptr section,
|
||||
const void * location,
|
||||
|
@ -474,9 +474,9 @@ const bfd_target tic54x_coff0_beh_vec =
|
|||
15, /* ar_max_namelen */
|
||||
0, /* match priority. */
|
||||
#ifdef TARGET_KEEP_UNUSED_SECTION_SYMBOLS
|
||||
TRUE, /* keep unused section symbols. */
|
||||
true, /* keep unused section symbols. */
|
||||
#else
|
||||
FALSE, /* keep unused section symbols. */
|
||||
false, /* keep unused section symbols. */
|
||||
#endif
|
||||
bfd_getl64, bfd_getl_signed_64, bfd_putl64,
|
||||
tic54x_getl32, tic54x_getl_signed_32, tic54x_putl32,
|
||||
|
@ -537,9 +537,9 @@ const bfd_target tic54x_coff1_vec =
|
|||
15, /* ar_max_namelen */
|
||||
0, /* match priority. */
|
||||
#ifdef TARGET_KEEP_UNUSED_SECTION_SYMBOLS
|
||||
TRUE, /* keep unused section symbols. */
|
||||
true, /* keep unused section symbols. */
|
||||
#else
|
||||
FALSE, /* keep unused section symbols. */
|
||||
false, /* keep unused section symbols. */
|
||||
#endif
|
||||
bfd_getl64, bfd_getl_signed_64, bfd_putl64,
|
||||
tic54x_getl32, tic54x_getl_signed_32, tic54x_putl32,
|
||||
|
@ -600,9 +600,9 @@ const bfd_target tic54x_coff1_beh_vec =
|
|||
15, /* ar_max_namelen */
|
||||
0, /* match priority. */
|
||||
#ifdef TARGET_KEEP_UNUSED_SECTION_SYMBOLS
|
||||
TRUE, /* keep unused section symbols. */
|
||||
true, /* keep unused section symbols. */
|
||||
#else
|
||||
FALSE, /* keep unused section symbols. */
|
||||
false, /* keep unused section symbols. */
|
||||
#endif
|
||||
bfd_getl64, bfd_getl_signed_64, bfd_putl64,
|
||||
tic54x_getl32, tic54x_getl_signed_32, tic54x_putl32,
|
||||
|
@ -663,9 +663,9 @@ const bfd_target tic54x_coff2_vec =
|
|||
15, /* ar_max_namelen */
|
||||
0, /* match priority. */
|
||||
#ifdef TARGET_KEEP_UNUSED_SECTION_SYMBOLS
|
||||
TRUE, /* keep unused section symbols. */
|
||||
true, /* keep unused section symbols. */
|
||||
#else
|
||||
FALSE, /* keep unused section symbols. */
|
||||
false, /* keep unused section symbols. */
|
||||
#endif
|
||||
bfd_getl64, bfd_getl_signed_64, bfd_putl64,
|
||||
tic54x_getl32, tic54x_getl_signed_32, tic54x_putl32,
|
||||
|
@ -726,9 +726,9 @@ const bfd_target tic54x_coff2_beh_vec =
|
|||
15, /* ar_max_namelen */
|
||||
0, /* match priority. */
|
||||
#ifdef TARGET_KEEP_UNUSED_SECTION_SYMBOLS
|
||||
TRUE, /* keep unused section symbols. */
|
||||
true, /* keep unused section symbols. */
|
||||
#else
|
||||
FALSE, /* keep unused section symbols. */
|
||||
false, /* keep unused section symbols. */
|
||||
#endif
|
||||
bfd_getl64, bfd_getl_signed_64, bfd_putl64,
|
||||
tic54x_getl32, tic54x_getl_signed_32, tic54x_putl32,
|
||||
|
|
|
@ -148,7 +148,7 @@ coff_amd64_reloc (bfd *abfd,
|
|||
if (link_info == NULL)
|
||||
return bfd_reloc_dangerous;
|
||||
h = bfd_link_hash_lookup (link_info->hash, "__ImageBase",
|
||||
FALSE, FALSE, FALSE);
|
||||
false, false, false);
|
||||
if (h == NULL)
|
||||
return bfd_reloc_dangerous;
|
||||
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
|
||||
section. */
|
||||
|
||||
static bfd_boolean
|
||||
static bool
|
||||
in_reloc_p (bfd *abfd ATTRIBUTE_UNUSED, reloc_howto_type *howto)
|
||||
{
|
||||
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 */
|
||||
|
||||
#ifndef PCRELOFFSET
|
||||
#define PCRELOFFSET TRUE
|
||||
#define PCRELOFFSET true
|
||||
#endif
|
||||
|
||||
static reloc_howto_type howto_table[] =
|
||||
|
@ -245,53 +245,53 @@ static reloc_howto_type howto_table[] =
|
|||
0, /* rightshift */
|
||||
4, /* size (0 = byte, 1 = short, 2 = long, 4 = long long) */
|
||||
64, /* bitsize */
|
||||
FALSE, /* pc_relative */
|
||||
false, /* pc_relative */
|
||||
0, /* bitpos */
|
||||
complain_overflow_bitfield, /* complain_on_overflow */
|
||||
coff_amd64_reloc, /* special_function */
|
||||
"IMAGE_REL_AMD64_ADDR64", /* name */
|
||||
TRUE, /* partial_inplace */
|
||||
true, /* partial_inplace */
|
||||
0xffffffffffffffffll, /* src_mask */
|
||||
0xffffffffffffffffll, /* dst_mask */
|
||||
TRUE), /* pcrel_offset */
|
||||
true), /* pcrel_offset */
|
||||
HOWTO (R_AMD64_DIR32, /* type 2 */
|
||||
0, /* rightshift */
|
||||
2, /* size (0 = byte, 1 = short, 2 = long) */
|
||||
32, /* bitsize */
|
||||
FALSE, /* pc_relative */
|
||||
false, /* pc_relative */
|
||||
0, /* bitpos */
|
||||
complain_overflow_bitfield, /* complain_on_overflow */
|
||||
coff_amd64_reloc, /* special_function */
|
||||
"IMAGE_REL_AMD64_ADDR32", /* name */
|
||||
TRUE, /* partial_inplace */
|
||||
true, /* partial_inplace */
|
||||
0xffffffff, /* src_mask */
|
||||
0xffffffff, /* dst_mask */
|
||||
TRUE), /* pcrel_offset */
|
||||
true), /* pcrel_offset */
|
||||
/* PE IMAGE_REL_AMD64_ADDR32NB relocation (3). */
|
||||
HOWTO (R_AMD64_IMAGEBASE, /* type */
|
||||
0, /* rightshift */
|
||||
2, /* size (0 = byte, 1 = short, 2 = long) */
|
||||
32, /* bitsize */
|
||||
FALSE, /* pc_relative */
|
||||
false, /* pc_relative */
|
||||
0, /* bitpos */
|
||||
complain_overflow_bitfield, /* complain_on_overflow */
|
||||
coff_amd64_reloc, /* special_function */
|
||||
"IMAGE_REL_AMD64_ADDR32NB", /* name */
|
||||
TRUE, /* partial_inplace */
|
||||
true, /* partial_inplace */
|
||||
0xffffffff, /* src_mask */
|
||||
0xffffffff, /* dst_mask */
|
||||
FALSE), /* pcrel_offset */
|
||||
false), /* pcrel_offset */
|
||||
/* 32-bit longword PC relative relocation (4). */
|
||||
HOWTO (R_AMD64_PCRLONG, /* type 4 */
|
||||
0, /* rightshift */
|
||||
2, /* size (0 = byte, 1 = short, 2 = long) */
|
||||
32, /* bitsize */
|
||||
TRUE, /* pc_relative */
|
||||
true, /* pc_relative */
|
||||
0, /* bitpos */
|
||||
complain_overflow_signed, /* complain_on_overflow */
|
||||
coff_amd64_reloc, /* special_function */
|
||||
"IMAGE_REL_AMD64_REL32", /* name */
|
||||
TRUE, /* partial_inplace */
|
||||
true, /* partial_inplace */
|
||||
0xffffffff, /* src_mask */
|
||||
0xffffffff, /* dst_mask */
|
||||
PCRELOFFSET), /* pcrel_offset */
|
||||
|
@ -300,12 +300,12 @@ static reloc_howto_type howto_table[] =
|
|||
0, /* rightshift */
|
||||
2, /* size (0 = byte, 1 = short, 2 = long) */
|
||||
32, /* bitsize */
|
||||
TRUE, /* pc_relative */
|
||||
true, /* pc_relative */
|
||||
0, /* bitpos */
|
||||
complain_overflow_signed, /* complain_on_overflow */
|
||||
coff_amd64_reloc, /* special_function */
|
||||
"IMAGE_REL_AMD64_REL32_1", /* name */
|
||||
TRUE, /* partial_inplace */
|
||||
true, /* partial_inplace */
|
||||
0xffffffff, /* src_mask */
|
||||
0xffffffff, /* dst_mask */
|
||||
PCRELOFFSET), /* pcrel_offset */
|
||||
|
@ -313,12 +313,12 @@ static reloc_howto_type howto_table[] =
|
|||
0, /* rightshift */
|
||||
2, /* size (0 = byte, 1 = short, 2 = long) */
|
||||
32, /* bitsize */
|
||||
TRUE, /* pc_relative */
|
||||
true, /* pc_relative */
|
||||
0, /* bitpos */
|
||||
complain_overflow_signed, /* complain_on_overflow */
|
||||
coff_amd64_reloc, /* special_function */
|
||||
"IMAGE_REL_AMD64_REL32_2", /* name */
|
||||
TRUE, /* partial_inplace */
|
||||
true, /* partial_inplace */
|
||||
0xffffffff, /* src_mask */
|
||||
0xffffffff, /* dst_mask */
|
||||
PCRELOFFSET), /* pcrel_offset */
|
||||
|
@ -326,12 +326,12 @@ static reloc_howto_type howto_table[] =
|
|||
0, /* rightshift */
|
||||
2, /* size (0 = byte, 1 = short, 2 = long) */
|
||||
32, /* bitsize */
|
||||
TRUE, /* pc_relative */
|
||||
true, /* pc_relative */
|
||||
0, /* bitpos */
|
||||
complain_overflow_signed, /* complain_on_overflow */
|
||||
coff_amd64_reloc, /* special_function */
|
||||
"IMAGE_REL_AMD64_REL32_3", /* name */
|
||||
TRUE, /* partial_inplace */
|
||||
true, /* partial_inplace */
|
||||
0xffffffff, /* src_mask */
|
||||
0xffffffff, /* dst_mask */
|
||||
PCRELOFFSET), /* pcrel_offset */
|
||||
|
@ -339,12 +339,12 @@ static reloc_howto_type howto_table[] =
|
|||
0, /* rightshift */
|
||||
2, /* size (0 = byte, 1 = short, 2 = long) */
|
||||
32, /* bitsize */
|
||||
TRUE, /* pc_relative */
|
||||
true, /* pc_relative */
|
||||
0, /* bitpos */
|
||||
complain_overflow_signed, /* complain_on_overflow */
|
||||
coff_amd64_reloc, /* special_function */
|
||||
"IMAGE_REL_AMD64_REL32_4", /* name */
|
||||
TRUE, /* partial_inplace */
|
||||
true, /* partial_inplace */
|
||||
0xffffffff, /* src_mask */
|
||||
0xffffffff, /* dst_mask */
|
||||
PCRELOFFSET), /* pcrel_offset */
|
||||
|
@ -352,12 +352,12 @@ static reloc_howto_type howto_table[] =
|
|||
0, /* rightshift */
|
||||
2, /* size (0 = byte, 1 = short, 2 = long) */
|
||||
32, /* bitsize */
|
||||
TRUE, /* pc_relative */
|
||||
true, /* pc_relative */
|
||||
0, /* bitpos */
|
||||
complain_overflow_signed, /* complain_on_overflow */
|
||||
coff_amd64_reloc, /* special_function */
|
||||
"IMAGE_REL_AMD64_REL32_5", /* name */
|
||||
TRUE, /* partial_inplace */
|
||||
true, /* partial_inplace */
|
||||
0xffffffff, /* src_mask */
|
||||
0xffffffff, /* dst_mask */
|
||||
PCRELOFFSET), /* pcrel_offset */
|
||||
|
@ -368,15 +368,15 @@ static reloc_howto_type howto_table[] =
|
|||
0, /* rightshift */
|
||||
2, /* size (0 = byte, 1 = short, 2 = long) */
|
||||
32, /* bitsize */
|
||||
FALSE, /* pc_relative */
|
||||
false, /* pc_relative */
|
||||
0, /* bitpos */
|
||||
complain_overflow_bitfield, /* complain_on_overflow */
|
||||
coff_amd64_reloc, /* special_function */
|
||||
"IMAGE_REL_AMD64_SECREL", /* name */
|
||||
TRUE, /* partial_inplace */
|
||||
true, /* partial_inplace */
|
||||
0xffffffff, /* src_mask */
|
||||
0xffffffff, /* dst_mask */
|
||||
TRUE), /* pcrel_offset */
|
||||
true), /* pcrel_offset */
|
||||
#else
|
||||
EMPTY_HOWTO (11),
|
||||
#endif
|
||||
|
@ -387,12 +387,12 @@ static reloc_howto_type howto_table[] =
|
|||
0, /* rightshift */
|
||||
4, /* size (0 = byte, 1 = short, 2 = long) */
|
||||
64, /* bitsize */
|
||||
TRUE, /* pc_relative */
|
||||
true, /* pc_relative */
|
||||
0, /* bitpos */
|
||||
complain_overflow_signed, /* complain_on_overflow */
|
||||
coff_amd64_reloc, /* special_function */
|
||||
"R_X86_64_PC64", /* name */
|
||||
TRUE, /* partial_inplace */
|
||||
true, /* partial_inplace */
|
||||
0xffffffffffffffffll, /* src_mask */
|
||||
0xffffffffffffffffll, /* dst_mask */
|
||||
PCRELOFFSET), /* pcrel_offset */
|
||||
|
@ -404,12 +404,12 @@ static reloc_howto_type howto_table[] =
|
|||
0, /* rightshift */
|
||||
0, /* size (0 = byte, 1 = short, 2 = long) */
|
||||
8, /* bitsize */
|
||||
FALSE, /* pc_relative */
|
||||
false, /* pc_relative */
|
||||
0, /* bitpos */
|
||||
complain_overflow_bitfield, /* complain_on_overflow */
|
||||
coff_amd64_reloc, /* special_function */
|
||||
"R_X86_64_8", /* name */
|
||||
TRUE, /* partial_inplace */
|
||||
true, /* partial_inplace */
|
||||
0x000000ff, /* src_mask */
|
||||
0x000000ff, /* dst_mask */
|
||||
PCRELOFFSET), /* pcrel_offset */
|
||||
|
@ -418,12 +418,12 @@ static reloc_howto_type howto_table[] =
|
|||
0, /* rightshift */
|
||||
1, /* size (0 = byte, 1 = short, 2 = long) */
|
||||
16, /* bitsize */
|
||||
FALSE, /* pc_relative */
|
||||
false, /* pc_relative */
|
||||
0, /* bitpos */
|
||||
complain_overflow_bitfield, /* complain_on_overflow */
|
||||
coff_amd64_reloc, /* special_function */
|
||||
"R_X86_64_16", /* name */
|
||||
TRUE, /* partial_inplace */
|
||||
true, /* partial_inplace */
|
||||
0x0000ffff, /* src_mask */
|
||||
0x0000ffff, /* dst_mask */
|
||||
PCRELOFFSET), /* pcrel_offset */
|
||||
|
@ -432,12 +432,12 @@ static reloc_howto_type howto_table[] =
|
|||
0, /* rightshift */
|
||||
2, /* size (0 = byte, 1 = short, 2 = long) */
|
||||
32, /* bitsize */
|
||||
FALSE, /* pc_relative */
|
||||
false, /* pc_relative */
|
||||
0, /* bitpos */
|
||||
complain_overflow_bitfield, /* complain_on_overflow */
|
||||
coff_amd64_reloc, /* special_function */
|
||||
"R_X86_64_32S", /* name */
|
||||
TRUE, /* partial_inplace */
|
||||
true, /* partial_inplace */
|
||||
0xffffffff, /* src_mask */
|
||||
0xffffffff, /* dst_mask */
|
||||
PCRELOFFSET), /* pcrel_offset */
|
||||
|
@ -446,12 +446,12 @@ static reloc_howto_type howto_table[] =
|
|||
0, /* rightshift */
|
||||
0, /* size (0 = byte, 1 = short, 2 = long) */
|
||||
8, /* bitsize */
|
||||
TRUE, /* pc_relative */
|
||||
true, /* pc_relative */
|
||||
0, /* bitpos */
|
||||
complain_overflow_signed, /* complain_on_overflow */
|
||||
coff_amd64_reloc, /* special_function */
|
||||
"R_X86_64_PC8", /* name */
|
||||
TRUE, /* partial_inplace */
|
||||
true, /* partial_inplace */
|
||||
0x000000ff, /* src_mask */
|
||||
0x000000ff, /* dst_mask */
|
||||
PCRELOFFSET), /* pcrel_offset */
|
||||
|
@ -460,12 +460,12 @@ static reloc_howto_type howto_table[] =
|
|||
0, /* rightshift */
|
||||
1, /* size (0 = byte, 1 = short, 2 = long) */
|
||||
16, /* bitsize */
|
||||
TRUE, /* pc_relative */
|
||||
true, /* pc_relative */
|
||||
0, /* bitpos */
|
||||
complain_overflow_signed, /* complain_on_overflow */
|
||||
coff_amd64_reloc, /* special_function */
|
||||
"R_X86_64_PC16", /* name */
|
||||
TRUE, /* partial_inplace */
|
||||
true, /* partial_inplace */
|
||||
0x0000ffff, /* src_mask */
|
||||
0x0000ffff, /* dst_mask */
|
||||
PCRELOFFSET), /* pcrel_offset */
|
||||
|
@ -474,12 +474,12 @@ static reloc_howto_type howto_table[] =
|
|||
0, /* rightshift */
|
||||
2, /* size (0 = byte, 1 = short, 2 = long) */
|
||||
32, /* bitsize */
|
||||
TRUE, /* pc_relative */
|
||||
true, /* pc_relative */
|
||||
0, /* bitpos */
|
||||
complain_overflow_signed, /* complain_on_overflow */
|
||||
coff_amd64_reloc, /* special_function */
|
||||
"R_X86_64_PC32", /* name */
|
||||
TRUE, /* partial_inplace */
|
||||
true, /* partial_inplace */
|
||||
0xffffffff, /* src_mask */
|
||||
0xffffffff, /* dst_mask */
|
||||
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
|
||||
relocatable link. */
|
||||
|
||||
static bfd_boolean
|
||||
static bool
|
||||
coff_pe_amd64_relocate_section (bfd *output_bfd,
|
||||
struct bfd_link_info *info,
|
||||
bfd *input_bfd,
|
||||
|
@ -565,7 +565,7 @@ coff_pe_amd64_relocate_section (bfd *output_bfd,
|
|||
asection **sections)
|
||||
{
|
||||
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);
|
||||
}
|
||||
|
@ -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
|
||||
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)
|
||||
{
|
||||
if (name[0] == 'L')
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
return _bfd_coff_is_local_label_name (abfd, name);
|
||||
}
|
||||
|
|
|
@ -47,195 +47,195 @@ static bfd_howto_type howto_table[] =
|
|||
0, /* rightshift */
|
||||
2, /* size (0 = byte, 1 = short, 2 = long) */
|
||||
32, /* bitsize */
|
||||
FALSE, /* pc_relative */
|
||||
false, /* pc_relative */
|
||||
0, /* bitpos */
|
||||
complain_overflow_bitfield, /* complain_on_overflow */
|
||||
0, /* special_function */
|
||||
"r_imm32", /* name */
|
||||
FALSE, /* partial_inplace */
|
||||
false, /* partial_inplace */
|
||||
0xffffffff, /* src_mask */
|
||||
0xffffffff, /* dst_mask */
|
||||
FALSE), /* pcrel_offset */
|
||||
false), /* pcrel_offset */
|
||||
|
||||
BFD_HOWTO (BFD_RELOC_24,
|
||||
R_IMM24, /* type */
|
||||
0, /* rightshift */
|
||||
1, /* size (0 = byte, 1 = short, 2 = long) */
|
||||
24, /* bitsize */
|
||||
FALSE, /* pc_relative */
|
||||
false, /* pc_relative */
|
||||
0, /* bitpos */
|
||||
complain_overflow_bitfield, /* complain_on_overflow */
|
||||
0, /* special_function */
|
||||
"r_imm24", /* name */
|
||||
FALSE, /* partial_inplace */
|
||||
false, /* partial_inplace */
|
||||
0x00ffffff, /* src_mask */
|
||||
0x00ffffff, /* dst_mask */
|
||||
FALSE), /* pcrel_offset */
|
||||
false), /* pcrel_offset */
|
||||
|
||||
BFD_HOWTO (BFD_RELOC_16,
|
||||
R_IMM16, /* type */
|
||||
0, /* rightshift */
|
||||
1, /* size (0 = byte, 1 = short, 2 = long) */
|
||||
16, /* bitsize */
|
||||
FALSE, /* pc_relative */
|
||||
false, /* pc_relative */
|
||||
0, /* bitpos */
|
||||
complain_overflow_bitfield, /* complain_on_overflow */
|
||||
0, /* special_function */
|
||||
"r_imm16", /* name */
|
||||
FALSE, /* partial_inplace */
|
||||
false, /* partial_inplace */
|
||||
0x0000ffff, /* src_mask */
|
||||
0x0000ffff, /* dst_mask */
|
||||
FALSE), /* pcrel_offset */
|
||||
false), /* pcrel_offset */
|
||||
|
||||
BFD_HOWTO (BFD_RELOC_8,
|
||||
R_IMM8, /* type */
|
||||
0, /* rightshift */
|
||||
0, /* size (0 = byte, 1 = short, 2 = long) */
|
||||
8, /* bitsize */
|
||||
FALSE, /* pc_relative */
|
||||
false, /* pc_relative */
|
||||
0, /* bitpos */
|
||||
complain_overflow_bitfield, /* complain_on_overflow */
|
||||
0, /* special_function */
|
||||
"r_imm8", /* name */
|
||||
FALSE, /* partial_inplace */
|
||||
false, /* partial_inplace */
|
||||
0x000000ff, /* src_mask */
|
||||
0x000000ff, /* dst_mask */
|
||||
FALSE), /* pcrel_offset */
|
||||
false), /* pcrel_offset */
|
||||
|
||||
BFD_HOWTO (BFD_RELOC_8_PCREL,
|
||||
R_JR, /* type */
|
||||
0, /* rightshift */
|
||||
0, /* size (0 = byte, 1 = short, 2 = long) */
|
||||
8, /* bitsize */
|
||||
TRUE, /* pc_relative */
|
||||
true, /* pc_relative */
|
||||
0, /* bitpos */
|
||||
complain_overflow_signed, /* complain_on_overflow */
|
||||
0, /* special_function */
|
||||
"r_jr", /* name */
|
||||
FALSE, /* partial_inplace */
|
||||
false, /* partial_inplace */
|
||||
0, /* src_mask */
|
||||
0xFF, /* dst_mask */
|
||||
TRUE), /* pcrel_offset */
|
||||
true), /* pcrel_offset */
|
||||
|
||||
BFD_HOWTO (BFD_RELOC_Z80_DISP8,
|
||||
R_OFF8, /* type */
|
||||
0, /* rightshift */
|
||||
0, /* size (0 = byte, 1 = short, 2 = long) */
|
||||
8, /* bitsize */
|
||||
FALSE, /* pc_relative */
|
||||
false, /* pc_relative */
|
||||
0, /* bitpos */
|
||||
complain_overflow_signed, /* complain_on_overflow */
|
||||
0, /* special_function */
|
||||
"r_off8", /* name */
|
||||
FALSE, /* partial_inplace */
|
||||
false, /* partial_inplace */
|
||||
0, /* src_mask */
|
||||
0xff, /* dst_mask */
|
||||
FALSE), /* pcrel_offset */
|
||||
false), /* pcrel_offset */
|
||||
|
||||
BFD_HOWTO (BFD_RELOC_Z80_BYTE0,
|
||||
R_BYTE0, /* type */
|
||||
0, /* rightshift */
|
||||
0, /* size (0 = byte, 1 = short, 2 = long) */
|
||||
8, /* bitsize */
|
||||
FALSE, /* pc_relative */
|
||||
false, /* pc_relative */
|
||||
0, /* bitpos */
|
||||
complain_overflow_dont, /* complain_on_overflow */
|
||||
0, /* special_function */
|
||||
"r_byte0", /* name */
|
||||
FALSE, /* partial_inplace */
|
||||
false, /* partial_inplace */
|
||||
0, /* src_mask */
|
||||
0xff, /* dst_mask */
|
||||
FALSE), /* pcrel_offset */
|
||||
false), /* pcrel_offset */
|
||||
|
||||
BFD_HOWTO (BFD_RELOC_Z80_BYTE1,
|
||||
R_BYTE1, /* type */
|
||||
8, /* rightshift */
|
||||
0, /* size (0 = byte, 1 = short, 2 = long) */
|
||||
8, /* bitsize */
|
||||
FALSE, /* pc_relative */
|
||||
false, /* pc_relative */
|
||||
0, /* bitpos */
|
||||
complain_overflow_dont, /* complain_on_overflow */
|
||||
0, /* special_function */
|
||||
"r_byte1", /* name */
|
||||
FALSE, /* partial_inplace */
|
||||
false, /* partial_inplace */
|
||||
0, /* src_mask */
|
||||
0xff, /* dst_mask */
|
||||
FALSE), /* pcrel_offset */
|
||||
false), /* pcrel_offset */
|
||||
|
||||
BFD_HOWTO (BFD_RELOC_Z80_BYTE2,
|
||||
R_BYTE2, /* type */
|
||||
16, /* rightshift */
|
||||
0, /* size (0 = byte, 1 = short, 2 = long) */
|
||||
8, /* bitsize */
|
||||
FALSE, /* pc_relative */
|
||||
false, /* pc_relative */
|
||||
0, /* bitpos */
|
||||
complain_overflow_dont, /* complain_on_overflow */
|
||||
0, /* special_function */
|
||||
"r_byte2", /* name */
|
||||
FALSE, /* partial_inplace */
|
||||
false, /* partial_inplace */
|
||||
0, /* src_mask */
|
||||
0xff, /* dst_mask */
|
||||
FALSE), /* pcrel_offset */
|
||||
false), /* pcrel_offset */
|
||||
|
||||
BFD_HOWTO (BFD_RELOC_Z80_BYTE3,
|
||||
R_BYTE3, /* type */
|
||||
24, /* rightshift */
|
||||
0, /* size (0 = byte, 1 = short, 2 = long) */
|
||||
8, /* bitsize */
|
||||
FALSE, /* pc_relative */
|
||||
false, /* pc_relative */
|
||||
0, /* bitpos */
|
||||
complain_overflow_dont, /* complain_on_overflow */
|
||||
0, /* special_function */
|
||||
"r_byte3", /* name */
|
||||
FALSE, /* partial_inplace */
|
||||
false, /* partial_inplace */
|
||||
0, /* src_mask */
|
||||
0xff, /* dst_mask */
|
||||
FALSE), /* pcrel_offset */
|
||||
false), /* pcrel_offset */
|
||||
|
||||
BFD_HOWTO (BFD_RELOC_Z80_WORD0,
|
||||
R_WORD0, /* type */
|
||||
0, /* rightshift */
|
||||
0, /* size (0 = byte, 1 = short, 2 = long) */
|
||||
16, /* bitsize */
|
||||
FALSE, /* pc_relative */
|
||||
false, /* pc_relative */
|
||||
0, /* bitpos */
|
||||
complain_overflow_dont, /* complain_on_overflow */
|
||||
0, /* special_function */
|
||||
"r_word0", /* name */
|
||||
FALSE, /* partial_inplace */
|
||||
false, /* partial_inplace */
|
||||
0, /* src_mask */
|
||||
0xffff, /* dst_mask */
|
||||
FALSE), /* pcrel_offset */
|
||||
false), /* pcrel_offset */
|
||||
|
||||
BFD_HOWTO (BFD_RELOC_Z80_WORD1,
|
||||
R_WORD1, /* type */
|
||||
16, /* rightshift */
|
||||
0, /* size (0 = byte, 1 = short, 2 = long) */
|
||||
16, /* bitsize */
|
||||
FALSE, /* pc_relative */
|
||||
false, /* pc_relative */
|
||||
0, /* bitpos */
|
||||
complain_overflow_dont, /* complain_on_overflow */
|
||||
0, /* special_function */
|
||||
"r_word1", /* name */
|
||||
FALSE, /* partial_inplace */
|
||||
false, /* partial_inplace */
|
||||
0, /* src_mask */
|
||||
0xffff, /* dst_mask */
|
||||
FALSE), /* pcrel_offset */
|
||||
false), /* pcrel_offset */
|
||||
|
||||
BFD_HOWTO (BFD_RELOC_Z80_16_BE,
|
||||
R_IMM16BE, /* type */
|
||||
0, /* rightshift */
|
||||
1, /* size (0 = byte, 1 = short, 2 = long) */
|
||||
16, /* bitsize */
|
||||
FALSE, /* pc_relative */
|
||||
false, /* pc_relative */
|
||||
0, /* bitpos */
|
||||
complain_overflow_bitfield, /* complain_on_overflow */
|
||||
0, /* special_function */
|
||||
"r_imm16be", /* name */
|
||||
FALSE, /* partial_inplace */
|
||||
false, /* partial_inplace */
|
||||
0x0000ffff, /* src_mask */
|
||||
0x0000ffff, /* dst_mask */
|
||||
FALSE), /* pcrel_offset */
|
||||
false), /* pcrel_offset */
|
||||
};
|
||||
|
||||
#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,
|
||||
const char * name)
|
||||
{
|
||||
|
|
|
@ -31,40 +31,40 @@
|
|||
#define COFF_DEFAULT_SECTION_ALIGNMENT_POWER (1)
|
||||
|
||||
static reloc_howto_type r_imm32 =
|
||||
HOWTO (R_IMM32, 0, 2, 32, FALSE, 0,
|
||||
complain_overflow_bitfield, 0, "r_imm32", TRUE, 0xffffffff,
|
||||
0xffffffff, FALSE);
|
||||
HOWTO (R_IMM32, 0, 2, 32, false, 0,
|
||||
complain_overflow_bitfield, 0, "r_imm32", true, 0xffffffff,
|
||||
0xffffffff, false);
|
||||
|
||||
static reloc_howto_type r_imm4l =
|
||||
HOWTO (R_IMM4L, 0, 0, 4, FALSE, 0,
|
||||
complain_overflow_bitfield, 0, "r_imm4l", TRUE, 0xf, 0xf, FALSE);
|
||||
HOWTO (R_IMM4L, 0, 0, 4, false, 0,
|
||||
complain_overflow_bitfield, 0, "r_imm4l", true, 0xf, 0xf, false);
|
||||
|
||||
static reloc_howto_type r_da =
|
||||
HOWTO (R_IMM16, 0, 1, 16, FALSE, 0,
|
||||
complain_overflow_bitfield, 0, "r_da", TRUE, 0x0000ffff, 0x0000ffff,
|
||||
FALSE);
|
||||
HOWTO (R_IMM16, 0, 1, 16, false, 0,
|
||||
complain_overflow_bitfield, 0, "r_da", true, 0x0000ffff, 0x0000ffff,
|
||||
false);
|
||||
|
||||
static reloc_howto_type r_imm8 =
|
||||
HOWTO (R_IMM8, 0, 0, 8, FALSE, 0,
|
||||
complain_overflow_bitfield, 0, "r_imm8", TRUE, 0x000000ff, 0x000000ff,
|
||||
FALSE);
|
||||
HOWTO (R_IMM8, 0, 0, 8, false, 0,
|
||||
complain_overflow_bitfield, 0, "r_imm8", true, 0x000000ff, 0x000000ff,
|
||||
false);
|
||||
|
||||
static reloc_howto_type r_rel16 =
|
||||
HOWTO (R_REL16, 0, 1, 16, FALSE, 0,
|
||||
complain_overflow_bitfield, 0, "r_rel16", TRUE, 0x0000ffff, 0x0000ffff,
|
||||
TRUE);
|
||||
HOWTO (R_REL16, 0, 1, 16, false, 0,
|
||||
complain_overflow_bitfield, 0, "r_rel16", true, 0x0000ffff, 0x0000ffff,
|
||||
true);
|
||||
|
||||
static reloc_howto_type r_jr =
|
||||
HOWTO (R_JR, 1, 0, 8, TRUE, 0, complain_overflow_signed, 0,
|
||||
"r_jr", TRUE, 0xff, 0xff, TRUE);
|
||||
HOWTO (R_JR, 1, 0, 8, true, 0, complain_overflow_signed, 0,
|
||||
"r_jr", true, 0xff, 0xff, true);
|
||||
|
||||
static reloc_howto_type r_disp7 =
|
||||
HOWTO (R_DISP7, 0, 0, 7, TRUE, 0, complain_overflow_bitfield, 0,
|
||||
"r_disp7", TRUE, 0x7f, 0x7f, TRUE);
|
||||
HOWTO (R_DISP7, 0, 0, 7, true, 0, complain_overflow_bitfield, 0,
|
||||
"r_disp7", true, 0x7f, 0x7f, true);
|
||||
|
||||
static reloc_howto_type r_callr =
|
||||
HOWTO (R_CALLR, 1, 1, 12, TRUE, 0, complain_overflow_signed, 0,
|
||||
"r_callr", TRUE, 0xfff, 0xfff, TRUE);
|
||||
HOWTO (R_CALLR, 1, 1, 12, true, 0, complain_overflow_signed, 0,
|
||||
"r_callr", true, 0xfff, 0xfff, true);
|
||||
|
||||
#define BADMAG(x) Z8KBADMAG(x)
|
||||
#define Z8K 1 /* Customize coffcode.h. */
|
||||
|
|
File diff suppressed because it is too large
Load diff
470
bfd/coffcode.h
470
bfd/coffcode.h
File diff suppressed because it is too large
Load diff
253
bfd/coffgen.c
253
bfd/coffgen.c
|
@ -46,14 +46,14 @@
|
|||
/* 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. */
|
||||
|
||||
static bfd_boolean
|
||||
static bool
|
||||
make_a_section_from_file (bfd *abfd,
|
||||
struct internal_scnhdr *hdr,
|
||||
unsigned int target_index)
|
||||
{
|
||||
asection *return_section;
|
||||
char *name;
|
||||
bfd_boolean result = TRUE;
|
||||
bool result = true;
|
||||
flagword flags;
|
||||
|
||||
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
|
||||
format of any output BFD created from this one, but the information
|
||||
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);
|
||||
buf[SCNNMLEN - 1] = '\0';
|
||||
strindex = strtol (buf, &p, 10);
|
||||
|
@ -84,14 +84,14 @@ make_a_section_from_file (bfd *abfd,
|
|||
{
|
||||
strings = _bfd_coff_read_string_table (abfd);
|
||||
if (strings == NULL)
|
||||
return FALSE;
|
||||
return false;
|
||||
if ((bfd_size_type)(strindex + 2) >= obj_coff_strings_len (abfd))
|
||||
return FALSE;
|
||||
return false;
|
||||
strings += strindex;
|
||||
name = (char *) bfd_alloc (abfd,
|
||||
(bfd_size_type) strlen (strings) + 1 + 1);
|
||||
if (name == NULL)
|
||||
return FALSE;
|
||||
return false;
|
||||
strcpy (name, strings);
|
||||
}
|
||||
}
|
||||
|
@ -102,14 +102,14 @@ make_a_section_from_file (bfd *abfd,
|
|||
name = (char *) bfd_alloc (abfd,
|
||||
(bfd_size_type) sizeof (hdr->s_name) + 1 + 1);
|
||||
if (name == NULL)
|
||||
return FALSE;
|
||||
return false;
|
||||
strncpy (name, (char *) &hdr->s_name[0], sizeof (hdr->s_name));
|
||||
name[sizeof (hdr->s_name)] = 0;
|
||||
}
|
||||
|
||||
return_section = bfd_make_section_anyway (abfd, name);
|
||||
if (return_section == NULL)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
return_section->vma = hdr->s_vaddr;
|
||||
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,
|
||||
& flags))
|
||||
result = FALSE;
|
||||
result = false;
|
||||
|
||||
return_section->flags = flags;
|
||||
|
||||
|
@ -178,7 +178,7 @@ make_a_section_from_file (bfd *abfd,
|
|||
/* xgettext: c-format */
|
||||
(_("%pB: unable to initialize compress status for section %s"),
|
||||
abfd, name);
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
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);
|
||||
if (new_name == NULL)
|
||||
return FALSE;
|
||||
return false;
|
||||
new_name[0] = '.';
|
||||
new_name[1] = 'z';
|
||||
memcpy (new_name + 2, name + 1, len);
|
||||
|
@ -202,7 +202,7 @@ make_a_section_from_file (bfd *abfd,
|
|||
/* xgettext: c-format */
|
||||
(_("%pB: unable to initialize decompress status for section %s"),
|
||||
abfd, name);
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
if (name[1] == 'z')
|
||||
{
|
||||
|
@ -210,7 +210,7 @@ make_a_section_from_file (bfd *abfd,
|
|||
|
||||
new_name = bfd_alloc (abfd, len);
|
||||
if (new_name == NULL)
|
||||
return FALSE;
|
||||
return false;
|
||||
new_name[0] = '.';
|
||||
memcpy (new_name + 1, name + 2, len - 1);
|
||||
}
|
||||
|
@ -486,9 +486,9 @@ _bfd_coff_internal_syment_name (bfd *abfd,
|
|||
struct internal_reloc *
|
||||
_bfd_coff_read_internal_relocs (bfd *abfd,
|
||||
asection *sec,
|
||||
bfd_boolean cache,
|
||||
bool cache,
|
||||
bfd_byte *external_relocs,
|
||||
bfd_boolean require_internal,
|
||||
bool require_internal,
|
||||
struct internal_reloc *internal_relocs)
|
||||
{
|
||||
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
|
||||
do that here too. */
|
||||
|
||||
bfd_boolean
|
||||
bool
|
||||
coff_renumber_symbols (bfd *bfd_ptr, int *first_undef)
|
||||
{
|
||||
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);
|
||||
newsyms = (asymbol **) bfd_alloc (bfd_ptr, amt);
|
||||
if (!newsyms)
|
||||
return FALSE;
|
||||
return false;
|
||||
bfd_ptr->outsymbols = newsyms;
|
||||
for (i = 0; i < symbol_count; i++)
|
||||
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;
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
/* 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. */
|
||||
|
||||
static bfd_boolean
|
||||
static bool
|
||||
coff_write_symbol (bfd *abfd,
|
||||
asymbol *symbol,
|
||||
combined_entry_type *native,
|
||||
|
@ -1011,10 +1011,10 @@ coff_write_symbol (bfd *abfd,
|
|||
symesz = bfd_coff_symesz (abfd);
|
||||
buf = bfd_alloc (abfd, symesz);
|
||||
if (!buf)
|
||||
return FALSE;
|
||||
return false;
|
||||
bfd_coff_swap_sym_out (abfd, &native->u.syment, buf);
|
||||
if (bfd_bwrite (buf, symesz, abfd) != symesz)
|
||||
return FALSE;
|
||||
return false;
|
||||
bfd_release (abfd, buf);
|
||||
|
||||
if (native->u.syment.n_numaux > 0)
|
||||
|
@ -1025,7 +1025,7 @@ coff_write_symbol (bfd *abfd,
|
|||
auxesz = bfd_coff_auxesz (abfd);
|
||||
buf = bfd_alloc (abfd, auxesz);
|
||||
if (!buf)
|
||||
return FALSE;
|
||||
return false;
|
||||
for (j = 0; j < native->u.syment.n_numaux; j++)
|
||||
{
|
||||
BFD_ASSERT (! (native + j + 1)->is_sym);
|
||||
|
@ -1035,7 +1035,7 @@ coff_write_symbol (bfd *abfd,
|
|||
native->u.syment.n_numaux,
|
||||
buf);
|
||||
if (bfd_bwrite (buf, auxesz, abfd) != auxesz)
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
bfd_release (abfd, buf);
|
||||
}
|
||||
|
@ -1044,14 +1044,14 @@ coff_write_symbol (bfd *abfd,
|
|||
set_index (symbol, *written);
|
||||
|
||||
*written += numaux + 1;
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
/* 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,
|
||||
or we may be linking a non COFF file to a COFF file. */
|
||||
|
||||
bfd_boolean
|
||||
bool
|
||||
coff_write_alien_symbol (bfd *abfd,
|
||||
asymbol *symbol,
|
||||
struct internal_syment *isym,
|
||||
|
@ -1067,7 +1067,7 @@ coff_write_alien_symbol (bfd *abfd,
|
|||
? symbol->section->output_section
|
||||
: symbol->section;
|
||||
struct bfd_link_info *link_info = coff_data (abfd)->link_info;
|
||||
bfd_boolean ret;
|
||||
bool ret;
|
||||
|
||||
if ((!link_info || link_info->strip_discarded)
|
||||
&& !bfd_is_abs_section (symbol->section)
|
||||
|
@ -1076,11 +1076,11 @@ coff_write_alien_symbol (bfd *abfd,
|
|||
symbol->name = "";
|
||||
if (isym != NULL)
|
||||
memset (isym, 0, sizeof (*isym));
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
native = dummy;
|
||||
native->is_sym = TRUE;
|
||||
native[1].is_sym = FALSE;
|
||||
native->is_sym = true;
|
||||
native[1].is_sym = false;
|
||||
native->u.syment.n_type = T_NULL;
|
||||
native->u.syment.n_flags = 0;
|
||||
native->u.syment.n_numaux = 0;
|
||||
|
@ -1108,7 +1108,7 @@ coff_write_alien_symbol (bfd *abfd,
|
|||
symbol->name = "";
|
||||
if (isym != NULL)
|
||||
memset (isym, 0, sizeof (*isym));
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1148,7 +1148,7 @@ coff_write_alien_symbol (bfd *abfd,
|
|||
|
||||
/* Write a native symbol to a COFF file. */
|
||||
|
||||
static bfd_boolean
|
||||
static bool
|
||||
coff_write_native_symbol (bfd *abfd,
|
||||
coff_symbol_type *symbol,
|
||||
bfd_vma *written,
|
||||
|
@ -1165,7 +1165,7 @@ coff_write_native_symbol (bfd *abfd,
|
|||
&& symbol->symbol.section->output_section == bfd_abs_section_ptr)
|
||||
{
|
||||
symbol->symbol.name = "";
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
BFD_ASSERT (native->is_sym);
|
||||
|
@ -1194,7 +1194,7 @@ coff_write_native_symbol (bfd *abfd,
|
|||
+ symbol->symbol.section->output_offset);
|
||||
count++;
|
||||
}
|
||||
symbol->done_lineno = TRUE;
|
||||
symbol->done_lineno = true;
|
||||
|
||||
if (! bfd_is_const_section (symbol->symbol.section->output_section))
|
||||
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. */
|
||||
|
||||
bfd_boolean
|
||||
bool
|
||||
coff_write_symbols (bfd *abfd)
|
||||
{
|
||||
bfd_size_type string_size;
|
||||
|
@ -1249,7 +1249,7 @@ coff_write_symbols (bfd *abfd)
|
|||
|
||||
/* Seek to the right place. */
|
||||
if (bfd_seek (abfd, obj_sym_filepos (abfd), SEEK_SET) != 0)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
/* Output all the symbols we have. */
|
||||
written = 0;
|
||||
|
@ -1264,7 +1264,7 @@ coff_write_symbols (bfd *abfd)
|
|||
if (!coff_write_alien_symbol (abfd, symbol, NULL, NULL, &written,
|
||||
&string_size, &debug_string_section,
|
||||
&debug_string_size))
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1309,7 +1309,7 @@ coff_write_symbols (bfd *abfd)
|
|||
if (!coff_write_native_symbol (abfd, c_symbol, &written,
|
||||
&string_size, &debug_string_section,
|
||||
&debug_string_size))
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1328,7 +1328,7 @@ coff_write_symbols (bfd *abfd)
|
|||
#endif
|
||||
if (bfd_bwrite ((void *) buffer, (bfd_size_type) sizeof (buffer), abfd)
|
||||
!= sizeof (buffer))
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
/* Handle long section names. This code must handle section
|
||||
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)
|
||||
!= 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_bwrite (".file", (bfd_size_type) 6, abfd) != 6)
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
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,
|
||||
abfd) != name_length + 1)
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1417,7 +1417,7 @@ coff_write_symbols (bfd *abfd)
|
|||
#endif
|
||||
if (bfd_bwrite ((void *) buffer, (bfd_size_type) STRING_SIZE_SIZE, abfd)
|
||||
!= STRING_SIZE_SIZE)
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
/* 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)
|
||||
== debug_string_section->size)));
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
bfd_boolean
|
||||
bool
|
||||
coff_write_linenumbers (bfd *abfd)
|
||||
{
|
||||
asection *s;
|
||||
|
@ -1444,14 +1444,14 @@ coff_write_linenumbers (bfd *abfd)
|
|||
linesz = bfd_coff_linesz (abfd);
|
||||
buff = bfd_alloc (abfd, linesz);
|
||||
if (!buff)
|
||||
return FALSE;
|
||||
return false;
|
||||
for (s = abfd->sections; s != (asection *) NULL; s = s->next)
|
||||
{
|
||||
if (s->lineno_count)
|
||||
{
|
||||
asymbol **q = abfd->outsymbols;
|
||||
if (bfd_seek (abfd, s->line_filepos, SEEK_SET) != 0)
|
||||
return FALSE;
|
||||
return false;
|
||||
/* Find all the linenumbers in this section. */
|
||||
while (*q)
|
||||
{
|
||||
|
@ -1472,7 +1472,7 @@ coff_write_linenumbers (bfd *abfd)
|
|||
bfd_coff_swap_lineno_out (abfd, &out, buff);
|
||||
if (bfd_bwrite (buff, (bfd_size_type) linesz, abfd)
|
||||
!= linesz)
|
||||
return FALSE;
|
||||
return false;
|
||||
l++;
|
||||
while (l->line_number)
|
||||
{
|
||||
|
@ -1481,7 +1481,7 @@ coff_write_linenumbers (bfd *abfd)
|
|||
bfd_coff_swap_lineno_out (abfd, &out, buff);
|
||||
if (bfd_bwrite (buff, (bfd_size_type) linesz, abfd)
|
||||
!= linesz)
|
||||
return FALSE;
|
||||
return false;
|
||||
l++;
|
||||
}
|
||||
}
|
||||
|
@ -1491,7 +1491,7 @@ coff_write_linenumbers (bfd *abfd)
|
|||
}
|
||||
}
|
||||
bfd_release (abfd, buff);
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
alent *
|
||||
|
@ -1621,7 +1621,7 @@ copy_name (bfd *abfd, char *name, size_t maxlen)
|
|||
|
||||
/* Read in the external symbols. */
|
||||
|
||||
bfd_boolean
|
||||
bool
|
||||
_bfd_coff_get_external_symbols (bfd *abfd)
|
||||
{
|
||||
size_t symesz;
|
||||
|
@ -1629,20 +1629,20 @@ _bfd_coff_get_external_symbols (bfd *abfd)
|
|||
void * syms;
|
||||
|
||||
if (obj_coff_external_syms (abfd) != NULL)
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
symesz = bfd_coff_symesz (abfd);
|
||||
if (_bfd_mul_overflow (obj_raw_syment_count (abfd), symesz, &size))
|
||||
{
|
||||
bfd_set_error (bfd_error_file_truncated);
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (size == 0)
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
if (bfd_seek (abfd, obj_sym_filepos (abfd), SEEK_SET) != 0)
|
||||
return FALSE;
|
||||
return false;
|
||||
syms = _bfd_malloc_and_read (abfd, size, size);
|
||||
obj_coff_external_syms (abfd) = syms;
|
||||
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. */
|
||||
|
||||
bfd_boolean
|
||||
bool
|
||||
_bfd_coff_free_symbols (bfd *abfd)
|
||||
{
|
||||
if (! bfd_family_coff (abfd))
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
if (obj_coff_external_syms (abfd) != NULL
|
||||
&& ! obj_coff_keep_syms (abfd))
|
||||
|
@ -1753,7 +1753,7 @@ _bfd_coff_free_symbols (bfd *abfd)
|
|||
obj_coff_strings_len (abfd) = 0;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
/* 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,
|
||||
(void *) & internal_ptr->u.syment);
|
||||
symbol_ptr = internal_ptr;
|
||||
internal_ptr->is_sym = TRUE;
|
||||
internal_ptr->is_sym = true;
|
||||
|
||||
/* PR 17512: Prevent buffer overrun. */
|
||||
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,
|
||||
&(internal_ptr->u.auxent));
|
||||
|
||||
internal_ptr->is_sym = FALSE;
|
||||
internal_ptr->is_sym = false;
|
||||
coff_pointerize_aux (abfd, internal, symbol_ptr, i,
|
||||
internal_ptr, internal_end);
|
||||
}
|
||||
|
@ -1999,7 +1999,7 @@ coff_make_empty_symbol (bfd *abfd)
|
|||
new_symbol->symbol.section = 0;
|
||||
new_symbol->native = NULL;
|
||||
new_symbol->lineno = NULL;
|
||||
new_symbol->done_lineno = FALSE;
|
||||
new_symbol->done_lineno = false;
|
||||
new_symbol->symbol.the_bfd = abfd;
|
||||
|
||||
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);
|
||||
if (!new_symbol->native)
|
||||
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.flags = BSF_DEBUGGING;
|
||||
new_symbol->lineno = NULL;
|
||||
new_symbol->done_lineno = FALSE;
|
||||
new_symbol->done_lineno = false;
|
||||
new_symbol->symbol.the_bfd = abfd;
|
||||
|
||||
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
|
||||
override it. */
|
||||
|
||||
bfd_boolean
|
||||
bool
|
||||
_bfd_coff_is_local_label_name (bfd *abfd ATTRIBUTE_UNUSED,
|
||||
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
|
||||
nearest to the wanted location. */
|
||||
|
||||
bfd_boolean
|
||||
bool
|
||||
coff_find_nearest_line_with_names (bfd *abfd,
|
||||
asymbol **symbols,
|
||||
asection *section,
|
||||
|
@ -2228,7 +2228,7 @@ coff_find_nearest_line_with_names (bfd *abfd,
|
|||
unsigned int *line_ptr,
|
||||
const struct dwarf_debug_section *debug_sections)
|
||||
{
|
||||
bfd_boolean found;
|
||||
bool found;
|
||||
unsigned int i;
|
||||
unsigned int line_base;
|
||||
coff_data_type *cof = coff_data (abfd);
|
||||
|
@ -2245,17 +2245,17 @@ coff_find_nearest_line_with_names (bfd *abfd,
|
|||
&found, filename_ptr,
|
||||
functionname_ptr, line_ptr,
|
||||
&coff_data(abfd)->line_info))
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
if (found)
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
/* Also try examining DWARF2 debugging information. */
|
||||
if (_bfd_dwarf2_find_nearest_line (abfd, symbols, NULL, section, offset,
|
||||
filename_ptr, functionname_ptr,
|
||||
line_ptr, NULL, debug_sections,
|
||||
&coff_data(abfd)->dwarf2_find_line_info))
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
sec_data = coff_section_data (abfd, section);
|
||||
|
||||
|
@ -2284,7 +2284,7 @@ coff_find_nearest_line_with_names (bfd *abfd,
|
|||
|
||||
if (sec_data)
|
||||
{
|
||||
sec_data->saved_bias = TRUE;
|
||||
sec_data->saved_bias = true;
|
||||
sec_data->bias = bias;
|
||||
}
|
||||
}
|
||||
|
@ -2295,7 +2295,7 @@ coff_find_nearest_line_with_names (bfd *abfd,
|
|||
filename_ptr, functionname_ptr,
|
||||
line_ptr, NULL, debug_sections,
|
||||
&coff_data(abfd)->dwarf2_find_line_info))
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
*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. */
|
||||
if (!bfd_family_coff (abfd))
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
if (cof == NULL)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
/* Find the first C_FILE symbol. */
|
||||
p = cof->raw_syments;
|
||||
if (!p)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
pend = p + cof->raw_syment_count;
|
||||
while (p < pend)
|
||||
|
@ -2389,7 +2389,7 @@ coff_find_nearest_line_with_names (bfd *abfd,
|
|||
{
|
||||
*functionname_ptr = NULL;
|
||||
*line_ptr = 0;
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
/* 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;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
bfd_boolean
|
||||
bool
|
||||
coff_find_nearest_line (bfd *abfd,
|
||||
asymbol **symbols,
|
||||
asection *section,
|
||||
|
@ -2513,13 +2513,13 @@ coff_find_nearest_line (bfd *abfd,
|
|||
line_ptr, dwarf_debug_sections);
|
||||
}
|
||||
|
||||
bfd_boolean
|
||||
bool
|
||||
coff_find_inliner_info (bfd *abfd,
|
||||
const char **filename_ptr,
|
||||
const char **functionname_ptr,
|
||||
unsigned int *line_ptr)
|
||||
{
|
||||
bfd_boolean found;
|
||||
bool found;
|
||||
|
||||
found = _bfd_dwarf2_find_inliner_info (abfd, filename_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. */
|
||||
|
||||
bfd_boolean
|
||||
bool
|
||||
bfd_coff_set_symbol_class (bfd * abfd,
|
||||
asymbol * symbol,
|
||||
unsigned int symbol_class)
|
||||
|
@ -2554,7 +2554,7 @@ bfd_coff_set_symbol_class (bfd * abfd,
|
|||
if (csym == NULL)
|
||||
{
|
||||
bfd_set_error (bfd_error_invalid_operation);
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
else if (csym->native == NULL)
|
||||
{
|
||||
|
@ -2568,9 +2568,9 @@ bfd_coff_set_symbol_class (bfd * abfd,
|
|||
|
||||
native = (combined_entry_type *) bfd_zalloc (abfd, amt);
|
||||
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_sclass = symbol_class;
|
||||
|
||||
|
@ -2603,10 +2603,10 @@ bfd_coff_set_symbol_class (bfd * abfd,
|
|||
else
|
||||
csym->native->u.syment.n_sclass = symbol_class;
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
bfd_boolean
|
||||
bool
|
||||
_bfd_coff_section_already_linked (bfd *abfd,
|
||||
asection *sec,
|
||||
struct bfd_link_info *info)
|
||||
|
@ -2618,15 +2618,15 @@ _bfd_coff_section_already_linked (bfd *abfd,
|
|||
struct coff_comdat_info *s_comdat;
|
||||
|
||||
if (sec->output_section == bfd_abs_section_ptr)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
flags = sec->flags;
|
||||
if ((flags & SEC_LINK_ONCE) == 0)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
/* The COFF backend linker doesn't support group sections. */
|
||||
if ((flags & SEC_GROUP) != 0)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
name = bfd_section_name (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. */
|
||||
if (!bfd_section_already_linked_table_insert (already_linked_list, sec))
|
||||
info->callbacks->einfo (_("%F%P: already_linked_table: %E\n"));
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
/* Initialize COOKIE for input bfd ABFD. */
|
||||
|
||||
static bfd_boolean
|
||||
static bool
|
||||
init_reloc_cookie (struct coff_reloc_cookie *cookie,
|
||||
struct bfd_link_info *info ATTRIBUTE_UNUSED,
|
||||
bfd *abfd)
|
||||
|
@ -2692,7 +2692,7 @@ init_reloc_cookie (struct coff_reloc_cookie *cookie,
|
|||
|
||||
cookie->symbols = obj_symbols (abfd);
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
/* 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
|
||||
of input bfd ABFD. */
|
||||
|
||||
static bfd_boolean
|
||||
static bool
|
||||
init_reloc_cookie_rels (struct coff_reloc_cookie *cookie,
|
||||
struct bfd_link_info *info ATTRIBUTE_UNUSED,
|
||||
bfd *abfd,
|
||||
|
@ -2718,17 +2718,18 @@ init_reloc_cookie_rels (struct coff_reloc_cookie *cookie,
|
|||
cookie->rels = NULL;
|
||||
cookie->relend = 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)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
cookie->rel = cookie->rels;
|
||||
cookie->relend = (cookie->rels + sec->reloc_count);
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
/* 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. */
|
||||
|
||||
static bfd_boolean
|
||||
static bool
|
||||
init_reloc_cookie_for_section (struct coff_reloc_cookie *cookie,
|
||||
struct bfd_link_info *info,
|
||||
asection *sec)
|
||||
{
|
||||
if (!init_reloc_cookie (cookie, info, sec->owner))
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
if (!init_reloc_cookie_rels (cookie, info, sec->owner, sec))
|
||||
{
|
||||
fini_reloc_cookie (cookie, sec->owner);
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
/* 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);
|
||||
}
|
||||
|
||||
static bfd_boolean _bfd_coff_gc_mark
|
||||
static bool _bfd_coff_gc_mark
|
||||
(struct bfd_link_info *, asection *, coff_gc_mark_hook_fn);
|
||||
|
||||
/* COOKIE->rel describes a relocation against section SEC, which is
|
||||
a section we've decided to keep. Mark the section that contains
|
||||
the relocation symbol. */
|
||||
|
||||
static bfd_boolean
|
||||
static bool
|
||||
_bfd_coff_gc_mark_reloc (struct bfd_link_info *info,
|
||||
asection *sec,
|
||||
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)
|
||||
rsec->gc_mark = 1;
|
||||
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
|
||||
it and any sections in this section's group, and all the sections
|
||||
which define symbols to which it refers. */
|
||||
|
||||
static bfd_boolean
|
||||
static bool
|
||||
_bfd_coff_gc_mark (struct bfd_link_info *info,
|
||||
asection *sec,
|
||||
coff_gc_mark_hook_fn gc_mark_hook)
|
||||
{
|
||||
bfd_boolean ret = TRUE;
|
||||
bool ret = true;
|
||||
|
||||
sec->gc_mark = 1;
|
||||
|
||||
|
@ -2892,14 +2893,14 @@ _bfd_coff_gc_mark (struct bfd_link_info *info,
|
|||
struct coff_reloc_cookie cookie;
|
||||
|
||||
if (!init_reloc_cookie_for_section (&cookie, info, sec))
|
||||
ret = FALSE;
|
||||
ret = false;
|
||||
else
|
||||
{
|
||||
for (; cookie.rel < cookie.relend; cookie.rel++)
|
||||
{
|
||||
if (!_bfd_coff_gc_mark_reloc (info, sec, gc_mark_hook, &cookie))
|
||||
{
|
||||
ret = FALSE;
|
||||
ret = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -2910,7 +2911,7 @@ _bfd_coff_gc_mark (struct bfd_link_info *info,
|
|||
return ret;
|
||||
}
|
||||
|
||||
static bfd_boolean
|
||||
static bool
|
||||
_bfd_coff_gc_mark_extra_sections (struct bfd_link_info *info,
|
||||
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)
|
||||
{
|
||||
asection *isec;
|
||||
bfd_boolean some_kept;
|
||||
bool some_kept;
|
||||
|
||||
if (bfd_get_flavour (ibfd) != bfd_target_coff_flavour)
|
||||
continue;
|
||||
|
||||
/* Ensure all linker created sections are kept, and see whether
|
||||
any other section is already marked. */
|
||||
some_kept = FALSE;
|
||||
some_kept = false;
|
||||
for (isec = ibfd->sections; isec != NULL; isec = isec->next)
|
||||
{
|
||||
if ((isec->flags & SEC_LINKER_CREATED) != 0)
|
||||
isec->gc_mark = 1;
|
||||
else if (isec->gc_mark)
|
||||
some_kept = TRUE;
|
||||
some_kept = true;
|
||||
}
|
||||
|
||||
/* 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->gc_mark = 1;
|
||||
}
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
/* 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,
|
||||
void *data ATTRIBUTE_UNUSED)
|
||||
{
|
||||
|
@ -2969,15 +2970,15 @@ coff_gc_sweep_symbol (struct coff_link_hash_entry *h,
|
|||
h->symbol_class = C_HIDDEN;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
/* 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 *);
|
||||
|
||||
static bfd_boolean
|
||||
static bool
|
||||
coff_gc_sweep (bfd *abfd ATTRIBUTE_UNUSED, struct bfd_link_info *info)
|
||||
{
|
||||
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))
|
||||
{
|
||||
struct internal_reloc *internal_relocs;
|
||||
bfd_boolean r;
|
||||
bool r;
|
||||
|
||||
internal_relocs
|
||||
= _bfd_coff_link_read_relocs (o->owner, o, NULL, NULL,
|
||||
info->keep_memory);
|
||||
if (internal_relocs == NULL)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
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);
|
||||
|
||||
if (!r)
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
#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,
|
||||
NULL);
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
/* 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;
|
||||
|
||||
h = coff_link_hash_lookup (coff_hash_table (info), sym->name,
|
||||
FALSE, FALSE, FALSE);
|
||||
false, false, false);
|
||||
|
||||
if (h != NULL
|
||||
&& (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. */
|
||||
|
||||
bfd_boolean
|
||||
bool
|
||||
bfd_coff_gc_sections (bfd *abfd ATTRIBUTE_UNUSED, struct bfd_link_info *info)
|
||||
{
|
||||
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))
|
||||
{
|
||||
_bfd_error_handler(_("warning: gc-sections option ignored"));
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -3115,7 +3116,7 @@ bfd_coff_gc_sections (bfd *abfd ATTRIBUTE_UNUSED, struct bfd_link_info *info)
|
|||
&& !o->gc_mark)
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
||||
bfd_boolean
|
||||
bool
|
||||
_bfd_coff_close_and_cleanup (bfd *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
|
||||
&& bfd_family_coff (abfd)
|
||||
&& !_bfd_coff_free_symbols (abfd))
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
if (bfd_get_format (abfd) == bfd_object
|
||||
|| bfd_get_format (abfd) == bfd_core)
|
||||
|
|
344
bfd/cofflink.c
344
bfd/cofflink.c
File diff suppressed because it is too large
Load diff
|
@ -26,7 +26,7 @@
|
|||
|
||||
#define MAX_COMPRESSION_HEADER_SIZE 24
|
||||
|
||||
static bfd_boolean
|
||||
static bool
|
||||
decompress_contents (bfd_byte *compressed_buffer,
|
||||
bfd_size_type compressed_size,
|
||||
bfd_byte *uncompressed_buffer,
|
||||
|
@ -79,13 +79,13 @@ bfd_compress_section_contents (bfd *abfd, sec_ptr sec,
|
|||
uLong compressed_size;
|
||||
bfd_byte *buffer;
|
||||
bfd_size_type buffer_size;
|
||||
bfd_boolean decompress;
|
||||
bool decompress;
|
||||
int zlib_size = 0;
|
||||
int orig_compression_header_size;
|
||||
bfd_size_type orig_uncompressed_size;
|
||||
unsigned int orig_uncompressed_alignment_pow;
|
||||
int header_size = bfd_get_compression_header_size (abfd, NULL);
|
||||
bfd_boolean compressed
|
||||
bool compressed
|
||||
= bfd_is_section_compressed_with_header (abfd, sec,
|
||||
&orig_compression_header_size,
|
||||
&orig_uncompressed_size,
|
||||
|
@ -128,12 +128,12 @@ bfd_compress_section_contents (bfd *abfd, sec_ptr sec,
|
|||
/* Uncompress if it leads to smaller size. */
|
||||
if (compressed && compressed_size > orig_uncompressed_size)
|
||||
{
|
||||
decompress = TRUE;
|
||||
decompress = true;
|
||||
buffer_size = orig_uncompressed_size;
|
||||
}
|
||||
else
|
||||
{
|
||||
decompress = FALSE;
|
||||
decompress = false;
|
||||
buffer_size = compressed_size;
|
||||
}
|
||||
buffer = (bfd_byte *) bfd_alloc (abfd, buffer_size);
|
||||
|
@ -209,7 +209,7 @@ FUNCTION
|
|||
bfd_get_full_section_contents
|
||||
|
||||
SYNOPSIS
|
||||
bfd_boolean bfd_get_full_section_contents
|
||||
bool bfd_get_full_section_contents
|
||||
(bfd *abfd, asection *section, bfd_byte **ptr);
|
||||
|
||||
DESCRIPTION
|
||||
|
@ -222,12 +222,12 @@ DESCRIPTION
|
|||
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_size_type sz;
|
||||
bfd_byte *p = *ptr;
|
||||
bfd_boolean ret;
|
||||
bool ret;
|
||||
bfd_size_type save_size;
|
||||
bfd_size_type save_rawsize;
|
||||
bfd_byte *compressed_buffer;
|
||||
|
@ -240,7 +240,7 @@ bfd_get_full_section_contents (bfd *abfd, sec_ptr sec, bfd_byte **ptr)
|
|||
if (sz == 0)
|
||||
{
|
||||
*ptr = NULL;
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
switch (sec->compress_status)
|
||||
|
@ -269,7 +269,7 @@ bfd_get_full_section_contents (bfd *abfd, sec_ptr sec, bfd_byte **ptr)
|
|||
/* xgettext:c-format */
|
||||
(_("error: %pB(%pA) section size (%#" PRIx64 " bytes) is larger than file size (%#" PRIx64 " bytes)"),
|
||||
abfd, sec, (uint64_t) sz, (uint64_t) filesize);
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
p = (bfd_byte *) bfd_malloc (sz);
|
||||
if (p == NULL)
|
||||
|
@ -280,7 +280,7 @@ bfd_get_full_section_contents (bfd *abfd, sec_ptr sec, bfd_byte **ptr)
|
|||
/* xgettext:c-format */
|
||||
(_("error: %pB(%pA) is too large (%#" PRIx64 " bytes)"),
|
||||
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)
|
||||
free (p);
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
*ptr = p;
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
case DECOMPRESS_SECTION_SIZED:
|
||||
/* Read in the full compressed section contents. */
|
||||
compressed_buffer = (bfd_byte *) bfd_malloc (sec->compressed_size);
|
||||
if (compressed_buffer == NULL)
|
||||
return FALSE;
|
||||
return false;
|
||||
save_rawsize = sec->rawsize;
|
||||
save_size = sec->size;
|
||||
/* 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);
|
||||
fail_compressed:
|
||||
free (compressed_buffer);
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
free (compressed_buffer);
|
||||
*ptr = p;
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
case COMPRESS_SECTION_DONE:
|
||||
if (sec->contents == NULL)
|
||||
return FALSE;
|
||||
return false;
|
||||
if (p == NULL)
|
||||
{
|
||||
p = (bfd_byte *) bfd_malloc (sz);
|
||||
if (p == NULL)
|
||||
return FALSE;
|
||||
return false;
|
||||
*ptr = p;
|
||||
}
|
||||
/* PR 17512; file: 5bc29788. */
|
||||
if (p != sec->contents)
|
||||
memcpy (p, sec->contents, sz);
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
default:
|
||||
abort ();
|
||||
|
@ -387,7 +387,7 @@ FUNCTION
|
|||
bfd_is_section_compressed_with_header
|
||||
|
||||
SYNOPSIS
|
||||
bfd_boolean bfd_is_section_compressed_with_header
|
||||
bool bfd_is_section_compressed_with_header
|
||||
(bfd *abfd, asection *section,
|
||||
int *compression_header_size_p,
|
||||
bfd_size_type *uncompressed_size_p,
|
||||
|
@ -403,7 +403,7 @@ DESCRIPTION
|
|||
and uncompressed size is returned with 0.
|
||||
*/
|
||||
|
||||
bfd_boolean
|
||||
bool
|
||||
bfd_is_section_compressed_with_header (bfd *abfd, sec_ptr sec,
|
||||
int *compression_header_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 header_size;
|
||||
unsigned int saved = sec->compress_status;
|
||||
bfd_boolean compressed;
|
||||
bool compressed;
|
||||
|
||||
*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. */
|
||||
compressed = startswith ((char*) header , "ZLIB");
|
||||
else
|
||||
compressed = TRUE;
|
||||
compressed = true;
|
||||
}
|
||||
else
|
||||
compressed = FALSE;
|
||||
compressed = false;
|
||||
|
||||
*uncompressed_size_p = sec->size;
|
||||
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. */
|
||||
else if (strcmp (sec->name, ".debug_str") == 0
|
||||
&& ISPRINT (header[4]))
|
||||
compressed = FALSE;
|
||||
compressed = false;
|
||||
else
|
||||
*uncompressed_size_p = bfd_getb64 (header + 4);
|
||||
}
|
||||
|
@ -470,14 +470,14 @@ FUNCTION
|
|||
bfd_is_section_compressed
|
||||
|
||||
SYNOPSIS
|
||||
bfd_boolean bfd_is_section_compressed
|
||||
bool bfd_is_section_compressed
|
||||
(bfd *abfd, asection *section);
|
||||
|
||||
DESCRIPTION
|
||||
Return @code{TRUE} if @var{section} is compressed.
|
||||
*/
|
||||
|
||||
bfd_boolean
|
||||
bool
|
||||
bfd_is_section_compressed (bfd *abfd, sec_ptr sec)
|
||||
{
|
||||
int compression_header_size;
|
||||
|
@ -496,7 +496,7 @@ FUNCTION
|
|||
bfd_init_section_decompress_status
|
||||
|
||||
SYNOPSIS
|
||||
bfd_boolean bfd_init_section_decompress_status
|
||||
bool bfd_init_section_decompress_status
|
||||
(bfd *abfd, asection *section);
|
||||
|
||||
DESCRIPTION
|
||||
|
@ -508,7 +508,7 @@ DESCRIPTION
|
|||
section. Otherwise, return @code{TRUE}.
|
||||
*/
|
||||
|
||||
bfd_boolean
|
||||
bool
|
||||
bfd_init_section_decompress_status (bfd *abfd, sec_ptr sec)
|
||||
{
|
||||
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_set_error (bfd_error_invalid_operation);
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (compression_header_size == 0)
|
||||
|
@ -539,7 +539,7 @@ bfd_init_section_decompress_status (bfd *abfd, sec_ptr sec)
|
|||
if (! startswith ((char*) header, "ZLIB"))
|
||||
{
|
||||
bfd_set_error (bfd_error_wrong_format);
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
uncompressed_size = bfd_getb64 (header + 4);
|
||||
}
|
||||
|
@ -548,7 +548,7 @@ bfd_init_section_decompress_status (bfd *abfd, sec_ptr sec)
|
|||
&uncompressed_alignment_power))
|
||||
{
|
||||
bfd_set_error (bfd_error_wrong_format);
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
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);
|
||||
sec->compress_status = DECOMPRESS_SECTION_SIZED;
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -564,7 +564,7 @@ FUNCTION
|
|||
bfd_init_section_compress_status
|
||||
|
||||
SYNOPSIS
|
||||
bfd_boolean bfd_init_section_compress_status
|
||||
bool bfd_init_section_compress_status
|
||||
(bfd *abfd, asection *section);
|
||||
|
||||
DESCRIPTION
|
||||
|
@ -575,7 +575,7 @@ DESCRIPTION
|
|||
section. Otherwise, return @code{TRUE}.
|
||||
*/
|
||||
|
||||
bfd_boolean
|
||||
bool
|
||||
bfd_init_section_compress_status (bfd *abfd, sec_ptr sec)
|
||||
{
|
||||
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)
|
||||
{
|
||||
bfd_set_error (bfd_error_invalid_operation);
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
/* 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);
|
||||
/* PR 21431 */
|
||||
if (uncompressed_buffer == NULL)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
if (!bfd_get_section_contents (abfd, sec, uncompressed_buffer,
|
||||
0, uncompressed_size))
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
uncompressed_size = bfd_compress_section_contents (abfd, sec,
|
||||
uncompressed_buffer,
|
||||
|
@ -614,7 +614,7 @@ FUNCTION
|
|||
bfd_compress_section
|
||||
|
||||
SYNOPSIS
|
||||
bfd_boolean bfd_compress_section
|
||||
bool bfd_compress_section
|
||||
(bfd *abfd, asection *section, bfd_byte *uncompressed_buffer);
|
||||
|
||||
DESCRIPTION
|
||||
|
@ -625,7 +625,7 @@ DESCRIPTION
|
|||
@code{TRUE}.
|
||||
*/
|
||||
|
||||
bfd_boolean
|
||||
bool
|
||||
bfd_compress_section (bfd *abfd, sec_ptr sec, bfd_byte *uncompressed_buffer)
|
||||
{
|
||||
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)
|
||||
{
|
||||
bfd_set_error (bfd_error_invalid_operation);
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
/* Compress it. */
|
||||
|
|
|
@ -111,7 +111,7 @@ FUNCTION
|
|||
core_file_matches_executable_p
|
||||
|
||||
SYNOPSIS
|
||||
bfd_boolean core_file_matches_executable_p
|
||||
bool core_file_matches_executable_p
|
||||
(bfd *core_bfd, bfd *exec_bfd);
|
||||
|
||||
DESCRIPTION
|
||||
|
@ -120,13 +120,13 @@ DESCRIPTION
|
|||
@var{exec_bfd}, <<FALSE>> otherwise.
|
||||
*/
|
||||
|
||||
bfd_boolean
|
||||
bool
|
||||
core_file_matches_executable_p (bfd *core_bfd, bfd *exec_bfd)
|
||||
{
|
||||
if (core_bfd->format != bfd_core || exec_bfd->format != bfd_object)
|
||||
{
|
||||
bfd_set_error (bfd_error_wrong_format);
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
return BFD_SEND (core_bfd, _core_file_matches_executable_p,
|
||||
|
@ -138,7 +138,7 @@ FUNCTION
|
|||
generic_core_file_matches_executable_p
|
||||
|
||||
SYNOPSIS
|
||||
bfd_boolean generic_core_file_matches_executable_p
|
||||
bool generic_core_file_matches_executable_p
|
||||
(bfd *core_bfd, bfd *exec_bfd);
|
||||
|
||||
DESCRIPTION
|
||||
|
@ -154,7 +154,7 @@ DESCRIPTION
|
|||
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)
|
||||
{
|
||||
const char *exec;
|
||||
|
@ -162,7 +162,7 @@ generic_core_file_matches_executable_p (bfd *core_bfd, bfd *exec_bfd)
|
|||
const char *last_slash;
|
||||
|
||||
if (exec_bfd == NULL || core_bfd == NULL)
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
/* 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
|
||||
|
@ -171,11 +171,11 @@ generic_core_file_matches_executable_p (bfd *core_bfd, bfd *exec_bfd)
|
|||
|
||||
core = bfd_core_file_failing_command (core_bfd);
|
||||
if (core == NULL)
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
exec = bfd_get_filename (exec_bfd);
|
||||
if (exec == NULL)
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
last_slash = strrchr (core, '/');
|
||||
if (last_slash != NULL)
|
||||
|
|
|
@ -76,14 +76,14 @@ processors[] =
|
|||
{ bfd_mach_aarch64, "cortex-a77" }
|
||||
};
|
||||
|
||||
static bfd_boolean
|
||||
static bool
|
||||
scan (const struct bfd_arch_info *info, const char *string)
|
||||
{
|
||||
int i;
|
||||
|
||||
/* First test for an exact match. */
|
||||
if (strcasecmp (string, info->printable_name) == 0)
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
/* Next check for a processor name instead of an Architecture name. */
|
||||
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)
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
/* Finally check for the default architecture. */
|
||||
if (strcasecmp (string, "aarch64") == 0)
|
||||
return info->the_default;
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
#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 }
|
||||
|
||||
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 =
|
||||
N (bfd_mach_aarch64_ilp32, "aarch64:ilp32", 32, FALSE,
|
||||
N (bfd_mach_aarch64_ilp32, "aarch64:ilp32", 32, false,
|
||||
&bfd_aarch64_arch_v8_r);
|
||||
|
||||
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)
|
||||
{
|
||||
if (!name || name[0] != '$')
|
||||
return FALSE;
|
||||
return false;
|
||||
if (name[1] == 'x' || name[1] == 'd')
|
||||
type &= BFD_AARCH64_SPECIAL_SYM_TYPE_MAP;
|
||||
else if (name[1] == 'm' || name[1] == 'f' || name[1] == 'p')
|
||||
type &= BFD_AARCH64_SPECIAL_SYM_TYPE_TAG;
|
||||
else
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
return (type != 0 && (name[2] == 0 || name[2] == '.'));
|
||||
}
|
||||
|
|
|
@ -21,5 +21,5 @@
|
|||
#define BFD_AARCH64_SPECIAL_SYM_TYPE_TAG (1 << 1)
|
||||
#define BFD_AARCH64_SPECIAL_SYM_TYPE_OTHER (1 << 2)
|
||||
#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);
|
||||
|
|
|
@ -45,10 +45,10 @@
|
|||
/* These exist only so that we can reasonably disassemble PALcode. */
|
||||
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_ev5, "alpha:ev5", FALSE, NN(2)),
|
||||
N (64, 64, bfd_mach_alpha_ev6, "alpha:ev6", FALSE, 0),
|
||||
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_ev6, "alpha:ev6", false, 0),
|
||||
};
|
||||
|
||||
const bfd_arch_info_type bfd_alpha_arch =
|
||||
N (64, 64, 0, "alpha", TRUE, NN(0));
|
||||
N (64, 64, 0, "alpha", true, NN(0));
|
||||
|
|
|
@ -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[] =
|
||||
{
|
||||
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_arc700, "ARC700", FALSE, &arch_info_struct[3]),
|
||||
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, "EM", FALSE, &arch_info_struct[6]),
|
||||
ARC (bfd_mach_arc_arcv2, "HS", FALSE, NULL),
|
||||
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_arc700, "ARC700", false, &arch_info_struct[3]),
|
||||
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, "EM", false, &arch_info_struct[6]),
|
||||
ARC (bfd_mach_arc_arcv2, "HS", false, NULL),
|
||||
};
|
||||
|
||||
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
|
||||
compatible, then this function should return architecture that is more
|
||||
|
|
104
bfd/cpu-arm.c
104
bfd/cpu-arm.c
|
@ -198,14 +198,14 @@ processors[] =
|
|||
{ bfd_mach_arm_unknown, "arm_any" }
|
||||
};
|
||||
|
||||
static bfd_boolean
|
||||
static bool
|
||||
scan (const struct bfd_arch_info *info, const char *string)
|
||||
{
|
||||
int i;
|
||||
|
||||
/* First test for an exact match. */
|
||||
if (strcasecmp (string, info->printable_name) == 0)
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
/* Next check for a processor name instead of an Architecture name. */
|
||||
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)
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
/* Finally check for the default architecture. */
|
||||
if (strcasecmp (string, "arm") == 0)
|
||||
return info->the_default;
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
#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[] =
|
||||
{
|
||||
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_3, "armv3", FALSE, & arch_info_struct[3]),
|
||||
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_4T, "armv4t", FALSE, & arch_info_struct[6]),
|
||||
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_5TE, "armv5te", FALSE, & arch_info_struct[9]),
|
||||
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_iWMMXt, "iwmmxt", FALSE, & arch_info_struct[12]),
|
||||
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_6, "armv6", FALSE, & arch_info_struct[15]),
|
||||
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_6K, "armv6k", FALSE, & arch_info_struct[18]),
|
||||
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_6SM, "armv6s-m", FALSE, & arch_info_struct[21]),
|
||||
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_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_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_unknown, "arm_any", FALSE, NULL)
|
||||
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_3, "armv3", false, & arch_info_struct[3]),
|
||||
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_4T, "armv4t", false, & arch_info_struct[6]),
|
||||
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_5TE, "armv5te", false, & arch_info_struct[9]),
|
||||
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_iWMMXt, "iwmmxt", false, & arch_info_struct[12]),
|
||||
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_6, "armv6", false, & arch_info_struct[15]),
|
||||
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_6K, "armv6k", false, & arch_info_struct[18]),
|
||||
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_6SM, "armv6s-m", false, & arch_info_struct[21]),
|
||||
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_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_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_unknown, "arm_any", false, NULL)
|
||||
};
|
||||
|
||||
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. */
|
||||
|
||||
|
@ -270,7 +270,7 @@ const bfd_arch_info_type bfd_arm_arch =
|
|||
different possible ARM architecture variants.
|
||||
Returns TRUE if they were merged successfully or FALSE otherwise. */
|
||||
|
||||
bfd_boolean
|
||||
bool
|
||||
bfd_arm_merge_machines (bfd *ibfd, bfd *obfd)
|
||||
{
|
||||
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"),
|
||||
ibfd, obfd);
|
||||
bfd_set_error (bfd_error_wrong_format);
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
else if (out == bfd_mach_arm_ep9312
|
||||
&& (in == bfd_mach_arm_XScale
|
||||
|
@ -320,14 +320,14 @@ bfd_arm_merge_machines (bfd *ibfd, bfd *obfd)
|
|||
"whereas %pB is compiled for XScale"),
|
||||
obfd, ibfd);
|
||||
bfd_set_error (bfd_error_wrong_format);
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
else if (in > out)
|
||||
bfd_set_arch_mach (obfd, bfd_arch_arm, in);
|
||||
/* else
|
||||
Nothing to do. */
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
typedef struct
|
||||
|
@ -338,7 +338,7 @@ typedef struct
|
|||
char name[1]; /* Start of the name+desc data. */
|
||||
} arm_Note;
|
||||
|
||||
static bfd_boolean
|
||||
static bool
|
||||
arm_check_note (bfd *abfd,
|
||||
bfd_byte *buffer,
|
||||
bfd_size_type buffer_size,
|
||||
|
@ -351,7 +351,7 @@ arm_check_note (bfd *abfd,
|
|||
char * descr;
|
||||
|
||||
if (buffer_size < offsetof (arm_Note, name))
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
/* We have to extract the values this way to allow for a
|
||||
host whose endian-ness is different from the target. */
|
||||
|
@ -362,20 +362,20 @@ arm_check_note (bfd *abfd,
|
|||
|
||||
/* Check for buffer overflow. */
|
||||
if (namesz + descsz + offsetof (arm_Note, name) > buffer_size)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
if (expected_name == NULL)
|
||||
{
|
||||
if (namesz != 0)
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (namesz != ((strlen (expected_name) + 1 + 3) & ~3))
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
if (strcmp (descr, expected_name) != 0)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
descr += (namesz + 3) & ~3;
|
||||
}
|
||||
|
@ -386,12 +386,12 @@ arm_check_note (bfd *abfd,
|
|||
if (description_return != NULL)
|
||||
* description_return = descr;
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
#define NOTE_ARCH_STRING "arch: "
|
||||
|
||||
bfd_boolean
|
||||
bool
|
||||
bfd_arm_update_notes (bfd *abfd, const char *note_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);
|
||||
|
||||
if (arm_arch_section == NULL)
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
buffer_size = arm_arch_section->size;
|
||||
if (buffer_size == 0)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
if (!bfd_malloc_and_get_section (abfd, arm_arch_section, &buffer))
|
||||
goto FAIL;
|
||||
|
@ -459,11 +459,11 @@ bfd_arm_update_notes (bfd *abfd, const char *note_section)
|
|||
}
|
||||
|
||||
free (buffer);
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
FAIL:
|
||||
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;
|
||||
}
|
||||
|
||||
bfd_boolean
|
||||
bool
|
||||
bfd_is_arm_special_symbol_name (const char * name, int type)
|
||||
{
|
||||
/* The ARM compiler outputs several obsolete forms. Recognize them
|
||||
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. */
|
||||
if (!name || name[0] != '$')
|
||||
return FALSE;
|
||||
return false;
|
||||
if (name[1] == 'a' || name[1] == 't' || name[1] == 'd')
|
||||
type &= BFD_ARM_SPECIAL_SYM_TYPE_MAP;
|
||||
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')
|
||||
type &= BFD_ARM_SPECIAL_SYM_TYPE_OTHER;
|
||||
else
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
return (type != 0 && (name[2] == 0 || name[2] == '.'));
|
||||
}
|
||||
|
|
|
@ -19,10 +19,10 @@
|
|||
MA 02110-1301, USA. */
|
||||
|
||||
/* ARM Note section processing. */
|
||||
extern bfd_boolean bfd_arm_merge_machines
|
||||
extern bool bfd_arm_merge_machines
|
||||
(bfd *, bfd *);
|
||||
|
||||
extern bfd_boolean bfd_arm_update_notes
|
||||
extern bool bfd_arm_update_notes
|
||||
(bfd *, const char *);
|
||||
|
||||
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_ANY (~0)
|
||||
|
||||
extern bfd_boolean bfd_is_arm_special_symbol_name
|
||||
extern bool bfd_is_arm_special_symbol_name
|
||||
(const char *, int);
|
||||
|
||||
|
|
|
@ -101,64 +101,64 @@ compatible (const bfd_arch_info_type * a,
|
|||
static const bfd_arch_info_type arch_info_struct[] =
|
||||
{
|
||||
/* 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. */
|
||||
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. */
|
||||
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. */
|
||||
/* TODO: addr_bits should be 16, but set to 22 for some following
|
||||
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. */
|
||||
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. */
|
||||
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. */
|
||||
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. */
|
||||
/* TODO: addr_bits should be 16, but set to 22 for some following
|
||||
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. */
|
||||
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. */
|
||||
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). */
|
||||
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. */
|
||||
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. */
|
||||
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. */
|
||||
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. */
|
||||
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. */
|
||||
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. */
|
||||
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. */
|
||||
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 =
|
||||
N (16, bfd_mach_avr2, "avr", TRUE, & arch_info_struct[0]);
|
||||
N (16, bfd_mach_avr2, "avr", true, & arch_info_struct[0]);
|
||||
|
|
|
@ -33,7 +33,7 @@ const bfd_arch_info_type bfd_bfin_arch =
|
|||
"bfin", /* Arch name. */
|
||||
"bfin", /* Arch printable name. */
|
||||
4, /* Section align power. */
|
||||
TRUE, /* The one and only. */
|
||||
true, /* The one and only. */
|
||||
bfd_default_compatible,
|
||||
bfd_default_scan,
|
||||
bfd_arch_default_fill,
|
||||
|
|
|
@ -34,7 +34,7 @@ static const bfd_arch_info_type bfd_xbpf_arch =
|
|||
"bpf", /* Architecture name. */
|
||||
"xbpf", /* Machine name. */
|
||||
3, /* Section align power. */
|
||||
FALSE, /* The default ? */
|
||||
false, /* The default ? */
|
||||
bfd_default_compatible, /* Architecture comparison fn. */
|
||||
bfd_default_scan, /* String to architecture convert fn. */
|
||||
bfd_arch_default_fill, /* Default fill. */
|
||||
|
@ -53,7 +53,7 @@ const bfd_arch_info_type bfd_bpf_arch =
|
|||
"bpf", /* Architecture name. */
|
||||
"bpf", /* Machine name. */
|
||||
3, /* Section align power. */
|
||||
TRUE, /* The default ? */
|
||||
true, /* The default ? */
|
||||
bfd_default_compatible, /* Architecture comparison fn. */
|
||||
bfd_default_scan, /* String to architecture convert fn. */
|
||||
bfd_arch_default_fill, /* Default fill. */
|
||||
|
|
|
@ -25,18 +25,18 @@
|
|||
|
||||
const bfd_arch_info_type bfd_cr16_arch =
|
||||
{
|
||||
16, /* Bits in a word. */
|
||||
32, /* Bits in an address. */
|
||||
8, /* Bits in a byte. */
|
||||
bfd_arch_cr16, /* Architecture number. */
|
||||
bfd_mach_cr16,
|
||||
"cr16", /* Arch name. */
|
||||
"cr16", /* Printable name. */
|
||||
1, /* Section alignment power. */
|
||||
TRUE, /* The one and only. */
|
||||
bfd_default_compatible,
|
||||
bfd_default_scan,
|
||||
bfd_arch_default_fill,
|
||||
NULL,
|
||||
0 /* Maximum offset of a reloc from the start of an insn. */
|
||||
16, /* Bits in a word. */
|
||||
32, /* Bits in an address. */
|
||||
8, /* Bits in a byte. */
|
||||
bfd_arch_cr16, /* Architecture number. */
|
||||
bfd_mach_cr16,
|
||||
"cr16", /* Arch name. */
|
||||
"cr16", /* Printable name. */
|
||||
1, /* Section alignment power. */
|
||||
true, /* The one and only. */
|
||||
bfd_default_compatible,
|
||||
bfd_default_scan,
|
||||
bfd_arch_default_fill,
|
||||
NULL,
|
||||
0 /* Maximum offset of a reloc from the start of an insn. */
|
||||
};
|
||||
|
|
|
@ -66,7 +66,7 @@ get_compatible (const bfd_arch_info_type *a,
|
|||
}
|
||||
|
||||
#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 }
|
||||
|
||||
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. */
|
||||
1, /* Section alignment power; each section
|
||||
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
|
||||
"machine" compatibility of two
|
||||
bfd_arch_info_type. */
|
||||
|
|
|
@ -33,7 +33,7 @@ const bfd_arch_info_type bfd_crx_arch =
|
|||
"crx", /* Arch name. */
|
||||
"crx", /* Printable name. */
|
||||
1, /* Section alignment power. */
|
||||
TRUE, /* The one and only. */
|
||||
true, /* The one and only. */
|
||||
bfd_default_compatible,
|
||||
bfd_default_scan,
|
||||
bfd_arch_default_fill,
|
||||
|
|
|
@ -44,18 +44,18 @@
|
|||
static const bfd_arch_info_type arch_info_struct[] =
|
||||
{
|
||||
/* ABI v1 processors. */
|
||||
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_ck510, "csky:ck510", false, & arch_info_struct[1]),
|
||||
N (bfd_mach_ck610, "csky:ck610", false, & arch_info_struct[2]),
|
||||
|
||||
/* ABI v2 processors. */
|
||||
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_ck803, "csky:ck803", FALSE, & arch_info_struct[5]),
|
||||
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_ck860, "csky:ck860", FALSE, & arch_info_struct[8]),
|
||||
N (bfd_mach_ck_unknown, "csky:any", FALSE, NULL)
|
||||
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_ck803, "csky:ck803", false, & arch_info_struct[5]),
|
||||
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_ck860, "csky:ck860", false, & arch_info_struct[8]),
|
||||
N (bfd_mach_ck_unknown, "csky:any", false, NULL)
|
||||
};
|
||||
|
||||
const bfd_arch_info_type bfd_csky_arch =
|
||||
N (0, "csky", TRUE, & arch_info_struct[0]);
|
||||
N (0, "csky", true, & arch_info_struct[0]);
|
||||
|
|
|
@ -42,10 +42,10 @@
|
|||
}
|
||||
|
||||
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 =
|
||||
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 =
|
||||
N (bfd_mach_d10v, "d10v", TRUE, & d10v_ts2_info);
|
||||
N (bfd_mach_d10v, "d10v", true, & d10v_ts2_info);
|
||||
|
|
|
@ -33,7 +33,7 @@ const bfd_arch_info_type bfd_d30v_arch =
|
|||
"d30v",
|
||||
"d30v",
|
||||
4, /* Section alignment power. */
|
||||
TRUE,
|
||||
true,
|
||||
bfd_default_compatible,
|
||||
bfd_default_scan,
|
||||
bfd_arch_default_fill,
|
||||
|
|
|
@ -33,7 +33,7 @@ const bfd_arch_info_type bfd_dlx_arch =
|
|||
"dlx",
|
||||
"dlx",
|
||||
4,
|
||||
TRUE, /* The one and only. */
|
||||
true, /* The one and only. */
|
||||
bfd_default_compatible,
|
||||
bfd_default_scan,
|
||||
bfd_arch_default_fill,
|
||||
|
|
|
@ -42,8 +42,7 @@
|
|||
}
|
||||
|
||||
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 =
|
||||
N (bfd_mach_epiphany32, "epiphany32", 2, TRUE, & bfd_epiphany16_arch);
|
||||
|
||||
N (bfd_mach_epiphany32, "epiphany32", 2, true, &bfd_epiphany16_arch);
|
||||
|
|
|
@ -32,7 +32,7 @@ const bfd_arch_info_type bfd_fr30_arch =
|
|||
"fr30", /* Architecture name. */
|
||||
"fr30", /* Printable name. */
|
||||
4, /* Section align power. */
|
||||
TRUE, /* The default ? */
|
||||
true, /* The default ? */
|
||||
bfd_default_compatible, /* Architecture comparison fn. */
|
||||
bfd_default_scan, /* String to architecture convert fn. */
|
||||
bfd_arch_default_fill, /* Default fill. */
|
||||
|
|
|
@ -41,26 +41,26 @@
|
|||
}
|
||||
|
||||
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
|
||||
= 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
|
||||
= 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
|
||||
= 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
|
||||
= 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
|
||||
= 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
|
||||
= 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
|
||||
= FRV_ARCH (bfd_mach_frv, "frv", TRUE, &arch_info_tomcat);
|
||||
= FRV_ARCH (bfd_mach_frv, "frv", true, &arch_info_tomcat);
|
||||
|
||||
|
|
|
@ -43,10 +43,10 @@
|
|||
|
||||
static const bfd_arch_info_type arch_info_struct[] =
|
||||
{
|
||||
N (bfd_mach_ft32, "ft32", FALSE, &arch_info_struct[1]),
|
||||
N (bfd_mach_ft32b, "ft32b", FALSE, NULL)
|
||||
N (bfd_mach_ft32, "ft32", false, &arch_info_struct[1]),
|
||||
N (bfd_mach_ft32b, "ft32b", false, NULL)
|
||||
};
|
||||
|
||||
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);
|
||||
|
||||
|
|
|
@ -24,28 +24,28 @@
|
|||
#include "libbfd.h"
|
||||
#include "cpu-h8300.h"
|
||||
|
||||
static bfd_boolean
|
||||
static bool
|
||||
h8300_scan (const struct bfd_arch_info *info, const char *string)
|
||||
{
|
||||
if (*string != 'h' && *string != 'H')
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
string++;
|
||||
if (*string != '8')
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
string++;
|
||||
if (*string == '/')
|
||||
string++;
|
||||
|
||||
if (*string != '3')
|
||||
return FALSE;
|
||||
return false;
|
||||
string++;
|
||||
if (*string != '0')
|
||||
return FALSE;
|
||||
return false;
|
||||
string++;
|
||||
if (*string != '0')
|
||||
return FALSE;
|
||||
return false;
|
||||
string++;
|
||||
if (*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 }
|
||||
|
||||
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 =
|
||||
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 =
|
||||
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 =
|
||||
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 =
|
||||
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 =
|
||||
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 =
|
||||
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
|
||||
addresses into the values they would have had on a h8s target. */
|
||||
|
|
|
@ -42,15 +42,15 @@
|
|||
|
||||
|
||||
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. */
|
||||
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. */
|
||||
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 =
|
||||
N (32, bfd_mach_hppa11, "hppa1.1", FALSE, &bfd_hppa20w_arch);
|
||||
N (32, bfd_mach_hppa11, "hppa1.1", false, &bfd_hppa20w_arch);
|
||||
|
|
|
@ -23,8 +23,8 @@
|
|||
#include "libbfd.h"
|
||||
#include "libiberty.h"
|
||||
|
||||
extern void * bfd_arch_i386_short_nop_fill (bfd_size_type, bfd_boolean,
|
||||
bfd_boolean);
|
||||
extern void * bfd_arch_i386_short_nop_fill (bfd_size_type, bool,
|
||||
bool);
|
||||
|
||||
static const bfd_arch_info_type *
|
||||
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. */
|
||||
|
||||
static void *
|
||||
bfd_arch_i386_fill (bfd_size_type count, bfd_boolean code,
|
||||
bfd_boolean long_nop)
|
||||
bfd_arch_i386_fill (bfd_size_type count, bool code,
|
||||
bool long_nop)
|
||||
{
|
||||
/* nop */
|
||||
static const char nop_1[] = { 0x90 };
|
||||
|
@ -97,24 +97,24 @@ bfd_arch_i386_fill (bfd_size_type count, bfd_boolean code,
|
|||
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 *
|
||||
bfd_arch_i386_short_nop_fill (bfd_size_type count,
|
||||
bfd_boolean is_bigendian ATTRIBUTE_UNUSED,
|
||||
bfd_boolean code)
|
||||
bool is_bigendian ATTRIBUTE_UNUSED,
|
||||
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. */
|
||||
|
||||
static void *
|
||||
bfd_arch_i386_long_nop_fill (bfd_size_type count,
|
||||
bfd_boolean is_bigendian ATTRIBUTE_UNUSED,
|
||||
bfd_boolean code)
|
||||
bool is_bigendian ATTRIBUTE_UNUSED,
|
||||
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) \
|
||||
|
@ -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 =
|
||||
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 =
|
||||
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 =
|
||||
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 =
|
||||
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 =
|
||||
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 =
|
||||
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 =
|
||||
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);
|
||||
|
|
|
@ -42,9 +42,9 @@
|
|||
}
|
||||
|
||||
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 =
|
||||
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"
|
||||
|
|
|
@ -22,11 +22,10 @@
|
|||
#include "bfd.h"
|
||||
#include "libbfd.h"
|
||||
|
||||
extern void * bfd_arch_i386_short_nop_fill (bfd_size_type, bfd_boolean,
|
||||
bfd_boolean);
|
||||
extern void *bfd_arch_i386_short_nop_fill (bfd_size_type, bool, bool);
|
||||
|
||||
#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_arch_i386_short_nop_fill, next, 0 }
|
||||
|
||||
|
|
|
@ -41,8 +41,8 @@
|
|||
}
|
||||
|
||||
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 =
|
||||
N (bfd_mach_ip2022ext, "ip2022ext", TRUE, & bfd_ip2k_nonext_arch);
|
||||
N (bfd_mach_ip2022ext, "ip2022ext", true, & bfd_ip2k_nonext_arch);
|
||||
|
||||
|
|
|
@ -41,8 +41,8 @@
|
|||
}
|
||||
|
||||
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 =
|
||||
N (bfd_mach_iq2000, "iq2000", TRUE, &arch_info_struct);
|
||||
N (bfd_mach_iq2000, "iq2000", true, &arch_info_struct);
|
||||
|
||||
|
|
|
@ -22,12 +22,11 @@
|
|||
#include "bfd.h"
|
||||
#include "libbfd.h"
|
||||
|
||||
extern void * bfd_arch_i386_short_nop_fill (bfd_size_type, bfd_boolean,
|
||||
bfd_boolean);
|
||||
extern void *bfd_arch_i386_short_nop_fill (bfd_size_type, bool, bool);
|
||||
|
||||
#define N(number, name, print, next) \
|
||||
{ 64, 64, 8, bfd_arch_k1om, number, name, print, 3, TRUE, \
|
||||
bfd_default_compatible, bfd_default_scan, \
|
||||
#define N(number, name, print, next) \
|
||||
{ 64, 64, 8, bfd_arch_k1om, number, name, print, 3, true, \
|
||||
bfd_default_compatible, bfd_default_scan, \
|
||||
bfd_arch_i386_short_nop_fill, next, 9 }
|
||||
|
||||
static const bfd_arch_info_type bfd_k1om_arch_intel_syntax =
|
||||
|
|
|
@ -22,12 +22,11 @@
|
|||
#include "bfd.h"
|
||||
#include "libbfd.h"
|
||||
|
||||
extern void * bfd_arch_i386_short_nop_fill (bfd_size_type, bfd_boolean,
|
||||
bfd_boolean);
|
||||
extern void *bfd_arch_i386_short_nop_fill (bfd_size_type, bool, bool);
|
||||
|
||||
#define N(number, name, print, next) \
|
||||
{ 64, 64, 8, bfd_arch_l1om, number, name, print, 3, TRUE, \
|
||||
bfd_default_compatible, bfd_default_scan, \
|
||||
#define N(number, name, print, next) \
|
||||
{ 64, 64, 8, bfd_arch_l1om, number, name, print, 3, true, \
|
||||
bfd_default_compatible, bfd_default_scan, \
|
||||
bfd_arch_i386_short_nop_fill, next, 0 }
|
||||
|
||||
static const bfd_arch_info_type bfd_l1om_arch_intel_syntax =
|
||||
|
|
|
@ -33,7 +33,7 @@ const bfd_arch_info_type bfd_lm32_arch =
|
|||
"lm32", /* Architecture name. */
|
||||
"lm32", /* Printable name. */
|
||||
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_scan,
|
||||
bfd_arch_default_fill,
|
||||
|
|
|
@ -32,7 +32,7 @@ const bfd_arch_info_type bfd_mn10200_arch =
|
|||
"mn10200",
|
||||
"mn10200",
|
||||
2,
|
||||
TRUE, /* The one and only. */
|
||||
true, /* The one and only. */
|
||||
bfd_default_compatible,
|
||||
bfd_default_scan,
|
||||
bfd_arch_default_fill,
|
||||
|
|
|
@ -41,10 +41,10 @@
|
|||
}
|
||||
|
||||
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 =
|
||||
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 =
|
||||
N (bfd_mach_mn10300, "mn10300", "mn10300", TRUE, &bfd_am33_arch);
|
||||
N (bfd_mach_mn10300, "mn10300", "mn10300", true, &bfd_am33_arch);
|
||||
|
|
|
@ -25,12 +25,12 @@
|
|||
/* Like bfd_default_scan but if the string is just "m32c" then
|
||||
skip the m16c architecture. */
|
||||
|
||||
static bfd_boolean
|
||||
static bool
|
||||
m32c_scan (const bfd_arch_info_type * info, const char * string)
|
||||
{
|
||||
if (strcmp (string, "m32c") == 0
|
||||
&& info->mach == bfd_mach_m16c)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
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 }
|
||||
|
||||
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 =
|
||||
N (bfd_mach_m16c, "m16c", 4, TRUE, &arch_info_struct);
|
||||
N (bfd_mach_m16c, "m16c", 4, true, &arch_info_struct);
|
||||
|
||||
|
|
|
@ -31,9 +31,9 @@
|
|||
|
||||
static const bfd_arch_info_type arch_info_struct[] =
|
||||
{
|
||||
N (bfd_mach_m32rx, "m32rx", FALSE, M32R2_NEXT) ,
|
||||
N (bfd_mach_m32r2, "m32r2", FALSE, NULL)
|
||||
N (bfd_mach_m32rx, "m32rx", false, M32R2_NEXT) ,
|
||||
N (bfd_mach_m32r2, "m32r2", false, NULL)
|
||||
};
|
||||
|
||||
const bfd_arch_info_type bfd_m32r_arch =
|
||||
N (bfd_mach_m32r, "m32r", TRUE, NEXT);
|
||||
N (bfd_mach_m32r, "m32r", true, NEXT);
|
||||
|
|
|
@ -32,7 +32,7 @@ const bfd_arch_info_type bfd_m68hc11_arch =
|
|||
"m68hc11",
|
||||
"m68hc11",
|
||||
4, /* Section alignment power. */
|
||||
TRUE,
|
||||
true,
|
||||
bfd_default_compatible,
|
||||
bfd_default_scan,
|
||||
bfd_arch_default_fill,
|
||||
|
|
|
@ -41,8 +41,8 @@
|
|||
}
|
||||
|
||||
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 =
|
||||
N (bfd_mach_m6812_default, "m68hc12", TRUE, &bfd_m68hc12s_arch);
|
||||
N (bfd_mach_m6812_default, "m68hc12", true, &bfd_m68hc12s_arch);
|
||||
|
||||
|
|
|
@ -35,79 +35,79 @@ bfd_m68k_compatible (const bfd_arch_info_type *a,
|
|||
|
||||
static const bfd_arch_info_type arch_info_struct[] =
|
||||
{
|
||||
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_m68010, "m68k:68010", FALSE, &arch_info_struct[3]),
|
||||
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_m68040, "m68k:68040", FALSE, &arch_info_struct[6]),
|
||||
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_fido, "m68k:fido", FALSE, &arch_info_struct[9]),
|
||||
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_m68010, "m68k:68010", false, &arch_info_struct[3]),
|
||||
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_m68040, "m68k:68040", false, &arch_info_struct[6]),
|
||||
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_fido, "m68k:fido", false, &arch_info_struct[9]),
|
||||
|
||||
/* Various combinations of CF architecture features */
|
||||
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",
|
||||
FALSE, &arch_info_struct[11]),
|
||||
false, &arch_info_struct[11]),
|
||||
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",
|
||||
FALSE, &arch_info_struct[13]),
|
||||
false, &arch_info_struct[13]),
|
||||
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",
|
||||
FALSE, &arch_info_struct[15]),
|
||||
false, &arch_info_struct[15]),
|
||||
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",
|
||||
FALSE, &arch_info_struct[17]),
|
||||
false, &arch_info_struct[17]),
|
||||
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",
|
||||
FALSE, &arch_info_struct[19]),
|
||||
false, &arch_info_struct[19]),
|
||||
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",
|
||||
FALSE, &arch_info_struct[21]),
|
||||
false, &arch_info_struct[21]),
|
||||
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",
|
||||
FALSE, &arch_info_struct[23]),
|
||||
false, &arch_info_struct[23]),
|
||||
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",
|
||||
FALSE, &arch_info_struct[25]),
|
||||
false, &arch_info_struct[25]),
|
||||
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",
|
||||
FALSE, &arch_info_struct[27]),
|
||||
false, &arch_info_struct[27]),
|
||||
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",
|
||||
FALSE, &arch_info_struct[29]),
|
||||
false, &arch_info_struct[29]),
|
||||
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",
|
||||
FALSE, &arch_info_struct[31]),
|
||||
false, &arch_info_struct[31]),
|
||||
|
||||
/* 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_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_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: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_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: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_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_a_emac, "m68k:5249", false, &arch_info_struct[38]),
|
||||
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",
|
||||
FALSE, &arch_info_struct[40]),
|
||||
N(bfd_mach_mcf_isa_b_float_emac, "m68k:cfv4e", FALSE, 0),
|
||||
false, &arch_info_struct[40]),
|
||||
N(bfd_mach_mcf_isa_b_float_emac, "m68k:cfv4e", false, 0),
|
||||
};
|
||||
|
||||
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
|
||||
architectural features are supported. */
|
||||
|
|
|
@ -32,7 +32,7 @@ const bfd_arch_info_type bfd_m9s12x_arch =
|
|||
"m9s12x",
|
||||
"m9s12x",
|
||||
4, /* Section alignment power. */
|
||||
TRUE,
|
||||
true,
|
||||
bfd_default_compatible,
|
||||
bfd_default_scan,
|
||||
bfd_arch_default_fill,
|
||||
|
|
|
@ -32,7 +32,7 @@ const bfd_arch_info_type bfd_m9s12xg_arch =
|
|||
"m9s12xg",
|
||||
"m9s12xg",
|
||||
4, /* Section alignment power. */
|
||||
TRUE,
|
||||
true,
|
||||
bfd_default_compatible,
|
||||
bfd_default_scan,
|
||||
bfd_arch_default_fill,
|
||||
|
|
|
@ -32,7 +32,7 @@ const bfd_arch_info_type bfd_mcore_arch =
|
|||
"MCore", /* Architecture name. */
|
||||
"MCore", /* Machine name. */
|
||||
3, /* Section align power. */
|
||||
TRUE, /* Is this the default architecture ? */
|
||||
true, /* Is this the default architecture ? */
|
||||
bfd_default_compatible, /* Architecture comparison function. */
|
||||
bfd_default_scan, /* String to architecture conversion. */
|
||||
bfd_arch_default_fill, /* Default fill. */
|
||||
|
|
|
@ -25,6 +25,6 @@
|
|||
2, def, bfd_default_compatible, bfd_default_scan, \
|
||||
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_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);
|
||||
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);
|
||||
const bfd_arch_info_type bfd_mep_arch = MA (bfd_mach_mep, "mep", true, & bfd_h1_arch);
|
||||
|
|
|
@ -33,7 +33,7 @@ const bfd_arch_info_type bfd_metag_arch =
|
|||
"metag", /* Architecture name. */
|
||||
"metag", /* Printable name. */
|
||||
4, /* Section align power. */
|
||||
TRUE, /* The default ? */
|
||||
true, /* The default ? */
|
||||
bfd_default_compatible, /* Architecture comparison fn. */
|
||||
bfd_default_scan, /* String to architecture convert fn. */
|
||||
bfd_arch_default_fill, /* Default fill. */
|
||||
|
|
|
@ -33,7 +33,7 @@ const bfd_arch_info_type bfd_microblaze_arch =
|
|||
"microblaze", /* Architecture name. */
|
||||
"MicroBlaze", /* Printable name. */
|
||||
3, /* Section align power. */
|
||||
TRUE, /* Is this the default architecture ? */
|
||||
true, /* Is this the default architecture ? */
|
||||
bfd_default_compatible, /* Architecture comparison function. */
|
||||
bfd_default_scan, /* String to architecture conversion. */
|
||||
bfd_arch_default_fill, /* Default fill. */
|
||||
|
|
|
@ -115,55 +115,55 @@ enum
|
|||
|
||||
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_mips3900, "mips:3900", FALSE, NN(I_mips3900)),
|
||||
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 (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_mips4120, "mips:4120", FALSE, NN(I_mips4120)),
|
||||
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_mips4600, "mips:4600", FALSE, NN(I_mips4600)),
|
||||
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_mips5400, "mips:5400", FALSE, NN(I_mips5400)),
|
||||
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 (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_mips8000, "mips:8000", FALSE, NN(I_mips8000)),
|
||||
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_mips12000,"mips:12000", FALSE, NN(I_mips12000)),
|
||||
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_mips16, "mips:16", FALSE, NN(I_mips16)),
|
||||
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_mipsisa32r2,"mips:isa32r2", FALSE, NN(I_mipsisa32r2)),
|
||||
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_mipsisa32r6,"mips:isa32r6", FALSE, NN(I_mipsisa32r6)),
|
||||
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_mipsisa64r3,"mips:isa64r3", FALSE, NN(I_mipsisa64r3)),
|
||||
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_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_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_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_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_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_xlr, "mips:xlr", FALSE, NN(I_xlr)),
|
||||
N (32, 32, bfd_mach_mips_interaptiv_mr2, "mips:interaptiv-mr2", FALSE,
|
||||
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 (64, 64, bfd_mach_mips4000, "mips:4000", false, NN(I_mips4000)),
|
||||
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_mips4111, "mips:4111", false, NN(I_mips4111)),
|
||||
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_mips4400, "mips:4400", false, NN(I_mips4400)),
|
||||
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_mips5000, "mips:5000", false, NN(I_mips5000)),
|
||||
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, 32, bfd_mach_mips5900, "mips:5900", false, NN(I_mips5900)),
|
||||
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_mips8000, "mips:8000", false, NN(I_mips8000)),
|
||||
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_mips12000,"mips:12000", false, NN(I_mips12000)),
|
||||
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_mips16, "mips:16", false, NN(I_mips16)),
|
||||
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_mipsisa32r2,"mips:isa32r2", false, NN(I_mipsisa32r2)),
|
||||
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_mipsisa32r6,"mips:isa32r6", false, NN(I_mipsisa32r6)),
|
||||
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_mipsisa64r3,"mips:isa64r3", false, NN(I_mipsisa64r3)),
|
||||
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_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_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_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_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_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_xlr, "mips:xlr", false, NN(I_xlr)),
|
||||
N (32, 32, bfd_mach_mips_interaptiv_mr2, "mips:interaptiv-mr2", false,
|
||||
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
|
||||
|
@ -171,4 +171,4 @@ static const bfd_arch_info_type arch_info_struct[] =
|
|||
of mips, and an explicit setting of mips:3000. */
|
||||
|
||||
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]);
|
||||
|
|
|
@ -35,7 +35,7 @@ bfd_mmix_arch =
|
|||
"mmix", /* Architecture name. */
|
||||
"mmix", /* Printable name. */
|
||||
3, /* Section align power. */
|
||||
TRUE, /* This is the default architecture. */
|
||||
true, /* This is the default architecture. */
|
||||
bfd_default_compatible, /* Architecture comparison function. */
|
||||
bfd_default_scan, /* String to architecture conversion. */
|
||||
bfd_arch_default_fill, /* Default fill. */
|
||||
|
|
|
@ -33,7 +33,7 @@ const bfd_arch_info_type bfd_moxie_arch =
|
|||
"moxie", /* Arch name. */
|
||||
"moxie", /* Printable name. */
|
||||
2, /* Section alignment power. */
|
||||
TRUE, /* The one and only. */
|
||||
true, /* The one and only. */
|
||||
bfd_default_compatible,
|
||||
bfd_default_scan,
|
||||
bfd_arch_default_fill,
|
||||
|
|
|
@ -62,78 +62,78 @@ compatible (const bfd_arch_info_type * a,
|
|||
static const bfd_arch_info_type arch_info_struct[] =
|
||||
{
|
||||
/* msp430x11x. */
|
||||
N (16, bfd_mach_msp11, "MSP430", FALSE, & arch_info_struct[1]),
|
||||
N (16, bfd_mach_msp11, "MSP430", false, & arch_info_struct[1]),
|
||||
|
||||
/* msp430x11x1. */
|
||||
N (16, bfd_mach_msp110, "MSP430x11x1", FALSE, & arch_info_struct[2]),
|
||||
N (16, bfd_mach_msp110, "MSP430x11x1", false, & arch_info_struct[2]),
|
||||
|
||||
/* msp430x12x. */
|
||||
N (16, bfd_mach_msp12, "MSP430x12", FALSE, & arch_info_struct[3]),
|
||||
N (16, bfd_mach_msp12, "MSP430x12", false, & arch_info_struct[3]),
|
||||
|
||||
/* msp430x13x. */
|
||||
N (16, bfd_mach_msp13, "MSP430x13", FALSE, & arch_info_struct[4]),
|
||||
N (16, bfd_mach_msp13, "MSP430x13", false, & arch_info_struct[4]),
|
||||
|
||||
/* msp430x14x. */
|
||||
N (16, bfd_mach_msp14, "MSP430x14", FALSE, & arch_info_struct[5]),
|
||||
N (16, bfd_mach_msp14, "MSP430x14", false, & arch_info_struct[5]),
|
||||
|
||||
/* msp430x15x. */
|
||||
N (16, bfd_mach_msp15, "MSP430x15", FALSE, & arch_info_struct[6]),
|
||||
N (16, bfd_mach_msp15, "MSP430x15", false, & arch_info_struct[6]),
|
||||
|
||||
/* msp430x16x. */
|
||||
N (16, bfd_mach_msp16, "MSP430x16", FALSE, & arch_info_struct[7]),
|
||||
N (16, bfd_mach_msp16, "MSP430x16", false, & arch_info_struct[7]),
|
||||
|
||||
/* msp430x20x. */
|
||||
N (16, bfd_mach_msp20, "MSP430x20", FALSE, & arch_info_struct[8]),
|
||||
N (16, bfd_mach_msp20, "MSP430x20", false, & arch_info_struct[8]),
|
||||
|
||||
/* msp430x21x. */
|
||||
N (16, bfd_mach_msp21, "MSP430x21", FALSE, & arch_info_struct[9]),
|
||||
N (16, bfd_mach_msp21, "MSP430x21", false, & arch_info_struct[9]),
|
||||
|
||||
/* msp430x22x. */
|
||||
N (16, bfd_mach_msp22, "MSP430x22", FALSE, & arch_info_struct[10]),
|
||||
N (16, bfd_mach_msp22, "MSP430x22", false, & arch_info_struct[10]),
|
||||
|
||||
/* msp430x23x. */
|
||||
N (16, bfd_mach_msp23, "MSP430x23", FALSE, & arch_info_struct[11]),
|
||||
N (16, bfd_mach_msp23, "MSP430x23", false, & arch_info_struct[11]),
|
||||
|
||||
/* msp430x24x. */
|
||||
N (16, bfd_mach_msp24, "MSP430x24", FALSE, & arch_info_struct[12]),
|
||||
N (16, bfd_mach_msp24, "MSP430x24", false, & arch_info_struct[12]),
|
||||
|
||||
/* msp430x26x. */
|
||||
N (16, bfd_mach_msp26, "MSP430x26", FALSE, & arch_info_struct[13]),
|
||||
N (16, bfd_mach_msp26, "MSP430x26", false, & arch_info_struct[13]),
|
||||
|
||||
/* msp430x31x. */
|
||||
N (16, bfd_mach_msp31, "MSP430x31", FALSE, & arch_info_struct[14]),
|
||||
N (16, bfd_mach_msp31, "MSP430x31", false, & arch_info_struct[14]),
|
||||
|
||||
/* msp430x32x. */
|
||||
N (16, bfd_mach_msp32, "MSP430x32", FALSE, & arch_info_struct[15]),
|
||||
N (16, bfd_mach_msp32, "MSP430x32", false, & arch_info_struct[15]),
|
||||
|
||||
/* msp430x33x. */
|
||||
N (16, bfd_mach_msp33, "MSP430x33", FALSE, & arch_info_struct[16]),
|
||||
N (16, bfd_mach_msp33, "MSP430x33", false, & arch_info_struct[16]),
|
||||
|
||||
/* msp430x41x. */
|
||||
N (16, bfd_mach_msp41, "MSP430x41", FALSE, & arch_info_struct[17]),
|
||||
N (16, bfd_mach_msp41, "MSP430x41", false, & arch_info_struct[17]),
|
||||
|
||||
/* msp430x42x. */
|
||||
N (16, bfd_mach_msp42, "MSP430x42", FALSE, & arch_info_struct[18]),
|
||||
N (16, bfd_mach_msp42, "MSP430x42", false, & arch_info_struct[18]),
|
||||
|
||||
/* msp430x43x. */
|
||||
N (16, bfd_mach_msp43, "MSP430x43", FALSE, & arch_info_struct[19]),
|
||||
N (16, bfd_mach_msp43, "MSP430x43", false, & arch_info_struct[19]),
|
||||
|
||||
/* msp430x44x. */
|
||||
N (16, bfd_mach_msp43, "MSP430x44", FALSE, & arch_info_struct[20]),
|
||||
N (16, bfd_mach_msp43, "MSP430x44", false, & arch_info_struct[20]),
|
||||
|
||||
/* msp430x46x. */
|
||||
N (16, bfd_mach_msp46, "MSP430x46", FALSE, & arch_info_struct[21]),
|
||||
N (16, bfd_mach_msp46, "MSP430x46", false, & arch_info_struct[21]),
|
||||
|
||||
/* msp430x47x. */
|
||||
N (16, bfd_mach_msp47, "MSP430x47", FALSE, & arch_info_struct[22]),
|
||||
N (16, bfd_mach_msp47, "MSP430x47", false, & arch_info_struct[22]),
|
||||
|
||||
/* 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 =
|
||||
N (16, bfd_mach_msp14, "msp:14", TRUE, & arch_info_struct[0]);
|
||||
N (16, bfd_mach_msp14, "msp:14", true, & arch_info_struct[0]);
|
||||
|
||||
|
|
|
@ -42,11 +42,11 @@
|
|||
|
||||
const bfd_arch_info_type arch_info_struct[2] =
|
||||
{
|
||||
N (bfd_mach_mrisc2, "ms1-003", FALSE, arch_info_struct + 1),
|
||||
N (bfd_mach_ms2, "ms2", FALSE, NULL)
|
||||
N (bfd_mach_mrisc2, "ms1-003", false, arch_info_struct + 1),
|
||||
N (bfd_mach_ms2, "ms2", false, NULL)
|
||||
};
|
||||
|
||||
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);
|
||||
|
||||
|
||||
|
|
|
@ -35,11 +35,11 @@
|
|||
|
||||
static const bfd_arch_info_type arch_info_struct[] =
|
||||
{
|
||||
N (bfd_mach_n1h, "n1h", FALSE, NDS32V2_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_v3m, "n1h_v3m", FALSE, NULL),
|
||||
N (bfd_mach_n1h, "n1h", false, NDS32V2_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_v3m, "n1h_v3m", false, NULL),
|
||||
};
|
||||
|
||||
const bfd_arch_info_type bfd_nds32_arch =
|
||||
N (bfd_mach_n1, "n1h", TRUE, NEXT);
|
||||
N (bfd_mach_n1, "n1h", true, NEXT);
|
||||
|
|
|
@ -55,7 +55,7 @@ bfd_nfp_compatible (const bfd_arch_info_type * a,
|
|||
}
|
||||
|
||||
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 =
|
||||
N (bfd_mach_nfp6000, "NFP-6xxx", TRUE, &arch_info_struct);
|
||||
N (bfd_mach_nfp6000, "NFP-6xxx", true, &arch_info_struct);
|
||||
|
|
|
@ -67,9 +67,9 @@ nios2_compatible (const bfd_arch_info_type *a,
|
|||
|
||||
static const bfd_arch_info_type arch_info_struct[2] =
|
||||
{
|
||||
N (bfd_mach_nios2r1, "nios2:r1", FALSE, NIOS2R2_NEXT),
|
||||
N (bfd_mach_nios2r2, "nios2:r2", FALSE, NULL),
|
||||
N (bfd_mach_nios2r1, "nios2:r1", false, NIOS2R2_NEXT),
|
||||
N (bfd_mach_nios2r2, "nios2:r2", false, NULL),
|
||||
};
|
||||
|
||||
const bfd_arch_info_type bfd_nios2_arch =
|
||||
N (bfd_mach_nios2, "nios2", TRUE, NIOS2R1_NEXT);
|
||||
N (bfd_mach_nios2, "nios2", true, NIOS2R1_NEXT);
|
||||
|
|
|
@ -31,11 +31,11 @@
|
|||
|
||||
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 =
|
||||
N (32032, "ns32k:32032", FALSE, &arch_info_struct[0]);
|
||||
N (32032, "ns32k:32032", false, &arch_info_struct[0]);
|
||||
|
||||
bfd_vma
|
||||
_bfd_ns32k_get_displacement (bfd_byte *buffer, int size)
|
||||
|
@ -572,7 +572,7 @@ _bfd_do_ns32k_reloc_contents (reloc_howto_type *howto,
|
|||
{
|
||||
int size;
|
||||
bfd_vma x;
|
||||
bfd_boolean overflow;
|
||||
bool overflow;
|
||||
|
||||
if (howto->negate)
|
||||
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
|
||||
operation, which would be tedious, or we must do the computations
|
||||
in a type larger than bfd_vma, which would be inefficient. */
|
||||
overflow = FALSE;
|
||||
overflow = false;
|
||||
if (howto->complain_on_overflow != complain_overflow_dont)
|
||||
{
|
||||
bfd_vma check;
|
||||
|
@ -674,7 +674,7 @@ _bfd_do_ns32k_reloc_contents (reloc_howto_type *howto,
|
|||
|
||||
if (signed_check > reloc_signed_max
|
||||
|| signed_check < reloc_signed_min)
|
||||
overflow = TRUE;
|
||||
overflow = true;
|
||||
}
|
||||
break;
|
||||
case complain_overflow_unsigned:
|
||||
|
@ -686,7 +686,7 @@ _bfd_do_ns32k_reloc_contents (reloc_howto_type *howto,
|
|||
(((1 << (howto->bitsize - 1)) - 1) << 1) | 1;
|
||||
|
||||
if (check > reloc_unsigned_max)
|
||||
overflow = TRUE;
|
||||
overflow = true;
|
||||
}
|
||||
break;
|
||||
case complain_overflow_bitfield:
|
||||
|
@ -699,7 +699,7 @@ _bfd_do_ns32k_reloc_contents (reloc_howto_type *howto,
|
|||
if ((check & ~reloc_bits) != 0
|
||||
&& (((bfd_vma) signed_check & ~reloc_bits)
|
||||
!= (-(bfd_vma) 1 & ~reloc_bits)))
|
||||
overflow = TRUE;
|
||||
overflow = true;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
|
||||
|
||||
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 =
|
||||
N (bfd_mach_or1k, "or1k", TRUE, &bfd_or1knd_arch);
|
||||
N (bfd_mach_or1k, "or1k", true, &bfd_or1knd_arch);
|
||||
|
|
|
@ -32,7 +32,7 @@ const bfd_arch_info_type bfd_pdp11_arch =
|
|||
"pdp11",
|
||||
"pdp11",
|
||||
1, /* Alignment = 16 bit. */
|
||||
TRUE, /* The one and only. */
|
||||
true, /* The one and only. */
|
||||
bfd_default_compatible,
|
||||
bfd_default_scan,
|
||||
bfd_arch_default_fill,
|
||||
|
|
|
@ -33,7 +33,7 @@ const bfd_arch_info_type bfd_pj_arch =
|
|||
"pj", /* Arch_name. */
|
||||
"pj", /* Printable name. */
|
||||
1,
|
||||
TRUE, /* The default machine. */
|
||||
true, /* The default machine. */
|
||||
bfd_default_compatible,
|
||||
bfd_default_scan,
|
||||
bfd_arch_default_fill,
|
||||
|
|
|
@ -54,8 +54,8 @@ powerpc_compatible (const bfd_arch_info_type *a,
|
|||
|
||||
static void *
|
||||
bfd_arch_ppc_nop_fill (bfd_size_type count,
|
||||
bfd_boolean is_bigendian,
|
||||
bfd_boolean code)
|
||||
bool is_bigendian,
|
||||
bool code)
|
||||
{
|
||||
bfd_byte *fill;
|
||||
|
||||
|
@ -107,34 +107,34 @@ const bfd_arch_info_type bfd_powerpc_archs[] =
|
|||
{
|
||||
#if BFD_DEFAULT_TARGET_SIZE == 64
|
||||
/* 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
|
||||
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
|
||||
/* 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
|
||||
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
|
||||
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_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_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_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_rs64ii, "powerpc:rs64ii", FALSE, bfd_powerpc_archs + 11),
|
||||
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_e500, "powerpc:e500", FALSE, bfd_powerpc_archs + 14),
|
||||
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 (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_titan, "powerpc:titan", FALSE, bfd_powerpc_archs + 19),
|
||||
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_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_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_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_rs64ii, "powerpc:rs64ii", false, bfd_powerpc_archs + 11),
|
||||
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_e500, "powerpc:e500", false, bfd_powerpc_archs + 14),
|
||||
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 (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_titan, "powerpc:titan", false, bfd_powerpc_archs + 19),
|
||||
|
||||
{
|
||||
16, /* Bits in a word. */
|
||||
|
@ -145,7 +145,7 @@ const bfd_arch_info_type bfd_powerpc_archs[] =
|
|||
"powerpc",
|
||||
"powerpc:vle",
|
||||
3,
|
||||
FALSE, /* Not the default. */
|
||||
false, /* Not the default. */
|
||||
powerpc_compatible,
|
||||
bfd_default_scan,
|
||||
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. */
|
||||
},
|
||||
|
||||
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_e5500, "powerpc:e5500", false, bfd_powerpc_archs + 21),
|
||||
N (64, bfd_mach_ppc_e6500, "powerpc:e6500", false, NULL)
|
||||
};
|
||||
|
|
|
@ -41,4 +41,4 @@
|
|||
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);
|
||||
|
|
|
@ -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. */
|
||||
|
||||
static bfd_boolean
|
||||
static bool
|
||||
riscv_scan (const struct bfd_arch_info *info, const char *string)
|
||||
{
|
||||
if (bfd_default_scan (info, string))
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
/* 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
|
||||
|
@ -59,9 +59,9 @@ riscv_scan (const struct bfd_arch_info *info, const char *string)
|
|||
if (!info->the_default
|
||||
&& strncasecmp (string, info->printable_name,
|
||||
strlen (info->printable_name)) == 0)
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
#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). */
|
||||
static const bfd_arch_info_type arch_info_struct[] =
|
||||
{
|
||||
N (64, bfd_mach_riscv64, "riscv:rv64", FALSE, NN (I_riscv64)),
|
||||
N (32, bfd_mach_riscv32, "riscv:rv32", FALSE, NULL)
|
||||
N (64, bfd_mach_riscv64, "riscv:rv64", false, NN (I_riscv64)),
|
||||
N (32, bfd_mach_riscv32, "riscv:rv32", false, NULL)
|
||||
};
|
||||
|
||||
/* The default architecture is riscv:rv64. */
|
||||
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. */
|
||||
const struct riscv_spec riscv_isa_specs[] =
|
||||
|
|
|
@ -32,7 +32,7 @@ const bfd_arch_info_type bfd_rl78_arch =
|
|||
"rl78", /* Architecture name. */
|
||||
"rl78", /* Printable name. */
|
||||
4, /* Section align power. */
|
||||
TRUE, /* The default ? */
|
||||
true, /* The default ? */
|
||||
bfd_default_compatible, /* Architecture comparison fn. */
|
||||
bfd_default_scan, /* String to architecture convert fn. */
|
||||
bfd_arch_default_fill, /* Default fill. */
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue