aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-avr.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2021-03-31 10:30:54 +1030
committerAlan Modra <amodra@gmail.com>2021-03-31 10:49:23 +1030
commit0a1b45a20eaa98d4d9026dc1fd17e79e741183af (patch)
tree059b2b296b4d60784a82cd6a52dae47dcac4d66a /bfd/elf32-avr.c
parentfaa7a26040c617a6d29f601998b99a1da882c672 (diff)
downloadgdb-0a1b45a20eaa98d4d9026dc1fd17e79e741183af.zip
gdb-0a1b45a20eaa98d4d9026dc1fd17e79e741183af.tar.gz
gdb-0a1b45a20eaa98d4d9026dc1fd17e79e741183af.tar.bz2
Use bool in bfd
* sysdep.h: POISON_BFD_BOOLEAN: Define. * aix5ppc-core.c, * aout-cris.c, * aout-ns32k.c, * aout-target.h, * aoutx.h, * arc-got.h, * archive.c, * archive64.c, * archures.c, * bfd-in.h, * bfd.c, * bfdwin.c, * binary.c, * cache.c, * coff-alpha.c, * coff-arm.c, * coff-arm.h, * coff-bfd.c, * coff-bfd.h, * coff-go32.c, * coff-i386.c, * coff-ia64.c, * coff-mcore.c, * coff-mips.c, * coff-rs6000.c, * coff-sh.c, * coff-stgo32.c, * coff-tic30.c, * coff-tic4x.c, * coff-tic54x.c, * coff-x86_64.c, * coff-z80.c, * coff-z8k.c, * coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c, * compress.c, * corefile.c, * cpu-aarch64.c, * cpu-aarch64.h, * cpu-alpha.c, * cpu-arc.c, * cpu-arm.c, * cpu-arm.h, * cpu-avr.c, * cpu-bfin.c, * cpu-bpf.c, * cpu-cr16.c, * cpu-cris.c, * cpu-crx.c, * cpu-csky.c, * cpu-d10v.c, * cpu-d30v.c, * cpu-dlx.c, * cpu-epiphany.c, * cpu-fr30.c, * cpu-frv.c, * cpu-ft32.c, * cpu-h8300.c, * cpu-hppa.c, * cpu-i386.c, * cpu-ia64.c, * cpu-iamcu.c, * cpu-ip2k.c, * cpu-iq2000.c, * cpu-k1om.c, * cpu-l1om.c, * cpu-lm32.c, * cpu-m10200.c, * cpu-m10300.c, * cpu-m32c.c, * cpu-m32r.c, * cpu-m68hc11.c, * cpu-m68hc12.c, * cpu-m68k.c, * cpu-m9s12x.c, * cpu-m9s12xg.c, * cpu-mcore.c, * cpu-mep.c, * cpu-metag.c, * cpu-microblaze.c, * cpu-mips.c, * cpu-mmix.c, * cpu-moxie.c, * cpu-msp430.c, * cpu-mt.c, * cpu-nds32.c, * cpu-nfp.c, * cpu-nios2.c, * cpu-ns32k.c, * cpu-or1k.c, * cpu-pdp11.c, * cpu-pj.c, * cpu-powerpc.c, * cpu-pru.c, * cpu-riscv.c, * cpu-rl78.c, * cpu-rs6000.c, * cpu-rx.c, * cpu-s12z.c, * cpu-s390.c, * cpu-score.c, * cpu-sh.c, * cpu-sparc.c, * cpu-spu.c, * cpu-tic30.c, * cpu-tic4x.c, * cpu-tic54x.c, * cpu-tic6x.c, * cpu-tilegx.c, * cpu-tilepro.c, * cpu-v850.c, * cpu-v850_rh850.c, * cpu-vax.c, * cpu-visium.c, * cpu-wasm32.c, * cpu-xc16x.c, * cpu-xgate.c, * cpu-xstormy16.c, * cpu-xtensa.c, * cpu-z80.c, * cpu-z8k.c, * dwarf1.c, * dwarf2.c, * ecoff-bfd.h, * ecoff.c, * ecofflink.c, * elf-attrs.c, * elf-bfd.h, * elf-eh-frame.c, * elf-hppa.h, * elf-ifunc.c, * elf-m10200.c, * elf-m10300.c, * elf-nacl.c, * elf-nacl.h, * elf-properties.c, * elf-s390-common.c, * elf-s390.h, * elf-strtab.c, * elf-vxworks.c, * elf-vxworks.h, * elf.c, * elf32-am33lin.c, * elf32-arc.c, * elf32-arm.c, * elf32-arm.h, * elf32-avr.c, * elf32-avr.h, * elf32-bfin.c, * elf32-bfin.h, * elf32-cr16.c, * elf32-cr16.h, * elf32-cris.c, * elf32-crx.c, * elf32-csky.c, * elf32-csky.h, * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c, * elf32-ft32.c, * elf32-gen.c, * elf32-h8300.c, * elf32-hppa.c, * elf32-hppa.h, * elf32-i386.c, * elf32-ip2k.c, * elf32-iq2000.c, * elf32-lm32.c, * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c, * elf32-m68hc1x.c, * elf32-m68hc1x.h, * elf32-m68k.c, * elf32-m68k.h, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c, * elf32-metag.h, * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-nios2.c, * elf32-nios2.h, * elf32-or1k.c, * elf32-pj.c, * elf32-ppc.c, * elf32-ppc.h, * elf32-pru.c, * elf32-rl78.c, * elf32-rx.c, * elf32-s12z.c, * elf32-s390.c, * elf32-score.c, * elf32-score.h, * elf32-score7.c, * elf32-sh-relocs.h, * elf32-sh.c, * elf32-sparc.c, * elf32-spu.c, * elf32-spu.h, * elf32-tic6x.c, * elf32-tic6x.h, * elf32-tilegx.c, * elf32-tilepro.c, * elf32-v850.c, * elf32-v850.h, * elf32-vax.c, * elf32-visium.c, * elf32-wasm32.c, * elf32-xc16x.c, * elf32-xgate.c, * elf32-xstormy16.c, * elf32-xtensa.c, * elf32-z80.c, * elf64-alpha.c, * elf64-bpf.c, * elf64-gen.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c, * elf64-nfp.c, * elf64-ppc.c, * elf64-ppc.h, * elf64-s390.c, * elf64-sparc.c, * elf64-tilegx.c, * elf64-x86-64.c, * elfcode.h, * elfcore.h, * elflink.c, * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-aarch64.c, * elfxx-aarch64.h, * elfxx-ia64.c, * elfxx-ia64.h, * elfxx-mips.c, * elfxx-mips.h, * elfxx-riscv.c, * elfxx-riscv.h, * elfxx-sparc.c, * elfxx-sparc.h, * elfxx-target.h, * elfxx-tilegx.c, * elfxx-tilegx.h, * elfxx-x86.c, * elfxx-x86.h, * format.c, * genlink.h, * hash.c, * i386aout.c, * i386lynx.c, * i386msdos.c, * ihex.c, * libaout.h, * libbfd-in.h, * libbfd.c, * libcoff-in.h, * libecoff.h, * libpei.h, * libxcoff.h, * linker.c, * mach-o-aarch64.c, * mach-o-arm.c, * mach-o-i386.c, * mach-o-x86-64.c, * mach-o.c, * mach-o.h, * merge.c, * mmo.c, * netbsd.h, * opncls.c, * pc532-mach.c, * pdp11.c, * pe-arm.c, * pe-i386.c, * pe-mcore.c, * pe-sh.c, * pe-x86_64.c, * peXXigen.c, * pef.c, * pei-arm.c, * pei-i386.c, * pei-ia64.c, * pei-mcore.c, * pei-sh.c, * pei-x86_64.c, * peicode.h, * plugin.c, * plugin.h, * ppcboot.c, * reloc.c, * reloc16.c, * rs6000-core.c, * section.c, * simple.c, * som.c, * som.h, * srec.c, * stabs.c, * syms.c, * targets.c, * tekhex.c, * verilog.c, * vms-alpha.c, * vms-lib.c, * vms-misc.c, * vms.h, * wasm-module.c, * xcofflink.c, * xcofflink.h, * xsym.c, * xsym.h: Replace bfd_boolean with bool, FALSE with false, and TRUE with true throughout. * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. * libcoff.h: Regenerate.
Diffstat (limited to 'bfd/elf32-avr.c')
-rw-r--r--bfd/elf32-avr.c437
1 files changed, 217 insertions, 220 deletions
diff --git a/bfd/elf32-avr.c b/bfd/elf32-avr.c
index 79de45d..4d1ab54 100644
--- a/bfd/elf32-avr.c
+++ b/bfd/elf32-avr.c
@@ -27,10 +27,10 @@
#include "elf32-avr.h"
/* Enable debugging printout at stdout with this variable. */
-static bfd_boolean debug_relax = FALSE;
+static bool debug_relax = false;
/* Enable debugging printout at stdout with this variable. */
-static bfd_boolean debug_stubs = FALSE;
+static bool debug_stubs = false;
static bfd_reloc_status_type
bfd_elf_avr_diff_reloc (bfd *, arelent *, asymbol *, void *,
@@ -62,7 +62,7 @@ struct elf32_avr_stub_hash_entry
bfd_vma target_value;
/* This way we could mark stubs to be no longer necessary. */
- bfd_boolean is_actually_needed;
+ bool is_actually_needed;
};
struct elf32_avr_link_hash_table
@@ -73,7 +73,7 @@ struct elf32_avr_link_hash_table
/* The stub hash table. */
struct bfd_hash_table bstab;
- bfd_boolean no_stubs;
+ bool no_stubs;
/* Linker stub bfd. */
bfd *stub_bfd;
@@ -123,74 +123,74 @@ static reloc_howto_type elf_avr_howto_table[] =
0, /* rightshift */
3, /* size (0 = byte, 1 = short, 2 = long) */
0, /* bitsize */
- FALSE, /* pc_relative */
+ false, /* pc_relative */
0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_AVR_NONE", /* name */
- FALSE, /* partial_inplace */
+ false, /* partial_inplace */
0, /* src_mask */
0, /* dst_mask */
- FALSE), /* pcrel_offset */
+ false), /* pcrel_offset */
HOWTO (R_AVR_32, /* 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 */
bfd_elf_generic_reloc, /* special_function */
"R_AVR_32", /* name */
- FALSE, /* partial_inplace */
+ false, /* partial_inplace */
0xffffffff, /* src_mask */
0xffffffff, /* dst_mask */
- FALSE), /* pcrel_offset */
+ false), /* pcrel_offset */
/* A 7 bit PC relative relocation. */
HOWTO (R_AVR_7_PCREL, /* type */
1, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */
7, /* bitsize */
- TRUE, /* pc_relative */
+ true, /* pc_relative */
3, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_AVR_7_PCREL", /* name */
- FALSE, /* partial_inplace */
+ false, /* partial_inplace */
0xffff, /* src_mask */
0xffff, /* dst_mask */
- TRUE), /* pcrel_offset */
+ true), /* pcrel_offset */
/* A 13 bit PC relative relocation. */
HOWTO (R_AVR_13_PCREL, /* type */
1, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */
13, /* bitsize */
- TRUE, /* pc_relative */
+ true, /* pc_relative */
0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_AVR_13_PCREL", /* name */
- FALSE, /* partial_inplace */
+ false, /* partial_inplace */
0xfff, /* src_mask */
0xfff, /* dst_mask */
- TRUE), /* pcrel_offset */
+ true), /* pcrel_offset */
/* A 16 bit absolute relocation. */
HOWTO (R_AVR_16, /* type */
0, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */
16, /* bitsize */
- FALSE, /* pc_relative */
+ false, /* pc_relative */
0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_AVR_16", /* name */
- FALSE, /* partial_inplace */
+ false, /* partial_inplace */
0xffff, /* src_mask */
0xffff, /* dst_mask */
- FALSE), /* pcrel_offset */
+ false), /* pcrel_offset */
/* A 16 bit absolute relocation for command address
Will be changed when linker stubs are needed. */
@@ -198,45 +198,45 @@ static reloc_howto_type elf_avr_howto_table[] =
1, /* 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 */
bfd_elf_generic_reloc, /* special_function */
"R_AVR_16_PM", /* name */
- FALSE, /* partial_inplace */
+ false, /* partial_inplace */
0xffff, /* src_mask */
0xffff, /* dst_mask */
- FALSE), /* pcrel_offset */
+ false), /* pcrel_offset */
/* A low 8 bit absolute relocation of 16 bit address.
For LDI command. */
HOWTO (R_AVR_LO8_LDI, /* type */
0, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */
8, /* bitsize */
- FALSE, /* pc_relative */
+ false, /* pc_relative */
0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_AVR_LO8_LDI", /* name */
- FALSE, /* partial_inplace */
+ false, /* partial_inplace */
0xffff, /* src_mask */
0xffff, /* dst_mask */
- FALSE), /* pcrel_offset */
+ false), /* pcrel_offset */
/* A high 8 bit absolute relocation of 16 bit address.
For LDI command. */
HOWTO (R_AVR_HI8_LDI, /* type */
8, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */
8, /* bitsize */
- FALSE, /* pc_relative */
+ false, /* pc_relative */
0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_AVR_HI8_LDI", /* name */
- FALSE, /* partial_inplace */
+ false, /* partial_inplace */
0xffff, /* src_mask */
0xffff, /* dst_mask */
- FALSE), /* pcrel_offset */
+ false), /* pcrel_offset */
/* A high 6 bit absolute relocation of 22 bit address.
For LDI command. As well second most significant 8 bit value of
a 32 bit link-time constant. */
@@ -244,418 +244,418 @@ static reloc_howto_type elf_avr_howto_table[] =
16, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */
8, /* bitsize */
- FALSE, /* pc_relative */
+ false, /* pc_relative */
0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_AVR_HH8_LDI", /* name */
- FALSE, /* partial_inplace */
+ false, /* partial_inplace */
0xffff, /* src_mask */
0xffff, /* dst_mask */
- FALSE), /* pcrel_offset */
+ false), /* pcrel_offset */
/* A negative low 8 bit absolute relocation of 16 bit address.
For LDI command. */
HOWTO (R_AVR_LO8_LDI_NEG, /* type */
0, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */
8, /* bitsize */
- FALSE, /* pc_relative */
+ false, /* pc_relative */
0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_AVR_LO8_LDI_NEG", /* name */
- FALSE, /* partial_inplace */
+ false, /* partial_inplace */
0xffff, /* src_mask */
0xffff, /* dst_mask */
- FALSE), /* pcrel_offset */
+ false), /* pcrel_offset */
/* A negative high 8 bit absolute relocation of 16 bit address.
For LDI command. */
HOWTO (R_AVR_HI8_LDI_NEG, /* type */
8, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */
8, /* bitsize */
- FALSE, /* pc_relative */
+ false, /* pc_relative */
0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_AVR_HI8_LDI_NEG", /* name */
- FALSE, /* partial_inplace */
+ false, /* partial_inplace */
0xffff, /* src_mask */
0xffff, /* dst_mask */
- FALSE), /* pcrel_offset */
+ false), /* pcrel_offset */
/* A negative high 6 bit absolute relocation of 22 bit address.
For LDI command. */
HOWTO (R_AVR_HH8_LDI_NEG, /* type */
16, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */
8, /* bitsize */
- FALSE, /* pc_relative */
+ false, /* pc_relative */
0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_AVR_HH8_LDI_NEG", /* name */
- FALSE, /* partial_inplace */
+ false, /* partial_inplace */
0xffff, /* src_mask */
0xffff, /* dst_mask */
- FALSE), /* pcrel_offset */
+ false), /* pcrel_offset */
/* A low 8 bit absolute relocation of 24 bit program memory address.
For LDI command. Will not be changed when linker stubs are needed. */
HOWTO (R_AVR_LO8_LDI_PM, /* type */
1, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */
8, /* bitsize */
- FALSE, /* pc_relative */
+ false, /* pc_relative */
0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_AVR_LO8_LDI_PM", /* name */
- FALSE, /* partial_inplace */
+ false, /* partial_inplace */
0xffff, /* src_mask */
0xffff, /* dst_mask */
- FALSE), /* pcrel_offset */
+ false), /* pcrel_offset */
/* A low 8 bit absolute relocation of 24 bit program memory address.
For LDI command. Will not be changed when linker stubs are needed. */
HOWTO (R_AVR_HI8_LDI_PM, /* type */
9, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */
8, /* bitsize */
- FALSE, /* pc_relative */
+ false, /* pc_relative */
0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_AVR_HI8_LDI_PM", /* name */
- FALSE, /* partial_inplace */
+ false, /* partial_inplace */
0xffff, /* src_mask */
0xffff, /* dst_mask */
- FALSE), /* pcrel_offset */
+ false), /* pcrel_offset */
/* A low 8 bit absolute relocation of 24 bit program memory address.
For LDI command. Will not be changed when linker stubs are needed. */
HOWTO (R_AVR_HH8_LDI_PM, /* type */
17, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */
8, /* bitsize */
- FALSE, /* pc_relative */
+ false, /* pc_relative */
0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_AVR_HH8_LDI_PM", /* name */
- FALSE, /* partial_inplace */
+ false, /* partial_inplace */
0xffff, /* src_mask */
0xffff, /* dst_mask */
- FALSE), /* pcrel_offset */
+ false), /* pcrel_offset */
/* A low 8 bit absolute relocation of 24 bit program memory address.
For LDI command. Will not be changed when linker stubs are needed. */
HOWTO (R_AVR_LO8_LDI_PM_NEG, /* type */
1, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */
8, /* bitsize */
- FALSE, /* pc_relative */
+ false, /* pc_relative */
0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_AVR_LO8_LDI_PM_NEG", /* name */
- FALSE, /* partial_inplace */
+ false, /* partial_inplace */
0xffff, /* src_mask */
0xffff, /* dst_mask */
- FALSE), /* pcrel_offset */
+ false), /* pcrel_offset */
/* A low 8 bit absolute relocation of 24 bit program memory address.
For LDI command. Will not be changed when linker stubs are needed. */
HOWTO (R_AVR_HI8_LDI_PM_NEG, /* type */
9, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */
8, /* bitsize */
- FALSE, /* pc_relative */
+ false, /* pc_relative */
0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_AVR_HI8_LDI_PM_NEG", /* name */
- FALSE, /* partial_inplace */
+ false, /* partial_inplace */
0xffff, /* src_mask */
0xffff, /* dst_mask */
- FALSE), /* pcrel_offset */
+ false), /* pcrel_offset */
/* A low 8 bit absolute relocation of 24 bit program memory address.
For LDI command. Will not be changed when linker stubs are needed. */
HOWTO (R_AVR_HH8_LDI_PM_NEG, /* type */
17, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */
8, /* bitsize */
- FALSE, /* pc_relative */
+ false, /* pc_relative */
0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_AVR_HH8_LDI_PM_NEG", /* name */
- FALSE, /* partial_inplace */
+ false, /* partial_inplace */
0xffff, /* src_mask */
0xffff, /* dst_mask */
- FALSE), /* pcrel_offset */
+ false), /* pcrel_offset */
/* Relocation for CALL command in ATmega. */
HOWTO (R_AVR_CALL, /* type */
1, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
23, /* bitsize */
- FALSE, /* pc_relative */
+ false, /* pc_relative */
0, /* bitpos */
complain_overflow_dont,/* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_AVR_CALL", /* name */
- FALSE, /* partial_inplace */
+ false, /* partial_inplace */
0xffffffff, /* src_mask */
0xffffffff, /* dst_mask */
- FALSE), /* pcrel_offset */
+ false), /* pcrel_offset */
/* A 16 bit absolute relocation of 16 bit address.
For LDI command. */
HOWTO (R_AVR_LDI, /* type */
0, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */
16, /* bitsize */
- FALSE, /* pc_relative */
+ false, /* pc_relative */
0, /* bitpos */
complain_overflow_dont,/* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_AVR_LDI", /* name */
- FALSE, /* partial_inplace */
+ false, /* partial_inplace */
0xffff, /* src_mask */
0xffff, /* dst_mask */
- FALSE), /* pcrel_offset */
+ false), /* pcrel_offset */
/* A 6 bit absolute relocation of 6 bit offset.
For ldd/sdd command. */
HOWTO (R_AVR_6, /* type */
0, /* rightshift */
0, /* size (0 = byte, 1 = short, 2 = long) */
6, /* bitsize */
- FALSE, /* pc_relative */
+ false, /* pc_relative */
0, /* bitpos */
complain_overflow_dont,/* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_AVR_6", /* name */
- FALSE, /* partial_inplace */
+ false, /* partial_inplace */
0xffff, /* src_mask */
0xffff, /* dst_mask */
- FALSE), /* pcrel_offset */
+ false), /* pcrel_offset */
/* A 6 bit absolute relocation of 6 bit offset.
For sbiw/adiw command. */
HOWTO (R_AVR_6_ADIW, /* type */
0, /* rightshift */
0, /* size (0 = byte, 1 = short, 2 = long) */
6, /* bitsize */
- FALSE, /* pc_relative */
+ false, /* pc_relative */
0, /* bitpos */
complain_overflow_dont,/* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_AVR_6_ADIW", /* name */
- FALSE, /* partial_inplace */
+ false, /* partial_inplace */
0xffff, /* src_mask */
0xffff, /* dst_mask */
- FALSE), /* pcrel_offset */
+ false), /* pcrel_offset */
/* Most significant 8 bit value of a 32 bit link-time constant. */
HOWTO (R_AVR_MS8_LDI, /* type */
24, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */
8, /* bitsize */
- FALSE, /* pc_relative */
+ false, /* pc_relative */
0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_AVR_MS8_LDI", /* name */
- FALSE, /* partial_inplace */
+ false, /* partial_inplace */
0xffff, /* src_mask */
0xffff, /* dst_mask */
- FALSE), /* pcrel_offset */
+ false), /* pcrel_offset */
/* Negative most significant 8 bit value of a 32 bit link-time constant. */
HOWTO (R_AVR_MS8_LDI_NEG, /* type */
24, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */
8, /* bitsize */
- FALSE, /* pc_relative */
+ false, /* pc_relative */
0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_AVR_MS8_LDI_NEG", /* name */
- FALSE, /* partial_inplace */
+ false, /* partial_inplace */
0xffff, /* src_mask */
0xffff, /* dst_mask */
- FALSE), /* pcrel_offset */
+ false), /* pcrel_offset */
/* A low 8 bit absolute relocation of 24 bit program memory address.
For LDI command. Will be changed when linker stubs are needed. */
HOWTO (R_AVR_LO8_LDI_GS, /* type */
1, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */
8, /* bitsize */
- FALSE, /* pc_relative */
+ false, /* pc_relative */
0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_AVR_LO8_LDI_GS", /* name */
- FALSE, /* partial_inplace */
+ false, /* partial_inplace */
0xffff, /* src_mask */
0xffff, /* dst_mask */
- FALSE), /* pcrel_offset */
+ false), /* pcrel_offset */
/* A low 8 bit absolute relocation of 24 bit program memory address.
For LDI command. Will be changed when linker stubs are needed. */
HOWTO (R_AVR_HI8_LDI_GS, /* type */
9, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */
8, /* bitsize */
- FALSE, /* pc_relative */
+ false, /* pc_relative */
0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_AVR_HI8_LDI_GS", /* name */
- FALSE, /* partial_inplace */
+ false, /* partial_inplace */
0xffff, /* src_mask */
0xffff, /* dst_mask */
- FALSE), /* pcrel_offset */
+ false), /* pcrel_offset */
/* 8 bit offset. */
HOWTO (R_AVR_8, /* 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 */
bfd_elf_generic_reloc, /* special_function */
"R_AVR_8", /* name */
- FALSE, /* partial_inplace */
+ false, /* partial_inplace */
0x000000ff, /* src_mask */
0x000000ff, /* dst_mask */
- FALSE), /* pcrel_offset */
+ false), /* pcrel_offset */
/* lo8-part to use in .byte lo8(sym). */
HOWTO (R_AVR_8_LO8, /* 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 */
bfd_elf_generic_reloc, /* special_function */
"R_AVR_8_LO8", /* name */
- FALSE, /* partial_inplace */
+ false, /* partial_inplace */
0xffffff, /* src_mask */
0xffffff, /* dst_mask */
- FALSE), /* pcrel_offset */
+ false), /* pcrel_offset */
/* hi8-part to use in .byte hi8(sym). */
HOWTO (R_AVR_8_HI8, /* 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 */
bfd_elf_generic_reloc, /* special_function */
"R_AVR_8_HI8", /* name */
- FALSE, /* partial_inplace */
+ false, /* partial_inplace */
0xffffff, /* src_mask */
0xffffff, /* dst_mask */
- FALSE), /* pcrel_offset */
+ false), /* pcrel_offset */
/* hlo8-part to use in .byte hlo8(sym). */
HOWTO (R_AVR_8_HLO8, /* 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 */
bfd_elf_generic_reloc, /* special_function */
"R_AVR_8_HLO8", /* name */
- FALSE, /* partial_inplace */
+ false, /* partial_inplace */
0xffffff, /* src_mask */
0xffffff, /* dst_mask */
- FALSE), /* pcrel_offset */
+ false), /* pcrel_offset */
HOWTO (R_AVR_DIFF8, /* 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 */
bfd_elf_avr_diff_reloc, /* special_function */
"R_AVR_DIFF8", /* name */
- FALSE, /* partial_inplace */
+ false, /* partial_inplace */
0, /* src_mask */
0xff, /* dst_mask */
- FALSE), /* pcrel_offset */
+ false), /* pcrel_offset */
HOWTO (R_AVR_DIFF16, /* 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 */
bfd_elf_avr_diff_reloc,/* special_function */
"R_AVR_DIFF16", /* name */
- FALSE, /* partial_inplace */
+ false, /* partial_inplace */
0, /* src_mask */
0xffff, /* dst_mask */
- FALSE), /* pcrel_offset */
+ false), /* pcrel_offset */
HOWTO (R_AVR_DIFF32, /* 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 */
bfd_elf_avr_diff_reloc,/* special_function */
"R_AVR_DIFF32", /* name */
- FALSE, /* partial_inplace */
+ false, /* partial_inplace */
0, /* src_mask */
0xffffffff, /* dst_mask */
- FALSE), /* pcrel_offset */
+ false), /* pcrel_offset */
/* 7 bit immediate for LDS/STS in Tiny core. */
HOWTO (R_AVR_LDS_STS_16, /* type */
0, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */
7, /* bitsize */
- FALSE, /* pc_relative */
+ false, /* pc_relative */
0, /* bitpos */
complain_overflow_dont,/* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_AVR_LDS_STS_16", /* name */
- FALSE, /* partial_inplace */
+ false, /* partial_inplace */
0xffff, /* src_mask */
0xffff, /* dst_mask */
- FALSE), /* pcrel_offset */
+ false), /* pcrel_offset */
HOWTO (R_AVR_PORT6, /* type */
0, /* rightshift */
0, /* size (0 = byte, 1 = short, 2 = long) */
6, /* bitsize */
- FALSE, /* pc_relative */
+ false, /* pc_relative */
0, /* bitpos */
complain_overflow_dont,/* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_AVR_PORT6", /* name */
- FALSE, /* partial_inplace */
+ false, /* partial_inplace */
0xffffff, /* src_mask */
0xffffff, /* dst_mask */
- FALSE), /* pcrel_offset */
+ false), /* pcrel_offset */
HOWTO (R_AVR_PORT5, /* type */
0, /* rightshift */
0, /* size (0 = byte, 1 = short, 2 = long) */
5, /* bitsize */
- FALSE, /* pc_relative */
+ false, /* pc_relative */
0, /* bitpos */
complain_overflow_dont,/* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_AVR_PORT5", /* name */
- FALSE, /* partial_inplace */
+ false, /* partial_inplace */
0xffffff, /* src_mask */
0xffffff, /* dst_mask */
- FALSE), /* pcrel_offset */
+ false), /* pcrel_offset */
/* A 32 bit PC relative relocation. */
HOWTO (R_AVR_32_PCREL, /* 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 */
bfd_elf_generic_reloc, /* special_function */
"R_AVR_32_PCREL", /* name */
- FALSE, /* partial_inplace */
+ false, /* partial_inplace */
0xffffffff, /* src_mask */
0xffffffff, /* dst_mask */
- TRUE), /* pcrel_offset */
+ true), /* pcrel_offset */
};
/* Map BFD reloc types to AVR ELF reloc types. */
@@ -761,7 +761,7 @@ struct elf_avr_section_data
/* Possibly initialise avr specific data for new section SEC from ABFD. */
-static bfd_boolean
+static bool
elf_avr_new_section_hook (bfd *abfd, asection *sec)
{
if (!sec->used_by_bfd)
@@ -771,7 +771,7 @@ elf_avr_new_section_hook (bfd *abfd, asection *sec)
sdata = bfd_zalloc (abfd, amt);
if (sdata == NULL)
- return FALSE;
+ return false;
sec->used_by_bfd = sdata;
}
@@ -948,7 +948,7 @@ bfd_elf32_bfd_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
/* Set the howto pointer for an AVR ELF reloc. */
-static bfd_boolean
+static bool
avr_info_to_howto_rela (bfd *abfd,
arelent *cache_ptr,
Elf_Internal_Rela *dst)
@@ -962,13 +962,13 @@ avr_info_to_howto_rela (bfd *abfd,
_bfd_error_handler (_("%pB: unsupported relocation type %#x"),
abfd, r_type);
bfd_set_error (bfd_error_bad_value);
- return FALSE;
+ return false;
}
cache_ptr->howto = &elf_avr_howto_table[r_type];
- return TRUE;
+ return true;
}
-static bfd_boolean
+static bool
avr_stub_is_required_for_16_bit_reloc (bfd_vma relocation)
{
return (relocation >= 0x020000);
@@ -1025,12 +1025,12 @@ avr_final_link_relocate (reloc_howto_type * howto,
struct elf32_avr_link_hash_table * htab)
{
bfd_reloc_status_type r = bfd_reloc_ok;
- bfd_vma x;
- bfd_signed_vma srel;
- bfd_signed_vma reloc_addr;
- bfd_boolean use_stubs = FALSE;
+ bfd_vma x;
+ bfd_signed_vma srel;
+ bfd_signed_vma reloc_addr;
+ bool use_stubs = false;
/* Usually is 0, unless we are generating code for a bootloader. */
- bfd_signed_vma base_addr = htab->vector_base;
+ bfd_signed_vma base_addr = htab->vector_base;
/* Absolute addr of the reloc in the final excecutable. */
reloc_addr = rel->r_offset + input_section->output_section->vma
@@ -1430,7 +1430,7 @@ elf32_avr_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
struct elf32_avr_link_hash_table * htab = avr_link_hash_table (info);
if (htab == NULL)
- return FALSE;
+ return false;
symtab_hdr = & elf_tdata (input_bfd)->symtab_hdr;
sym_hashes = elf_sym_hashes (input_bfd);
@@ -1467,7 +1467,7 @@ elf32_avr_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
}
else
{
- bfd_boolean unresolved_reloc, warned, ignored;
+ bool unresolved_reloc, warned, ignored;
RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
r_symndx, symtab_hdr, sym_hashes,
@@ -1501,7 +1501,7 @@ elf32_avr_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
case bfd_reloc_undefined:
(*info->callbacks->undefined_symbol)
- (info, name, input_bfd, input_section, rel->r_offset, TRUE);
+ (info, name, input_bfd, input_section, rel->r_offset, true);
break;
case bfd_reloc_outofrange:
@@ -1527,14 +1527,14 @@ elf32_avr_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
}
}
- return TRUE;
+ return true;
}
/* The final processing done just before writing out a AVR ELF object
file. This gets the AVR architecture right based on the machine
number. */
-static bfd_boolean
+static bool
bfd_elf_avr_final_write_processing (bfd *abfd)
{
unsigned long val;
@@ -1623,7 +1623,7 @@ bfd_elf_avr_final_write_processing (bfd *abfd)
/* Set the right machine number. */
-static bfd_boolean
+static bool
elf32_avr_object_p (bfd *abfd)
{
unsigned int e_set = bfd_mach_avr2;
@@ -1715,7 +1715,7 @@ elf32_avr_object_p (bfd *abfd)
/* Returns whether the relocation type passed is a diff reloc. */
-static bfd_boolean
+static bool
elf32_avr_is_diff_reloc (Elf_Internal_Rela *irel)
{
return (ELF32_R_TYPE (irel->r_info) == R_AVR_DIFF8
@@ -1845,10 +1845,9 @@ elf32_avr_adjust_reloc_if_spans_insn (bfd *abfd,
else
{
bfd_vma reloc_value = symval + irel->r_addend;
- bfd_boolean addend_within_shrink_boundary =
- (reloc_value <= shrink_boundary);
+ bool addend_within_shrink_boundary = reloc_value <= shrink_boundary;
- bfd_boolean reloc_spans_insn =
+ bool reloc_spans_insn =
(symval <= shrinked_insn_address
&& reloc_value > shrinked_insn_address
&& addend_within_shrink_boundary);
@@ -1863,38 +1862,36 @@ elf32_avr_adjust_reloc_if_spans_insn (bfd *abfd,
}
}
-static bfd_boolean
+static bool
avr_should_move_sym (symvalue symval,
bfd_vma start,
bfd_vma end,
- bfd_boolean did_pad)
+ bool did_pad)
{
- bfd_boolean sym_within_boundary =
- did_pad ? symval < end : symval <= end;
+ bool sym_within_boundary = did_pad ? symval < end : symval <= end;
return (symval > start && sym_within_boundary);
}
-static bfd_boolean
+static bool
avr_should_reduce_sym_size (symvalue symval,
symvalue symend,
bfd_vma start,
bfd_vma end,
- bfd_boolean did_pad)
+ bool did_pad)
{
- bfd_boolean sym_end_within_boundary =
- did_pad ? symend < end : symend <= end;
+ bool sym_end_within_boundary = did_pad ? symend < end : symend <= end;
return (symval <= start && symend > start && sym_end_within_boundary);
}
-static bfd_boolean
+static bool
avr_should_increase_sym_size (symvalue symval,
symvalue symend,
bfd_vma start,
bfd_vma end,
- bfd_boolean did_pad)
+ bool did_pad)
{
- return avr_should_move_sym (symval, start, end, did_pad)
- && symend >= end && did_pad;
+ return (avr_should_move_sym (symval, start, end, did_pad)
+ && symend >= end && did_pad);
}
/* Delete some bytes from a section while changing the size of an instruction.
@@ -1905,12 +1902,12 @@ avr_should_increase_sym_size (symvalue symval,
record handling. In that case, addr is section-relative offset of start
of padding, and count is the number of padding bytes to delete. */
-static bfd_boolean
+static bool
elf32_avr_relax_delete_bytes (bfd *abfd,
asection *sec,
bfd_vma addr,
int count,
- bfd_boolean delete_shrinks_insn)
+ bool delete_shrinks_insn)
{
Elf_Internal_Shdr *symtab_hdr;
unsigned int sec_shndx;
@@ -1924,8 +1921,8 @@ elf32_avr_relax_delete_bytes (bfd *abfd,
unsigned int symcount;
struct avr_relax_info *relax_info;
struct avr_property_record *prop_record = NULL;
- bfd_boolean did_shrink = FALSE;
- bfd_boolean did_pad = FALSE;
+ bool did_shrink = false;
+ bool did_pad = false;
symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
sec_shndx = _bfd_elf_section_from_bfd_section (abfd, sec);
@@ -1964,12 +1961,12 @@ elf32_avr_relax_delete_bytes (bfd *abfd,
{
memmove (contents + addr, contents + addr + count,
(size_t) (toaddr - addr - count));
- did_shrink = TRUE;
+ did_shrink = true;
}
if (prop_record == NULL)
{
sec->size -= count;
- did_shrink = TRUE;
+ did_shrink = true;
}
else
{
@@ -1995,11 +1992,11 @@ elf32_avr_relax_delete_bytes (bfd *abfd,
to remember we didn't delete anything i.e. don't set did_shrink,
so that we don't corrupt reloc offsets or symbol values.*/
memset (contents + toaddr - count, fill, count);
- did_pad = TRUE;
+ did_pad = true;
}
if (!did_shrink)
- return TRUE;
+ return true;
/* Adjust all the reloc addresses. */
for (irel = elf_section_data (sec)->relocs; irel < irelend; irel++)
@@ -2055,7 +2052,7 @@ elf32_avr_relax_delete_bytes (bfd *abfd,
irel = elf_section_data (isec)->relocs;
/* PR 12161: Read in the relocs for this section if necessary. */
if (irel == NULL)
- irel = _bfd_elf_link_read_relocs (abfd, isec, NULL, NULL, TRUE);
+ irel = _bfd_elf_link_read_relocs (abfd, isec, NULL, NULL, true);
for (irelend = irel + isec->reloc_count;
irel < irelend;
@@ -2071,7 +2068,7 @@ elf32_avr_relax_delete_bytes (bfd *abfd,
symtab_hdr->sh_info, 0,
NULL, NULL, NULL);
if (isymbuf == NULL)
- return FALSE;
+ return false;
}
/* Get the value of the symbol referred to by the reloc. */
@@ -2186,7 +2183,7 @@ elf32_avr_relax_delete_bytes (bfd *abfd,
}
}
- return TRUE;
+ return true;
}
static Elf_Internal_Sym *
@@ -2452,11 +2449,11 @@ avr_load_all_property_sections (struct bfd_link_info *link_info)
contains 4-byte jump instructions whose relative offset must not
be changed. */
-static bfd_boolean
+static bool
elf32_avr_relax_section (bfd *abfd,
asection *sec,
struct bfd_link_info *link_info,
- bfd_boolean *again)
+ bool *again)
{
Elf_Internal_Shdr *symtab_hdr;
Elf_Internal_Rela *internal_relocs;
@@ -2464,11 +2461,11 @@ elf32_avr_relax_section (bfd *abfd,
bfd_byte *contents = NULL;
Elf_Internal_Sym *isymbuf = NULL;
struct elf32_avr_link_hash_table *htab;
- static bfd_boolean relaxation_initialised = FALSE;
+ static bool relaxation_initialised = false;
if (!relaxation_initialised)
{
- relaxation_initialised = TRUE;
+ relaxation_initialised = true;
/* Load entries from the .avr.prop sections. */
avr_load_all_property_sections (link_info);
@@ -2478,11 +2475,11 @@ elf32_avr_relax_section (bfd *abfd,
relaxing. Such shrinking can cause issues for the sections such
as .vectors and .jumptables. Instead the unused bytes should be
filled with nop instructions. */
- bfd_boolean shrinkable = TRUE;
+ bool shrinkable = true;
if (!strcmp (sec->name,".vectors")
|| !strcmp (sec->name,".jumptables"))
- shrinkable = FALSE;
+ shrinkable = false;
if (bfd_link_relocatable (link_info))
(*link_info->callbacks->einfo)
@@ -2490,10 +2487,10 @@ elf32_avr_relax_section (bfd *abfd,
htab = avr_link_hash_table (link_info);
if (htab == NULL)
- return FALSE;
+ return false;
/* Assume nothing changes. */
- *again = FALSE;
+ *again = false;
if ((!htab->no_stubs) && (sec == htab->stub_sec))
{
@@ -2506,17 +2503,17 @@ elf32_avr_relax_section (bfd *abfd,
(int) last_estimated_stub_section_size);
elf32_avr_size_stubs (htab->stub_sec->output_section->owner,
- link_info, FALSE);
+ link_info, false);
/* Check if the number of trampolines changed. */
if (last_estimated_stub_section_size != htab->stub_sec->size)
- *again = TRUE;
+ *again = true;
if (debug_relax)
printf ("Size of stub section after this pass: %i\n",
(int) htab->stub_sec->size);
- return TRUE;
+ return true;
}
/* We don't have to do anything for a relocatable link, if
@@ -2526,12 +2523,12 @@ elf32_avr_relax_section (bfd *abfd,
|| (sec->flags & SEC_RELOC) == 0
|| sec->reloc_count == 0
|| (sec->flags & SEC_CODE) == 0)
- return TRUE;
+ return true;
/* Check if the object file to relax uses internal symbols so that we
could fix up the relocations. */
if (!(elf_elfheader (abfd)->e_flags & EF_AVR_LINKRELAX_PREPARED))
- return TRUE;
+ return true;
symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
@@ -2748,12 +2745,12 @@ elf32_avr_relax_section (bfd *abfd,
/* Delete two bytes of data. */
if (!elf32_avr_relax_delete_bytes (abfd, sec,
irel->r_offset + 2, 2,
- TRUE))
+ true))
goto error_return;
/* That will change things, so, we should relax again.
Note that this is not required, and it may be slow. */
- *again = TRUE;
+ *again = true;
}
}
}
@@ -2799,7 +2796,7 @@ elf32_avr_relax_section (bfd *abfd,
printf ("converted rcall/ret sequence at address 0x%x"
" into rjmp/ret sequence. Section is %s\n\n",
(int) dot, sec->name);
- *again = TRUE;
+ *again = true;
break;
}
}
@@ -2830,7 +2827,7 @@ elf32_avr_relax_section (bfd *abfd,
printf ("converted call/ret sequence at address 0x%x"
" into jmp/ret sequence. Section is %s\n\n",
(int) dot, sec->name);
- *again = TRUE;
+ *again = true;
break;
}
}
@@ -2993,7 +2990,7 @@ elf32_avr_relax_section (bfd *abfd,
rel = elf_section_data (isec)->relocs;
if (rel == NULL)
- rel = _bfd_elf_link_read_relocs (abfd, isec, NULL, NULL, TRUE);
+ rel = _bfd_elf_link_read_relocs (abfd, isec, NULL, NULL, true);
relend = rel + isec->reloc_count;
@@ -3074,13 +3071,13 @@ elf32_avr_relax_section (bfd *abfd,
/* Delete two bytes of data. */
if (!elf32_avr_relax_delete_bytes (abfd, sec,
irel->r_offset + insn_size, 2,
- TRUE))
+ true))
goto error_return;
/* That will change things, so, we should relax
again. Note that this is not required, and it
may be slow. */
- *again = TRUE;
+ *again = true;
break;
}
}
@@ -3142,8 +3139,8 @@ elf32_avr_relax_section (bfd *abfd,
record->offset -= count;
elf32_avr_relax_delete_bytes (abfd, sec,
addr - count,
- count, FALSE);
- *again = TRUE;
+ count, false);
+ *again = true;
}
}
break;
@@ -3167,7 +3164,7 @@ elf32_avr_relax_section (bfd *abfd,
if (elf_section_data (sec)->relocs != internal_relocs)
free (internal_relocs);
- return TRUE;
+ return true;
error_return:
if (symtab_hdr->contents != (unsigned char *) isymbuf)
@@ -3177,7 +3174,7 @@ elf32_avr_relax_section (bfd *abfd,
if (elf_section_data (sec)->relocs != internal_relocs)
free (internal_relocs);
- return FALSE;
+ return false;
}
/* This is a version of bfd_generic_get_relocated_section_contents
@@ -3193,7 +3190,7 @@ elf32_avr_get_relocated_section_contents (bfd *output_bfd,
struct bfd_link_info *link_info,
struct bfd_link_order *link_order,
bfd_byte *data,
- bfd_boolean relocatable,
+ bool relocatable,
asymbol **symbols)
{
Elf_Internal_Shdr *symtab_hdr;
@@ -3224,7 +3221,7 @@ elf32_avr_get_relocated_section_contents (bfd *output_bfd,
bfd_size_type amt;
internal_relocs = (_bfd_elf_link_read_relocs
- (input_bfd, input_section, NULL, NULL, FALSE));
+ (input_bfd, input_section, NULL, NULL, false));
if (internal_relocs == NULL)
goto error_return;
@@ -3319,7 +3316,7 @@ avr_add_stub (const char *stub_name,
struct elf32_avr_stub_hash_entry *hsh;
/* Enter this entry into the linker stub hash table. */
- hsh = avr_stub_hash_lookup (&htab->bstab, stub_name, TRUE, FALSE);
+ hsh = avr_stub_hash_lookup (&htab->bstab, stub_name, true, false);
if (hsh == NULL)
{
@@ -3340,7 +3337,7 @@ avr_add_stub (const char *stub_name,
relative to the trampoline section start to the stub_offset entry in
the stub hash table entry. */
-static bfd_boolean
+static bool
avr_build_one_stub (struct bfd_hash_entry *bh, void *in_arg)
{
struct elf32_avr_stub_hash_entry *hsh;
@@ -3358,13 +3355,13 @@ avr_build_one_stub (struct bfd_hash_entry *bh, void *in_arg)
hsh = avr_stub_hash_entry (bh);
if (!hsh->is_actually_needed)
- return TRUE;
+ return true;
info = (struct bfd_link_info *) in_arg;
htab = avr_link_hash_table (info);
if (htab == NULL)
- return FALSE;
+ return false;
target = hsh->target_value;
@@ -3384,7 +3381,7 @@ avr_build_one_stub (struct bfd_hash_entry *bh, void *in_arg)
/* Check for the alignment of the address. */
if (target & 1)
- return FALSE;
+ return false;
starget = target >> 1;
jmp_insn |= ((starget & 0x10000) | ((starget << 3) & 0x1f00000)) >> 16;
@@ -3408,22 +3405,22 @@ avr_build_one_stub (struct bfd_hash_entry *bh, void *in_arg)
}
}
- return TRUE;
+ return true;
}
-static bfd_boolean
+static bool
avr_mark_stub_not_to_be_necessary (struct bfd_hash_entry *bh,
void *in_arg ATTRIBUTE_UNUSED)
{
struct elf32_avr_stub_hash_entry *hsh;
hsh = avr_stub_hash_entry (bh);
- hsh->is_actually_needed = FALSE;
+ hsh->is_actually_needed = false;
- return TRUE;
+ return true;
}
-static bfd_boolean
+static bool
avr_size_one_stub (struct bfd_hash_entry *bh, void *in_arg)
{
struct elf32_avr_stub_hash_entry *hsh;
@@ -3440,18 +3437,18 @@ avr_size_one_stub (struct bfd_hash_entry *bh, void *in_arg)
size = 0;
htab->stub_sec->size += size;
- return TRUE;
+ return true;
}
void
elf32_avr_setup_params (struct bfd_link_info *info,
bfd *avr_stub_bfd,
asection *avr_stub_section,
- bfd_boolean no_stubs,
- bfd_boolean deb_stubs,
- bfd_boolean deb_relax,
+ bool no_stubs,
+ bool deb_stubs,
+ bool deb_relax,
bfd_vma pc_wrap_around,
- bfd_boolean call_ret_replacement)
+ bool call_ret_replacement)
{
struct elf32_avr_link_hash_table *htab = avr_link_hash_table (info);
@@ -3596,17 +3593,17 @@ get_local_syms (bfd *input_bfd, struct bfd_link_info *info)
#define ADD_DUMMY_STUBS_FOR_DEBUGGING 0
-bfd_boolean
+bool
elf32_avr_size_stubs (bfd *output_bfd,
struct bfd_link_info *info,
- bfd_boolean is_prealloc_run)
+ bool is_prealloc_run)
{
struct elf32_avr_link_hash_table *htab;
int stub_changed = 0;
htab = avr_link_hash_table (info);
if (htab == NULL)
- return FALSE;
+ return false;
/* At this point we initialize htab->vector_base
To the start of the text output section. */
@@ -3616,7 +3613,7 @@ elf32_avr_size_stubs (bfd *output_bfd,
{
if (htab->all_local_syms)
goto error_ret_free_local;
- return FALSE;
+ return false;
}
if (ADD_DUMMY_STUBS_FOR_DEBUGGING)
@@ -3797,13 +3794,13 @@ elf32_avr_size_stubs (bfd *output_bfd,
hsh = avr_stub_hash_lookup (&htab->bstab,
stub_name,
- FALSE, FALSE);
+ false, false);
if (hsh != NULL)
{
/* The proper stub has already been created. Mark it
to be used and write the possibly changed destination
value. */
- hsh->is_actually_needed = TRUE;
+ hsh->is_actually_needed = true;
hsh->target_value = destination;
free (stub_name);
continue;
@@ -3816,7 +3813,7 @@ elf32_avr_size_stubs (bfd *output_bfd,
goto error_ret_free_internal;
}
- hsh->is_actually_needed = TRUE;
+ hsh->is_actually_needed = true;
hsh->target_value = destination;
if (debug_stubs)
@@ -3825,7 +3822,7 @@ elf32_avr_size_stubs (bfd *output_bfd,
if (debug_stubs)
printf ("(Pre-Alloc run: %i)\n", is_prealloc_run);
- stub_changed = TRUE;
+ stub_changed = true;
}
/* We're done with the internal relocs, free them. */
@@ -3841,15 +3838,15 @@ elf32_avr_size_stubs (bfd *output_bfd,
if (!stub_changed)
break;
- stub_changed = FALSE;
+ stub_changed = false;
}
free (htab->all_local_syms);
- return TRUE;
+ return true;
error_ret_free_local:
free (htab->all_local_syms);
- return FALSE;
+ return false;
}
@@ -3859,7 +3856,7 @@ elf32_avr_size_stubs (bfd *output_bfd,
functions here. This function is called via hppaelf_finish in the
linker. */
-bfd_boolean
+bool
elf32_avr_build_stubs (struct bfd_link_info *info)
{
asection *stub_sec;
@@ -3869,7 +3866,7 @@ elf32_avr_build_stubs (struct bfd_link_info *info)
htab = avr_link_hash_table (info);
if (htab == NULL)
- return FALSE;
+ return false;
/* In case that there were several stub sections: */
for (stub_sec = htab->stub_bfd->sections;
@@ -3884,7 +3881,7 @@ elf32_avr_build_stubs (struct bfd_link_info *info)
stub_sec->contents = bfd_zalloc (htab->stub_bfd, size);
if (stub_sec->contents == NULL && size != 0)
- return FALSE;
+ return false;
stub_sec->size = 0;
}
@@ -3906,7 +3903,7 @@ elf32_avr_build_stubs (struct bfd_link_info *info)
if (debug_stubs)
printf ("Final Stub section Size: %i\n", (int) htab->stub_sec->size);
- return TRUE;
+ return true;
}
/* Callback used by QSORT to order relocations AP and BP. */
@@ -3935,7 +3932,7 @@ internal_reloc_compare (const void *ap, const void *bp)
/* Return true if ADDRESS is within the vma range of SECTION from ABFD. */
-static bfd_boolean
+static bool
avr_is_section_for_address (asection *section, bfd_vma address)
{
bfd_vma vma;
@@ -3943,13 +3940,13 @@ avr_is_section_for_address (asection *section, bfd_vma address)
vma = bfd_section_vma (section);
if (address < vma)
- return FALSE;
+ return false;
size = section->size;
if (address >= vma + size)
- return FALSE;
+ return false;
- return TRUE;
+ return true;
}
/* Data structure used by AVR_FIND_SECTION_FOR_ADDRESS. */
@@ -4018,7 +4015,7 @@ avr_elf32_load_records_from_section (bfd *abfd, asection *sec)
/* Load the relocations for the '.avr.prop' section if there are any, and
sort them. */
internal_relocs = (_bfd_elf_link_read_relocs
- (abfd, sec, NULL, NULL, FALSE));
+ (abfd, sec, NULL, NULL, false));
if (internal_relocs)
qsort (internal_relocs, sec->reloc_count,
sizeof (Elf_Internal_Rela), internal_reloc_compare);