X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=bfd%2Felfxx-sparc.c;h=d2bb36648c6aedc475c2bc2a7df57a38d16f36cb;hb=3ecde599184e6bde325c5e671b1c6a61c4f090de;hp=92e0b074210b4fb5cd7aecd313c798bf4cc29769;hpb=827041555ac443bd57340060f3e034fd7b199dd8;p=deliverable%2Fbinutils-gdb.git diff --git a/bfd/elfxx-sparc.c b/bfd/elfxx-sparc.c index 92e0b07421..d2bb36648c 100644 --- a/bfd/elfxx-sparc.c +++ b/bfd/elfxx-sparc.c @@ -1,5 +1,5 @@ /* 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. @@ -1136,7 +1136,7 @@ struct bfd_link_hash_table * _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) @@ -1263,15 +1263,14 @@ create_ifunc_sections (bfd *abfd, struct bfd_link_info *info) 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; @@ -1812,7 +1811,7 @@ _bfd_sparc_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, 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) @@ -1837,9 +1836,7 @@ _bfd_sparc_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, 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; @@ -2773,7 +2770,7 @@ _bfd_sparc_elf_new_section_hook (bfd *abfd, asection *sec) 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) @@ -4142,7 +4139,7 @@ _bfd_sparc_elf_relocate_section (bfd *output_bfd, 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); @@ -4166,8 +4163,7 @@ do_relocation: || 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, @@ -4196,7 +4192,7 @@ do_relocation: 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, @@ -4792,7 +4788,7 @@ _bfd_sparc_elf_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *i 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 @@ -4802,7 +4798,7 @@ _bfd_sparc_elf_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *i { 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; @@ -4810,7 +4806,7 @@ _bfd_sparc_elf_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *i 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)