aboutsummaryrefslogtreecommitdiff
path: root/bfd/elfxx-x86.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/elfxx-x86.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/elfxx-x86.c')
-rw-r--r--bfd/elfxx-x86.c178
1 files changed, 89 insertions, 89 deletions
diff --git a/bfd/elfxx-x86.c b/bfd/elfxx-x86.c
index 81c1e5c..62d516a 100644
--- a/bfd/elfxx-x86.c
+++ b/bfd/elfxx-x86.c
@@ -31,7 +31,7 @@
#define ELF64_DYNAMIC_INTERPRETER "/lib/ld64.so.1"
#define ELFX32_DYNAMIC_INTERPRETER "/lib/ldx32.so.1"
-bfd_boolean
+bool
_bfd_x86_elf_mkobject (bfd *abfd)
{
return bfd_elf_allocate_object (abfd,
@@ -82,7 +82,7 @@ _bfd_x86_elf_dtpoff_base (struct bfd_link_info *info)
/* Allocate space in .plt, .got and associated reloc sections for
dynamic relocs. */
-static bfd_boolean
+static bool
elf_x86_allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
{
struct bfd_link_info *info;
@@ -90,11 +90,11 @@ elf_x86_allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
struct elf_x86_link_hash_entry *eh;
struct elf_dyn_relocs *p;
unsigned int plt_entry_size;
- bfd_boolean resolved_to_zero;
+ bool resolved_to_zero;
const struct elf_backend_data *bed;
if (h->root.type == bfd_link_hash_indirect)
- return TRUE;
+ return true;
eh = (struct elf_x86_link_hash_entry *) h;
@@ -102,7 +102,7 @@ elf_x86_allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
bed = get_elf_backend_data (info->output_bfd);
htab = elf_x86_hash_table (info, bed->target_id);
if (htab == NULL)
- return FALSE;
+ return false;
plt_entry_size = htab->plt.plt_entry_size;
@@ -136,7 +136,7 @@ elf_x86_allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
(htab->plt.has_plt0
* plt_entry_size),
htab->got_entry_size,
- TRUE))
+ true))
{
asection *s = htab->plt_second;
if (h->plt.offset != (bfd_vma) -1 && s != NULL)
@@ -148,10 +148,10 @@ elf_x86_allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
s->size += htab->non_lazy_plt->plt_entry_size;
}
- return TRUE;
+ return true;
}
else
- return FALSE;
+ return false;
}
/* Don't create the PLT entry if there are only function pointer
relocations which can be resolved at run-time. */
@@ -159,7 +159,7 @@ elf_x86_allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
&& (h->plt.refcount > 0
|| eh->plt_got.refcount > 0))
{
- bfd_boolean use_plt_got = eh->plt_got.refcount > 0;
+ bool use_plt_got = eh->plt_got.refcount > 0;
/* Make sure this symbol is output as a dynamic symbol.
Undefined weak syms won't yet be marked as dynamic. */
@@ -169,7 +169,7 @@ elf_x86_allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
&& h->root.type == bfd_link_hash_undefweak)
{
if (! bfd_elf_link_record_dynamic_symbol (info, h))
- return FALSE;
+ return false;
}
if (bfd_link_pic (info)
@@ -178,7 +178,7 @@ elf_x86_allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
asection *s = htab->elf.splt;
asection *second_s = htab->plt_second;
asection *got_s = htab->plt_got;
- bfd_boolean use_plt;
+ bool use_plt;
/* If this is the first .plt entry, make room for the special
first entry. The .plt section is used by prelink to undo
@@ -203,7 +203,7 @@ elf_x86_allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
NB: If PLT is PC-relative, we can use the .plt in PIE for
function address. */
if (h->def_regular)
- use_plt = FALSE;
+ use_plt = false;
else if (htab->pcrel_plt)
use_plt = ! bfd_link_dll (info);
else
@@ -308,7 +308,7 @@ elf_x86_allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
else if (h->got.refcount > 0)
{
asection *s;
- bfd_boolean dyn;
+ bool dyn;
int tls_type = elf_x86_hash_entry (h)->tls_type;
/* Make sure this symbol is output as a dynamic symbol.
@@ -319,7 +319,7 @@ elf_x86_allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
&& h->root.type == bfd_link_hash_undefweak)
{
if (! bfd_elf_link_record_dynamic_symbol (info, h))
- return FALSE;
+ return false;
}
s = htab->elf.sgot;
@@ -375,7 +375,7 @@ elf_x86_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
@@ -451,7 +451,7 @@ elf_x86_allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
non-PLT reloations. */
if (h->dyn_relocs != NULL
&& !bfd_elf_link_record_dynamic_symbol (info, h))
- return FALSE;
+ return false;
}
else
h->dyn_relocs = NULL;
@@ -459,7 +459,7 @@ elf_x86_allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
else if (h->dynindx == -1
&& !h->forced_local
&& !bfd_elf_link_record_dynamic_symbol (info, h))
- return FALSE;
+ return false;
}
else if (bfd_link_executable (info)
&& (h->needs_copy || eh->needs_copy)
@@ -504,7 +504,7 @@ elf_x86_allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
&& !resolved_to_zero
&& h->root.type == bfd_link_hash_undefweak
&& ! bfd_elf_link_record_dynamic_symbol (info, h))
- return FALSE;
+ return false;
/* If that succeeded, we know we'll be keeping all the
relocs. */
@@ -528,7 +528,7 @@ elf_x86_allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
sreloc->size += p->count * htab->sizeof_reloc;
}
- return TRUE;
+ return true;
}
/* Allocate space in .plt, .got and associated reloc sections for
@@ -555,7 +555,7 @@ elf_x86_allocate_local_dynreloc (void **slot, void *inf)
struct elf_link_hash_entry *
_bfd_elf_x86_get_local_sym_hash (struct elf_x86_link_hash_table *htab,
bfd *abfd, const Elf_Internal_Rela *rel,
- bfd_boolean create)
+ bool create)
{
struct elf_x86_link_hash_entry e, *ret;
asection *sec = abfd->sections;
@@ -683,13 +683,13 @@ elf_x86_link_hash_table_free (bfd *obfd)
_bfd_elf_link_hash_table_free (obfd);
}
-static bfd_boolean
+static bool
elf_i386_is_reloc_section (const char *secname)
{
return startswith (secname, ".rel");
}
-static bfd_boolean
+static bool
elf_x86_64_is_reloc_section (const char *secname)
{
return startswith (secname, ".rela");
@@ -722,7 +722,7 @@ _bfd_x86_elf_link_hash_table_create (bfd *abfd)
{
ret->is_reloc_section = elf_x86_64_is_reloc_section;
ret->got_entry_size = 8;
- ret->pcrel_plt = TRUE;
+ ret->pcrel_plt = true;
ret->tls_get_addr = "__tls_get_addr";
}
if (ABI_64_P (abfd))
@@ -747,7 +747,7 @@ _bfd_x86_elf_link_hash_table_create (bfd *abfd)
ret->is_reloc_section = elf_i386_is_reloc_section;
ret->sizeof_reloc = sizeof (Elf32_External_Rel);
ret->got_entry_size = 4;
- ret->pcrel_plt = FALSE;
+ ret->pcrel_plt = false;
ret->pointer_r_type = R_386_32;
ret->dynamic_interpreter = ELF32_DYNAMIC_INTERPRETER;
ret->dynamic_interpreter_size
@@ -796,7 +796,7 @@ elf_x86_linker_defined (struct bfd_link_info *info, const char *name)
struct elf_link_hash_entry *h;
h = elf_link_hash_lookup (elf_hash_table (info), name,
- FALSE, FALSE, FALSE);
+ false, false, false);
if (h == NULL)
return;
@@ -823,7 +823,7 @@ elf_x86_hide_linker_defined (struct bfd_link_info *info,
struct elf_link_hash_entry *h;
h = elf_link_hash_lookup (elf_hash_table (info), name,
- FALSE, FALSE, FALSE);
+ false, false, false);
if (h == NULL)
return;
@@ -832,10 +832,10 @@ elf_x86_hide_linker_defined (struct bfd_link_info *info,
if (ELF_ST_VISIBILITY (h->other) == STV_INTERNAL
|| ELF_ST_VISIBILITY (h->other) == STV_HIDDEN)
- _bfd_elf_link_hash_hide_symbol (info, h, TRUE);
+ _bfd_elf_link_hash_hide_symbol (info, h, true);
}
-bfd_boolean
+bool
_bfd_x86_elf_link_check_relocs (bfd *abfd, struct bfd_link_info *info)
{
if (!bfd_link_relocatable (info))
@@ -850,7 +850,7 @@ _bfd_x86_elf_link_check_relocs (bfd *abfd, struct bfd_link_info *info)
h = elf_link_hash_lookup (elf_hash_table (info),
htab->tls_get_addr,
- FALSE, FALSE, FALSE);
+ false, false, false);
if (h != NULL)
{
elf_x86_hash_entry (h)->tls_get_addr = 1;
@@ -890,7 +890,7 @@ _bfd_x86_elf_link_check_relocs (bfd *abfd, struct bfd_link_info *info)
return _bfd_elf_link_check_relocs (abfd, info);
}
-bfd_boolean
+bool
_bfd_elf_x86_valid_reloc_p (asection *input_section,
struct bfd_link_info *info,
struct elf_x86_link_hash_table *htab,
@@ -898,11 +898,11 @@ _bfd_elf_x86_valid_reloc_p (asection *input_section,
struct elf_link_hash_entry *h,
Elf_Internal_Sym *sym,
Elf_Internal_Shdr *symtab_hdr,
- bfd_boolean *no_dynreloc_p)
+ bool *no_dynreloc_p)
{
- bfd_boolean valid_p = TRUE;
+ bool valid_p = true;
- *no_dynreloc_p = FALSE;
+ *no_dynreloc_p = false;
/* Check If relocation against non-preemptible absolute symbol is
valid in PIC. FIXME: Can't use SYMBOL_REFERENCES_LOCAL_P since
@@ -955,7 +955,7 @@ _bfd_elf_x86_valid_reloc_p (asection *input_section,
|| r_type == R_386_8);
if (valid_p)
- *no_dynreloc_p = TRUE;
+ *no_dynreloc_p = true;
else
{
const char *name;
@@ -986,21 +986,21 @@ _bfd_elf_x86_valid_reloc_p (asection *input_section,
/* Set the sizes of the dynamic sections. */
-bfd_boolean
+bool
_bfd_x86_elf_size_dynamic_sections (bfd *output_bfd,
struct bfd_link_info *info)
{
struct elf_x86_link_hash_table *htab;
bfd *dynobj;
asection *s;
- bfd_boolean relocs;
+ bool relocs;
bfd *ibfd;
const struct elf_backend_data *bed
= get_elf_backend_data (output_bfd);
htab = elf_x86_hash_table (info, bed->target_id);
if (htab == NULL)
- return FALSE;
+ return false;
dynobj = htab->elf.dynobj;
if (dynobj == NULL)
abort ();
@@ -1237,10 +1237,10 @@ _bfd_x86_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)
{
- bfd_boolean strip_section = TRUE;
+ bool strip_section = true;
if ((s->flags & SEC_LINKER_CREATED) == 0)
continue;
@@ -1255,7 +1255,7 @@ _bfd_x86_elf_size_dynamic_sections (bfd *output_bfd,
It's too late to tell BFD to get rid of the symbols. */
if (htab->elf.hplt != NULL)
- strip_section = FALSE;
+ strip_section = false;
}
else if (s == htab->elf.sgotplt
|| s == htab->elf.iplt
@@ -1275,7 +1275,7 @@ _bfd_x86_elf_size_dynamic_sections (bfd *output_bfd,
if (s->size != 0
&& s != htab->elf.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. */
@@ -1321,7 +1321,7 @@ _bfd_x86_elf_size_dynamic_sections (bfd *output_bfd,
reloc instead of garbage. */
s->contents = (unsigned char *) bfd_zalloc (dynobj, s->size);
if (s->contents == NULL)
- return FALSE;
+ return false;
}
if (htab->plt_eh_frame != NULL
@@ -1578,7 +1578,7 @@ _bfd_x86_elf_finish_dynamic_sections (bfd *output_bfd,
}
-bfd_boolean
+bool
_bfd_x86_elf_always_size_sections (bfd *output_bfd,
struct bfd_link_info *info)
{
@@ -1590,7 +1590,7 @@ _bfd_x86_elf_always_size_sections (bfd *output_bfd,
tlsbase = elf_link_hash_lookup (elf_hash_table (info),
"_TLS_MODULE_BASE_",
- FALSE, FALSE, FALSE);
+ false, false, false);
if (tlsbase && tlsbase->type == STT_TLS)
{
@@ -1601,13 +1601,13 @@ _bfd_x86_elf_always_size_sections (bfd *output_bfd,
htab = elf_x86_hash_table (info, bed->target_id);
if (htab == NULL)
- return FALSE;
+ return false;
if (!(_bfd_generic_link_add_one_symbol
(info, output_bfd, "_TLS_MODULE_BASE_", BSF_LOCAL,
- tls_sec, 0, NULL, FALSE,
+ tls_sec, 0, NULL, false,
bed->collect, &bh)))
- return FALSE;
+ return false;
htab->tls_module_base = bh;
@@ -1615,18 +1615,18 @@ _bfd_x86_elf_always_size_sections (bfd *output_bfd,
tlsbase->def_regular = 1;
tlsbase->other = STV_HIDDEN;
tlsbase->root.linker_def = 1;
- (*bed->elf_backend_hide_symbol) (info, tlsbase, TRUE);
+ (*bed->elf_backend_hide_symbol) (info, tlsbase, true);
}
}
- return TRUE;
+ return true;
}
void
_bfd_x86_elf_merge_symbol_attribute (struct elf_link_hash_entry *h,
unsigned int st_other,
- bfd_boolean definition,
- bfd_boolean dynamic ATTRIBUTE_UNUSED)
+ bool definition,
+ bool dynamic ATTRIBUTE_UNUSED)
{
if (definition)
{
@@ -1682,7 +1682,7 @@ _bfd_x86_elf_copy_indirect_symbol (struct bfd_link_info *info,
/* Remove undefined weak symbol from the dynamic symbol table if it
is resolved to 0. */
-bfd_boolean
+bool
_bfd_x86_elf_fixup_symbol (struct bfd_link_info *info,
struct elf_link_hash_entry *h)
{
@@ -1693,7 +1693,7 @@ _bfd_x86_elf_fixup_symbol (struct bfd_link_info *info,
_bfd_elf_strtab_delref (elf_hash_table (info)->dynstr,
h->dynstr_index);
}
- return TRUE;
+ return true;
}
/* Change the STT_GNU_IFUNC symbol defined in position-dependent
@@ -1790,13 +1790,13 @@ _bfd_x86_elf_link_report_relative_reloc
/* Return TRUE if symbol should be hashed in the `.gnu.hash' section. */
-bfd_boolean
+bool
_bfd_x86_elf_hash_symbol (struct elf_link_hash_entry *h)
{
if (h->plt.offset != (bfd_vma) -1
&& !h->def_regular
&& !h->pointer_equality_needed)
- return FALSE;
+ return false;
return _bfd_elf_hash_symbol (h);
}
@@ -1807,7 +1807,7 @@ _bfd_x86_elf_hash_symbol (struct elf_link_hash_entry *h)
change the definition to something the rest of the link can
understand. */
-bfd_boolean
+bool
_bfd_x86_elf_adjust_dynamic_symbol (struct bfd_link_info *info,
struct elf_link_hash_entry *h)
{
@@ -1863,7 +1863,7 @@ _bfd_x86_elf_adjust_dynamic_symbol (struct bfd_link_info *info,
h->plt.offset = (bfd_vma) -1;
h->needs_plt = 0;
}
- return TRUE;
+ return true;
}
/* If this is a function, put it in the procedure linkage table. We
@@ -1886,7 +1886,7 @@ _bfd_x86_elf_adjust_dynamic_symbol (struct bfd_link_info *info,
h->needs_plt = 0;
}
- return TRUE;
+ return true;
}
else
/* It's possible that we incorrectly decided a .plt reloc was needed
@@ -1915,7 +1915,7 @@ _bfd_x86_elf_adjust_dynamic_symbol (struct bfd_link_info *info,
h->non_got_ref = def->non_got_ref;
eh->needs_copy = def->needs_copy;
}
- return TRUE;
+ return true;
}
/* This is a reference to a symbol defined by a dynamic object which
@@ -1926,24 +1926,24 @@ _bfd_x86_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_executable (info))
- return TRUE;
+ return true;
/* If there are no references to this symbol that do not use the
GOT nor R_386_GOTOFF relocation, we don't need to generate a copy
reloc. NB: gotoff_ref is always 0 for x86-64. */
if (!h->non_got_ref && !eh->gotoff_ref)
- return TRUE;
+ return true;
/* If -z nocopyreloc was given, we won't generate them either. */
if (info->nocopyreloc || SYMBOL_NO_COPYRELOC (info, eh))
{
h->non_got_ref = 0;
- return TRUE;
+ return true;
}
htab = elf_x86_hash_table (info, bed->target_id);
if (htab == NULL)
- return FALSE;
+ return false;
/* If there aren't any dynamic relocs in read-only sections nor
R_386_GOTOFF relocation, then we can keep the dynamic relocs and
@@ -1961,7 +1961,7 @@ _bfd_x86_elf_adjust_dynamic_symbol (struct bfd_link_info *info,
if (!_bfd_elf_readonly_dynrelocs (h))
{
h->non_got_ref = 0;
- return TRUE;
+ return true;
}
}
@@ -2000,7 +2000,7 @@ _bfd_x86_elf_adjust_dynamic_symbol (struct bfd_link_info *info,
void
_bfd_x86_elf_hide_symbol (struct bfd_link_info *info,
struct elf_link_hash_entry *h,
- bfd_boolean force_local)
+ bool force_local)
{
if (h->root.type == bfd_link_hash_undefweak
&& info->nointerp
@@ -2022,7 +2022,7 @@ _bfd_x86_elf_hide_symbol (struct bfd_link_info *info,
SYMBOL_REFERENCES_LOCAL, but it also checks version script. It
works in check_relocs. */
-bfd_boolean
+bool
_bfd_x86_elf_link_symbol_references_local (struct bfd_link_info *info,
struct elf_link_hash_entry *h)
{
@@ -2031,10 +2031,10 @@ _bfd_x86_elf_link_symbol_references_local (struct bfd_link_info *info,
= (struct elf_x86_link_hash_table *) info->hash;
if (eh->local_ref > 1)
- return TRUE;
+ return true;
if (eh->local_ref == 1)
- return FALSE;
+ return false;
/* Unversioned symbols defined in regular objects can be forced local
by linker version script. A weak undefined symbol is forced local
@@ -2054,11 +2054,11 @@ _bfd_x86_elf_link_symbol_references_local (struct bfd_link_info *info,
&& _bfd_elf_link_hide_sym_by_version (info, h)))
{
eh->local_ref = 2;
- return TRUE;
+ return true;
}
eh->local_ref = 1;
- return FALSE;
+ return false;
}
/* Return the section that should be marked against GC for a given
@@ -2107,7 +2107,7 @@ elf_x86_64_get_plt_got_vma (struct elf_x86_plt *plt_p,
return plt_p->sec->vma + offset + off + plt_p->plt_got_insn_size;
}
-static bfd_boolean
+static bool
elf_i386_valid_plt_reloc_p (unsigned int type)
{
return (type == R_386_JUMP_SLOT
@@ -2115,7 +2115,7 @@ elf_i386_valid_plt_reloc_p (unsigned int type)
|| type == R_386_IRELATIVE);
}
-static bfd_boolean
+static bool
elf_x86_64_valid_plt_reloc_p (unsigned int type)
{
return (type == R_X86_64_JUMP_SLOT
@@ -2143,7 +2143,7 @@ _bfd_x86_elf_get_synthetic_symtab (bfd *abfd,
const struct elf_backend_data *bed;
bfd_vma (*get_plt_got_vma) (struct elf_x86_plt *, bfd_vma, bfd_vma,
bfd_vma);
- bfd_boolean (*valid_plt_reloc_p) (unsigned int);
+ bool (*valid_plt_reloc_p) (unsigned int);
dynrelbuf = NULL;
if (count == 0)
@@ -2373,7 +2373,7 @@ _bfd_x86_elf_parse_gnu_properties (bfd *abfd, unsigned int type,
return TRUE if APROP is updated. Otherwise, return TRUE if BPROP
should be merged with ABFD. */
-bfd_boolean
+bool
_bfd_x86_elf_merge_gnu_properties (struct bfd_link_info *info,
bfd *abfd ATTRIBUTE_UNUSED,
bfd *bbfd ATTRIBUTE_UNUSED,
@@ -2381,7 +2381,7 @@ _bfd_x86_elf_merge_gnu_properties (struct bfd_link_info *info,
elf_property *bprop)
{
unsigned int number, features;
- bfd_boolean updated = FALSE;
+ bool updated = false;
const struct elf_backend_data *bed;
struct elf_x86_link_hash_table *htab;
unsigned int pr_type = aprop != NULL ? aprop->pr_type : bprop->pr_type;
@@ -2398,7 +2398,7 @@ _bfd_x86_elf_merge_gnu_properties (struct bfd_link_info *info,
/* Remove this property since the other input file doesn't
have it. */
aprop->pr_kind = property_remove;
- updated = TRUE;
+ updated = true;
}
}
else
@@ -2443,7 +2443,7 @@ _bfd_x86_elf_merge_gnu_properties (struct bfd_link_info *info,
if (aprop->u.number == 0)
{
aprop->pr_kind = property_remove;
- updated = TRUE;
+ updated = true;
}
else
updated = number != (unsigned int) aprop->u.number;
@@ -2458,7 +2458,7 @@ _bfd_x86_elf_merge_gnu_properties (struct bfd_link_info *info,
{
/* Remove APROP if all bits are empty. */
aprop->pr_kind = property_remove;
- updated = TRUE;
+ updated = true;
}
}
else
@@ -2538,14 +2538,14 @@ _bfd_x86_elf_merge_gnu_properties (struct bfd_link_info *info,
}
else
{
- updated = TRUE;
+ updated = true;
bprop->u.number = features;
}
}
else if (aprop != NULL)
{
aprop->pr_kind = property_remove;
- updated = TRUE;
+ updated = true;
}
}
return updated;
@@ -2566,11 +2566,11 @@ bfd *
_bfd_x86_elf_link_setup_gnu_properties
(struct bfd_link_info *info, struct elf_x86_init_table *init_table)
{
- bfd_boolean normal_target;
- bfd_boolean lazy_plt;
+ bool normal_target;
+ bool lazy_plt;
asection *sec, *pltsec;
bfd *dynobj;
- bfd_boolean use_ibt_plt;
+ bool use_ibt_plt;
unsigned int plt_alignment, features, isa_level;
struct elf_x86_link_hash_table *htab;
bfd *pbfd;
@@ -2710,12 +2710,12 @@ _bfd_x86_elf_link_setup_gnu_properties
const char *lam_u57_msg = NULL;
const char *missing;
elf_property_list *p;
- bfd_boolean missing_ibt, missing_shstk;
- bfd_boolean missing_lam_u48, missing_lam_u57;
- bfd_boolean check_ibt
+ bool missing_ibt, missing_shstk;
+ bool missing_lam_u48, missing_lam_u57;
+ bool check_ibt
= (htab->params->cet_report
&& (htab->params->cet_report & prop_report_ibt));
- bfd_boolean check_shstk
+ bool check_shstk
= (htab->params->cet_report
&& (htab->params->cet_report & prop_report_shstk));
@@ -2886,7 +2886,7 @@ _bfd_x86_elf_link_setup_gnu_properties
if (htab->non_lazy_plt != NULL
&& (!htab->plt.has_plt0 || pltsec == NULL))
{
- lazy_plt = FALSE;
+ lazy_plt = false;
if (bfd_link_pic (info))
htab->plt.plt_entry = htab->non_lazy_plt->pic_plt_entry;
else
@@ -2901,7 +2901,7 @@ _bfd_x86_elf_link_setup_gnu_properties
}
else
{
- lazy_plt = TRUE;
+ lazy_plt = true;
if (bfd_link_pic (info))
{
htab->plt.plt0_entry = htab->lazy_plt->pic_plt0_entry;