/* SPARC-specific support for ELF
- Copyright (C) 2005-2019 Free Software Foundation, Inc.
+ Copyright (C) 2005-2020 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
_bfd_sparc_elf_link_hash_table_create (bfd *abfd)
{
struct _bfd_sparc_elf_link_hash_table *ret;
- bfd_size_type amt = sizeof (struct _bfd_sparc_elf_link_hash_table);
+ size_t amt = sizeof (struct _bfd_sparc_elf_link_hash_table);
ret = (struct _bfd_sparc_elf_link_hash_table *) bfd_zmalloc (amt);
if (ret == NULL)
s = bfd_make_section_with_flags (abfd, ".iplt", pltflags);
if (s == NULL
- || ! bfd_set_section_alignment (abfd, s, bed->plt_alignment))
+ || !bfd_set_section_alignment (s, bed->plt_alignment))
return FALSE;
htab->iplt = s;
s = bfd_make_section_with_flags (abfd, ".rela.iplt",
flags | SEC_READONLY);
if (s == NULL
- || ! bfd_set_section_alignment (abfd, s,
- bed->s->log_file_align))
+ || !bfd_set_section_alignment (s, bed->s->log_file_align))
return FALSE;
htab->irelplt = s;
p = *head;
if (p == NULL || p->sec != sec)
{
- bfd_size_type amt = sizeof *p;
+ size_t amt = sizeof *p;
p = ((struct elf_dyn_relocs *)
bfd_alloc (htab->elf.dynobj, amt));
if (p == NULL)
break;
case R_SPARC_GNU_VTENTRY:
- BFD_ASSERT (h != NULL);
- if (h != NULL
- && !bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend))
+ if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend))
return FALSE;
break;
if (!sec->used_by_bfd)
{
struct _bfd_sparc_elf_section_data *sdata;
- bfd_size_type amt = sizeof (*sdata);
+ size_t amt = sizeof (*sdata);
sdata = bfd_zalloc (abfd, amt);
if (sdata == NULL)
if (r == bfd_reloc_continue)
{
-do_relocation:
+ do_relocation:
r = _bfd_final_link_relocate (howto, input_bfd, input_section,
contents, rel->r_offset,
relocation, rel->r_addend);
|| r_type == R_SPARC_UA32
|| r_type == R_SPARC_DISP32)
&& (((input_section->flags & SEC_DEBUGGING) != 0
- && strcmp (bfd_section_name (input_bfd,
- input_section),
+ && strcmp (bfd_section_name (input_section),
".stab") == 0)
|| _bfd_elf_section_offset (output_bfd, info,
input_section,
if (name == NULL)
return FALSE;
if (*name == '\0')
- name = bfd_section_name (input_bfd, sec);
+ name = bfd_section_name (sec);
}
(*info->callbacks->reloc_overflow)
(info, (h ? &h->root : NULL), name, howto->name,
htab = _bfd_sparc_elf_hash_table (info);
BFD_ASSERT (htab != NULL);
dynobj = htab->elf.dynobj;
-
+
/* We arranged in size_dynamic_sections to put the STT_REGISTER
entries at the end of the dynlocal list, so they came at the end
of the local symbols in the symtab. Except that they aren't
{
asection *dynsymsec = bfd_get_linker_section (dynobj, ".dynsym");
struct elf_link_local_dynamic_entry *e;
-
+
for (e = elf_hash_table (info)->dynlocal; e ; e = e->next)
if (e->input_indx == -1)
break;
elf_section_data (dynsymsec->output_section)->this_hdr.sh_info
= e->dynindx;
}
-
+
sdyn = bfd_get_linker_section (dynobj, ".dynamic");
if (elf_hash_table (info)->dynamic_sections_created)