aboutsummaryrefslogtreecommitdiff
path: root/bfd/elfnn-ia64.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/elfnn-ia64.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/elfnn-ia64.c')
-rw-r--r--bfd/elfnn-ia64.c481
1 files changed, 241 insertions, 240 deletions
diff --git a/bfd/elfnn-ia64.c b/bfd/elfnn-ia64.c
index 04bf7d7..ceebe55 100644
--- a/bfd/elfnn-ia64.c
+++ b/bfd/elfnn-ia64.c
@@ -77,7 +77,7 @@ struct elfNN_ia64_dyn_sym_info
int count;
/* Is this reloc against readonly section? */
- bfd_boolean reltext;
+ bool reltext;
} *reloc_entries;
/* TRUE when the section contents have been updated. */
@@ -162,7 +162,7 @@ struct elfNN_ia64_allocate_data
{
struct bfd_link_info *info;
bfd_size_type ofs;
- bfd_boolean only_got;
+ bool only_got;
};
#define elfNN_ia64_hash_table(p) \
@@ -173,24 +173,24 @@ struct elfNN_ia64_allocate_data
static struct elfNN_ia64_dyn_sym_info * get_dyn_sym_info
(struct elfNN_ia64_link_hash_table *ia64_info,
struct elf_link_hash_entry *h,
- bfd *abfd, const Elf_Internal_Rela *rel, bfd_boolean create);
-static bfd_boolean elfNN_ia64_dynamic_symbol_p
+ bfd *abfd, const Elf_Internal_Rela *rel, bool create);
+static bool elfNN_ia64_dynamic_symbol_p
(struct elf_link_hash_entry *h, struct bfd_link_info *info, int);
-static bfd_boolean elfNN_ia64_choose_gp
- (bfd *abfd, struct bfd_link_info *info, bfd_boolean final);
+static bool elfNN_ia64_choose_gp
+ (bfd *abfd, struct bfd_link_info *info, bool final);
static void elfNN_ia64_dyn_sym_traverse
(struct elfNN_ia64_link_hash_table *ia64_info,
- bfd_boolean (*func) (struct elfNN_ia64_dyn_sym_info *, void *),
+ bool (*func) (struct elfNN_ia64_dyn_sym_info *, void *),
void * info);
-static bfd_boolean allocate_global_data_got
+static bool allocate_global_data_got
(struct elfNN_ia64_dyn_sym_info *dyn_i, void * data);
-static bfd_boolean allocate_global_fptr_got
+static bool allocate_global_fptr_got
(struct elfNN_ia64_dyn_sym_info *dyn_i, void * data);
-static bfd_boolean allocate_local_got
+static bool allocate_local_got
(struct elfNN_ia64_dyn_sym_info *dyn_i, void * data);
-static bfd_boolean elfNN_ia64_hpux_vec
+static bool elfNN_ia64_hpux_vec
(const bfd_target *vec);
-static bfd_boolean allocate_dynrel_entries
+static bool allocate_dynrel_entries
(struct elfNN_ia64_dyn_sym_info *dyn_i, void * data);
static asection *get_pltoff
(bfd *abfd, struct bfd_link_info *info,
@@ -200,7 +200,7 @@ static asection *get_pltoff
/* Given a ELF reloc, return the matching HOWTO structure. */
-static bfd_boolean
+static bool
elfNN_ia64_info_to_howto (bfd *abfd ATTRIBUTE_UNUSED,
arelent *bfd_reloc,
Elf_Internal_Rela *elf_reloc)
@@ -214,10 +214,10 @@ elfNN_ia64_info_to_howto (bfd *abfd ATTRIBUTE_UNUSED,
_bfd_error_handler (_("%pB: unsupported relocation type %#x"),
abfd, r_type);
bfd_set_error (bfd_error_bad_value);
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
#define PLT_HEADER_SIZE (3 * 16)
@@ -329,10 +329,10 @@ elfNN_ia64_update_short_info (asection *sec, bfd_vma offset,
}
}
-static bfd_boolean
+static bool
elfNN_ia64_relax_section (bfd *abfd, asection *sec,
struct bfd_link_info *link_info,
- bfd_boolean *again)
+ bool *again)
{
struct one_fixup
{
@@ -349,16 +349,16 @@ elfNN_ia64_relax_section (bfd *abfd, asection *sec,
Elf_Internal_Sym *isymbuf = NULL;
struct elfNN_ia64_link_hash_table *ia64_info;
struct one_fixup *fixups = NULL;
- bfd_boolean changed_contents = FALSE;
- bfd_boolean changed_relocs = FALSE;
- bfd_boolean changed_got = FALSE;
- bfd_boolean skip_relax_pass_0 = TRUE;
- bfd_boolean skip_relax_pass_1 = TRUE;
+ bool changed_contents = false;
+ bool changed_relocs = false;
+ bool changed_got = false;
+ bool skip_relax_pass_0 = true;
+ bool skip_relax_pass_1 = true;
bfd_vma gp = 0;
/* Assume we're not going to change any sizes, and we'll only need
one pass. */
- *again = FALSE;
+ *again = false;
if (bfd_link_relocatable (link_info))
(*link_info->callbacks->einfo)
@@ -366,7 +366,7 @@ elfNN_ia64_relax_section (bfd *abfd, asection *sec,
/* Don't even try to relax for non-ELF outputs. */
if (!is_elf_hash_table (link_info->hash))
- return FALSE;
+ return false;
/* Nothing to do if there are no relocations or there is no need for
the current pass. */
@@ -374,11 +374,11 @@ elfNN_ia64_relax_section (bfd *abfd, asection *sec,
|| sec->reloc_count == 0
|| (link_info->relax_pass == 0 && sec->skip_relax_pass_0)
|| (link_info->relax_pass == 1 && sec->skip_relax_pass_1))
- return TRUE;
+ return true;
ia64_info = elfNN_ia64_hash_table (link_info);
if (ia64_info == NULL)
- return FALSE;
+ return false;
symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
@@ -387,7 +387,7 @@ elfNN_ia64_relax_section (bfd *abfd, asection *sec,
(abfd, sec, NULL, (Elf_Internal_Rela *) NULL,
link_info->keep_memory));
if (internal_relocs == NULL)
- return FALSE;
+ return false;
irelend = internal_relocs + sec->reloc_count;
@@ -407,7 +407,7 @@ elfNN_ia64_relax_section (bfd *abfd, asection *sec,
asection *tsec;
struct one_fixup *f;
bfd_size_type amt;
- bfd_boolean is_branch;
+ bool is_branch;
struct elfNN_ia64_dyn_sym_info *dyn_i;
char symtype;
@@ -420,8 +420,8 @@ elfNN_ia64_relax_section (bfd *abfd, asection *sec,
/* In pass 1, all br relaxations are done. We can skip it. */
if (link_info->relax_pass == 1)
continue;
- skip_relax_pass_0 = FALSE;
- is_branch = TRUE;
+ skip_relax_pass_0 = false;
+ is_branch = true;
break;
case R_IA64_PCREL60B:
@@ -429,10 +429,10 @@ elfNN_ia64_relax_section (bfd *abfd, asection *sec,
will increase the code size. Defer it to pass 1. */
if (link_info->relax_pass == 0)
{
- skip_relax_pass_1 = FALSE;
+ skip_relax_pass_1 = false;
continue;
}
- is_branch = TRUE;
+ is_branch = true;
break;
case R_IA64_GPREL22:
@@ -444,10 +444,10 @@ elfNN_ia64_relax_section (bfd *abfd, asection *sec,
increase the code size. Defer it to pass 1. */
if (link_info->relax_pass == 0)
{
- skip_relax_pass_1 = FALSE;
+ skip_relax_pass_1 = false;
continue;
}
- is_branch = FALSE;
+ is_branch = false;
break;
default:
@@ -485,7 +485,7 @@ elfNN_ia64_relax_section (bfd *abfd, asection *sec,
tsec = bfd_section_from_elf_index (abfd, isym->st_shndx);
toff = isym->st_value;
- dyn_i = get_dyn_sym_info (ia64_info, NULL, abfd, irel, FALSE);
+ dyn_i = get_dyn_sym_info (ia64_info, NULL, abfd, irel, false);
symtype = ELF_ST_TYPE (isym->st_info);
}
else
@@ -501,7 +501,7 @@ elfNN_ia64_relax_section (bfd *abfd, asection *sec,
|| h->root.type == bfd_link_hash_warning)
h = (struct elf_link_hash_entry *) h->root.u.i.link;
- dyn_i = get_dyn_sym_info (ia64_info, h, abfd, irel, FALSE);
+ dyn_i = get_dyn_sym_info (ia64_info, h, abfd, irel, false);
/* For branches to dynamic symbols, we're interested instead
in a branch to the PLT entry. */
@@ -608,8 +608,8 @@ elfNN_ia64_relax_section (bfd *abfd, asection *sec,
if ((irel->r_offset & 3) == 1)
irel->r_offset += 1;
- changed_contents = TRUE;
- changed_relocs = TRUE;
+ changed_contents = true;
+ changed_relocs = true;
}
continue;
@@ -625,8 +625,8 @@ elfNN_ia64_relax_section (bfd *abfd, asection *sec,
/* Make the relocation offset point to slot 1. */
irel->r_offset = (irel->r_offset & ~((bfd_vma) 0x3)) + 1;
- changed_contents = TRUE;
- changed_relocs = TRUE;
+ changed_contents = true;
+ changed_relocs = true;
continue;
}
@@ -739,8 +739,8 @@ elfNN_ia64_relax_section (bfd *abfd, asection *sec,
!= bfd_reloc_ok)
goto error_return;
- changed_contents = TRUE;
- changed_relocs = TRUE;
+ changed_contents = true;
+ changed_relocs = true;
}
else
{
@@ -751,7 +751,7 @@ elfNN_ia64_relax_section (bfd *abfd, asection *sec,
gp = _bfd_get_gp_value (obfd);
if (gp == 0)
{
- if (!elfNN_ia64_choose_gp (obfd, link_info, FALSE))
+ if (!elfNN_ia64_choose_gp (obfd, link_info, false))
goto error_return;
gp = _bfd_get_gp_value (obfd);
}
@@ -770,7 +770,7 @@ elfNN_ia64_relax_section (bfd *abfd, asection *sec,
{
irel->r_info = ELFNN_R_INFO (ELFNN_R_SYM (irel->r_info),
R_IA64_GPREL22);
- changed_relocs = TRUE;
+ changed_relocs = true;
if (dyn_i->want_gotx)
{
dyn_i->want_gotx = 0;
@@ -785,8 +785,8 @@ elfNN_ia64_relax_section (bfd *abfd, asection *sec,
{
ia64_elf_relax_ldxmov (contents, roff);
irel->r_info = ELFNN_R_INFO (0, R_IA64_NONE);
- changed_contents = TRUE;
- changed_relocs = TRUE;
+ changed_contents = true;
+ changed_relocs = true;
}
}
}
@@ -856,7 +856,7 @@ elfNN_ia64_relax_section (bfd *abfd, asection *sec,
if (bfd_link_pic (link_info)
&& ia64_info->self_dtpmod_offset != (bfd_vma) -1)
ia64_info->root.srelgot->size += sizeof (ElfNN_External_Rela);
- data.only_got = TRUE;
+ data.only_got = true;
elfNN_ia64_dyn_sym_traverse (ia64_info, allocate_dynrel_entries,
&data);
}
@@ -870,7 +870,7 @@ elfNN_ia64_relax_section (bfd *abfd, asection *sec,
}
*again = changed_contents || changed_relocs;
- return TRUE;
+ return true;
error_return:
if ((unsigned char *) isymbuf != symtab_hdr->contents)
@@ -879,19 +879,19 @@ elfNN_ia64_relax_section (bfd *abfd, asection *sec,
free (contents);
if (elf_section_data (sec)->relocs != internal_relocs)
free (internal_relocs);
- return FALSE;
+ return false;
}
#undef skip_relax_pass_0
#undef skip_relax_pass_1
/* Return TRUE if NAME is an unwind table section name. */
-static inline bfd_boolean
+static inline bool
is_unwind_section_name (bfd *abfd, const char *name)
{
if (elfNN_ia64_hpux_vec (abfd->xvec)
&& !strcmp (name, ELF_STRING_ia64_unwind_hdr))
- return FALSE;
+ return false;
return ((startswith (name, ELF_STRING_ia64_unwind)
&& ! startswith (name, ELF_STRING_ia64_unwind_info))
@@ -902,7 +902,7 @@ is_unwind_section_name (bfd *abfd, const char *name)
is called when bfd_section_from_shdr finds a section with an unknown
type. */
-static bfd_boolean
+static bool
elfNN_ia64_section_from_shdr (bfd *abfd,
Elf_Internal_Shdr *hdr,
const char *name,
@@ -921,17 +921,17 @@ elfNN_ia64_section_from_shdr (bfd *abfd,
case SHT_IA_64_EXT:
if (strcmp (name, ELF_STRING_ia64_archext) != 0)
- return FALSE;
+ return false;
break;
default:
- return FALSE;
+ return false;
}
if (! _bfd_elf_make_section_from_shdr (abfd, hdr, name, shindex))
- return FALSE;
+ return false;
- return TRUE;
+ return true;
}
/* Convert IA-64 specific section flags to bfd internal section flags. */
@@ -939,19 +939,19 @@ elfNN_ia64_section_from_shdr (bfd *abfd,
/* ??? There is no bfd internal flag equivalent to the SHF_IA_64_NORECOV
flag. */
-static bfd_boolean
+static bool
elfNN_ia64_section_flags (const Elf_Internal_Shdr *hdr)
{
if (hdr->sh_flags & SHF_IA_64_SHORT)
hdr->bfd_section->flags |= SEC_SMALL_DATA;
- return TRUE;
+ return true;
}
/* Set the correct type for an IA-64 ELF section. We do this by the
section name, which is a hack, but ought to work. */
-static bfd_boolean
+static bool
elfNN_ia64_fake_sections (bfd *abfd, Elf_Internal_Shdr *hdr,
asection *sec)
{
@@ -997,13 +997,13 @@ elfNN_ia64_fake_sections (bfd *abfd, Elf_Internal_Shdr *hdr,
if (elfNN_ia64_hpux_vec (abfd->xvec) && (sec->flags & SHF_TLS))
hdr->sh_flags |= SHF_IA_64_HP_TLS;
- return TRUE;
+ return true;
}
/* The final processing done just before writing out an IA-64 ELF
object file. */
-static bfd_boolean
+static bool
elfNN_ia64_final_write_processing (bfd *abfd)
{
Elf_Internal_Shdr *hdr;
@@ -1034,7 +1034,7 @@ elfNN_ia64_final_write_processing (bfd *abfd)
flags |= EF_IA_64_ABI64;
elf_elfheader(abfd)->e_flags = flags;
- elf_flags_init (abfd) = TRUE;
+ elf_flags_init (abfd) = true;
}
return _bfd_elf_final_write_processing (abfd);
}
@@ -1042,7 +1042,7 @@ elfNN_ia64_final_write_processing (bfd *abfd)
/* Hook called by the linker routine which adds symbols from an object
file. We use it to put .comm items in .sbss, and not .bss. */
-static bfd_boolean
+static bool
elfNN_ia64_add_symbol_hook (bfd *abfd,
struct bfd_link_info *info,
Elf_Internal_Sym *sym,
@@ -1068,14 +1068,14 @@ elfNN_ia64_add_symbol_hook (bfd *abfd,
| SEC_SMALL_DATA
| SEC_LINKER_CREATED));
if (scomm == NULL)
- return FALSE;
+ return false;
}
*secp = scomm;
*valp = sym->st_size;
}
- return TRUE;
+ return true;
}
/* Return the number of additional phdrs we will need. */
@@ -1100,7 +1100,7 @@ elfNN_ia64_additional_program_headers (bfd *abfd,
return ret;
}
-static bfd_boolean
+static bool
elfNN_ia64_modify_segment_map (bfd *abfd,
struct bfd_link_info *info ATTRIBUTE_UNUSED)
{
@@ -1121,7 +1121,7 @@ elfNN_ia64_modify_segment_map (bfd *abfd,
m = ((struct elf_segment_map *)
bfd_zalloc (abfd, (bfd_size_type) sizeof *m));
if (m == NULL)
- return FALSE;
+ return false;
m->p_type = PT_IA_64_ARCHEXT;
m->count = 1;
@@ -1169,7 +1169,7 @@ elfNN_ia64_modify_segment_map (bfd *abfd,
m = ((struct elf_segment_map *)
bfd_zalloc (abfd, (bfd_size_type) sizeof *m));
if (m == NULL)
- return FALSE;
+ return false;
m->p_type = PT_IA_64_UNWIND;
m->count = 1;
@@ -1185,14 +1185,14 @@ elfNN_ia64_modify_segment_map (bfd *abfd,
}
}
- return TRUE;
+ return true;
}
/* Turn on PF_IA_64_NORECOV if needed. This involves traversing all of
the input sections for each output section in the segment and testing
for SHF_IA_64_NORECOV on each. */
-static bfd_boolean
+static bool
elfNN_ia64_modify_headers (bfd *abfd, struct bfd_link_info *info)
{
struct elf_obj_tdata *tdata = elf_tdata (abfd);
@@ -1231,7 +1231,7 @@ elfNN_ia64_modify_headers (bfd *abfd, struct bfd_link_info *info)
/* According to the Tahoe assembler spec, all labels starting with a
'.' are local. */
-static bfd_boolean
+static bool
elfNN_ia64_is_local_label_name (bfd *abfd ATTRIBUTE_UNUSED,
const char *name)
{
@@ -1240,11 +1240,11 @@ elfNN_ia64_is_local_label_name (bfd *abfd ATTRIBUTE_UNUSED,
/* Should we do dynamic things to this symbol? */
-static bfd_boolean
+static bool
elfNN_ia64_dynamic_symbol_p (struct elf_link_hash_entry *h,
struct bfd_link_info *info, int r_type)
{
- bfd_boolean ignore_protected
+ bool ignore_protected
= ((r_type & 0xf8) == 0x40 /* FPTR relocs */
|| (r_type & 0xf8) == 0x50); /* LTOFF_FPTR relocs */
@@ -1345,7 +1345,7 @@ elfNN_ia64_hash_copy_indirect (struct bfd_link_info *info,
static void
elfNN_ia64_hash_hide_symbol (struct bfd_link_info *info,
struct elf_link_hash_entry *xh,
- bfd_boolean force_local)
+ bool force_local)
{
struct elfNN_ia64_link_hash_entry *h;
struct elfNN_ia64_dyn_sym_info *dyn_i;
@@ -1390,7 +1390,7 @@ elfNN_ia64_local_htab_eq (const void *ptr1, const void *ptr2)
/* Free the global elfNN_ia64_dyn_sym_info array. */
-static bfd_boolean
+static bool
elfNN_ia64_global_dyn_info_free (void **xentry,
void * unused ATTRIBUTE_UNUSED)
{
@@ -1403,7 +1403,7 @@ elfNN_ia64_global_dyn_info_free (void **xentry,
entry->sorted_count = 0;
entry->size = 0;
- return TRUE;
+ return true;
}
/* Free the local elfNN_ia64_dyn_sym_info array. */
@@ -1421,7 +1421,7 @@ elfNN_ia64_local_dyn_info_free (void **slot,
entry->sorted_count = 0;
entry->size = 0;
- return TRUE;
+ return true;
}
/* Destroy IA-64 linker hash table. */
@@ -1475,7 +1475,7 @@ elfNN_ia64_hash_table_create (bfd *abfd)
return NULL;
}
ret->root.root.hash_table_free = elfNN_ia64_link_hash_table_free;
- ret->root.dt_pltgot_required = TRUE;
+ ret->root.dt_pltgot_required = true;
return &ret->root.root;
}
@@ -1484,11 +1484,11 @@ elfNN_ia64_hash_table_create (bfd *abfd)
struct elfNN_ia64_dyn_sym_traverse_data
{
- bfd_boolean (*func) (struct elfNN_ia64_dyn_sym_info *, void *);
+ bool (*func) (struct elfNN_ia64_dyn_sym_info *, void *);
void * data;
};
-static bfd_boolean
+static bool
elfNN_ia64_global_dyn_sym_thunk (struct bfd_hash_entry *xentry,
void * xdata)
{
@@ -1503,8 +1503,8 @@ elfNN_ia64_global_dyn_sym_thunk (struct bfd_hash_entry *xentry,
count != 0;
count--, dyn_i++)
if (! (*data->func) (dyn_i, data->data))
- return FALSE;
- return TRUE;
+ return false;
+ return true;
}
static int
@@ -1521,13 +1521,14 @@ elfNN_ia64_local_dyn_sym_thunk (void **slot, void * xdata)
count != 0;
count--, dyn_i++)
if (! (*data->func) (dyn_i, data->data))
- return FALSE;
- return TRUE;
+ return false;
+ return true;
}
static void
elfNN_ia64_dyn_sym_traverse (struct elfNN_ia64_link_hash_table *ia64_info,
- bfd_boolean (*func) (struct elfNN_ia64_dyn_sym_info *, void *),
+ bool (*func) (struct elfNN_ia64_dyn_sym_info *,
+ void *),
void * data)
{
struct elfNN_ia64_dyn_sym_traverse_data xdata;
@@ -1541,7 +1542,7 @@ elfNN_ia64_dyn_sym_traverse (struct elfNN_ia64_link_hash_table *ia64_info,
elfNN_ia64_local_dyn_sym_thunk, &xdata);
}
-static bfd_boolean
+static bool
elfNN_ia64_create_dynamic_sections (bfd *abfd,
struct bfd_link_info *info)
{
@@ -1549,22 +1550,22 @@ elfNN_ia64_create_dynamic_sections (bfd *abfd,
asection *s;
if (! _bfd_elf_create_dynamic_sections (abfd, info))
- return FALSE;
+ return false;
ia64_info = elfNN_ia64_hash_table (info);
if (ia64_info == NULL)
- return FALSE;
+ return false;
{
flagword flags = bfd_section_flags (ia64_info->root.sgot);
bfd_set_section_flags (ia64_info->root.sgot, SEC_SMALL_DATA | flags);
/* The .got section is always aligned at 8 bytes. */
if (!bfd_set_section_alignment (ia64_info->root.sgot, 3))
- return FALSE;
+ return false;
}
if (!get_pltoff (abfd, info, ia64_info))
- return FALSE;
+ return false;
s = bfd_make_section_anyway_with_flags (abfd, ".rela.IA_64.pltoff",
(SEC_ALLOC | SEC_LOAD
@@ -1574,17 +1575,17 @@ elfNN_ia64_create_dynamic_sections (bfd *abfd,
| SEC_READONLY));
if (s == NULL
|| !bfd_set_section_alignment (s, LOG_SECTION_ALIGN))
- return FALSE;
+ return false;
ia64_info->rel_pltoff_sec = s;
- return TRUE;
+ return true;
}
/* Find and/or create a hash entry for local symbol. */
static struct elfNN_ia64_local_hash_entry *
get_local_sym_hash (struct elfNN_ia64_link_hash_table *ia64_info,
bfd *abfd, const Elf_Internal_Rela *rel,
- bfd_boolean create)
+ bool create)
{
struct elfNN_ia64_local_hash_entry e, *ret;
asection *sec = abfd->sections;
@@ -1814,7 +1815,7 @@ sort_dyn_sym_info (struct elfNN_ia64_dyn_sym_info *info,
static struct elfNN_ia64_dyn_sym_info *
get_dyn_sym_info (struct elfNN_ia64_link_hash_table *ia64_info,
struct elf_link_hash_entry *h, bfd *abfd,
- const Elf_Internal_Rela *rel, bfd_boolean create)
+ const Elf_Internal_Rela *rel, bool create)
{
struct elfNN_ia64_dyn_sym_info **info_p, *info, *dyn_i, key;
unsigned int *count_p, *sorted_count_p, *size_p;
@@ -2081,7 +2082,7 @@ get_pltoff (bfd *abfd, struct bfd_link_info *info ATTRIBUTE_UNUSED,
static asection *
get_reloc_section (bfd *abfd,
struct elfNN_ia64_link_hash_table *ia64_info,
- asection *sec, bfd_boolean create)
+ asection *sec, bool create)
{
const char *srel_name;
asection *srel;
@@ -2114,9 +2115,9 @@ get_reloc_section (bfd *abfd,
return srel;
}
-static bfd_boolean
+static bool
count_dyn_reloc (bfd *abfd, struct elfNN_ia64_dyn_sym_info *dyn_i,
- asection *srel, int type, bfd_boolean reltext)
+ asection *srel, int type, bool reltext)
{
struct elfNN_ia64_dyn_reloc_entry *rent;
@@ -2129,7 +2130,7 @@ count_dyn_reloc (bfd *abfd, struct elfNN_ia64_dyn_sym_info *dyn_i,
rent = ((struct elfNN_ia64_dyn_reloc_entry *)
bfd_alloc (abfd, (bfd_size_type) sizeof (*rent)));
if (!rent)
- return FALSE;
+ return false;
rent->next = dyn_i->reloc_entries;
rent->srel = srel;
@@ -2140,10 +2141,10 @@ count_dyn_reloc (bfd *abfd, struct elfNN_ia64_dyn_sym_info *dyn_i,
rent->reltext = reltext;
rent->count++;
- return TRUE;
+ return true;
}
-static bfd_boolean
+static bool
elfNN_ia64_check_relocs (bfd *abfd, struct bfd_link_info *info,
asection *sec,
const Elf_Internal_Rela *relocs)
@@ -2169,15 +2170,15 @@ elfNN_ia64_check_relocs (bfd *abfd, struct bfd_link_info *info,
int need_entry;
struct elf_link_hash_entry *h;
unsigned long r_symndx;
- bfd_boolean maybe_dynamic;
+ bool maybe_dynamic;
if (bfd_link_relocatable (info))
- return TRUE;
+ return true;
symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
ia64_info = elfNN_ia64_hash_table (info);
if (ia64_info == NULL)
- return FALSE;
+ return false;
got = fptr = srel = pltoff = NULL;
@@ -2345,8 +2346,8 @@ elfNN_ia64_check_relocs (bfd *abfd, struct bfd_link_info *info,
abfd, 0, (bfd_vma) 0);
}
- if (get_dyn_sym_info (ia64_info, h, abfd, rel, TRUE) == NULL)
- return FALSE;
+ if (get_dyn_sym_info (ia64_info, h, abfd, rel, true) == NULL)
+ return false;
}
/* Now, we only do lookup without insertion, which is very fast
@@ -2514,7 +2515,7 @@ elfNN_ia64_check_relocs (bfd *abfd, struct bfd_link_info *info,
if (!need_entry)
continue;
- dyn_i = get_dyn_sym_info (ia64_info, h, abfd, rel, FALSE);
+ dyn_i = get_dyn_sym_info (ia64_info, h, abfd, rel, false);
/* Record whether or not this is a local symbol. */
dyn_i->h = h;
@@ -2527,7 +2528,7 @@ elfNN_ia64_check_relocs (bfd *abfd, struct bfd_link_info *info,
{
got = get_got (abfd, info, ia64_info);
if (!got)
- return FALSE;
+ return false;
}
if (need_entry & NEED_GOT)
dyn_i->want_got = 1;
@@ -2546,7 +2547,7 @@ elfNN_ia64_check_relocs (bfd *abfd, struct bfd_link_info *info,
{
fptr = get_fptr (abfd, info, ia64_info);
if (!fptr)
- return FALSE;
+ return false;
}
/* FPTRs for shared libraries are allocated by the dynamic
@@ -2556,7 +2557,7 @@ elfNN_ia64_check_relocs (bfd *abfd, struct bfd_link_info *info,
{
if (! (bfd_elf_link_record_local_dynamic_symbol
(info, abfd, (long) r_symndx)))
- return FALSE;
+ return false;
}
dyn_i->want_fptr = 1;
@@ -2580,7 +2581,7 @@ elfNN_ia64_check_relocs (bfd *abfd, struct bfd_link_info *info,
{
pltoff = get_pltoff (abfd, info, ia64_info);
if (!pltoff)
- return FALSE;
+ return false;
}
dyn_i->want_pltoff = 1;
@@ -2589,23 +2590,23 @@ elfNN_ia64_check_relocs (bfd *abfd, struct bfd_link_info *info,
{
if (!srel)
{
- srel = get_reloc_section (abfd, ia64_info, sec, TRUE);
+ srel = get_reloc_section (abfd, ia64_info, sec, true);
if (!srel)
- return FALSE;
+ return false;
}
if (!count_dyn_reloc (abfd, dyn_i, srel, dynrel_type,
(sec->flags & SEC_READONLY) != 0))
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return true;
}
/* For cleanliness, and potentially faster dynamic loading, allocate
external GOT entries first. */
-static bfd_boolean
+static bool
allocate_global_data_got (struct elfNN_ia64_dyn_sym_info *dyn_i,
void * data)
{
@@ -2636,7 +2637,7 @@ allocate_global_data_got (struct elfNN_ia64_dyn_sym_info *dyn_i,
ia64_info = elfNN_ia64_hash_table (x->info);
if (ia64_info == NULL)
- return FALSE;
+ return false;
if (ia64_info->self_dtpmod_offset == (bfd_vma) -1)
{
@@ -2651,12 +2652,12 @@ allocate_global_data_got (struct elfNN_ia64_dyn_sym_info *dyn_i,
dyn_i->dtprel_offset = x->ofs;
x->ofs += 8;
}
- return TRUE;
+ return true;
}
/* Next, allocate all the GOT entries used by LTOFF_FPTR relocs. */
-static bfd_boolean
+static bool
allocate_global_fptr_got (struct elfNN_ia64_dyn_sym_info *dyn_i,
void * data)
{
@@ -2669,12 +2670,12 @@ allocate_global_fptr_got (struct elfNN_ia64_dyn_sym_info *dyn_i,
dyn_i->got_offset = x->ofs;
x->ofs += 8;
}
- return TRUE;
+ return true;
}
/* Lastly, allocate all the GOT entries for local data. */
-static bfd_boolean
+static bool
allocate_local_got (struct elfNN_ia64_dyn_sym_info *dyn_i,
void * data)
{
@@ -2686,7 +2687,7 @@ allocate_local_got (struct elfNN_ia64_dyn_sym_info *dyn_i,
dyn_i->got_offset = x->ofs;
x->ofs += 8;
}
- return TRUE;
+ return true;
}
/* Search for the index of a global symbol in it's defining object file. */
@@ -2710,7 +2711,7 @@ global_sym_index (struct elf_link_hash_entry *h)
/* Allocate function descriptors. We can do these for every function
in a main executable that is not exported. */
-static bfd_boolean
+static bool
allocate_fptr (struct elfNN_ia64_dyn_sym_info *dyn_i, void * data)
{
struct elfNN_ia64_allocate_data *x = (struct elfNN_ia64_allocate_data *)data;
@@ -2738,7 +2739,7 @@ allocate_fptr (struct elfNN_ia64_dyn_sym_info *dyn_i, void * data)
if (!bfd_elf_link_record_local_dynamic_symbol
(x->info, h->root.u.def.section->owner,
global_sym_index (h)))
- return FALSE;
+ return false;
}
dyn_i->want_fptr = 0;
@@ -2751,12 +2752,12 @@ allocate_fptr (struct elfNN_ia64_dyn_sym_info *dyn_i, void * data)
else
dyn_i->want_fptr = 0;
}
- return TRUE;
+ return true;
}
/* Allocate all the minimal PLT entries. */
-static bfd_boolean
+static bool
allocate_plt_entries (struct elfNN_ia64_dyn_sym_info *dyn_i,
void * data)
{
@@ -2788,12 +2789,12 @@ allocate_plt_entries (struct elfNN_ia64_dyn_sym_info *dyn_i,
dyn_i->want_plt2 = 0;
}
}
- return TRUE;
+ return true;
}
/* Allocate all the full PLT entries. */
-static bfd_boolean
+static bool
allocate_plt2_entries (struct elfNN_ia64_dyn_sym_info *dyn_i,
void * data)
{
@@ -2812,7 +2813,7 @@ allocate_plt2_entries (struct elfNN_ia64_dyn_sym_info *dyn_i,
h = (struct elf_link_hash_entry *) h->root.u.i.link;
dyn_i->h->plt.offset = ofs;
}
- return TRUE;
+ return true;
}
/* Allocate all the PLTOFF entries requested by relocations and
@@ -2820,7 +2821,7 @@ allocate_plt2_entries (struct elfNN_ia64_dyn_sym_info *dyn_i,
because the latter are not necessarily addressable by the GP.
??? Relaxation might be able to determine that they are. */
-static bfd_boolean
+static bool
allocate_pltoff_entries (struct elfNN_ia64_dyn_sym_info *dyn_i,
void * data)
{
@@ -2831,24 +2832,24 @@ allocate_pltoff_entries (struct elfNN_ia64_dyn_sym_info *dyn_i,
dyn_i->pltoff_offset = x->ofs;
x->ofs += 16;
}
- return TRUE;
+ return true;
}
/* Allocate dynamic relocations for those symbols that turned out
to be dynamic. */
-static bfd_boolean
+static bool
allocate_dynrel_entries (struct elfNN_ia64_dyn_sym_info *dyn_i,
void * data)
{
struct elfNN_ia64_allocate_data *x = (struct elfNN_ia64_allocate_data *)data;
struct elfNN_ia64_link_hash_table *ia64_info;
struct elfNN_ia64_dyn_reloc_entry *rent;
- bfd_boolean dynamic_symbol, shared, resolved_zero;
+ bool dynamic_symbol, shared, resolved_zero;
ia64_info = elfNN_ia64_hash_table (x->info);
if (ia64_info == NULL)
- return FALSE;
+ return false;
/* Note that this can't be used in relation to FPTR relocs below. */
dynamic_symbol = elfNN_ia64_dynamic_symbol_p (dyn_i->h, x->info, 0);
@@ -2881,7 +2882,7 @@ allocate_dynrel_entries (struct elfNN_ia64_dyn_sym_info *dyn_i,
ia64_info->root.srelgot->size += sizeof (ElfNN_External_Rela);
if (x->only_got)
- return TRUE;
+ return true;
if (ia64_info->rel_fptr_sec && dyn_i->want_fptr)
{
@@ -2952,10 +2953,10 @@ allocate_dynrel_entries (struct elfNN_ia64_dyn_sym_info *dyn_i,
rent->srel->size += sizeof (ElfNN_External_Rela) * count;
}
- return TRUE;
+ return true;
}
-static bfd_boolean
+static bool
elfNN_ia64_adjust_dynamic_symbol (struct bfd_link_info *info ATTRIBUTE_UNUSED,
struct elf_link_hash_entry *h)
{
@@ -2971,7 +2972,7 @@ elfNN_ia64_adjust_dynamic_symbol (struct bfd_link_info *info ATTRIBUTE_UNUSED,
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;
}
/* If this is a reference to a symbol defined by a dynamic object which
@@ -2981,10 +2982,10 @@ elfNN_ia64_adjust_dynamic_symbol (struct bfd_link_info *info ATTRIBUTE_UNUSED,
But IA-64 code is canonically PIC, so as a rule we can avoid this sort
of hackery. */
- return TRUE;
+ return true;
}
-static bfd_boolean
+static bool
elfNN_ia64_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
struct bfd_link_info *info)
{
@@ -2995,7 +2996,7 @@ elfNN_ia64_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
ia64_info = elfNN_ia64_hash_table (info);
if (ia64_info == NULL)
- return FALSE;
+ return false;
dynobj = ia64_info->root.dynobj;
ia64_info->self_dtpmod_offset = (bfd_vma) -1;
BFD_ASSERT(dynobj != NULL);
@@ -3081,7 +3082,7 @@ elfNN_ia64_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
if (bfd_link_pic (info) && ia64_info->self_dtpmod_offset != (bfd_vma) -1)
ia64_info->root.srelgot->size += sizeof (ElfNN_External_Rela);
- data.only_got = FALSE;
+ data.only_got = false;
elfNN_ia64_dyn_sym_traverse (ia64_info, allocate_dynrel_entries, &data);
}
@@ -3089,7 +3090,7 @@ elfNN_ia64_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
Allocate memory for them. */
for (sec = dynobj->sections; sec != NULL; sec = sec->next)
{
- bfd_boolean strip;
+ bool strip;
if (!(sec->flags & SEC_LINKER_CREATED))
continue;
@@ -3105,7 +3106,7 @@ elfNN_ia64_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
strip = (sec->size == 0);
if (sec == ia64_info->root.sgot)
- strip = FALSE;
+ strip = false;
else if (sec == ia64_info->root.srelgot)
{
if (strip)
@@ -3145,7 +3146,7 @@ elfNN_ia64_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
ia64_info->rel_pltoff_sec = NULL;
else
{
- ia64_info->root.dt_jmprel_required = TRUE;
+ ia64_info->root.dt_jmprel_required = true;
/* We use the reloc_count field as a counter if we need to
copy relocs into the output file. */
sec->reloc_count = 0;
@@ -3160,7 +3161,7 @@ elfNN_ia64_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
name = bfd_section_name (sec);
if (strcmp (name, ".got.plt") == 0)
- strip = FALSE;
+ strip = false;
else if (startswith (name, ".rel"))
{
if (!strip)
@@ -3181,7 +3182,7 @@ elfNN_ia64_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
/* Allocate memory for the section contents. */
sec->contents = (bfd_byte *) bfd_zalloc (dynobj, sec->size);
if (sec->contents == NULL && sec->size != 0)
- return FALSE;
+ return false;
}
}
@@ -3194,16 +3195,16 @@ elfNN_ia64_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
#define add_dynamic_entry(TAG, VAL) \
_bfd_elf_add_dynamic_entry (info, TAG, VAL)
- if (!_bfd_elf_add_dynamic_tags (output_bfd, info, TRUE))
- return FALSE;
+ if (!_bfd_elf_add_dynamic_tags (output_bfd, info, true))
+ return false;
if (!add_dynamic_entry (DT_IA_64_PLT_RESERVE, 0))
- return FALSE;
+ return false;
}
/* ??? Perhaps force __gp local. */
- return TRUE;
+ return true;
}
static void
@@ -3247,7 +3248,7 @@ set_got_entry (bfd *abfd, struct bfd_link_info *info,
{
struct elfNN_ia64_link_hash_table *ia64_info;
asection *got_sec;
- bfd_boolean done;
+ bool done;
bfd_vma got_offset;
ia64_info = elfNN_ia64_hash_table (info);
@@ -3260,19 +3261,19 @@ set_got_entry (bfd *abfd, struct bfd_link_info *info,
{
case R_IA64_TPREL64LSB:
done = dyn_i->tprel_done;
- dyn_i->tprel_done = TRUE;
+ dyn_i->tprel_done = true;
got_offset = dyn_i->tprel_offset;
break;
case R_IA64_DTPMOD64LSB:
if (dyn_i->dtpmod_offset != ia64_info->self_dtpmod_offset)
{
done = dyn_i->dtpmod_done;
- dyn_i->dtpmod_done = TRUE;
+ dyn_i->dtpmod_done = true;
}
else
{
done = ia64_info->self_dtpmod_done;
- ia64_info->self_dtpmod_done = TRUE;
+ ia64_info->self_dtpmod_done = true;
dynindx = 0;
}
got_offset = dyn_i->dtpmod_offset;
@@ -3280,12 +3281,12 @@ set_got_entry (bfd *abfd, struct bfd_link_info *info,
case R_IA64_DTPREL32LSB:
case R_IA64_DTPREL64LSB:
done = dyn_i->dtprel_done;
- dyn_i->dtprel_done = TRUE;
+ dyn_i->dtprel_done = true;
got_offset = dyn_i->dtprel_offset;
break;
default:
done = dyn_i->got_done;
- dyn_i->got_done = TRUE;
+ dyn_i->got_done = true;
got_offset = dyn_i->got_offset;
break;
}
@@ -3359,7 +3360,7 @@ set_got_entry (bfd *abfd, struct bfd_link_info *info,
dyn_r_type = R_IA64_DTPREL64MSB;
break;
default:
- BFD_ASSERT (FALSE);
+ BFD_ASSERT (false);
break;
}
}
@@ -3438,7 +3439,7 @@ set_fptr_entry (bfd *abfd, struct bfd_link_info *info,
static bfd_vma
set_pltoff_entry (bfd *abfd, struct bfd_link_info *info,
struct elfNN_ia64_dyn_sym_info *dyn_i,
- bfd_vma value, bfd_boolean is_plt)
+ bfd_vma value, bool is_plt)
{
struct elfNN_ia64_link_hash_table *ia64_info;
asection *pltoff_sec;
@@ -3536,8 +3537,8 @@ elfNN_ia64_unwind_entry_compare (const void * a, const void * b)
}
/* Make sure we've got ourselves a nice fat __gp value. */
-static bfd_boolean
-elfNN_ia64_choose_gp (bfd *abfd, struct bfd_link_info *info, bfd_boolean final)
+static bool
+elfNN_ia64_choose_gp (bfd *abfd, struct bfd_link_info *info, bool final)
{
bfd_vma min_vma = (bfd_vma) -1, max_vma = 0;
bfd_vma min_short_vma = min_vma, max_short_vma = 0;
@@ -3548,7 +3549,7 @@ elfNN_ia64_choose_gp (bfd *abfd, struct bfd_link_info *info, bfd_boolean final)
ia64_info = elfNN_ia64_hash_table (info);
if (ia64_info == NULL)
- return FALSE;
+ return false;
/* Find the min and max vma of all sections marked short. Also collect
min and max vma of any type, for use in selecting a nice gp. */
@@ -3597,8 +3598,8 @@ elfNN_ia64_choose_gp (bfd *abfd, struct bfd_link_info *info, bfd_boolean final)
}
/* See if the user wants to force a value. */
- gp = elf_link_hash_lookup (elf_hash_table (info), "__gp", FALSE,
- FALSE, FALSE);
+ gp = elf_link_hash_lookup (elf_hash_table (info), "__gp", false,
+ false, false);
if (gp
&& (gp->root.type == bfd_link_hash_defined
@@ -3668,7 +3669,7 @@ elfNN_ia64_choose_gp (bfd *abfd, struct bfd_link_info *info, bfd_boolean final)
/* xgettext:c-format */
(_("%pB: short data segment overflowed (%#" PRIx64 " >= 0x400000)"),
abfd, (uint64_t) (max_short_vma - min_short_vma));
- return FALSE;
+ return false;
}
else if ((gp_val > min_short_vma
&& gp_val - min_short_vma > 0x200000)
@@ -3677,16 +3678,16 @@ elfNN_ia64_choose_gp (bfd *abfd, struct bfd_link_info *info, bfd_boolean final)
{
_bfd_error_handler
(_("%pB: __gp does not cover short data segment"), abfd);
- return FALSE;
+ return false;
}
}
_bfd_set_gp_value (abfd, gp_val);
- return TRUE;
+ return true;
}
-static bfd_boolean
+static bool
elfNN_ia64_final_link (bfd *abfd, struct bfd_link_info *info)
{
struct elfNN_ia64_link_hash_table *ia64_info;
@@ -3694,7 +3695,7 @@ elfNN_ia64_final_link (bfd *abfd, struct bfd_link_info *info)
ia64_info = elfNN_ia64_hash_table (info);
if (ia64_info == NULL)
- return FALSE;
+ return false;
/* Make sure we've got ourselves a nice fat __gp value. */
if (!bfd_link_relocatable (info))
@@ -3705,12 +3706,12 @@ elfNN_ia64_final_link (bfd *abfd, struct bfd_link_info *info)
/* We assume after gp is set, section size will only decrease. We
need to adjust gp for it. */
_bfd_set_gp_value (abfd, 0);
- if (! elfNN_ia64_choose_gp (abfd, info, TRUE))
- return FALSE;
+ if (! elfNN_ia64_choose_gp (abfd, info, true))
+ return false;
gp_val = _bfd_get_gp_value (abfd);
- gp = elf_link_hash_lookup (elf_hash_table (info), "__gp", FALSE,
- FALSE, FALSE);
+ gp = elf_link_hash_lookup (elf_hash_table (info), "__gp", false,
+ false, false);
if (gp)
{
gp->root.type = bfd_link_hash_defined;
@@ -3732,13 +3733,13 @@ elfNN_ia64_final_link (bfd *abfd, struct bfd_link_info *info)
unwind_output_sec->contents
= bfd_malloc (unwind_output_sec->size);
if (unwind_output_sec->contents == NULL)
- return FALSE;
+ return false;
}
}
/* Invoke the regular ELF backend linker to do all the work. */
if (!bfd_elf_final_link (abfd, info))
- return FALSE;
+ return false;
if (unwind_output_sec)
{
@@ -3751,10 +3752,10 @@ elfNN_ia64_final_link (bfd *abfd, struct bfd_link_info *info)
if (! bfd_set_section_contents (abfd, unwind_output_sec,
unwind_output_sec->contents, (bfd_vma) 0,
unwind_output_sec->size))
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
static int
@@ -3772,13 +3773,13 @@ elfNN_ia64_relocate_section (bfd *output_bfd,
Elf_Internal_Rela *rel;
Elf_Internal_Rela *relend;
asection *srel;
- bfd_boolean ret_val = TRUE; /* for non-fatal errors */
+ bool ret_val = true; /* for non-fatal errors */
bfd_vma gp_val;
symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
ia64_info = elfNN_ia64_hash_table (info);
if (ia64_info == NULL)
- return FALSE;
+ return false;
/* Infect various flags from the input section to the output section. */
if (bfd_link_relocatable (info))
@@ -3793,7 +3794,7 @@ elfNN_ia64_relocate_section (bfd *output_bfd,
}
gp_val = _bfd_get_gp_value (output_bfd);
- srel = get_reloc_section (input_bfd, ia64_info, input_section, FALSE);
+ srel = get_reloc_section (input_bfd, ia64_info, input_section, false);
rel = relocs;
relend = relocs + input_section->reloc_count;
@@ -3809,8 +3810,8 @@ elfNN_ia64_relocate_section (bfd *output_bfd,
bfd_vma value;
asection *sym_sec;
bfd_byte *hit_addr;
- bfd_boolean dynamic_symbol_p;
- bfd_boolean undef_weak_ref;
+ bool dynamic_symbol_p;
+ bool undef_weak_ref;
r_type = ELFNN_R_TYPE (rel->r_info);
if (r_type > R_IA64_MAX_RELOC_CODE)
@@ -3819,14 +3820,14 @@ elfNN_ia64_relocate_section (bfd *output_bfd,
_bfd_error_handler (_("%pB: unsupported relocation type %#x"),
input_bfd, (int) r_type);
bfd_set_error (bfd_error_bad_value);
- ret_val = FALSE;
+ ret_val = false;
continue;
}
howto = ia64_elf_lookup_howto (r_type);
if (howto == NULL)
{
- ret_val = FALSE;
+ ret_val = false;
continue;
}
@@ -3834,7 +3835,7 @@ elfNN_ia64_relocate_section (bfd *output_bfd,
h = NULL;
sym = NULL;
sym_sec = NULL;
- undef_weak_ref = FALSE;
+ undef_weak_ref = false;
if (r_symndx < symtab_hdr->sh_info)
{
@@ -3851,7 +3852,7 @@ elfNN_ia64_relocate_section (bfd *output_bfd,
{
struct elfNN_ia64_local_hash_entry *loc_h;
- loc_h = get_local_sym_hash (ia64_info, input_bfd, rel, FALSE);
+ loc_h = get_local_sym_hash (ia64_info, input_bfd, rel, false);
if (loc_h && ! loc_h->sec_merge_done)
{
struct elfNN_ia64_dyn_sym_info *dynent;
@@ -3890,8 +3891,8 @@ elfNN_ia64_relocate_section (bfd *output_bfd,
}
else
{
- bfd_boolean unresolved_reloc;
- bfd_boolean warned, ignored;
+ bool unresolved_reloc;
+ bool warned, ignored;
struct elf_link_hash_entry **sym_hashes = elf_sym_hashes (input_bfd);
RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
@@ -3900,7 +3901,7 @@ elfNN_ia64_relocate_section (bfd *output_bfd,
unresolved_reloc, warned, ignored);
if (h->root.type == bfd_link_hash_undefweak)
- undef_weak_ref = TRUE;
+ undef_weak_ref = true;
else if (warned || (ignored && bfd_link_executable (info)))
continue;
}
@@ -3954,7 +3955,7 @@ elfNN_ia64_relocate_section (bfd *output_bfd,
h ? h->root.root.string
: bfd_elf_sym_name (input_bfd, symtab_hdr, sym,
sym_sec));
- ret_val = FALSE;
+ ret_val = false;
continue;
default:
@@ -4022,7 +4023,7 @@ elfNN_ia64_relocate_section (bfd *output_bfd,
h ? h->root.root.string
: bfd_elf_sym_name (input_bfd, symtab_hdr, sym,
sym_sec));
- ret_val = FALSE;
+ ret_val = false;
continue;
}
value -= gp_val;
@@ -4032,7 +4033,7 @@ elfNN_ia64_relocate_section (bfd *output_bfd,
case R_IA64_LTOFF22:
case R_IA64_LTOFF22X:
case R_IA64_LTOFF64I:
- dyn_i = get_dyn_sym_info (ia64_info, h, input_bfd, rel, FALSE);
+ dyn_i = get_dyn_sym_info (ia64_info, h, input_bfd, rel, false);
value = set_got_entry (input_bfd, info, dyn_i, (h ? h->dynindx : -1),
rel->r_addend, value, R_IA64_DIRNNLSB);
value -= gp_val;
@@ -4043,8 +4044,8 @@ elfNN_ia64_relocate_section (bfd *output_bfd,
case R_IA64_PLTOFF64I:
case R_IA64_PLTOFF64MSB:
case R_IA64_PLTOFF64LSB:
- dyn_i = get_dyn_sym_info (ia64_info, h, input_bfd, rel, FALSE);
- value = set_pltoff_entry (output_bfd, info, dyn_i, value, FALSE);
+ dyn_i = get_dyn_sym_info (ia64_info, h, input_bfd, rel, false);
+ value = set_pltoff_entry (output_bfd, info, dyn_i, value, false);
value -= gp_val;
r = ia64_elf_install_value (hit_addr, value, r_type);
break;
@@ -4054,7 +4055,7 @@ elfNN_ia64_relocate_section (bfd *output_bfd,
case R_IA64_FPTR32LSB:
case R_IA64_FPTR64MSB:
case R_IA64_FPTR64LSB:
- dyn_i = get_dyn_sym_info (ia64_info, h, input_bfd, rel, FALSE);
+ dyn_i = get_dyn_sym_info (ia64_info, h, input_bfd, rel, false);
if (dyn_i->want_fptr)
{
if (!undef_weak_ref)
@@ -4082,7 +4083,7 @@ elfNN_ia64_relocate_section (bfd *output_bfd,
_bfd_error_handler
(_("%pB: linking non-pic code in a position independent executable"),
input_bfd);
- ret_val = FALSE;
+ ret_val = false;
continue;
}
dynindx = 0;
@@ -4123,7 +4124,7 @@ elfNN_ia64_relocate_section (bfd *output_bfd,
{
long dynindx;
- dyn_i = get_dyn_sym_info (ia64_info, h, input_bfd, rel, FALSE);
+ dyn_i = get_dyn_sym_info (ia64_info, h, input_bfd, rel, false);
if (dyn_i->want_fptr)
{
BFD_ASSERT (h == NULL || h->dynindx == -1);
@@ -4177,7 +4178,7 @@ elfNN_ia64_relocate_section (bfd *output_bfd,
/* We should have created a PLT entry for any dynamic symbol. */
dyn_i = NULL;
if (h)
- dyn_i = get_dyn_sym_info (ia64_info, h, NULL, NULL, FALSE);
+ dyn_i = get_dyn_sym_info (ia64_info, h, NULL, NULL, false);
if (dyn_i && dyn_i->want_plt2)
{
@@ -4231,7 +4232,7 @@ elfNN_ia64_relocate_section (bfd *output_bfd,
symtab_hdr,
sym,
sym_sec));
- ret_val = FALSE;
+ ret_val = false;
continue;
}
goto finish_pcrel;
@@ -4386,7 +4387,7 @@ elfNN_ia64_relocate_section (bfd *output_bfd,
got_r_type = R_IA64_DTPRELNNLSB;
break;
}
- dyn_i = get_dyn_sym_info (ia64_info, h, input_bfd, rel, FALSE);
+ dyn_i = get_dyn_sym_info (ia64_info, h, input_bfd, rel, false);
value = set_got_entry (input_bfd, info, dyn_i, dynindx, r_addend,
value, got_r_type);
value -= gp_val;
@@ -4410,7 +4411,7 @@ elfNN_ia64_relocate_section (bfd *output_bfd,
don't try to continue. */
(*info->callbacks->undefined_symbol)
(info, "__gp", input_bfd, input_section, rel->r_offset, 1);
- return FALSE;
+ return false;
case bfd_reloc_notsupported:
{
@@ -4424,7 +4425,7 @@ elfNN_ia64_relocate_section (bfd *output_bfd,
(*info->callbacks->warning) (info, _("unsupported reloc"),
name, input_bfd,
input_section, rel->r_offset);
- ret_val = FALSE;
+ ret_val = false;
}
break;
@@ -4496,7 +4497,7 @@ elfNN_ia64_relocate_section (bfd *output_bfd,
break;
}
- ret_val = FALSE;
+ ret_val = false;
}
break;
}
@@ -4505,7 +4506,7 @@ elfNN_ia64_relocate_section (bfd *output_bfd,
return ret_val;
}
-static bfd_boolean
+static bool
elfNN_ia64_finish_dynamic_symbol (bfd *output_bfd,
struct bfd_link_info *info,
struct elf_link_hash_entry *h,
@@ -4516,9 +4517,9 @@ elfNN_ia64_finish_dynamic_symbol (bfd *output_bfd,
ia64_info = elfNN_ia64_hash_table (info);
if (ia64_info == NULL)
- return FALSE;
+ return false;
- dyn_i = get_dyn_sym_info (ia64_info, h, NULL, NULL, FALSE);
+ dyn_i = get_dyn_sym_info (ia64_info, h, NULL, NULL, false);
/* Fill in the PLT data, if required. */
if (dyn_i && dyn_i->want_plt)
@@ -4543,7 +4544,7 @@ elfNN_ia64_finish_dynamic_symbol (bfd *output_bfd,
plt_addr = (plt_sec->output_section->vma
+ plt_sec->output_offset
+ dyn_i->plt_offset);
- pltoff_addr = set_pltoff_entry (output_bfd, info, dyn_i, plt_addr, TRUE);
+ pltoff_addr = set_pltoff_entry (output_bfd, info, dyn_i, plt_addr, true);
/* Initialize the FULL PLT entry, if needed. */
if (dyn_i->want_plt2)
@@ -4593,10 +4594,10 @@ elfNN_ia64_finish_dynamic_symbol (bfd *output_bfd,
|| h == ia64_info->root.hplt)
sym->st_shndx = SHN_ABS;
- return TRUE;
+ return true;
}
-static bfd_boolean
+static bool
elfNN_ia64_finish_dynamic_sections (bfd *abfd,
struct bfd_link_info *info)
{
@@ -4605,7 +4606,7 @@ elfNN_ia64_finish_dynamic_sections (bfd *abfd,
ia64_info = elfNN_ia64_hash_table (info);
if (ia64_info == NULL)
- return FALSE;
+ return false;
dynobj = ia64_info->root.dynobj;
@@ -4673,47 +4674,47 @@ elfNN_ia64_finish_dynamic_sections (bfd *abfd,
}
}
- return TRUE;
+ return true;
}
/* ELF file flag handling: */
/* Function to keep IA-64 specific file flags. */
-static bfd_boolean
+static bool
elfNN_ia64_set_private_flags (bfd *abfd, flagword flags)
{
BFD_ASSERT (!elf_flags_init (abfd)
|| elf_elfheader (abfd)->e_flags == flags);
elf_elfheader (abfd)->e_flags = flags;
- elf_flags_init (abfd) = TRUE;
- return TRUE;
+ elf_flags_init (abfd) = true;
+ return true;
}
/* Merge backend specific data from an object file to the output
object file when linking. */
-static bfd_boolean
+static bool
elfNN_ia64_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
{
bfd *obfd = info->output_bfd;
flagword out_flags;
flagword in_flags;
- bfd_boolean ok = TRUE;
+ bool ok = true;
/* FIXME: What should be checked when linking shared libraries? */
if ((ibfd->flags & DYNAMIC) != 0)
- return TRUE;
+ return true;
if (!is_ia64_elf (ibfd) || !is_ia64_elf (obfd))
- return TRUE;
+ return true;
in_flags = elf_elfheader (ibfd)->e_flags;
out_flags = elf_elfheader (obfd)->e_flags;
if (! elf_flags_init (obfd))
{
- elf_flags_init (obfd) = TRUE;
+ elf_flags_init (obfd) = true;
elf_elfheader (obfd)->e_flags = in_flags;
if (bfd_get_arch (obfd) == bfd_get_arch (ibfd)
@@ -4723,12 +4724,12 @@ elfNN_ia64_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
bfd_get_mach (ibfd));
}
- return TRUE;
+ return true;
}
/* Check flag compatibility. */
if (in_flags == out_flags)
- return TRUE;
+ return true;
/* Output has EF_IA_64_REDUCEDFP set only if all inputs have it set. */
if (!(in_flags & EF_IA_64_REDUCEDFP) && (out_flags & EF_IA_64_REDUCEDFP))
@@ -4741,7 +4742,7 @@ elfNN_ia64_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
ibfd);
bfd_set_error (bfd_error_bad_value);
- ok = FALSE;
+ ok = false;
}
if ((in_flags & EF_IA_64_BE) != (out_flags & EF_IA_64_BE))
{
@@ -4750,7 +4751,7 @@ elfNN_ia64_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
ibfd);
bfd_set_error (bfd_error_bad_value);
- ok = FALSE;
+ ok = false;
}
if ((in_flags & EF_IA_64_ABI64) != (out_flags & EF_IA_64_ABI64))
{
@@ -4759,7 +4760,7 @@ elfNN_ia64_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
ibfd);
bfd_set_error (bfd_error_bad_value);
- ok = FALSE;
+ ok = false;
}
if ((in_flags & EF_IA_64_CONS_GP) != (out_flags & EF_IA_64_CONS_GP))
{
@@ -4768,7 +4769,7 @@ elfNN_ia64_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
ibfd);
bfd_set_error (bfd_error_bad_value);
- ok = FALSE;
+ ok = false;
}
if ((in_flags & EF_IA_64_NOFUNCDESC_CONS_GP)
!= (out_flags & EF_IA_64_NOFUNCDESC_CONS_GP))
@@ -4778,13 +4779,13 @@ elfNN_ia64_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
ibfd);
bfd_set_error (bfd_error_bad_value);
- ok = FALSE;
+ ok = false;
}
return ok;
}
-static bfd_boolean
+static bool
elfNN_ia64_print_private_bfd_data (bfd *abfd, void * ptr)
{
FILE *file = (FILE *) ptr;
@@ -4803,7 +4804,7 @@ elfNN_ia64_print_private_bfd_data (bfd *abfd, void * ptr)
(flags & EF_IA_64_ABI64) ? "ABI64" : "ABI32");
_bfd_elf_print_private_bfd_data (abfd, ptr);
- return TRUE;
+ return true;
}
static enum elf_reloc_type_class
@@ -4835,7 +4836,7 @@ static const struct bfd_elf_special_section elfNN_ia64_special_sections[] =
{ NULL, 0, 0, 0, 0 }
};
-static bfd_boolean
+static bool
elfNN_ia64_object_p (bfd *abfd)
{
asection *sec;
@@ -4846,7 +4847,7 @@ elfNN_ia64_object_p (bfd *abfd)
size_t amt;
if (abfd->flags & DYNAMIC)
- return TRUE;
+ return true;
/* Flags for fake group section. */
flags = (SEC_LINKER_CREATED | SEC_GROUP | SEC_LINK_ONCE
@@ -4866,7 +4867,7 @@ elfNN_ia64_object_p (bfd *abfd)
amt = strlen (name) + sizeof (".gnu.linkonce.ia64unwi.");
unwi_name = bfd_alloc (abfd, amt);
if (!unwi_name)
- return FALSE;
+ return false;
strcpy (stpcpy (unwi_name, ".gnu.linkonce.ia64unwi."), name);
unwi = bfd_get_section_by_name (abfd, unwi_name);
@@ -4874,7 +4875,7 @@ elfNN_ia64_object_p (bfd *abfd)
amt = strlen (name) + sizeof (".gnu.linkonce.ia64unw.");
unw_name = bfd_alloc (abfd, amt);
if (!unw_name)
- return FALSE;
+ return false;
strcpy (stpcpy (unw_name, ".gnu.linkonce.ia64unw."), name);
unw = bfd_get_section_by_name (abfd, unw_name);
@@ -4884,7 +4885,7 @@ elfNN_ia64_object_p (bfd *abfd)
group = bfd_make_section_anyway_with_flags (abfd, name,
flags);
if (group == NULL)
- return FALSE;
+ return false;
/* Move the fake group section to the beginning. */
bfd_section_list_remove (abfd, group);
@@ -4925,40 +4926,40 @@ elfNN_ia64_object_p (bfd *abfd)
elf_section_data (group)->this_hdr.sh_type = SHT_GROUP;
}
}
- return TRUE;
+ return true;
}
-static bfd_boolean
+static bool
elfNN_ia64_hpux_vec (const bfd_target *vec)
{
extern const bfd_target ia64_elfNN_hpux_be_vec;
return (vec == &ia64_elfNN_hpux_be_vec);
}
-static bfd_boolean
+static bool
elfNN_hpux_init_file_header (bfd *abfd, struct bfd_link_info *info)
{
Elf_Internal_Ehdr *i_ehdrp;
if (!_bfd_elf_init_file_header (abfd, info))
- return FALSE;
+ return false;
i_ehdrp = elf_elfheader (abfd);
i_ehdrp->e_ident[EI_OSABI] = get_elf_backend_data (abfd)->elf_osabi;
i_ehdrp->e_ident[EI_ABIVERSION] = 1;
- return TRUE;
+ return true;
}
-static bfd_boolean
+static bool
elfNN_hpux_backend_section_from_bfd_section (bfd *abfd ATTRIBUTE_UNUSED,
asection *sec, int *retval)
{
if (bfd_is_com_section (sec))
{
*retval = SHN_IA_64_ANSI_COMMON;
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
static void