summaryrefslogtreecommitdiff
path: root/bfd/elf32-sh.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-sh.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-sh.c')
-rw-r--r--bfd/elf32-sh.c461
1 files changed, 230 insertions, 231 deletions
diff --git a/bfd/elf32-sh.c b/bfd/elf32-sh.c
index d1b760d8532..dae248f50e6 100644
--- a/bfd/elf32-sh.c
+++ b/bfd/elf32-sh.c
@@ -37,11 +37,11 @@ static bfd_reloc_status_type sh_elf_reloc
(bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
static bfd_reloc_status_type sh_elf_ignore_reloc
(bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
-static bfd_boolean sh_elf_relax_delete_bytes
+static bool sh_elf_relax_delete_bytes
(bfd *, asection *, bfd_vma, int);
-static bfd_boolean sh_elf_align_loads
- (bfd *, asection *, Elf_Internal_Rela *, bfd_byte *, bfd_boolean *);
-static bfd_boolean sh_elf_swap_insns
+static bool sh_elf_align_loads
+ (bfd *, asection *, Elf_Internal_Rela *, bfd_byte *, bool *);
+static bool sh_elf_swap_insns
(bfd *, asection *, void *, bfd_byte *, bfd_vma);
static int sh_elf_optimized_tls_reloc
(struct bfd_link_info *, int, int);
@@ -67,7 +67,7 @@ static bfd_vma tpoff
(SYMBOL_REFERENCES_LOCAL (INFO, H) \
|| ! elf_hash_table (INFO)->dynamic_sections_created)
-#define SH_PARTIAL32 TRUE
+#define SH_PARTIAL32 true
#define SH_SRC_MASK32 0xffffffff
#define SH_ELF_RELOC sh_elf_reloc
static reloc_howto_type sh_elf_howto_table[] =
@@ -75,7 +75,7 @@ static reloc_howto_type sh_elf_howto_table[] =
#include "elf32-sh-relocs.h"
};
-#define SH_PARTIAL32 FALSE
+#define SH_PARTIAL32 false
#define SH_SRC_MASK32 0
#define SH_ELF_RELOC bfd_elf_generic_reloc
static reloc_howto_type sh_vxworks_howto_table[] =
@@ -85,7 +85,7 @@ static reloc_howto_type sh_vxworks_howto_table[] =
/* Return true if OUTPUT_BFD is a VxWorks object. */
-static bfd_boolean
+static bool
vxworks_object_p (bfd *abfd ATTRIBUTE_UNUSED)
{
#if !defined SH_TARGET_ALREADY_DEFINED
@@ -95,13 +95,13 @@ vxworks_object_p (bfd *abfd ATTRIBUTE_UNUSED)
return (abfd->xvec == &sh_elf32_vxworks_le_vec
|| abfd->xvec == &sh_elf32_vxworks_vec);
#else
- return FALSE;
+ return false;
#endif
}
/* Return true if OUTPUT_BFD is an FDPIC object. */
-static bfd_boolean
+static bool
fdpic_object_p (bfd *abfd ATTRIBUTE_UNUSED)
{
#if !defined SH_TARGET_ALREADY_DEFINED
@@ -111,7 +111,7 @@ fdpic_object_p (bfd *abfd ATTRIBUTE_UNUSED)
return (abfd->xvec == &sh_elf32_fdpic_le_vec
|| abfd->xvec == &sh_elf32_fdpic_be_vec);
#else
- return FALSE;
+ return false;
#endif
}
@@ -419,7 +419,7 @@ sh_elf_reloc_name_lookup (bfd *abfd, const char *r_name)
/* Given an ELF reloc, fill in the howto field of a relent. */
-static bfd_boolean
+static bool
sh_elf_info_to_howto (bfd *abfd, arelent *cache_ptr, Elf_Internal_Rela *dst)
{
unsigned int r;
@@ -438,11 +438,11 @@ sh_elf_info_to_howto (bfd *abfd, arelent *cache_ptr, Elf_Internal_Rela *dst)
_bfd_error_handler (_("%pB: unsupported relocation type %#x"),
abfd, r);
bfd_set_error (bfd_error_bad_value);
- return FALSE;
+ return false;
}
cache_ptr->howto = get_howto_table (abfd) + r;
- return TRUE;
+ return true;
}
/* This function handles relaxing for SH ELF. See the corresponding
@@ -455,23 +455,23 @@ sh_elf_info_to_howto (bfd *abfd, arelent *cache_ptr, Elf_Internal_Rela *dst)
values; in coff-sh.c they come from include/coff/sh.h, whereas here
they come from enum elf_sh_reloc_type in include/elf/sh.h. */
-static bfd_boolean
+static bool
sh_elf_relax_section (bfd *abfd, asection *sec,
- struct bfd_link_info *link_info, bfd_boolean *again)
+ struct bfd_link_info *link_info, bool *again)
{
Elf_Internal_Shdr *symtab_hdr;
Elf_Internal_Rela *internal_relocs;
- bfd_boolean have_code;
+ bool have_code;
Elf_Internal_Rela *irel, *irelend;
bfd_byte *contents = NULL;
Elf_Internal_Sym *isymbuf = NULL;
- *again = FALSE;
+ *again = false;
if (bfd_link_relocatable (link_info)
|| (sec->flags & SEC_RELOC) == 0
|| sec->reloc_count == 0)
- return TRUE;
+ return true;
symtab_hdr = &elf_symtab_hdr (abfd);
@@ -481,7 +481,7 @@ sh_elf_relax_section (bfd *abfd, asection *sec,
if (internal_relocs == NULL)
goto error_return;
- have_code = FALSE;
+ have_code = false;
irelend = internal_relocs + sec->reloc_count;
for (irel = internal_relocs; irel < irelend; irel++)
@@ -492,7 +492,7 @@ sh_elf_relax_section (bfd *abfd, asection *sec,
bfd_signed_vma foff;
if (ELF32_R_TYPE (irel->r_info) == (int) R_SH_CODE)
- have_code = TRUE;
+ have_code = true;
if (ELF32_R_TYPE (irel->r_info) != (int) R_SH_USES)
continue;
@@ -717,7 +717,7 @@ sh_elf_relax_section (bfd *abfd, asection *sec,
/* That will change things, so, just in case it permits some
other function call to come within range, we should relax
again. Note that this is not required, and it may be slow. */
- *again = TRUE;
+ *again = true;
/* Now check whether we got a COUNT reloc. */
if (irelcount >= irelend)
@@ -759,7 +759,7 @@ sh_elf_relax_section (bfd *abfd, asection *sec,
if ((elf_elfheader (abfd)->e_flags & EF_SH_MACH_MASK) != EF_SH4
&& have_code)
{
- bfd_boolean swapped;
+ bool swapped;
/* Get the section contents. */
if (contents == NULL)
@@ -812,7 +812,7 @@ sh_elf_relax_section (bfd *abfd, asection *sec,
if (elf_section_data (sec)->relocs != internal_relocs)
free (internal_relocs);
- return TRUE;
+ return true;
error_return:
if (symtab_hdr->contents != (unsigned char *) isymbuf)
@@ -822,14 +822,14 @@ sh_elf_relax_section (bfd *abfd, asection *sec,
if (elf_section_data (sec)->relocs != internal_relocs)
free (internal_relocs);
- return FALSE;
+ return false;
}
/* Delete some bytes from a section while relaxing. FIXME: There is a
lot of duplication between this function and sh_relax_delete_bytes
in coff-sh.c. */
-static bfd_boolean
+static bool
sh_elf_relax_delete_bytes (bfd *abfd, asection *sec, bfd_vma addr,
int count)
{
@@ -896,7 +896,7 @@ sh_elf_relax_delete_bytes (bfd *abfd, asection *sec, bfd_vma addr,
int insn = 0;
int off, adjust, oinsn;
bfd_signed_vma voff = 0;
- bfd_boolean overflow;
+ bool overflow;
/* Get the new reloc address. */
nraddr = irel->r_offset;
@@ -1071,7 +1071,7 @@ sh_elf_relax_delete_bytes (bfd *abfd, asection *sec, bfd_vma addr,
if (adjust != 0)
{
oinsn = insn;
- overflow = FALSE;
+ overflow = false;
switch ((enum elf_sh_reloc_type) ELF32_R_TYPE (irel->r_info))
{
default:
@@ -1082,14 +1082,14 @@ sh_elf_relax_delete_bytes (bfd *abfd, asection *sec, bfd_vma addr,
case R_SH_DIR8WPZ:
insn += adjust / 2;
if ((oinsn & 0xff00) != (insn & 0xff00))
- overflow = TRUE;
+ overflow = true;
bfd_put_16 (abfd, (bfd_vma) insn, contents + nraddr);
break;
case R_SH_IND12W:
insn += adjust / 2;
if ((oinsn & 0xf000) != (insn & 0xf000))
- overflow = TRUE;
+ overflow = true;
bfd_put_16 (abfd, (bfd_vma) insn, contents + nraddr);
break;
@@ -1103,21 +1103,21 @@ sh_elf_relax_delete_bytes (bfd *abfd, asection *sec, bfd_vma addr,
++insn;
}
if ((oinsn & 0xff00) != (insn & 0xff00))
- overflow = TRUE;
+ overflow = true;
bfd_put_16 (abfd, (bfd_vma) insn, contents + nraddr);
break;
case R_SH_SWITCH8:
voff += adjust;
if (voff < 0 || voff >= 0xff)
- overflow = TRUE;
+ overflow = true;
bfd_put_8 (abfd, voff, contents + nraddr);
break;
case R_SH_SWITCH16:
voff += adjust;
if (voff < - 0x8000 || voff >= 0x8000)
- overflow = TRUE;
+ overflow = true;
bfd_put_signed_16 (abfd, (bfd_vma) voff, contents + nraddr);
break;
@@ -1138,7 +1138,7 @@ sh_elf_relax_delete_bytes (bfd *abfd, asection *sec, bfd_vma addr,
(_("%pB: %#" PRIx64 ": fatal: reloc overflow while relaxing"),
abfd, (uint64_t) irel->r_offset);
bfd_set_error (bfd_error_bad_value);
- return FALSE;
+ return false;
}
}
@@ -1163,9 +1163,9 @@ sh_elf_relax_delete_bytes (bfd *abfd, asection *sec, bfd_vma addr,
FALSE, we should free them, if we are permitted to, when we
leave sh_coff_relax_section. */
internal_relocs = (_bfd_elf_link_read_relocs
- (abfd, o, NULL, (Elf_Internal_Rela *) NULL, TRUE));
+ (abfd, o, NULL, (Elf_Internal_Rela *) NULL, true));
if (internal_relocs == NULL)
- return FALSE;
+ return false;
ocontents = NULL;
irelscanend = internal_relocs + o->reloc_count;
@@ -1190,7 +1190,7 @@ sh_elf_relax_delete_bytes (bfd *abfd, asection *sec, bfd_vma addr,
if (!bfd_malloc_and_get_section (abfd, o, &ocontents))
{
free (ocontents);
- return FALSE;
+ return false;
}
elf_section_data (o)->this_hdr.contents = ocontents;
@@ -1247,7 +1247,7 @@ sh_elf_relax_delete_bytes (bfd *abfd, asection *sec, bfd_vma addr,
if (!bfd_malloc_and_get_section (abfd, o, &ocontents))
{
free (ocontents);
- return FALSE;
+ return false;
}
elf_section_data (o)->this_hdr.contents = ocontents;
@@ -1308,24 +1308,24 @@ sh_elf_relax_delete_bytes (bfd *abfd, asection *sec, bfd_vma addr,
}
}
- return TRUE;
+ return true;
}
/* Look for loads and stores which we can align to four byte
boundaries. This is like sh_align_loads in coff-sh.c. */
-static bfd_boolean
+static bool
sh_elf_align_loads (bfd *abfd ATTRIBUTE_UNUSED, asection *sec,
Elf_Internal_Rela *internal_relocs,
bfd_byte *contents ATTRIBUTE_UNUSED,
- bfd_boolean *pswapped)
+ bool *pswapped)
{
Elf_Internal_Rela *irel, *irelend;
bfd_vma *labels = NULL;
bfd_vma *label, *label_end;
bfd_size_type amt;
- *pswapped = FALSE;
+ *pswapped = false;
irelend = internal_relocs + sec->reloc_count;
@@ -1376,16 +1376,16 @@ sh_elf_align_loads (bfd *abfd ATTRIBUTE_UNUSED, asection *sec,
free (labels);
- return TRUE;
+ return true;
error_return:
free (labels);
- return FALSE;
+ return false;
}
/* Swap two SH instructions. This is like sh_swap_insns in coff-sh.c. */
-static bfd_boolean
+static bool
sh_elf_swap_insns (bfd *abfd, asection *sec, void *relocs,
bfd_byte *contents, bfd_vma addr)
{
@@ -1450,10 +1450,10 @@ sh_elf_swap_insns (bfd *abfd, asection *sec, void *relocs,
{
bfd_byte *loc;
unsigned short insn, oinsn;
- bfd_boolean overflow;
+ bool overflow;
loc = contents + irel->r_offset;
- overflow = FALSE;
+ overflow = false;
switch (type)
{
default:
@@ -1465,7 +1465,7 @@ sh_elf_swap_insns (bfd *abfd, asection *sec, void *relocs,
oinsn = insn;
insn += add / 2;
if ((oinsn & 0xff00) != (insn & 0xff00))
- overflow = TRUE;
+ overflow = true;
bfd_put_16 (abfd, (bfd_vma) insn, loc);
break;
@@ -1474,7 +1474,7 @@ sh_elf_swap_insns (bfd *abfd, asection *sec, void *relocs,
oinsn = insn;
insn += add / 2;
if ((oinsn & 0xf000) != (insn & 0xf000))
- overflow = TRUE;
+ overflow = true;
bfd_put_16 (abfd, (bfd_vma) insn, loc);
break;
@@ -1491,7 +1491,7 @@ sh_elf_swap_insns (bfd *abfd, asection *sec, void *relocs,
oinsn = insn;
insn += add / 2;
if ((oinsn & 0xff00) != (insn & 0xff00))
- overflow = TRUE;
+ overflow = true;
bfd_put_16 (abfd, (bfd_vma) insn, loc);
}
@@ -1505,12 +1505,12 @@ sh_elf_swap_insns (bfd *abfd, asection *sec, void *relocs,
(_("%pB: %#" PRIx64 ": fatal: reloc overflow while relaxing"),
abfd, (uint64_t) irel->r_offset);
bfd_set_error (bfd_error_bad_value);
- return FALSE;
+ return false;
}
}
}
- return TRUE;
+ return true;
}
/* Describes one of the various PLT styles. */
@@ -1542,9 +1542,8 @@ struct elf_sh_plt_info
bfd_vma got_entry; /* the address of the symbol's .got.plt entry */
bfd_vma plt; /* .plt (or a branch to .plt on VxWorks) */
bfd_vma reloc_offset; /* the offset of the symbol's JMP_SLOT reloc */
- bfd_boolean got20; /* TRUE if got_entry points to a movi20
- instruction (instead of a constant pool
- entry). */
+ bool got20; /* TRUE if got_entry points to a movi20 instruction
+ (instead of a constant pool entry). */
} symbol_fields;
/* The offset of the resolver stub from the start of SYMBOL_ENTRY. */
@@ -1678,7 +1677,7 @@ static const struct elf_sh_plt_info elf_sh_plts[2][2] = {
{ MINUS_ONE, 24, 20 },
elf_sh_plt_entry_be,
ELF_PLT_ENTRY_SIZE,
- { 20, 16, 24, FALSE },
+ { 20, 16, 24, false },
8,
NULL
},
@@ -1689,7 +1688,7 @@ static const struct elf_sh_plt_info elf_sh_plts[2][2] = {
{ MINUS_ONE, 24, 20 },
elf_sh_plt_entry_le,
ELF_PLT_ENTRY_SIZE,
- { 20, 16, 24, FALSE },
+ { 20, 16, 24, false },
8,
NULL
},
@@ -1702,7 +1701,7 @@ static const struct elf_sh_plt_info elf_sh_plts[2][2] = {
{ MINUS_ONE, MINUS_ONE, MINUS_ONE },
elf_sh_pic_plt_entry_be,
ELF_PLT_ENTRY_SIZE,
- { 20, MINUS_ONE, 24, FALSE },
+ { 20, MINUS_ONE, 24, false },
8,
NULL
},
@@ -1713,7 +1712,7 @@ static const struct elf_sh_plt_info elf_sh_plts[2][2] = {
{ MINUS_ONE, MINUS_ONE, MINUS_ONE },
elf_sh_pic_plt_entry_le,
ELF_PLT_ENTRY_SIZE,
- { 20, MINUS_ONE, 24, FALSE },
+ { 20, MINUS_ONE, 24, false },
8,
NULL
},
@@ -1806,7 +1805,7 @@ static const struct elf_sh_plt_info vxworks_sh_plts[2][2] = {
{ MINUS_ONE, MINUS_ONE, 8 },
vxworks_sh_plt_entry_be,
VXWORKS_PLT_ENTRY_SIZE,
- { 8, 14, 20, FALSE },
+ { 8, 14, 20, false },
12,
NULL
},
@@ -1817,7 +1816,7 @@ static const struct elf_sh_plt_info vxworks_sh_plts[2][2] = {
{ MINUS_ONE, MINUS_ONE, 8 },
vxworks_sh_plt_entry_le,
VXWORKS_PLT_ENTRY_SIZE,
- { 8, 14, 20, FALSE },
+ { 8, 14, 20, false },
12,
NULL
},
@@ -1830,7 +1829,7 @@ static const struct elf_sh_plt_info vxworks_sh_plts[2][2] = {
{ MINUS_ONE, MINUS_ONE, MINUS_ONE },
vxworks_sh_pic_plt_entry_be,
VXWORKS_PLT_ENTRY_SIZE,
- { 8, MINUS_ONE, 20, FALSE },
+ { 8, MINUS_ONE, 20, false },
12,
NULL
},
@@ -1841,7 +1840,7 @@ static const struct elf_sh_plt_info vxworks_sh_plts[2][2] = {
{ MINUS_ONE, MINUS_ONE, MINUS_ONE },
vxworks_sh_pic_plt_entry_le,
VXWORKS_PLT_ENTRY_SIZE,
- { 8, MINUS_ONE, 20, FALSE },
+ { 8, MINUS_ONE, 20, false },
12,
NULL
},
@@ -1902,7 +1901,7 @@ static const struct elf_sh_plt_info fdpic_sh_plts[2] = {
{ MINUS_ONE, MINUS_ONE, MINUS_ONE },
fdpic_sh_plt_entry_be,
FDPIC_PLT_ENTRY_SIZE,
- { 12, MINUS_ONE, 16, FALSE },
+ { 12, MINUS_ONE, 16, false },
FDPIC_PLT_LAZY_OFFSET,
NULL
},
@@ -1913,7 +1912,7 @@ static const struct elf_sh_plt_info fdpic_sh_plts[2] = {
{ MINUS_ONE, MINUS_ONE, MINUS_ONE },
fdpic_sh_plt_entry_le,
FDPIC_PLT_ENTRY_SIZE,
- { 12, MINUS_ONE, 16, FALSE },
+ { 12, MINUS_ONE, 16, false },
FDPIC_PLT_LAZY_OFFSET,
NULL
},
@@ -1962,7 +1961,7 @@ static const struct elf_sh_plt_info fdpic_sh2a_short_plt_be = {
{ MINUS_ONE, MINUS_ONE, MINUS_ONE },
fdpic_sh2a_plt_entry_be,
FDPIC_SH2A_PLT_ENTRY_SIZE,
- { 0, MINUS_ONE, 12, TRUE },
+ { 0, MINUS_ONE, 12, true },
FDPIC_SH2A_PLT_LAZY_OFFSET,
NULL
};
@@ -1974,7 +1973,7 @@ static const struct elf_sh_plt_info fdpic_sh2a_short_plt_le = {
{ MINUS_ONE, MINUS_ONE, MINUS_ONE },
fdpic_sh2a_plt_entry_le,
FDPIC_SH2A_PLT_ENTRY_SIZE,
- { 0, MINUS_ONE, 12, TRUE },
+ { 0, MINUS_ONE, 12, true },
FDPIC_SH2A_PLT_LAZY_OFFSET,
NULL
};
@@ -1987,7 +1986,7 @@ static const struct elf_sh_plt_info fdpic_sh2a_plts[2] = {
{ MINUS_ONE, MINUS_ONE, MINUS_ONE },
fdpic_sh_plt_entry_be,
FDPIC_PLT_ENTRY_SIZE,
- { 12, MINUS_ONE, 16, FALSE },
+ { 12, MINUS_ONE, 16, false },
FDPIC_PLT_LAZY_OFFSET,
&fdpic_sh2a_short_plt_be
},
@@ -1998,7 +1997,7 @@ static const struct elf_sh_plt_info fdpic_sh2a_plts[2] = {
{ MINUS_ONE, MINUS_ONE, MINUS_ONE },
fdpic_sh_plt_entry_le,
FDPIC_PLT_ENTRY_SIZE,
- { 12, MINUS_ONE, 16, FALSE },
+ { 12, MINUS_ONE, 16, false },
FDPIC_PLT_LAZY_OFFSET,
&fdpic_sh2a_short_plt_le
},
@@ -2008,7 +2007,7 @@ static const struct elf_sh_plt_info fdpic_sh2a_plts[2] = {
the object is position-independent. */
static const struct elf_sh_plt_info *
-get_plt_info (bfd *abfd, bfd_boolean pic_p)
+get_plt_info (bfd *abfd, bool pic_p)
{
if (fdpic_object_p (abfd))
{
@@ -2029,7 +2028,7 @@ get_plt_info (bfd *abfd, bfd_boolean pic_p)
not data. */
inline static void
-install_plt_field (bfd *output_bfd, bfd_boolean code_p ATTRIBUTE_UNUSED,
+install_plt_field (bfd *output_bfd, bool code_p ATTRIBUTE_UNUSED,
unsigned long value, bfd_byte *addr)
{
bfd_put_32 (output_bfd, value, addr);
@@ -2146,7 +2145,7 @@ struct sh_elf_obj_tdata
/* Override the generic function because we need to store sh_elf_obj_tdata
as the specific tdata. */
-static bfd_boolean
+static bool
sh_elf_mkobject (bfd *abfd)
{
return bfd_elf_allocate_object (abfd, sizeof (struct sh_elf_obj_tdata),
@@ -2178,7 +2177,7 @@ struct elf_sh_link_hash_table
const struct elf_sh_plt_info *plt_info;
/* True if the target system uses FDPIC. */
- bfd_boolean fdpic_p;
+ bool fdpic_p;
};
/* Traverse an sh ELF linker hash table. */
@@ -2186,7 +2185,7 @@ struct elf_sh_link_hash_table
#define sh_elf_link_hash_traverse(table, func, info) \
(elf_link_hash_traverse \
(&(table)->root, \
- (bfd_boolean (*) (struct elf_link_hash_entry *, void *)) (func), \
+ (bool (*) (struct elf_link_hash_entry *, void *)) (func), \
(info)))
/* Get the sh ELF linker hash table from a link_info structure. */
@@ -2253,14 +2252,14 @@ sh_elf_link_hash_table_create (bfd *abfd)
if (fdpic_object_p (abfd))
{
- ret->root.dt_pltgot_required = TRUE;
- ret->fdpic_p = TRUE;
+ ret->root.dt_pltgot_required = true;
+ ret->fdpic_p = true;
}
return &ret->root.root;
}
-static bfd_boolean
+static bool
sh_elf_omit_section_dynsym (bfd *output_bfd ATTRIBUTE_UNUSED,
struct bfd_link_info *info, asection *p)
{
@@ -2268,7 +2267,7 @@ sh_elf_omit_section_dynsym (bfd *output_bfd ATTRIBUTE_UNUSED,
/* Non-FDPIC binaries do not need dynamic symbols for sections. */
if (!htab->fdpic_p)
- return TRUE;
+ return true;
/* We need dynamic symbols for every section, since segments can
relocate independently. */
@@ -2279,29 +2278,29 @@ sh_elf_omit_section_dynsym (bfd *output_bfd ATTRIBUTE_UNUSED,
/* If sh_type is yet undecided, assume it could be
SHT_PROGBITS/SHT_NOBITS. */
case SHT_NULL:
- return FALSE;
+ return false;
/* There shouldn't be section relative relocations
against any other section. */
default:
- return TRUE;
+ return true;
}
}
/* Create .got, .gotplt, and .rela.got sections in DYNOBJ, and set up
shortcuts to them in our hash table. */
-static bfd_boolean
+static bool
create_got_section (bfd *dynobj, struct bfd_link_info *info)
{
struct elf_sh_link_hash_table *htab;
if (! _bfd_elf_create_got_section (dynobj, info))
- return FALSE;
+ return false;
htab = sh_elf_hash_table (info);
if (htab == NULL)
- return FALSE;
+ return false;
htab->sfuncdesc = bfd_make_section_anyway_with_flags (dynobj, ".got.funcdesc",
(SEC_ALLOC | SEC_LOAD
@@ -2310,7 +2309,7 @@ create_got_section (bfd *dynobj, struct bfd_link_info *info)
| SEC_LINKER_CREATED));
if (htab->sfuncdesc == NULL
|| !bfd_set_section_alignment (htab->sfuncdesc, 2))
- return FALSE;
+ return false;
htab->srelfuncdesc = bfd_make_section_anyway_with_flags (dynobj,
".rela.got.funcdesc",
@@ -2321,7 +2320,7 @@ create_got_section (bfd *dynobj, struct bfd_link_info *info)
| SEC_READONLY));
if (htab->srelfuncdesc == NULL
|| !bfd_set_section_alignment (htab->srelfuncdesc, 2))
- return FALSE;
+ return false;
/* Also create .rofixup. */
htab->srofixup = bfd_make_section_anyway_with_flags (dynobj, ".rofixup",
@@ -2332,14 +2331,14 @@ create_got_section (bfd *dynobj, struct bfd_link_info *info)
| SEC_READONLY));
if (htab->srofixup == NULL
|| !bfd_set_section_alignment (htab->srofixup, 2))
- return FALSE;
+ return false;
- return TRUE;
+ return true;
}
/* Create dynamic sections when linking against a dynamic object. */
-static bfd_boolean
+static bool
sh_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info)
{
struct elf_sh_link_hash_table *htab;
@@ -2360,15 +2359,15 @@ sh_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info)
default:
bfd_set_error (bfd_error_bad_value);
- return FALSE;
+ return false;
}
htab = sh_elf_hash_table (info);
if (htab == NULL)
- return FALSE;
+ return false;
if (htab->root.dynamic_sections_created)
- return TRUE;
+ return true;
/* We need to create .plt, .rel[a].plt, .got, .got.plt, .dynbss, and
.rel[a].bss sections. */
@@ -2387,7 +2386,7 @@ sh_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)
{
@@ -2398,9 +2397,9 @@ sh_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, (const char *) NULL, FALSE,
+ (bfd_vma) 0, (const char *) NULL, false,
get_elf_backend_data (abfd)->collect, &bh)))
- return FALSE;
+ return false;
h = (struct elf_link_hash_entry *) bh;
h->def_regular = 1;
@@ -2409,7 +2408,7 @@ sh_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,
@@ -2419,11 +2418,11 @@ sh_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
&& !create_got_section (abfd, info))
- return FALSE;
+ return false;
if (bed->want_dynbss)
{
@@ -2437,7 +2436,7 @@ sh_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info)
SEC_ALLOC | SEC_LINKER_CREATED);
htab->root.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
@@ -2459,17 +2458,17 @@ sh_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info)
htab->root.srelbss = s;
if (s == NULL
|| !bfd_set_section_alignment (s, ptralign))
- return FALSE;
+ return false;
}
}
if (htab->root.target_os == is_vxworks)
{
if (!elf_vxworks_create_dynamic_sections (abfd, info, &htab->srelplt2))
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
/* Adjust a symbol defined by a dynamic object and referenced by a
@@ -2478,7 +2477,7 @@ sh_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info)
change the definition to something the rest of the link can
understand. */
-static bfd_boolean
+static bool
sh_elf_adjust_dynamic_symbol (struct bfd_link_info *info,
struct elf_link_hash_entry *h)
{
@@ -2487,7 +2486,7 @@ sh_elf_adjust_dynamic_symbol (struct bfd_link_info *info,
htab = sh_elf_hash_table (info);
if (htab == NULL)
- return FALSE;
+ return false;
/* Make sure we know what is going on here. */
BFD_ASSERT (htab->root.dynobj != NULL
@@ -2517,7 +2516,7 @@ sh_elf_adjust_dynamic_symbol (struct bfd_link_info *info,
h->needs_plt = 0;
}
- return TRUE;
+ return true;
}
else
h->plt.offset = (bfd_vma) -1;
@@ -2533,7 +2532,7 @@ sh_elf_adjust_dynamic_symbol (struct bfd_link_info *info,
h->root.u.def.value = def->root.u.def.value;
if (info->nocopyreloc)
h->non_got_ref = def->non_got_ref;
- return TRUE;
+ return true;
}
/* This is a reference to a symbol defined by a dynamic object which
@@ -2544,18 +2543,18 @@ sh_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
@@ -2563,7 +2562,7 @@ sh_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
@@ -2599,7 +2598,7 @@ sh_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;
@@ -2608,12 +2607,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 = sh_elf_hash_table (info);
if (htab == NULL)
- return FALSE;
+ return false;
eh = (struct elf_sh_link_hash_entry *) h;
if ((h->got.refcount > 0
@@ -2638,7 +2637,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 (bfd_link_pic (info)
@@ -2716,7 +2715,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
if (h->got.refcount > 0)
{
asection *s;
- bfd_boolean dyn;
+ bool dyn;
enum got_type got_type = sh_elf_hash_entry (h)->got_type;
/* Make sure this symbol is output as a dynamic symbol.
@@ -2725,7 +2724,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;
@@ -2818,7 +2817,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
}
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
@@ -2871,7 +2870,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;
}
}
}
@@ -2894,7 +2893,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
@@ -2919,14 +2918,14 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
htab->srofixup->size -= 4 * (p->count - p->pc_count);
}
- return TRUE;
+ return true;
}
/* This function is called after all the input files have been read,
and the input sections have been assigned to output sections.
It's a convenient place to determine the PLT style. */
-static bfd_boolean
+static bool
sh_elf_always_size_sections (bfd *output_bfd, struct bfd_link_info *info)
{
sh_elf_hash_table (info)->plt_info = get_plt_info (output_bfd,
@@ -2935,25 +2934,25 @@ sh_elf_always_size_sections (bfd *output_bfd, struct bfd_link_info *info)
if (sh_elf_hash_table (info)->fdpic_p && !bfd_link_relocatable (info)
&& !bfd_elf_stack_segment_size (output_bfd, info,
"__stacksize", DEFAULT_STACK_SIZE))
- return FALSE;
- return TRUE;
+ return false;
+ return true;
}
/* Set the sizes of the dynamic sections. */
-static bfd_boolean
+static bool
sh_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
struct bfd_link_info *info)
{
struct elf_sh_link_hash_table *htab;
bfd *dynobj;
asection *s;
- bfd_boolean relocs;
+ bool relocs;
bfd *ibfd;
htab = sh_elf_hash_table (info);
if (htab == NULL)
- return FALSE;
+ return false;
dynobj = htab->root.dynobj;
BFD_ASSERT (dynobj != NULL);
@@ -3061,7 +3060,7 @@ sh_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
local_funcdesc = (union gotref *) bfd_zalloc (ibfd,
size);
if (local_funcdesc == NULL)
- return FALSE;
+ return false;
sh_elf_local_funcdesc (ibfd) = local_funcdesc;
local_funcdesc += (local_got
- elf_local_got_refcounts (ibfd));
@@ -3136,7 +3135,7 @@ sh_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
/* 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)
@@ -3155,7 +3154,7 @@ sh_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
else if (startswith (bfd_section_name (s), ".rela"))
{
if (s->size != 0 && s != htab->root.srelplt && s != htab->srelplt2)
- relocs = TRUE;
+ relocs = true;
/* We use the reloc_count field as a counter if we need
to copy relocs into the output file. */
@@ -3193,7 +3192,7 @@ sh_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
of garbage. */
s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->size);
if (s->contents == NULL)
- return FALSE;
+ return false;
}
return _bfd_elf_maybe_vxworks_add_dynamic_tags (output_bfd, info,
@@ -3263,7 +3262,7 @@ sh_elf_osec_to_segment (bfd *output_bfd, asection *osec)
return (p != NULL) ? p - elf_tdata (output_bfd)->phdr : -1;
}
-static bfd_boolean
+static bool
sh_elf_osec_readonly_p (bfd *output_bfd, asection *osec)
{
unsigned seg = sh_elf_osec_to_segment (output_bfd, osec);
@@ -3274,7 +3273,7 @@ sh_elf_osec_readonly_p (bfd *output_bfd, asection *osec)
/* Generate the initial contents of a local function descriptor, along
with any relocations or fixups required. */
-static bfd_boolean
+static bool
sh_elf_initialize_funcdesc (bfd *output_bfd,
struct bfd_link_info *info,
struct elf_link_hash_entry *h,
@@ -3342,7 +3341,7 @@ sh_elf_initialize_funcdesc (bfd *output_bfd,
bfd_put_32 (output_bfd, addr, htab->sfuncdesc->contents + offset);
bfd_put_32 (output_bfd, seg, htab->sfuncdesc->contents + offset + 4);
- return TRUE;
+ return true;
}
/* Install a 20-bit movi20 field starting at ADDR, which occurs in OUTPUT_BFD.
@@ -3393,14 +3392,14 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
asection *splt = NULL;
asection *sreloc = NULL;
asection *srelgot = NULL;
- bfd_boolean is_vxworks_tls;
+ bool is_vxworks_tls;
unsigned isec_segment, got_segment, plt_segment, check_segment[2];
- bfd_boolean fdpic_p = FALSE;
+ bool fdpic_p = false;
if (!is_sh_elf (input_bfd))
{
bfd_set_error (bfd_error_wrong_format);
- return FALSE;
+ return false;
}
htab = sh_elf_hash_table (info);
@@ -3451,7 +3450,7 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
bfd_vma off;
enum got_type got_type;
const char *symname = NULL;
- bfd_boolean resolved_to_zero;
+ bool resolved_to_zero;
r_symndx = ELF32_R_SYM (rel->r_info);
@@ -3481,7 +3480,7 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
&& r_type <= (int) R_SH_LAST_INVALID_RELOC_6))
{
bfd_set_error (bfd_error_bad_value);
- return FALSE;
+ return false;
}
howto = get_howto_table (output_bfd) + r_type;
@@ -3491,7 +3490,7 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
if (! howto->partial_inplace)
addend = rel->r_addend;
- resolved_to_zero = FALSE;
+ resolved_to_zero = false;
h = NULL;
sym = NULL;
sec = NULL;
@@ -3568,7 +3567,7 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
"%s relocation against SEC_MERGE section"),
input_bfd, input_section,
(uint64_t) rel->r_offset, howto->name);
- return FALSE;
+ return false;
}
addend = bfd_get_32 (input_bfd, contents + rel->r_offset);
@@ -3594,9 +3593,9 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
if (h->root.type == bfd_link_hash_defined
|| h->root.type == bfd_link_hash_defweak)
{
- bfd_boolean dyn;
+ bool dyn;
- dyn = htab ? htab->root.dynamic_sections_created : FALSE;
+ dyn = htab ? htab->root.dynamic_sections_created : false;
sec = h->root.u.def.section;
/* In these cases, we don't need the relocation value.
We check specially because in some obscure cases
@@ -3677,7 +3676,7 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
(uint64_t) rel->r_offset,
howto->name,
h->root.root.string);
- return FALSE;
+ return false;
}
}
else if (h->root.type == bfd_link_hash_undefweak)
@@ -3756,7 +3755,7 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
input_section->owner,
(uint64_t) rel->r_offset);
bfd_set_error (bfd_error_bad_value);
- return FALSE;
+ return false;
}
relocation -= 4;
goto final_link_relocate;
@@ -3766,7 +3765,7 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
default:
bfd_set_error (bfd_error_bad_value);
- return FALSE;
+ return false;
case R_SH_DIR16:
case R_SH_DIR8:
@@ -3786,7 +3785,7 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
input_section->owner, (uint64_t) rel->r_offset,
howto->name, (uint64_t) relocation);
bfd_set_error (bfd_error_bad_value);
- return FALSE;
+ return false;
}
goto final_link_relocate;
@@ -3803,7 +3802,7 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
(uint64_t) rel->r_offset, howto->name,
(uint64_t) relocation);
bfd_set_error (bfd_error_bad_value);
- return FALSE;
+ return false;
}
goto final_link_relocate;
@@ -3819,7 +3818,7 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
(uint64_t) rel->r_offset,
(int64_t) relocation);
bfd_set_error (bfd_error_bad_value);
- return FALSE;
+ return false;
}
goto final_link_relocate;
@@ -3835,7 +3834,7 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
(uint64_t) rel->r_offset,
(int64_t) relocation);
bfd_set_error (bfd_error_bad_value);
- return FALSE;
+ return false;
}
goto final_link_relocate;
@@ -3854,7 +3853,7 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
{
Elf_Internal_Rela outrel;
bfd_byte *loc;
- bfd_boolean skip, relocate;
+ bool skip, relocate;
/* When generating a shared object, these relocations
are copied into the output file to be resolved at run
@@ -3863,21 +3862,21 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
if (sreloc == NULL)
{
sreloc = _bfd_elf_get_dynamic_reloc_section
- (input_bfd, input_section, /*rela?*/ TRUE);
+ (input_bfd, input_section, /*rela?*/ true);
if (sreloc == NULL)
- return FALSE;
+ return false;
}
- skip = FALSE;
- relocate = FALSE;
+ skip = false;
+ relocate = false;
outrel.r_offset =
_bfd_elf_section_offset (output_bfd, info, input_section,
rel->r_offset);
if (outrel.r_offset == (bfd_vma) -1)
- skip = TRUE;
+ skip = true;
else if (outrel.r_offset == (bfd_vma) -2)
- skip = TRUE, relocate = TRUE;
+ skip = true, relocate = true;
outrel.r_offset += (input_section->output_section->vma
+ input_section->output_offset);
@@ -3965,7 +3964,7 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
input_section,
(uint64_t) rel->r_offset,
symname);
- return FALSE;
+ return false;
}
offset = _bfd_elf_section_offset (output_bfd, info,
@@ -4026,7 +4025,7 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
if (h != NULL)
{
- bfd_boolean dyn;
+ bool dyn;
off = h->got.offset;
BFD_ASSERT (off != (bfd_vma) -1);
@@ -4321,7 +4320,7 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
{
if (!sh_elf_initialize_funcdesc (output_bfd, info, h,
offset, NULL, 0))
- return FALSE;
+ return false;
sh_elf_hash_entry (h)->funcdesc.offset |= 1;
}
}
@@ -4337,7 +4336,7 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
if (!sh_elf_initialize_funcdesc (output_bfd, info, NULL,
offset, sec,
sym->st_value))
- return FALSE;
+ return false;
local_funcdesc[r_symndx].offset |= 1;
}
}
@@ -4360,7 +4359,7 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
input_section,
(uint64_t) rel->r_offset,
symname);
- return FALSE;
+ return false;
}
offset = _bfd_elf_section_offset (output_bfd, info,
@@ -4384,7 +4383,7 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
(info,
_("cannot emit dynamic relocations in read-only section"),
symname, input_bfd, reloc_section, reloc_offset);
- return FALSE;
+ return false;
}
offset = _bfd_elf_section_offset (output_bfd, info,
@@ -4461,7 +4460,7 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
"%s relocation against external symbol \"%s\""),
input_bfd, input_section, (uint64_t) rel->r_offset,
howto->name, h->root.root.string);
- return FALSE;
+ return false;
}
else
{
@@ -4477,7 +4476,7 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
{
if (!sh_elf_initialize_funcdesc (output_bfd, info, h,
offset, NULL, 0))
- return FALSE;
+ return false;
sh_elf_hash_entry (h)->funcdesc.offset |= 1;
}
}
@@ -4493,7 +4492,7 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
if (!sh_elf_initialize_funcdesc (output_bfd, info, NULL,
offset, sec,
sym->st_value))
- return FALSE;
+ return false;
local_funcdesc[r_symndx].offset |= 1;
}
}
@@ -4578,7 +4577,7 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
/* xgettext:c-format */
(_("%pB(%pA): offset in relocation for GD->LE translation is too small: %#" PRIx64),
input_bfd, input_section, (uint64_t) offset);
- return FALSE;
+ return false;
}
/* Size of GD instructions is 16 or 18. */
@@ -4667,7 +4666,7 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
/* xgettext:c-format */
(_("%pB(%pA): offset in relocation for IE->LE translation is too small: %#" PRIx64),
input_bfd, input_section, (uint64_t) offset);
- return FALSE;
+ return false;
}
/* Size of IE instructions is 10 or 12. */
@@ -4816,7 +4815,7 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
/* xgettext:c-format */
(_("%pB(%pA): offset in relocation for GD->IE translation is too small: %#" PRIx64),
input_bfd, input_section, (uint64_t) offset);
- return FALSE;
+ return false;
}
/* Size of GD instructions is 16 or 18. */
@@ -4884,7 +4883,7 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
/* xgettext:c-format */
(_("%pB(%pA): offset in relocation for LD->LE translation is too small: %#" PRIx64),
input_bfd, input_section, (uint64_t) offset);
- return FALSE;
+ return false;
}
/* Size of LD instructions is 16 or 18. */
@@ -4973,9 +4972,9 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
if (sreloc == NULL)
{
sreloc = _bfd_elf_get_dynamic_reloc_section
- (input_bfd, input_section, /*rela?*/ TRUE);
+ (input_bfd, input_section, /*rela?*/ true);
if (sreloc == NULL)
- return FALSE;
+ return false;
}
if (h == NULL || h->dynindx == -1)
@@ -5012,7 +5011,7 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
/* xgettext:c-format */
(_("%X%C: relocation to \"%s\" references a different segment\n"),
input_bfd, input_section, rel->r_offset, symname);
- return FALSE;
+ return false;
}
else
info->callbacks->einfo
@@ -5042,7 +5041,7 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
name = (bfd_elf_string_from_elf_section
(input_bfd, symtab_hdr->sh_link, sym->st_name));
if (name == NULL)
- return FALSE;
+ return false;
if (*name == '\0')
name = bfd_section_name (sec);
}
@@ -5055,7 +5054,7 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
}
}
- return TRUE;
+ return true;
}
/* This is a version of bfd_generic_get_relocated_section_contents
@@ -5066,7 +5065,7 @@ sh_elf_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;
@@ -5099,7 +5098,7 @@ sh_elf_get_relocated_section_contents (bfd *output_bfd,
internal_relocs = (_bfd_elf_link_read_relocs
(input_bfd, input_section, NULL,
- (Elf_Internal_Rela *) NULL, FALSE));
+ (Elf_Internal_Rela *) NULL, false));
if (internal_relocs == NULL)
goto error_return;
@@ -5273,7 +5272,7 @@ sh_elf_optimized_tls_reloc (struct bfd_link_info *info, int r_type,
Since we don't do .gots or .plts, we just need to consider the
virtual table relocs for gc. */
-static bfd_boolean
+static bool
sh_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec,
const Elf_Internal_Rela *relocs)
{
@@ -5289,7 +5288,7 @@ sh_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec,
sreloc = NULL;
if (bfd_link_relocatable (info))
- return TRUE;
+ return true;
BFD_ASSERT (is_sh_elf (abfd));
@@ -5298,7 +5297,7 @@ sh_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec,
htab = sh_elf_hash_table (info);
if (htab == NULL)
- return FALSE;
+ return false;
rel_end = relocs + sec->reloc_count;
for (rel = relocs; rel < rel_end; rel++)
@@ -5380,7 +5379,7 @@ sh_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec,
if (htab->root.dynobj == NULL)
htab->root.dynobj = abfd;
if (!create_got_section (htab->root.dynobj, info))
- return FALSE;
+ return false;
break;
default:
@@ -5394,14 +5393,14 @@ sh_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec,
Reconstruct it for later use during GC. */
case R_SH_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_SH_GNU_VTENTRY:
if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend))
- return FALSE;
+ return false;
break;
case R_SH_TLS_IE_32:
@@ -5454,7 +5453,7 @@ sh_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec,
local_got_refcounts = ((bfd_signed_vma *)
bfd_zalloc (abfd, size));
if (local_got_refcounts == NULL)
- return FALSE;
+ return false;
elf_local_got_refcounts (abfd) = local_got_refcounts;
sh_elf_local_got_type (abfd)
= (char *) (local_got_refcounts + symtab_hdr->sh_info);
@@ -5489,7 +5488,7 @@ sh_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec,
/* xgettext:c-format */
(_("%pB: `%s' accessed both as normal and thread local symbol"),
abfd, h->root.root.string);
- return FALSE;
+ return false;
}
}
@@ -5515,7 +5514,7 @@ sh_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec,
_bfd_error_handler
(_("%pB: Function descriptor relocation with non-zero addend"),
abfd);
- return FALSE;
+ return false;
}
if (h == NULL)
@@ -5531,7 +5530,7 @@ sh_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec,
size = symtab_hdr->sh_info * sizeof (union gotref);
local_funcdesc = (union gotref *) bfd_zalloc (abfd, size);
if (local_funcdesc == NULL)
- return FALSE;
+ return false;
sh_elf_local_funcdesc (abfd) = local_funcdesc;
}
local_funcdesc[r_symndx].refcount += 1;
@@ -5658,10 +5657,10 @@ sh_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec,
if (sreloc == NULL)
{
sreloc = _bfd_elf_make_dynamic_reloc_section
- (sec, htab->root.dynobj, 2, abfd, /*rela?*/ TRUE);
+ (sec, htab->root.dynobj, 2, abfd, /*rela?*/ true);
if (sreloc == NULL)
- return FALSE;
+ return false;
}
/* If this is a global symbol, we count the number of
@@ -5678,7 +5677,7 @@ sh_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec,
isym = bfd_sym_from_r_symndx (&htab->root.sym_cache,
abfd, r_symndx);
if (isym == NULL)
- return FALSE;
+ return false;
s = bfd_section_from_elf_index (abfd, isym->st_shndx);
if (s == NULL)
@@ -5694,7 +5693,7 @@ sh_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec,
size_t amt = sizeof (*p);
p = bfd_alloc (htab->root.dynobj, amt);
if (p == NULL)
- return FALSE;
+ return false;
p->next = *head;
*head = p;
p->sec = sec;
@@ -5722,7 +5721,7 @@ sh_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec,
_bfd_error_handler
(_("%pB: TLS local exec code cannot be linked into shared objects"),
abfd);
- return FALSE;
+ return false;
}
break;
@@ -5736,26 +5735,26 @@ sh_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec,
}
}
- return TRUE;
+ return true;
}
#ifndef sh_elf_set_mach_from_flags
static unsigned int sh_ef_bfd_table[] = { EF_SH_BFD_TABLE };
-static bfd_boolean
+static bool
sh_elf_set_mach_from_flags (bfd *abfd)
{
flagword flags = elf_elfheader (abfd)->e_flags & EF_SH_MACH_MASK;
if (flags >= ARRAY_SIZE (sh_ef_bfd_table))
- return FALSE;
+ return false;
if (sh_ef_bfd_table[flags] == 0)
- return FALSE;
+ return false;
bfd_default_set_arch_mach (abfd, bfd_arch_sh, sh_ef_bfd_table[flags]);
- return TRUE;
+ return true;
}
@@ -5783,14 +5782,14 @@ sh_elf_get_flags_from_mach (unsigned long mach)
#ifndef sh_elf_copy_private_data
/* Copy backend specific data from one object module to another */
-static bfd_boolean
+static bool
sh_elf_copy_private_data (bfd * ibfd, bfd * obfd)
{
if (! is_sh_elf (ibfd) || ! is_sh_elf (obfd))
- return TRUE;
+ return true;
if (! _bfd_elf_copy_private_bfd_data (ibfd, obfd))
- return FALSE;
+ return false;
return sh_elf_set_mach_from_flags (obfd);
}
@@ -5817,14 +5816,14 @@ sh_find_elf_flags (unsigned int arch_set)
DSP while the other uses FPU - or there is no known architecture
that fits the requirements then an error is emitted. */
-static bfd_boolean
+static bool
sh_merge_bfd_arch (bfd *ibfd, struct bfd_link_info *info)
{
bfd *obfd = info->output_bfd;
unsigned int old_arch, new_arch, merged_arch;
if (! _bfd_generic_verify_endian_match (ibfd, info))
- return FALSE;
+ return false;
old_arch = sh_get_arch_up_from_bfd_mach (bfd_get_mach (obfd));
new_arch = sh_get_arch_up_from_bfd_mach (bfd_get_mach (ibfd));
@@ -5841,7 +5840,7 @@ sh_merge_bfd_arch (bfd *ibfd, struct bfd_link_info *info)
SH_ARCH_SET_HAS_DSP (new_arch) ? "dsp" : "floating point",
SH_ARCH_SET_HAS_DSP (new_arch) ? "floating point" : "dsp");
bfd_set_error (bfd_error_bad_value);
- return FALSE;
+ return false;
}
else if (!SH_VALID_ARCH_SET (merged_arch))
{
@@ -5852,34 +5851,34 @@ sh_merge_bfd_arch (bfd *ibfd, struct bfd_link_info *info)
bfd_printable_name (obfd),
bfd_printable_name (ibfd));
bfd_set_error (bfd_error_bad_value);
- return FALSE;
+ return false;
}
bfd_default_set_arch_mach (obfd, bfd_arch_sh,
sh_get_bfd_mach_from_arch_set (merged_arch));
- return TRUE;
+ return true;
}
/* This routine initialises the elf flags when required and
calls sh_merge_bfd_arch() to check dsp/fpu compatibility. */
-static bfd_boolean
+static bool
sh_elf_merge_private_data (bfd *ibfd, struct bfd_link_info *info)
{
bfd *obfd = info->output_bfd;
/* FIXME: What should be checked when linking shared libraries? */
if ((ibfd->flags & DYNAMIC) != 0)
- return TRUE;
+ return true;
if (! is_sh_elf (ibfd) || ! is_sh_elf (obfd))
- return TRUE;
+ return true;
if (! elf_flags_init (obfd))
{
/* This happens when ld starts out with a 'blank' output file. */
- elf_flags_init (obfd) = TRUE;
+ elf_flags_init (obfd) = true;
elf_elfheader (obfd)->e_flags = elf_elfheader (ibfd)->e_flags;
sh_elf_set_mach_from_flags (obfd);
if (elf_elfheader (obfd)->e_flags & EF_SH_FDPIC)
@@ -5892,7 +5891,7 @@ sh_elf_merge_private_data (bfd *ibfd, struct bfd_link_info *info)
"with instructions used in previous modules"),
ibfd);
bfd_set_error (bfd_error_bad_value);
- return FALSE;
+ return false;
}
elf_elfheader (obfd)->e_flags &= ~EF_SH_MACH_MASK;
@@ -5904,10 +5903,10 @@ sh_elf_merge_private_data (bfd *ibfd, struct bfd_link_info *info)
_bfd_error_handler (_("%pB: attempt to mix FDPIC and non-FDPIC objects"),
ibfd);
bfd_set_error (bfd_error_bad_value);
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
#endif /* not sh_elf_merge_private_data */
@@ -5915,11 +5914,11 @@ sh_elf_merge_private_data (bfd *ibfd, struct bfd_link_info *info)
as the specific tdata. We set also the machine architecture from flags
here. */
-static bfd_boolean
+static bool
sh_elf_object_p (bfd *abfd)
{
if (! sh_elf_set_mach_from_flags (abfd))
- return FALSE;
+ return false;
return (((elf_elfheader (abfd)->e_flags & EF_SH_FDPIC) != 0)
== fdpic_object_p (abfd));
@@ -5928,7 +5927,7 @@ sh_elf_object_p (bfd *abfd)
/* Finish up dynamic symbol handling. We set the contents of various
dynamic sections here. */
-static bfd_boolean
+static bool
sh_elf_finish_dynamic_symbol (bfd *output_bfd, struct bfd_link_info *info,
struct elf_link_hash_entry *h,
Elf_Internal_Sym *sym)
@@ -5937,7 +5936,7 @@ sh_elf_finish_dynamic_symbol (bfd *output_bfd, struct bfd_link_info *info,
htab = sh_elf_hash_table (info);
if (htab == NULL)
- return FALSE;
+ return false;
if (h->plt.offset != (bfd_vma) -1)
{
@@ -6005,7 +6004,7 @@ sh_elf_finish_dynamic_symbol (bfd *output_bfd, struct bfd_link_info *info,
BFD_ASSERT (r == bfd_reloc_ok);
}
else
- install_plt_field (output_bfd, FALSE, got_offset,
+ install_plt_field (output_bfd, false, got_offset,
(splt->contents
+ h->plt.offset
+ plt_info->symbol_fields.got_entry));
@@ -6014,7 +6013,7 @@ sh_elf_finish_dynamic_symbol (bfd *output_bfd, struct bfd_link_info *info,
{
BFD_ASSERT (!plt_info->symbol_fields.got20);
- install_plt_field (output_bfd, FALSE,
+ install_plt_field (output_bfd, false,
(sgotplt->output_section->vma
+ sgotplt->output_offset
+ got_offset),
@@ -6053,7 +6052,7 @@ sh_elf_finish_dynamic_symbol (bfd *output_bfd, struct bfd_link_info *info,
+ plt_info->symbol_fields.plt));
}
else
- install_plt_field (output_bfd, TRUE,
+ install_plt_field (output_bfd, true,
splt->output_section->vma + splt->output_offset,
(splt->contents
+ h->plt.offset
@@ -6069,7 +6068,7 @@ sh_elf_finish_dynamic_symbol (bfd *output_bfd, struct bfd_link_info *info,
got_offset = plt_index * 8;
if (plt_info->symbol_fields.reloc_offset != MINUS_ONE)
- install_plt_field (output_bfd, FALSE,
+ install_plt_field (output_bfd, false,
plt_index * sizeof (Elf32_External_Rela),
(splt->contents
+ h->plt.offset
@@ -6228,12 +6227,12 @@ sh_elf_finish_dynamic_symbol (bfd *output_bfd, struct bfd_link_info *info,
|| (htab->root.target_os != is_vxworks && h == htab->root.hgot))
sym->st_shndx = SHN_ABS;
- return TRUE;
+ return true;
}
/* Finish up the dynamic sections. */
-static bfd_boolean
+static bool
sh_elf_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info)
{
struct elf_sh_link_hash_table *htab;
@@ -6242,7 +6241,7 @@ sh_elf_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info)
htab = sh_elf_hash_table (info);
if (htab == NULL)
- return FALSE;
+ return false;
sgotplt = htab->root.sgotplt;
sdyn = bfd_get_linker_section (htab->root.dynobj, ".dynamic");
@@ -6306,7 +6305,7 @@ sh_elf_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info)
htab->plt_info->plt0_entry_size);
for (i = 0; i < ARRAY_SIZE (htab->plt_info->plt0_got_fields); i++)
if (htab->plt_info->plt0_got_fields[i] != MINUS_ONE)
- install_plt_field (output_bfd, FALSE,
+ install_plt_field (output_bfd, false,
(sgotplt->output_section->vma
+ sgotplt->output_offset
+ (i * 4)),
@@ -6396,7 +6395,7 @@ sh_elf_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info)
BFD_ASSERT (htab->root.srelgot->reloc_count * sizeof (Elf32_External_Rela)
== htab->root.srelgot->size);
- return TRUE;
+ return true;
}
static enum elf_reloc_type_class
@@ -6420,7 +6419,7 @@ sh_elf_reloc_type_class (const struct bfd_link_info *info ATTRIBUTE_UNUSED,
#if !defined SH_TARGET_ALREADY_DEFINED
/* Support for Linux core dump NOTE sections. */
-static bfd_boolean
+static bool
elf32_shlin_grok_prstatus (bfd *abfd, Elf_Internal_Note *note)
{
int offset;
@@ -6429,7 +6428,7 @@ elf32_shlin_grok_prstatus (bfd *abfd, Elf_Internal_Note *note)
switch (note->descsz)
{
default:
- return FALSE;
+ return false;
case 168: /* Linux/SH */
/* pr_cursig */
@@ -6450,13 +6449,13 @@ elf32_shlin_grok_prstatus (bfd *abfd, Elf_Internal_Note *note)
size, note->descpos + offset);
}
-static bfd_boolean
+static bool
elf32_shlin_grok_psinfo (bfd *abfd, Elf_Internal_Note *note)
{
switch (note->descsz)
{
default:
- return FALSE;
+ return false;
case 124: /* Linux/SH elf_prpsinfo */
elf_tdata (abfd)->core->program
@@ -6477,7 +6476,7 @@ elf32_shlin_grok_psinfo (bfd *abfd, Elf_Internal_Note *note)
command[n - 1] = '\0';
}
- return TRUE;
+ return true;
}
#endif /* not SH_TARGET_ALREADY_DEFINED */
@@ -6498,7 +6497,7 @@ sh_elf_plt_sym_val (bfd_vma i, const asection *plt,
/* Decide whether to attempt to turn absptr or lsda encodings in
shared libraries into pcrel within the given input section. */
-static bfd_boolean
+static bool
sh_elf_use_relative_eh_frame (bfd *input_bfd ATTRIBUTE_UNUSED,
struct bfd_link_info *info,
asection *eh_frame_section ATTRIBUTE_UNUSED)
@@ -6507,9 +6506,9 @@ sh_elf_use_relative_eh_frame (bfd *input_bfd ATTRIBUTE_UNUSED,
/* We can't use PC-relative encodings in FDPIC binaries, in general. */
if (htab->fdpic_p)
- return FALSE;
+ return false;
- return TRUE;
+ return true;
}
/* Adjust the contents of an eh_frame_hdr section before they're output. */
@@ -6618,7 +6617,7 @@ sh_elf_encode_eh_address (bfd *abfd,
#define elf_backend_got_header_size 12
#define elf_backend_dtrel_excludes_plt 1
-#define elf_backend_linux_prpsinfo32_ugid16 TRUE
+#define elf_backend_linux_prpsinfo32_ugid16 true
#if !defined SH_TARGET_ALREADY_DEFINED