summaryrefslogtreecommitdiff
path: root/bfd/elf32-lm32.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-lm32.c
parentfaa7a26040c617a6d29f601998b99a1da882c672 (diff)
downloadbinutils-gdb-0a1b45a20eaa98d4d9026dc1fd17e79e741183af.tar.gz
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-lm32.c')
-rw-r--r--bfd/elf32-lm32.c298
1 files changed, 149 insertions, 149 deletions
diff --git a/bfd/elf32-lm32.c b/bfd/elf32-lm32.c
index 6c8b563cb65..be8d41632c1 100644
--- a/bfd/elf32-lm32.c
+++ b/bfd/elf32-lm32.c
@@ -133,14 +133,14 @@ _lm32fdpic_add_rofixup (bfd *output_bfd, asection *rofixup, bfd_vma relocation)
/* Create .rofixup sections in DYNOBJ, and set up
shortcuts to them in our hash table. */
-static bfd_boolean
+static bool
create_rofixup_section (bfd *dynobj, struct bfd_link_info *info)
{
struct elf_lm32_link_hash_table *htab;
htab = lm32_elf_hash_table (info);
if (htab == NULL)
- return FALSE;
+ return false;
/* Fixup section for R_LM32_32 relocs. */
lm32fdpic_fixup32_section (info)
@@ -154,9 +154,9 @@ create_rofixup_section (bfd *dynobj, struct bfd_link_info *info)
| SEC_READONLY));
if (lm32fdpic_fixup32_section (info) == NULL
|| !bfd_set_section_alignment (lm32fdpic_fixup32_section (info), 2))
- return FALSE;
+ return false;
- return TRUE;
+ return true;
}
static reloc_howto_type lm32_elf_howto_table [] =
@@ -166,258 +166,258 @@ static reloc_howto_type lm32_elf_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_LM32_NONE", /* name */
- FALSE, /* partial_inplace */
+ false, /* partial_inplace */
0, /* src_mask */
0, /* dst_mask */
- FALSE), /* pcrel_offset */
+ false), /* pcrel_offset */
/* An 8 bit absolute relocation. */
HOWTO (R_LM32_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_LM32_8", /* name */
- FALSE, /* partial_inplace */
+ false, /* partial_inplace */
0, /* src_mask */
0xff, /* dst_mask */
- FALSE), /* pcrel_offset */
+ false), /* pcrel_offset */
/* A 16 bit absolute relocation. */
HOWTO (R_LM32_16, /* 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_generic_reloc, /* special_function */
"R_LM32_16", /* name */
- FALSE, /* partial_inplace */
+ false, /* partial_inplace */
0, /* src_mask */
0xffff, /* dst_mask */
- FALSE), /* pcrel_offset */
+ false), /* pcrel_offset */
/* A 32 bit absolute relocation. */
HOWTO (R_LM32_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_LM32_32", /* name */
- FALSE, /* partial_inplace */
+ false, /* partial_inplace */
0, /* src_mask */
0xffffffff, /* dst_mask */
- FALSE), /* pcrel_offset */
+ false), /* pcrel_offset */
HOWTO (R_LM32_HI16, /* type */
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 */
bfd_elf_generic_reloc, /* special_function */
"R_LM32_HI16", /* name */
- FALSE, /* partial_inplace */
+ false, /* partial_inplace */
0, /* src_mask */
0xffff, /* dst_mask */
- FALSE), /* pcrel_offset */
+ false), /* pcrel_offset */
HOWTO (R_LM32_LO16, /* 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 */
bfd_elf_generic_reloc, /* special_function */
"R_LM32_LO16", /* name */
- FALSE, /* partial_inplace */
+ false, /* partial_inplace */
0, /* src_mask */
0xffff, /* dst_mask */
- FALSE), /* pcrel_offset */
+ false), /* pcrel_offset */
HOWTO (R_LM32_GPREL16, /* 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 */
lm32_elf_gprel_reloc, /* special_function */
"R_LM32_GPREL16", /* name */
- FALSE, /* partial_inplace */
+ false, /* partial_inplace */
0, /* src_mask */
0xffff, /* dst_mask */
- FALSE), /* pcrel_offset */
+ false), /* pcrel_offset */
HOWTO (R_LM32_CALL, /* type */
2, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
26, /* bitsize */
- TRUE, /* pc_relative */
+ true, /* pc_relative */
0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_LM32_CALL", /* name */
- FALSE, /* partial_inplace */
+ false, /* partial_inplace */
0, /* src_mask */
0x3ffffff, /* dst_mask */
- TRUE), /* pcrel_offset */
+ true), /* pcrel_offset */
HOWTO (R_LM32_BRANCH, /* type */
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 */
bfd_elf_generic_reloc, /* special_function */
"R_LM32_BRANCH", /* name */
- FALSE, /* partial_inplace */
+ false, /* partial_inplace */
0, /* src_mask */
0xffff, /* dst_mask */
- TRUE), /* pcrel_offset */
+ true), /* pcrel_offset */
/* GNU extension to record C++ vtable hierarchy. */
HOWTO (R_LM32_GNU_VTINHERIT, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
0, /* bitsize */
- FALSE, /* pc_relative */
+ false, /* pc_relative */
0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
NULL, /* special_function */
"R_LM32_GNU_VTINHERIT", /* name */
- FALSE, /* partial_inplace */
+ false, /* partial_inplace */
0, /* src_mask */
0, /* dst_mask */
- FALSE), /* pcrel_offset */
+ false), /* pcrel_offset */
/* GNU extension to record C++ vtable member usage. */
HOWTO (R_LM32_GNU_VTENTRY, /* type */
0, /* rightshift */
2, /* 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_rel_vtable_reloc_fn,/* special_function */
"R_LM32_GNU_VTENTRY", /* name */
- FALSE, /* partial_inplace */
+ false, /* partial_inplace */
0, /* src_mask */
0, /* dst_mask */
- FALSE), /* pcrel_offset */
+ false), /* pcrel_offset */
HOWTO (R_LM32_16_GOT, /* type */
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 */
bfd_elf_generic_reloc, /* special_function */
"R_LM32_16_GOT", /* name */
- FALSE, /* partial_inplace */
+ false, /* partial_inplace */
0, /* src_mask */
0xffff, /* dst_mask */
- FALSE), /* pcrel_offset */
+ false), /* pcrel_offset */
HOWTO (R_LM32_GOTOFF_HI16, /* type */
16, /* 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 */
bfd_elf_generic_reloc, /* special_function */
"R_LM32_GOTOFF_HI16", /* name */
- FALSE, /* partial_inplace */
+ false, /* partial_inplace */
0xffff, /* src_mask */
0xffff, /* dst_mask */
- FALSE), /* pcrel_offset */
+ false), /* pcrel_offset */
HOWTO (R_LM32_GOTOFF_LO16, /* 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 */
bfd_elf_generic_reloc, /* special_function */
"R_LM32_GOTOFF_LO16", /* name */
- FALSE, /* partial_inplace */
+ false, /* partial_inplace */
0xffff, /* src_mask */
0xffff, /* dst_mask */
- FALSE), /* pcrel_offset */
+ false), /* pcrel_offset */
HOWTO (R_LM32_COPY, /* 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_LM32_COPY", /* name */
- FALSE, /* partial_inplace */
+ false, /* partial_inplace */
0xffffffff, /* src_mask */
0xffffffff, /* dst_mask */
- FALSE), /* pcrel_offset */
+ false), /* pcrel_offset */
HOWTO (R_LM32_GLOB_DAT, /* 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_LM32_GLOB_DAT", /* name */
- FALSE, /* partial_inplace */
+ false, /* partial_inplace */
0xffffffff, /* src_mask */
0xffffffff, /* dst_mask */
- FALSE), /* pcrel_offset */
+ false), /* pcrel_offset */
HOWTO (R_LM32_JMP_SLOT, /* 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_LM32_JMP_SLOT", /* name */
- FALSE, /* partial_inplace */
+ false, /* partial_inplace */
0xffffffff, /* src_mask */
0xffffffff, /* dst_mask */
- FALSE), /* pcrel_offset */
+ false), /* pcrel_offset */
HOWTO (R_LM32_RELATIVE, /* 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_LM32_RELATIVE", /* name */
- FALSE, /* partial_inplace */
+ false, /* partial_inplace */
0xffffffff, /* src_mask */
0xffffffff, /* dst_mask */
- FALSE), /* pcrel_offset */
+ false), /* pcrel_offset */
};
@@ -482,7 +482,7 @@ lm32_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
/* Set the howto pointer for an Lattice Mico32 ELF reloc. */
-static bfd_boolean
+static bool
lm32_info_to_howto_rela (bfd *abfd,
arelent *cache_ptr,
Elf_Internal_Rela *dst)
@@ -496,15 +496,15 @@ lm32_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 = &lm32_elf_howto_table[r_type];
- return TRUE;
+ return true;
}
/* Set the right machine number for an Lattice Mico32 ELF file. */
-static bfd_boolean
+static bool
lm32_elf_object_p (bfd *abfd)
{
return bfd_default_set_arch_mach (abfd, bfd_arch_lm32, bfd_mach_lm32);
@@ -512,7 +512,7 @@ lm32_elf_object_p (bfd *abfd)
/* Set machine type flags just before file is written out. */
-static bfd_boolean
+static bool
lm32_elf_final_write_processing (bfd *abfd)
{
elf_elfheader (abfd)->e_machine = EM_LATTICEMICO32;
@@ -531,7 +531,7 @@ lm32_elf_final_write_processing (bfd *abfd)
/* Set the GP value for OUTPUT_BFD. Returns FALSE if this is a
dangerous relocation. */
-static bfd_boolean
+static bool
lm32_elf_assign_gp (bfd *output_bfd, bfd_vma *pgp)
{
unsigned int count;
@@ -541,7 +541,7 @@ lm32_elf_assign_gp (bfd *output_bfd, bfd_vma *pgp)
/* If we've already figured out what GP will be, just return it. */
*pgp = _bfd_get_gp_value (output_bfd);
if (*pgp)
- return TRUE;
+ return true;
count = bfd_get_symcount (output_bfd);
sym = bfd_get_outsymbols (output_bfd);
@@ -571,10 +571,10 @@ lm32_elf_assign_gp (bfd *output_bfd, bfd_vma *pgp)
/* Only get the error once. */
*pgp = 4;
_bfd_set_gp_value (output_bfd, *pgp);
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
/* We have to figure out the gp value, so that we can adjust the
@@ -584,7 +584,7 @@ lm32_elf_assign_gp (bfd *output_bfd, bfd_vma *pgp)
external symbol if we are producing relocatable output. */
static bfd_reloc_status_type
-lm32_elf_final_gp (bfd *output_bfd, asymbol *symbol, bfd_boolean relocatable,
+lm32_elf_final_gp (bfd *output_bfd, asymbol *symbol, bool relocatable,
char **error_message, bfd_vma *pgp)
{
if (bfd_is_und_section (symbol->section) && !relocatable)
@@ -655,7 +655,7 @@ lm32_elf_gprel_reloc (bfd *abfd,
+ symbol->section->output_section->vma + symbol->section->output_offset;
if ((r =
- lm32_elf_final_gp (abfd, symbol, FALSE, msg, &gp)) == bfd_reloc_ok)
+ lm32_elf_final_gp (abfd, symbol, false, msg, &gp)) == bfd_reloc_ok)
{
relocation = relocation + reloc_entry->addend - gp;
reloc_entry->addend = 0;
@@ -705,7 +705,7 @@ _lm32fdpic_osec_to_segment (bfd *output_bfd, asection *osec)
/* Determine if an output section is read-only. */
-inline static bfd_boolean
+inline static bool
_lm32fdpic_osec_readonly_p (bfd *output_bfd, asection *osec)
{
unsigned seg = _lm32fdpic_osec_to_segment (output_bfd, osec);
@@ -733,7 +733,7 @@ lm32_elf_relocate_section (bfd *output_bfd,
asection *sgot;
if (htab == NULL)
- return FALSE;
+ return false;
local_got_offsets = elf_local_got_offsets (input_bfd);
@@ -783,8 +783,8 @@ lm32_elf_relocate_section (bfd *output_bfd,
else
{
/* It's a global symbol. */
- bfd_boolean unresolved_reloc;
- bfd_boolean warned, ignored;
+ bool unresolved_reloc;
+ bool warned, ignored;
RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
r_symndx, symtab_hdr, sym_hashes,
@@ -843,7 +843,7 @@ lm32_elf_relocate_section (bfd *output_bfd,
BFD_ASSERT (sgot != NULL);
if (h != NULL)
{
- bfd_boolean dyn;
+ bool dyn;
bfd_vma off;
off = h->got.offset;
@@ -1006,7 +1006,7 @@ lm32_elf_relocate_section (bfd *output_bfd,
(info,
_("cannot emit dynamic relocations in read-only section"),
name, input_bfd, input_section, rel->r_offset);
- return FALSE;
+ return false;
}
/* Create entry in .rofixup section. */
_lm32fdpic_add_rofixup (output_bfd,
@@ -1063,7 +1063,7 @@ lm32_elf_relocate_section (bfd *output_bfd,
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:
@@ -1090,7 +1090,7 @@ lm32_elf_relocate_section (bfd *output_bfd,
}
}
- return TRUE;
+ return true;
}
static asection *
@@ -1113,7 +1113,7 @@ lm32_elf_gc_mark_hook (asection *sec,
/* Look through the relocs for a section during the first phase. */
-static bfd_boolean
+static bool
lm32_elf_check_relocs (bfd *abfd,
struct bfd_link_info *info,
asection *sec,
@@ -1127,7 +1127,7 @@ lm32_elf_check_relocs (bfd *abfd,
bfd *dynobj;
if (bfd_link_relocatable (info))
- return TRUE;
+ return true;
symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
sym_hashes = elf_sym_hashes (abfd);
@@ -1137,7 +1137,7 @@ lm32_elf_check_relocs (bfd *abfd,
htab = lm32_elf_hash_table (info);
if (htab == NULL)
- return FALSE;
+ return false;
dynobj = htab->root.dynobj;
@@ -1171,7 +1171,7 @@ lm32_elf_check_relocs (bfd *abfd,
if (dynobj == NULL)
htab->root.dynobj = dynobj = abfd;
if (!_bfd_elf_create_got_section (dynobj, info))
- return FALSE;
+ return false;
break;
}
}
@@ -1187,12 +1187,12 @@ lm32_elf_check_relocs (bfd *abfd,
if (dynobj == NULL)
htab->root.dynobj = dynobj = abfd;
if (!_bfd_elf_create_got_section (dynobj, info))
- return FALSE;
+ return false;
/* Create .rofixup section */
if (htab->sfixup32 == NULL)
{
if (! create_rofixup_section (dynobj, info))
- return FALSE;
+ return false;
}
break;
case R_LM32_16_GOT:
@@ -1204,7 +1204,7 @@ lm32_elf_check_relocs (bfd *abfd,
if (dynobj == NULL)
htab->root.dynobj = dynobj = abfd;
if (! create_rofixup_section (dynobj, info))
- return FALSE;
+ return false;
}
break;
}
@@ -1229,7 +1229,7 @@ lm32_elf_check_relocs (bfd *abfd,
size *= sizeof (bfd_signed_vma);
local_got_refcounts = bfd_zalloc (abfd, size);
if (local_got_refcounts == NULL)
- return FALSE;
+ return false;
elf_local_got_refcounts (abfd) = local_got_refcounts;
}
local_got_refcounts[r_symndx] += 1;
@@ -1240,25 +1240,25 @@ lm32_elf_check_relocs (bfd *abfd,
Reconstruct it for later use during GC. */
case R_LM32_GNU_VTINHERIT:
if (!bfd_elf_gc_record_vtinherit (abfd, sec, h, rel->r_offset))
- return FALSE;
+ return false;
break;
/* This relocation describes which C++ vtable entries are actually
used. Record for later use during GC. */
case R_LM32_GNU_VTENTRY:
if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend))
- return FALSE;
+ return false;
break;
}
}
- return TRUE;
+ return true;
}
/* Finish up the dynamic sections. */
-static bfd_boolean
+static bool
lm32_elf_finish_dynamic_sections (bfd *output_bfd,
struct bfd_link_info *info)
{
@@ -1269,7 +1269,7 @@ lm32_elf_finish_dynamic_sections (bfd *output_bfd,
htab = lm32_elf_hash_table (info);
if (htab == NULL)
- return FALSE;
+ return false;
dynobj = htab->root.dynobj;
@@ -1386,11 +1386,11 @@ lm32_elf_finish_dynamic_sections (bfd *output_bfd,
" != relocs %d",
(int64_t) (lm32fdpic_fixup32_section (info)->size / 4),
lm32fdpic_fixup32_section (info)->reloc_count);
- return FALSE;
+ return false;
}
hend = bfd_link_hash_lookup (info->hash, "__ROFIXUP_END__",
- FALSE, FALSE, TRUE);
+ false, false, true);
if (hend
&& (hend->type == bfd_link_hash_defined
|| hend->type == bfd_link_hash_defweak)
@@ -1409,18 +1409,18 @@ lm32_elf_finish_dynamic_sections (bfd *output_bfd,
("LINKER BUG: .rofixup section hend->u.def.value != value: %"
PRId64 " != %" PRId64,
(int64_t) hend->u.def.value, (int64_t) value);
- return FALSE;
+ return false;
}
}
}
- return TRUE;
+ return true;
}
/* Finish up dynamic symbol handling. We set the contents of various
dynamic sections here. */
-static bfd_boolean
+static bool
lm32_elf_finish_dynamic_symbol (bfd *output_bfd,
struct bfd_link_info *info,
struct elf_link_hash_entry *h,
@@ -1431,7 +1431,7 @@ lm32_elf_finish_dynamic_symbol (bfd *output_bfd,
htab = lm32_elf_hash_table (info);
if (htab == NULL)
- return FALSE;
+ return false;
if (h->plt.offset != (bfd_vma) -1)
{
@@ -1574,7 +1574,7 @@ lm32_elf_finish_dynamic_symbol (bfd *output_bfd,
if (h == htab->root.hdynamic || h == htab->root.hgot)
sym->st_shndx = SHN_ABS;
- return TRUE;
+ return true;
}
static enum elf_reloc_type_class
@@ -1597,7 +1597,7 @@ lm32_elf_reloc_type_class (const struct bfd_link_info *info ATTRIBUTE_UNUSED,
change the definition to something the rest of the link can
understand. */
-static bfd_boolean
+static bool
lm32_elf_adjust_dynamic_symbol (struct bfd_link_info *info,
struct elf_link_hash_entry *h)
{
@@ -1636,7 +1636,7 @@ lm32_elf_adjust_dynamic_symbol (struct bfd_link_info *info,
h->needs_plt = 0;
}
- return TRUE;
+ return true;
}
else
h->plt.offset = (bfd_vma) -1;
@@ -1650,7 +1650,7 @@ lm32_elf_adjust_dynamic_symbol (struct bfd_link_info *info,
BFD_ASSERT (def->root.type == bfd_link_hash_defined);
h->root.u.def.section = def->root.u.def.section;
h->root.u.def.value = def->root.u.def.value;
- return TRUE;
+ return true;
}
/* This is a reference to a symbol defined by a dynamic object which
@@ -1661,18 +1661,18 @@ lm32_elf_adjust_dynamic_symbol (struct bfd_link_info *info,
For such cases we need not do anything here; the relocations will
be handled correctly by relocate_section. */
if (bfd_link_pic (info))
- return TRUE;
+ return true;
/* If there are no references to this symbol that do not use the
GOT, we don't need to generate a copy reloc. */
if (!h->non_got_ref)
- return TRUE;
+ return true;
/* If -z nocopyreloc was given, we won't generate them either. */
if (0 && info->nocopyreloc)
{
h->non_got_ref = 0;
- return TRUE;
+ return true;
}
/* If we don't find any dynamic relocs in read-only sections, then
@@ -1680,7 +1680,7 @@ lm32_elf_adjust_dynamic_symbol (struct bfd_link_info *info,
if (0 && !_bfd_elf_readonly_dynrelocs (h))
{
h->non_got_ref = 0;
- return TRUE;
+ return true;
}
/* We must allocate the symbol in our .dynbss section, which will
@@ -1695,7 +1695,7 @@ lm32_elf_adjust_dynamic_symbol (struct bfd_link_info *info,
htab = lm32_elf_hash_table (info);
if (htab == NULL)
- return FALSE;
+ return false;
s = htab->sdynbss;
BFD_ASSERT (s != NULL);
@@ -1720,7 +1720,7 @@ lm32_elf_adjust_dynamic_symbol (struct bfd_link_info *info,
/* Allocate space in .plt, .got and associated reloc sections for
dynamic relocs. */
-static bfd_boolean
+static bool
allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf)
{
struct bfd_link_info *info;
@@ -1728,12 +1728,12 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf)
struct elf_dyn_relocs *p;
if (h->root.type == bfd_link_hash_indirect)
- return TRUE;
+ return true;
info = (struct bfd_link_info *) inf;
htab = lm32_elf_hash_table (info);
if (htab == NULL)
- return FALSE;
+ return false;
if (htab->root.dynamic_sections_created
&& h->plt.refcount > 0)
@@ -1744,7 +1744,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf)
&& !h->forced_local)
{
if (! bfd_elf_link_record_dynamic_symbol (info, h))
- return FALSE;
+ return false;
}
if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (1, bfd_link_pic (info), h))
@@ -1795,7 +1795,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf)
if (h->got.refcount > 0)
{
asection *s;
- bfd_boolean dyn;
+ bool dyn;
/* Make sure this symbol is output as a dynamic symbol.
Undefined weak syms won't yet be marked as dynamic. */
@@ -1803,7 +1803,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf)
&& !h->forced_local)
{
if (! bfd_elf_link_record_dynamic_symbol (info, h))
- return FALSE;
+ return false;
}
s = htab->root.sgot;
@@ -1818,7 +1818,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf)
h->got.offset = (bfd_vma) -1;
if (h->dyn_relocs == NULL)
- return TRUE;
+ return true;
/* In the shared -Bsymbolic case, discard space allocated for
dynamic pc-relative relocs against symbols which turn out to be
@@ -1859,7 +1859,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf)
&& !h->forced_local)
{
if (! bfd_elf_link_record_dynamic_symbol (info, h))
- return FALSE;
+ return false;
}
}
}
@@ -1882,7 +1882,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf)
&& !h->forced_local)
{
if (! bfd_elf_link_record_dynamic_symbol (info, h))
- return FALSE;
+ return false;
}
/* If that succeeded, we know we'll be keeping all the
@@ -1903,24 +1903,24 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf)
sreloc->size += p->count * sizeof (Elf32_External_Rela);
}
- return TRUE;
+ return true;
}
/* Set the sizes of the dynamic sections. */
-static bfd_boolean
+static bool
lm32_elf_size_dynamic_sections (bfd *output_bfd,
struct bfd_link_info *info)
{
struct elf_lm32_link_hash_table *htab;
bfd *dynobj;
asection *s;
- bfd_boolean relocs;
+ bool relocs;
bfd *ibfd;
htab = lm32_elf_hash_table (info);
if (htab == NULL)
- return FALSE;
+ return false;
dynobj = htab->root.dynobj;
BFD_ASSERT (dynobj != NULL);
@@ -2006,7 +2006,7 @@ lm32_elf_size_dynamic_sections (bfd *output_bfd,
/* We now have determined the sizes of the various dynamic sections.
Allocate memory for them. */
- relocs = FALSE;
+ relocs = false;
for (s = dynobj->sections; s != NULL; s = s->next)
{
if ((s->flags & SEC_LINKER_CREATED) == 0)
@@ -2023,7 +2023,7 @@ lm32_elf_size_dynamic_sections (bfd *output_bfd,
else if (startswith (bfd_section_name (s), ".rela"))
{
if (s->size != 0 && s != htab->root.srelplt)
- relocs = TRUE;
+ relocs = true;
/* We use the reloc_count field as a counter if we need
to copy relocs into the output file. */
@@ -2058,11 +2058,11 @@ lm32_elf_size_dynamic_sections (bfd *output_bfd,
of garbage. */
s->contents = bfd_zalloc (dynobj, s->size);
if (s->contents == NULL)
- return FALSE;
+ return false;
}
if (!_bfd_elf_add_dynamic_tags (output_bfd, info, relocs))
- return FALSE;
+ return false;
/* Allocate .rofixup section. */
if (IS_FDPIC (output_bfd))
@@ -2082,7 +2082,7 @@ lm32_elf_size_dynamic_sections (bfd *output_bfd,
Elf_Internal_Rela *internal_relocs, *end;
internal_relocs = elf_section_data (s)->relocs;
if (internal_relocs == NULL)
- internal_relocs = (_bfd_elf_link_read_relocs (ibfd, s, NULL, NULL, FALSE));
+ internal_relocs = (_bfd_elf_link_read_relocs (ibfd, s, NULL, NULL, false));
if (internal_relocs != NULL)
{
end = internal_relocs + s->reloc_count;
@@ -2141,7 +2141,7 @@ lm32_elf_size_dynamic_sections (bfd *output_bfd,
/* Create a new entry. */
new_entry = malloc (sizeof (struct weak_symbol_list));
if (!new_entry)
- return FALSE;
+ return false;
new_entry->name = h->root.root.string;
new_entry->next = NULL;
/* Add to list */
@@ -2164,7 +2164,7 @@ lm32_elf_size_dynamic_sections (bfd *output_bfd,
}
}
else
- return FALSE;
+ return false;
}
}
}
@@ -2186,16 +2186,16 @@ lm32_elf_size_dynamic_sections (bfd *output_bfd,
lm32fdpic_fixup32_section (info)->contents =
bfd_zalloc (dynobj, lm32fdpic_fixup32_section (info)->size);
if (lm32fdpic_fixup32_section (info)->contents == NULL)
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return true;
}
/* Create dynamic sections when linking against a dynamic object. */
-static bfd_boolean
+static bool
lm32_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info)
{
struct elf_lm32_link_hash_table *htab;
@@ -2206,16 +2206,16 @@ lm32_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info)
htab = lm32_elf_hash_table (info);
if (htab == NULL)
- return FALSE;
+ return false;
/* Make sure we have a GOT - For the case where we have a dynamic object
but none of the relocs in check_relocs */
if (!_bfd_elf_create_got_section (abfd, info))
- return FALSE;
+ return false;
if (IS_FDPIC (abfd) && (htab->sfixup32 == NULL))
{
if (! create_rofixup_section (abfd, info))
- return FALSE;
+ return false;
}
/* We need to create .plt, .rel[a].plt, .got, .got.plt, .dynbss, and
@@ -2234,7 +2234,7 @@ lm32_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info)
htab->root.splt = s;
if (s == NULL
|| !bfd_set_section_alignment (s, bed->plt_alignment))
- return FALSE;
+ return false;
if (bed->want_plt_sym)
{
@@ -2245,9 +2245,9 @@ lm32_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info)
if (! (_bfd_generic_link_add_one_symbol
(info, abfd, "_PROCEDURE_LINKAGE_TABLE_", BSF_GLOBAL, s,
- (bfd_vma) 0, NULL, FALSE,
+ (bfd_vma) 0, NULL, false,
get_elf_backend_data (abfd)->collect, &bh)))
- return FALSE;
+ return false;
h = (struct elf_link_hash_entry *) bh;
h->def_regular = 1;
h->type = STT_OBJECT;
@@ -2255,7 +2255,7 @@ lm32_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info)
if (bfd_link_pic (info)
&& ! bfd_elf_link_record_dynamic_symbol (info, h))
- return FALSE;
+ return false;
}
s = bfd_make_section_anyway_with_flags (abfd,
@@ -2265,11 +2265,11 @@ lm32_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info)
htab->root.srelplt = s;
if (s == NULL
|| !bfd_set_section_alignment (s, ptralign))
- return FALSE;
+ return false;
if (htab->root.sgot == NULL
&& !_bfd_elf_create_got_section (abfd, info))
- return FALSE;
+ return false;
if (bed->want_dynbss)
{
@@ -2283,7 +2283,7 @@ lm32_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info)
SEC_ALLOC | SEC_LINKER_CREATED);
htab->sdynbss = s;
if (s == NULL)
- return FALSE;
+ return false;
/* The .rel[a].bss section holds copy relocs. This section is not
normally needed. We need to create it here, though, so that the
linker will map it to an output section. We can't just create it
@@ -2304,45 +2304,45 @@ lm32_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info)
htab->srelbss = s;
if (s == NULL
|| !bfd_set_section_alignment (s, ptralign))
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return true;
}
-static bfd_boolean
+static bool
lm32_elf_always_size_sections (bfd *output_bfd, struct bfd_link_info *info)
{
if (!bfd_link_relocatable (info))
{
if (!bfd_elf_stack_segment_size (output_bfd, info,
"__stacksize", DEFAULT_STACK_SIZE))
- return FALSE;
+ return false;
asection *sec = bfd_get_section_by_name (output_bfd, ".stack");
if (sec)
sec->size = info->stacksize >= 0 ? info->stacksize : 0;
}
- return TRUE;
+ return true;
}
-static bfd_boolean
+static bool
lm32_elf_fdpic_copy_private_bfd_data (bfd *ibfd, bfd *obfd)
{
unsigned i;
if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour
|| bfd_get_flavour (obfd) != bfd_target_elf_flavour)
- return TRUE;
+ return true;
if (! _bfd_elf_copy_private_bfd_data (ibfd, obfd))
- return FALSE;
+ return false;
if (! elf_tdata (ibfd) || ! elf_tdata (ibfd)->phdr
|| ! elf_tdata (obfd) || ! elf_tdata (obfd)->phdr)
- return TRUE;
+ return true;
/* Copy the stack size. */
for (i = 0; i < elf_elfheader (ibfd)->e_phnum; i++)
@@ -2360,14 +2360,14 @@ lm32_elf_fdpic_copy_private_bfd_data (bfd *ibfd, bfd *obfd)
->s->sizeof_ehdr, SEEK_SET) != 0
|| get_elf_backend_data (obfd)->s->write_out_phdrs (obfd, elf_tdata (obfd)->phdr,
elf_elfheader (obfd)->e_phnum) != 0)
- return FALSE;
+ return false;
break;
}
break;
}
- return TRUE;
+ return true;
}