- (elf_hash_table_id ((struct elf_link_hash_table *) ((p)->hash)) \
- == IA64_ELF_DATA ? ((struct elf64_ia64_link_hash_table *) ((p)->hash)) : NULL)
+ ((is_elf_hash_table ((p)->hash) \
+ && elf_hash_table_id (elf_hash_table (p)) == IA64_ELF_DATA) \
+ ? (struct elf64_ia64_link_hash_table *) (p)->hash : NULL)
struct elf64_ia64_vms_obj_tdata
{
struct elf_obj_tdata root;
/* Ident for shared library. */
struct elf64_ia64_vms_obj_tdata
{
struct elf_obj_tdata root;
/* Ident for shared library. */
static struct elf64_ia64_dyn_sym_info * get_dyn_sym_info
(struct elf64_ia64_link_hash_table *,
struct elf_link_hash_entry *,
static struct elf64_ia64_dyn_sym_info * get_dyn_sym_info
(struct elf64_ia64_link_hash_table *,
struct elf_link_hash_entry *,
- bfd *, const Elf_Internal_Rela *, bfd_boolean);
-static bfd_boolean elf64_ia64_dynamic_symbol_p
+ bfd *, const Elf_Internal_Rela *, bool);
+static bool elf64_ia64_dynamic_symbol_p
-static bfd_boolean elf64_ia64_choose_gp
- (bfd *, struct bfd_link_info *, bfd_boolean);
+static bool elf64_ia64_choose_gp
+ (bfd *, struct bfd_link_info *, bool);
static void elf64_ia64_dyn_sym_traverse
(struct elf64_ia64_link_hash_table *,
static void elf64_ia64_dyn_sym_traverse
(struct elf64_ia64_link_hash_table *,
(struct elf64_ia64_dyn_sym_info *, void *);
static asection *get_pltoff
(bfd *, struct elf64_ia64_link_hash_table *);
(struct elf64_ia64_dyn_sym_info *, void *);
static asection *get_pltoff
(bfd *, struct elf64_ia64_link_hash_table *);
elf64_ia64_info_to_howto (bfd *abfd ATTRIBUTE_UNUSED,
arelent *bfd_reloc,
Elf_Internal_Rela *elf_reloc)
elf64_ia64_info_to_howto (bfd *abfd ATTRIBUTE_UNUSED,
arelent *bfd_reloc,
Elf_Internal_Rela *elf_reloc)
_bfd_error_handler (_("%pB: unsupported relocation type %#x"),
abfd, r_type);
bfd_set_error (bfd_error_bad_value);
_bfd_error_handler (_("%pB: unsupported relocation type %#x"),
abfd, r_type);
bfd_set_error (bfd_error_bad_value);
elf64_ia64_relax_section (bfd *abfd, asection *sec,
struct bfd_link_info *link_info,
elf64_ia64_relax_section (bfd *abfd, asection *sec,
struct bfd_link_info *link_info,
Elf_Internal_Sym *isymbuf = NULL;
struct elf64_ia64_link_hash_table *ia64_info;
struct one_fixup *fixups = NULL;
Elf_Internal_Sym *isymbuf = NULL;
struct elf64_ia64_link_hash_table *ia64_info;
struct one_fixup *fixups = NULL;
- bfd_boolean changed_contents = FALSE;
- bfd_boolean changed_relocs = FALSE;
- bfd_boolean skip_relax_pass_0 = TRUE;
- bfd_boolean skip_relax_pass_1 = TRUE;
+ bool changed_contents = false;
+ bool changed_relocs = false;
+ bool skip_relax_pass_0 = true;
+ bool skip_relax_pass_1 = true;
|| sec->reloc_count == 0
|| (link_info->relax_pass == 0 && sec->skip_relax_pass_0)
|| (link_info->relax_pass == 1 && sec->skip_relax_pass_1))
|| sec->reloc_count == 0
|| (link_info->relax_pass == 0 && sec->skip_relax_pass_0)
|| (link_info->relax_pass == 1 && sec->skip_relax_pass_1))
(abfd, sec, NULL, (Elf_Internal_Rela *) NULL,
link_info->keep_memory));
if (internal_relocs == NULL)
(abfd, sec, NULL, (Elf_Internal_Rela *) NULL,
link_info->keep_memory));
if (internal_relocs == NULL)
/* In pass 1, all br relaxations are done. We can skip it. */
if (link_info->relax_pass == 1)
continue;
/* In pass 1, all br relaxations are done. We can skip it. */
if (link_info->relax_pass == 1)
continue;
- dyn_i = get_dyn_sym_info (ia64_info, NULL, abfd, irel, FALSE);
+ dyn_i = get_dyn_sym_info (ia64_info, NULL, abfd, irel, false);
- 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. */
/* For branches to dynamic symbols, we're interested instead
in a branch to the PLT entry. */
elf64_ia64_update_short_info (tsec->output_section,
tsec->output_offset + toff,
elf64_ia64_update_short_info (tsec->output_section,
tsec->output_offset + toff,
{
ia64_elf_relax_ldxmov (contents, roff);
irel->r_info = ELF64_R_INFO (0, R_IA64_NONE);
{
ia64_elf_relax_ldxmov (contents, roff);
irel->r_info = ELF64_R_INFO (0, R_IA64_NONE);
- return ((CONST_STRNEQ (name, ELF_STRING_ia64_unwind)
- && ! CONST_STRNEQ (name, ELF_STRING_ia64_unwind_info))
- || CONST_STRNEQ (name, ELF_STRING_ia64_unwind_once));
+ return ((startswith (name, ELF_STRING_ia64_unwind)
+ && ! startswith (name, ELF_STRING_ia64_unwind_info))
+ || startswith (name, ELF_STRING_ia64_unwind_once));
}
/* 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. */
}
/* 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. */
}
/* 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. */
}
/* 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. */
elf64_ia64_add_symbol_hook (bfd *abfd,
struct bfd_link_info *info,
Elf_Internal_Sym *sym,
elf64_ia64_add_symbol_hook (bfd *abfd,
struct bfd_link_info *info,
Elf_Internal_Sym *sym,
static void
elf64_ia64_hash_hide_symbol (struct bfd_link_info *info,
struct elf_link_hash_entry *xh,
static void
elf64_ia64_hash_hide_symbol (struct bfd_link_info *info,
struct elf_link_hash_entry *xh,
if (entry->root.root.type == bfd_link_hash_warning)
entry = (struct elf64_ia64_link_hash_entry *) entry->root.root.u.i.link;
if (entry->root.root.type == bfd_link_hash_warning)
entry = (struct elf64_ia64_link_hash_entry *) entry->root.root.u.i.link;
elf64_ia64_local_dyn_info_free (void **slot,
void * unused ATTRIBUTE_UNUSED)
{
struct elf64_ia64_local_hash_entry *entry
= (struct elf64_ia64_local_hash_entry *) *slot;
elf64_ia64_local_dyn_info_free (void **slot,
void * unused ATTRIBUTE_UNUSED)
{
struct elf64_ia64_local_hash_entry *entry
= (struct elf64_ia64_local_hash_entry *) *slot;
elf64_ia64_local_dyn_sym_thunk (void **slot, void * xdata)
{
struct elf64_ia64_local_hash_entry *entry
elf64_ia64_local_dyn_sym_thunk (void **slot, void * xdata)
{
struct elf64_ia64_local_hash_entry *entry
create_ia64_vms_notes (bfd *abfd, struct bfd_link_info *info,
unsigned int time_hi, unsigned int time_lo)
{
create_ia64_vms_notes (bfd *abfd, struct bfd_link_info *info,
unsigned int time_hi, unsigned int time_lo)
{
module_name_len = strlen (module_name) + 1;
bfd_putl32 (time_lo, cur_time + 0);
module_name_len = strlen (module_name) + 1;
bfd_putl32 (time_lo, cur_time + 0);
orig_dyn_size = (sizeof (*orig_dyn) + sizeof (IMG_ID) - 1 + 7) & ~7;
orig_dyn = bfd_zalloc (abfd, orig_dyn_size);
if (orig_dyn == NULL)
orig_dyn_size = (sizeof (*orig_dyn) + sizeof (IMG_ID) - 1 + 7) & ~7;
orig_dyn = bfd_zalloc (abfd, orig_dyn_size);
if (orig_dyn == NULL)
bfd_putl32 (1, orig_dyn->major_id);
bfd_putl32 (3, orig_dyn->minor_id);
memcpy (orig_dyn->manipulation_date, cur_time, sizeof (cur_time));
bfd_putl32 (1, orig_dyn->major_id);
bfd_putl32 (3, orig_dyn->minor_id);
memcpy (orig_dyn->manipulation_date, cur_time, sizeof (cur_time));
/* Malloc a temporary buffer large enough for most notes */
note_contents = (unsigned char *) bfd_zalloc (abfd, note_size);
if (note_contents == NULL)
/* Malloc a temporary buffer large enough for most notes */
note_contents = (unsigned char *) bfd_zalloc (abfd, note_size);
if (note_contents == NULL)
elf64_ia64_create_dynamic_sections (bfd *abfd,
struct bfd_link_info *info)
{
elf64_ia64_create_dynamic_sections (bfd *abfd,
struct bfd_link_info *info)
{
s = bfd_make_section_anyway_with_flags (abfd, ".plt", flags | SEC_READONLY);
if (s == NULL
|| !bfd_set_section_alignment (s, bed->plt_alignment))
s = bfd_make_section_anyway_with_flags (abfd, ".plt", flags | SEC_READONLY);
if (s == NULL
|| !bfd_set_section_alignment (s, bed->plt_alignment))
ia64_info->root.splt = s;
if (!get_got (abfd, ia64_info))
ia64_info->root.splt = s;
if (!get_got (abfd, ia64_info))
/* Create a fixup section. */
s = bfd_make_section_anyway_with_flags (abfd, ".fixups",
/* Create a fixup section. */
s = bfd_make_section_anyway_with_flags (abfd, ".fixups",
}
/* Find and/or create a hash entry for local symbol. */
static struct elf64_ia64_local_hash_entry *
get_local_sym_hash (struct elf64_ia64_link_hash_table *ia64_info,
bfd *abfd, const Elf_Internal_Rela *rel,
}
/* Find and/or create a hash entry for local symbol. */
static struct elf64_ia64_local_hash_entry *
get_local_sym_hash (struct elf64_ia64_link_hash_table *ia64_info,
bfd *abfd, const Elf_Internal_Rela *rel,
{
struct elf64_ia64_local_hash_entry e, *ret;
asection *sec = abfd->sections;
{
struct elf64_ia64_local_hash_entry e, *ret;
asection *sec = abfd->sections;
static struct elf64_ia64_dyn_sym_info *
get_dyn_sym_info (struct elf64_ia64_link_hash_table *ia64_info,
struct elf_link_hash_entry *h, bfd *abfd,
static struct elf64_ia64_dyn_sym_info *
get_dyn_sym_info (struct elf64_ia64_link_hash_table *ia64_info,
struct elf_link_hash_entry *h, bfd *abfd,
{
struct elf64_ia64_dyn_sym_info **info_p, *info, *dyn_i, key;
unsigned int *count_p, *sorted_count_p, *size_p;
{
struct elf64_ia64_dyn_sym_info **info_p, *info, *dyn_i, key;
unsigned int *count_p, *sorted_count_p, *size_p;
/* Append the new one to the array. */
dyn_i = info + count;
memset (dyn_i, 0, sizeof (*dyn_i));
/* Append the new one to the array. */
dyn_i = info + count;
memset (dyn_i, 0, sizeof (*dyn_i));
static asection *
get_reloc_section (bfd *abfd,
struct elf64_ia64_link_hash_table *ia64_info,
static asection *
get_reloc_section (bfd *abfd,
struct elf64_ia64_link_hash_table *ia64_info,
&& strcmp (bfd_section_name (sec), srel_name+4) == 0));
dynobj = ia64_info->root.dynobj;
&& strcmp (bfd_section_name (sec), srel_name+4) == 0));
dynobj = ia64_info->root.dynobj;
count_dyn_reloc (bfd *abfd, struct elf64_ia64_dyn_sym_info *dyn_i,
asection *srel, int type)
{
count_dyn_reloc (bfd *abfd, struct elf64_ia64_dyn_sym_info *dyn_i,
asection *srel, int type)
{
rent = ((struct elf64_ia64_dyn_reloc_entry *)
bfd_alloc (abfd, (bfd_size_type) sizeof (*rent)));
if (!rent)
rent = ((struct elf64_ia64_dyn_reloc_entry *)
bfd_alloc (abfd, (bfd_size_type) sizeof (*rent)));
if (!rent)
elf64_ia64_check_relocs (bfd *abfd, struct bfd_link_info *info,
asection *sec,
const Elf_Internal_Rela *relocs)
elf64_ia64_check_relocs (bfd *abfd, struct bfd_link_info *info,
asection *sec,
const Elf_Internal_Rela *relocs)
- 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;
- dyn_i = get_dyn_sym_info (ia64_info, h, abfd, rel, FALSE);
+ dyn_i = get_dyn_sym_info (ia64_info, h, abfd, rel, false);
- srel = get_reloc_section (abfd, ia64_info, sec, TRUE);
+ srel = get_reloc_section (abfd, ia64_info, sec, true);
}
if (!count_dyn_reloc (abfd, dyn_i, srel, dynrel_type))
}
if (!count_dyn_reloc (abfd, dyn_i, srel, dynrel_type))
}
/* For cleanliness, and potentially faster dynamic loading, allocate
external GOT entries first. */
}
/* For cleanliness, and potentially faster dynamic loading, allocate
external GOT entries first. */
}
/* Allocate function descriptors. We can do these for every function
in a main executable that is not exported. */
}
/* Allocate function descriptors. We can do these for every function
in a main executable that is not exported. */
allocate_fptr (struct elf64_ia64_dyn_sym_info *dyn_i, void * data)
{
struct elf64_ia64_allocate_data *x = (struct elf64_ia64_allocate_data *) data;
allocate_fptr (struct elf64_ia64_dyn_sym_info *dyn_i, void * data)
{
struct elf64_ia64_allocate_data *x = (struct elf64_ia64_allocate_data *) data;
allocate_plt_entries (struct elf64_ia64_dyn_sym_info *dyn_i,
void * data ATTRIBUTE_UNUSED)
{
allocate_plt_entries (struct elf64_ia64_dyn_sym_info *dyn_i,
void * data ATTRIBUTE_UNUSED)
{
because the latter are not necessarily addressable by the GP.
??? Relaxation might be able to determine that they are. */
because the latter are not necessarily addressable by the GP.
??? Relaxation might be able to determine that they are. */
allocate_dynrel_entries (struct elf64_ia64_dyn_sym_info *dyn_i,
void * data)
{
struct elf64_ia64_allocate_data *x = (struct elf64_ia64_allocate_data *)data;
struct elf64_ia64_link_hash_table *ia64_info;
struct elf64_ia64_dyn_reloc_entry *rent;
allocate_dynrel_entries (struct elf64_ia64_dyn_sym_info *dyn_i,
void * data)
{
struct elf64_ia64_allocate_data *x = (struct elf64_ia64_allocate_data *)data;
struct elf64_ia64_link_hash_table *ia64_info;
struct elf64_ia64_dyn_reloc_entry *rent;
/* Note that this can't be used in relation to FPTR relocs below. */
dynamic_symbol = elf64_ia64_dynamic_symbol_p (dyn_i->h);
/* Note that this can't be used in relation to FPTR relocs below. */
dynamic_symbol = elf64_ia64_dynamic_symbol_p (dyn_i->h);
elf64_ia64_adjust_dynamic_symbol (struct bfd_link_info *info ATTRIBUTE_UNUSED,
struct elf_link_hash_entry *h)
{
elf64_ia64_adjust_dynamic_symbol (struct bfd_link_info *info ATTRIBUTE_UNUSED,
struct elf_link_hash_entry *h)
{
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;
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;
elf64_ia64_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
struct bfd_link_info *info)
{
elf64_ia64_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
struct bfd_link_info *info)
{
name = bfd_section_name (sec);
if (strcmp (name, ".got.plt") == 0)
name = bfd_section_name (sec);
if (strcmp (name, ".got.plt") == 0)
/* Allocate memory for the section contents. */
sec->contents = (bfd_byte *) bfd_zalloc (dynobj, sec->size);
if (sec->contents == NULL && sec->size != 0)
/* Allocate memory for the section contents. */
sec->contents = (bfd_byte *) bfd_zalloc (dynobj, sec->size);
if (sec->contents == NULL && sec->size != 0)
vms_get_time (&time_hi, &time_lo);
if (!_bfd_elf_add_dynamic_entry (info, DT_IA_64_VMS_IDENT, 0))
vms_get_time (&time_hi, &time_lo);
if (!_bfd_elf_add_dynamic_entry (info, DT_IA_64_VMS_IDENT, 0))
/* Strtab. */
strdyn_off = dynsec->size;
if (!_bfd_elf_add_dynamic_entry (info, DT_IA_64_VMS_STRTAB_OFFSET, 0))
/* Strtab. */
strdyn_off = dynsec->size;
if (!_bfd_elf_add_dynamic_entry (info, DT_IA_64_VMS_STRTAB_OFFSET, 0))
if (!_bfd_elf_add_dynamic_entry (info, DT_IA_64_VMS_LNKFLAGS,
VMS_LF_IMGSTA | VMS_LF_MAIN))
if (!_bfd_elf_add_dynamic_entry (info, DT_IA_64_VMS_LNKFLAGS,
VMS_LF_IMGSTA | VMS_LF_MAIN))
if (!_bfd_elf_add_dynamic_entry (info, DT_IA_64_VMS_NEEDED_IDENT,
elf_ia64_vms_ident (abfd)))
if (!_bfd_elf_add_dynamic_entry (info, DT_IA_64_VMS_NEEDED_IDENT,
elf_ia64_vms_ident (abfd)))
strindex = dynstrsec->size;
soname_len = strlen (soname) + 1;
newcontents = (bfd_byte *) bfd_realloc (dynstrsec->contents,
strindex + soname_len);
if (newcontents == NULL)
strindex = dynstrsec->size;
soname_len = strlen (soname) + 1;
newcontents = (bfd_byte *) bfd_realloc (dynstrsec->contents,
strindex + soname_len);
if (newcontents == NULL)
memcpy (newcontents + strindex, soname, soname_len);
dynstrsec->size += soname_len;
dynstrsec->contents = newcontents;
if (!_bfd_elf_add_dynamic_entry (info, DT_NEEDED, strindex))
memcpy (newcontents + strindex, soname, soname_len);
dynstrsec->size += soname_len;
dynstrsec->contents = newcontents;
if (!_bfd_elf_add_dynamic_entry (info, DT_NEEDED, strindex))
if (!_bfd_elf_add_dynamic_entry
(info, DT_IA_64_VMS_FIXUP_RELA_CNT,
fixups_shl_off / sizeof (Elf64_External_VMS_IMAGE_FIXUP)))
if (!_bfd_elf_add_dynamic_entry
(info, DT_IA_64_VMS_FIXUP_RELA_CNT,
fixups_shl_off / sizeof (Elf64_External_VMS_IMAGE_FIXUP)))
fixups_off += fixups_shl_off;
}
/* Unwind. */
if (!_bfd_elf_add_dynamic_entry (info, DT_IA_64_VMS_UNWINDSZ, 0))
fixups_off += fixups_shl_off;
}
/* Unwind. */
if (!_bfd_elf_add_dynamic_entry (info, DT_IA_64_VMS_UNWINDSZ, 0))
/* Note section. */
if (!create_ia64_vms_notes (output_bfd, info, time_hi, time_lo))
/* Note section. */
if (!create_ia64_vms_notes (output_bfd, info, time_hi, time_lo))
static bfd_vma
set_pltoff_entry (bfd *abfd, struct bfd_link_info *info,
struct elf64_ia64_dyn_sym_info *dyn_i,
static bfd_vma
set_pltoff_entry (bfd *abfd, struct bfd_link_info *info,
struct elf64_ia64_dyn_sym_info *dyn_i,
{
bfd_vma min_vma = (bfd_vma) -1, max_vma = 0;
bfd_vma min_short_vma = min_vma, max_short_vma = 0;
{
bfd_vma min_vma = (bfd_vma) -1, max_vma = 0;
bfd_vma min_short_vma = min_vma, max_short_vma = 0;
/* 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. */
/* 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. */
- 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);
_bfd_error_handler
/* xgettext:c-format */
(_("%pB: short data segment overflowed (%#" PRIx64 " >= 0x400000)"),
abfd, (uint64_t) (max_short_vma - min_short_vma));
_bfd_error_handler
/* xgettext:c-format */
(_("%pB: short data segment overflowed (%#" PRIx64 " >= 0x400000)"),
abfd, (uint64_t) (max_short_vma - min_short_vma));
elf64_ia64_final_link (bfd *abfd, struct bfd_link_info *info)
{
struct elf64_ia64_link_hash_table *ia64_info;
elf64_ia64_final_link (bfd *abfd, struct bfd_link_info *info)
{
struct elf64_ia64_link_hash_table *ia64_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);
/* We assume after gp is set, section size will only decrease. We
need to adjust gp for it. */
_bfd_set_gp_value (abfd, 0);
- 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);
unwind_output_sec->contents
= bfd_malloc (unwind_output_sec->size);
if (unwind_output_sec->contents == NULL)
unwind_output_sec->contents
= bfd_malloc (unwind_output_sec->size);
if (unwind_output_sec->contents == NULL)
}
}
/* Invoke the regular ELF backend linker to do all the work. */
if (!bfd_elf_final_link (abfd, info))
}
}
/* Invoke the regular ELF backend linker to do all the work. */
if (!bfd_elf_final_link (abfd, info))
if (! bfd_set_section_contents (abfd, unwind_output_sec,
unwind_output_sec->contents, (bfd_vma) 0,
unwind_output_sec->size))
if (! bfd_set_section_contents (abfd, unwind_output_sec,
unwind_output_sec->contents, (bfd_vma) 0,
unwind_output_sec->size))
elf64_ia64_relocate_section (bfd *output_bfd,
struct bfd_link_info *info,
bfd *input_bfd,
elf64_ia64_relocate_section (bfd *output_bfd,
struct bfd_link_info *info,
bfd *input_bfd,
/* Infect various flags from the input section to the output section. */
if (bfd_link_relocatable (info))
/* Infect various flags from the input section to the output section. */
if (bfd_link_relocatable (info))
_bfd_error_handler (_("%pB: unsupported relocation type %#x"),
input_bfd, (int) r_type);
bfd_set_error (bfd_error_bad_value);
_bfd_error_handler (_("%pB: unsupported relocation type %#x"),
input_bfd, (int) r_type);
bfd_set_error (bfd_error_bad_value);
- loc_h = get_local_sym_hash (ia64_info, input_bfd, rel, FALSE);
+ loc_h = get_local_sym_hash (ia64_info, input_bfd, rel, false);
struct elf_link_hash_entry **sym_hashes = elf_sym_hashes (input_bfd);
RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
struct elf_link_hash_entry **sym_hashes = elf_sym_hashes (input_bfd);
RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
unresolved_reloc, warned, ignored);
if (h->root.type == bfd_link_hash_undefweak)
unresolved_reloc, warned, ignored);
if (h->root.type == bfd_link_hash_undefweak)
h ? h->root.root.string
: bfd_elf_sym_name (input_bfd, symtab_hdr, sym,
sym_sec));
h ? h->root.root.string
: bfd_elf_sym_name (input_bfd, symtab_hdr, sym,
sym_sec));
h ? h->root.root.string
: bfd_elf_sym_name (input_bfd, symtab_hdr, sym,
sym_sec));
h ? h->root.root.string
: bfd_elf_sym_name (input_bfd, symtab_hdr, sym,
sym_sec));
- 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,
rel->r_addend, value, R_IA64_DIR64LSB);
value -= gp_val;
value = set_got_entry (input_bfd, info, dyn_i,
rel->r_addend, value, R_IA64_DIR64LSB);
value -= gp_val;
- 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);
- 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);
case R_IA64_LTOFF_FPTR32LSB:
case R_IA64_LTOFF_FPTR64MSB:
case R_IA64_LTOFF_FPTR64LSB:
case R_IA64_LTOFF_FPTR32LSB:
case R_IA64_LTOFF_FPTR64MSB:
case R_IA64_LTOFF_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);
- dyn_i = get_dyn_sym_info (ia64_info, h, NULL, NULL, FALSE);
+ dyn_i = get_dyn_sym_info (ia64_info, h, NULL, NULL, false);
don't try to continue. */
(*info->callbacks->undefined_symbol)
(info, "__gp", input_bfd, input_section, rel->r_offset, 1);
don't try to continue. */
(*info->callbacks->undefined_symbol)
(info, "__gp", input_bfd, input_section, rel->r_offset, 1);
(*info->callbacks->warning) (info, _("unsupported reloc"),
name, input_bfd,
input_section, rel->r_offset);
(*info->callbacks->warning) (info, _("unsupported reloc"),
name, input_bfd,
input_section, rel->r_offset);
elf64_ia64_finish_dynamic_symbol (bfd *output_bfd,
struct bfd_link_info *info,
struct elf_link_hash_entry *h,
elf64_ia64_finish_dynamic_symbol (bfd *output_bfd,
struct bfd_link_info *info,
struct elf_link_hash_entry *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);
/* Fill in the PLT data, if required. */
if (dyn_i && dyn_i->want_plt)
/* Fill in the PLT data, if required. */
if (dyn_i && dyn_i->want_plt)
- 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);
elf64_ia64_finish_dynamic_sections (bfd *abfd,
struct bfd_link_info *info)
{
elf64_ia64_finish_dynamic_sections (bfd *abfd,
struct bfd_link_info *info)
{
- tfr3 = elf_link_hash_lookup (elf_hash_table (info), "ELF$TFRADR", FALSE,
- FALSE, FALSE);
+ tfr3 = elf_link_hash_lookup (elf_hash_table (info), "ELF$TFRADR", false,
+ false, false);
elf64_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;
elf64_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;
elf64_ia64_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
{
bfd *obfd = info->output_bfd;
flagword out_flags;
flagword in_flags;
elf64_ia64_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
{
bfd *obfd = info->output_bfd;
flagword out_flags;
flagword in_flags;
/* Don't even pretend to support mixed-format linking. */
if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour
|| bfd_get_flavour (obfd) != bfd_target_elf_flavour)
/* Don't even pretend to support mixed-format linking. */
if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour
|| bfd_get_flavour (obfd) != bfd_target_elf_flavour)
in_flags = elf_elfheader (ibfd)->e_flags;
out_flags = elf_elfheader (obfd)->e_flags;
if (! elf_flags_init (obfd))
{
in_flags = elf_elfheader (ibfd)->e_flags;
out_flags = elf_elfheader (obfd)->e_flags;
if (! elf_flags_init (obfd))
{
/* 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))
/* 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))
elf64_ia64_print_private_bfd_data (bfd *abfd, void * ptr)
{
FILE *file = (FILE *) ptr;
elf64_ia64_print_private_bfd_data (bfd *abfd, void * ptr)
{
FILE *file = (FILE *) ptr;
(flags & EF_IA_64_ABI64) ? "ABI64" : "ABI32");
_bfd_elf_print_private_bfd_data (abfd, ptr);
(flags & EF_IA_64_ABI64) ? "ABI64" : "ABI32");
_bfd_elf_print_private_bfd_data (abfd, ptr);
if (elf_sec_group (sec) == NULL
&& ((sec->flags & (SEC_LINK_ONCE | SEC_CODE | SEC_GROUP))
== (SEC_LINK_ONCE | SEC_CODE))
if (elf_sec_group (sec) == NULL
&& ((sec->flags & (SEC_LINK_ONCE | SEC_CODE | SEC_GROUP))
== (SEC_LINK_ONCE | SEC_CODE))
{
name = sec->name + 16;
amt = strlen (name) + sizeof (".gnu.linkonce.ia64unwi.");
unwi_name = bfd_alloc (abfd, amt);
if (!unwi_name)
{
name = sec->name + 16;
amt = strlen (name) + sizeof (".gnu.linkonce.ia64unwi.");
unwi_name = bfd_alloc (abfd, amt);
if (!unwi_name)
strcpy (stpcpy (unwi_name, ".gnu.linkonce.ia64unwi."), name);
unwi = bfd_get_section_by_name (abfd, unwi_name);
strcpy (stpcpy (unwi_name, ".gnu.linkonce.ia64unwi."), name);
unwi = bfd_get_section_by_name (abfd, unwi_name);
amt = strlen (name) + sizeof (".gnu.linkonce.ia64unw.");
unw_name = bfd_alloc (abfd, amt);
if (!unw_name)
amt = strlen (name) + sizeof (".gnu.linkonce.ia64unw.");
unw_name = bfd_alloc (abfd, amt);
if (!unw_name)
strcpy (stpcpy (unw_name, ".gnu.linkonce.ia64unw."), name);
unw = bfd_get_section_by_name (abfd, unw_name);
strcpy (stpcpy (unw_name, ".gnu.linkonce.ia64unw."), name);
unw = bfd_get_section_by_name (abfd, unw_name);
/* Move the fake group section to the beginning. */
bfd_section_list_remove (abfd, group);
/* Move the fake group section to the beginning. */
bfd_section_list_remove (abfd, group);
}
/* Handle an IA-64 specific section when reading an object file. This
is called when bfd_section_from_shdr finds a section with an unknown
type. */
}
/* Handle an IA-64 specific section when reading an object file. This
is called when bfd_section_from_shdr finds a section with an unknown
type. */
}
if (! _bfd_elf_make_section_from_shdr (abfd, hdr, name, shindex))
}
if (! _bfd_elf_make_section_from_shdr (abfd, hdr, name, shindex))
if (!bfd_set_section_flags (newsect,
bfd_section_flags (newsect) | secflags))
if (!bfd_set_section_flags (newsect,
bfd_section_flags (newsect) | secflags))
/* Many VMS compilers do not generate sections for the corresponding
segment. This is boring as binutils tools won't be able to disassemble
/* Many VMS compilers do not generate sections for the corresponding
segment. This is boring as binutils tools won't be able to disassemble
size_t name_len = strlen (name) + 1;
nname = bfd_alloc (abfd, name_len);
if (nname == NULL)
size_t name_len = strlen (name) + 1;
nname = bfd_alloc (abfd, name_len);
if (nname == NULL)
memcpy (nname, name, name_len);
}
/* Create and fill new section. */
nsec = bfd_make_section_anyway_with_flags (abfd, nname, flags);
if (nsec == NULL)
memcpy (nname, name, name_len);
}
/* Create and fill new section. */
nsec = bfd_make_section_anyway_with_flags (abfd, nname, flags);
if (nsec == NULL)
elf64_vms_write_shdrs_and_ehdr (bfd *abfd)
{
unsigned char needed_count[8];
if (!bfd_elf64_write_shdrs_and_ehdr (abfd))
elf64_vms_write_shdrs_and_ehdr (bfd *abfd)
{
unsigned char needed_count[8];
if (!bfd_elf64_write_shdrs_and_ehdr (abfd))
bfd_putl64 (elf_ia64_vms_tdata (abfd)->needed_count, needed_count);
if (bfd_seek (abfd, sizeof (Elf64_External_Ehdr), SEEK_SET) != 0
|| bfd_bwrite (needed_count, 8, abfd) != 8)
bfd_putl64 (elf_ia64_vms_tdata (abfd)->needed_count, needed_count);
if (bfd_seek (abfd, sizeof (Elf64_External_Ehdr), SEEK_SET) != 0
|| bfd_bwrite (needed_count, 8, abfd) != 8)
bfd_seek (abfd, isize, SEEK_SET);
bfd_bwrite (&pad, ishort, abfd);
bfd_seek (abfd, isize, SEEK_SET);
bfd_bwrite (&pad, ishort, abfd);
/* You can't use -r against a dynamic object. Also, there's no
hope of using a dynamic object which does not exactly match
the format of the output file. */
if (bfd_link_relocatable (info)
/* You can't use -r against a dynamic object. Also, there's no
hope of using a dynamic object which does not exactly match
the format of the output file. */
if (bfd_link_relocatable (info)
format. FIXME: If there are no input BFD's of the same
format as the output, we can't make a shared library. */
if (bfd_link_pic (info)
format. FIXME: If there are no input BFD's of the same
format as the output, we can't make a shared library. */
if (bfd_link_pic (info)
bed->s->swap_dyn_in (abfd, extdyn, &dyn);
if (dyn.d_tag == DT_IA_64_VMS_IDENT)
{
bed->s->swap_dyn_in (abfd, extdyn, &dyn);
if (dyn.d_tag == DT_IA_64_VMS_IDENT)
{
- h = elf_link_hash_lookup (htab, name, TRUE, FALSE, FALSE);
+ h = elf_link_hash_lookup (htab, name, true, false, false);
- (abfd, info, name, TRUE, FALSE, FALSE));
+ (abfd, info, name, true, false, false));
- (info, abfd, name, flags, sec, value, NULL, FALSE, bed->collect,
+ (info, abfd, name, flags, sec, value, NULL, false, bed->collect,
{
/* Check the alignment when a common symbol is involved. This
can change when a common symbol is overridden by a normal
{
/* Check the alignment when a common symbol is involved. This
can change when a common symbol is overridden by a normal
/* If this object is the same format as the output object, and it is
not a shared library, then let the backend look through the
/* If this object is the same format as the output object, and it is
not a shared library, then let the backend look through the
I have no idea how to handle linking PIC code into a file of a
different format. It probably can't be done. */
if (! dynamic
I have no idea how to handle linking PIC code into a file of a
different format. It probably can't be done. */
if (! dynamic
&& bed->check_relocs != NULL
&& (*bed->relocs_compatible) (abfd->xvec, info->output_bfd->xvec))
{
&& bed->check_relocs != NULL
&& (*bed->relocs_compatible) (abfd->xvec, info->output_bfd->xvec))
{
if (element == NULL || !bfd_check_format (element, bfd_object))
{
orig_element->archive_pass = -1;
if (element == NULL || !bfd_check_format (element, bfd_object))
{
orig_element->archive_pass = -1;
}
}
else if (! bfd_check_format (element, bfd_object))
{
element->archive_pass = -1;
}
}
else if (! bfd_check_format (element, bfd_object))
{
element->archive_pass = -1;
h->root.string, &element))
continue;
if (! elf64_vms_link_add_object_symbols (element, info))
h->root.string, &element))
continue;
if (! elf64_vms_link_add_object_symbols (element, info))
elf64_vms_bfd_link_add_symbols (bfd *abfd, struct bfd_link_info *info)
{
switch (bfd_get_format (abfd))
elf64_vms_bfd_link_add_symbols (bfd *abfd, struct bfd_link_info *info)
{
switch (bfd_get_format (abfd))
#undef elf_backend_section_from_shdr
#define elf_backend_section_from_shdr elf64_vms_section_from_shdr
#undef elf_backend_section_from_shdr
#define elf_backend_section_from_shdr elf64_vms_section_from_shdr
-#undef elf_backend_post_process_headers
-#define elf_backend_post_process_headers elf64_vms_post_process_headers
+#undef elf_backend_init_file_header
+#define elf_backend_init_file_header elf64_vms_init_file_header
#undef elf_backend_section_processing
#define elf_backend_section_processing elf64_vms_section_processing
#undef elf_backend_section_processing
#define elf_backend_section_processing elf64_vms_section_processing