/* Matsushita 10300 specific support for 32-bit ELF
- Copyright (C) 1996-2019 Free Software Foundation, Inc.
+ Copyright (C) 1996-2020 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
s = bfd_make_section_anyway_with_flags (abfd, ".plt", pltflags);
htab->splt = s;
if (s == NULL
- || ! bfd_set_section_alignment (abfd, s, bed->plt_alignment))
+ || !bfd_set_section_alignment (s, bed->plt_alignment))
return FALSE;
/* Define the symbol _PROCEDURE_LINKAGE_TABLE_ at the start of the
s = bfd_make_section_anyway_with_flags (abfd, ".got", flags);
htab->sgot = s;
if (s == NULL
- || ! bfd_set_section_alignment (abfd, s, ptralign))
+ || !bfd_set_section_alignment (s, ptralign))
return FALSE;
if (bed->want_got_plt)
s = bfd_make_section_anyway_with_flags (abfd, ".got.plt", flags);
htab->sgotplt = s;
if (s == NULL
- || ! bfd_set_section_alignment (abfd, s, ptralign))
+ || !bfd_set_section_alignment (s, ptralign))
return FALSE;
}
name = (bfd_elf_string_from_elf_section
(input_bfd, symtab_hdr->sh_link, sym->st_name));
if (name == NULL || *name == '\0')
- name = bfd_section_name (input_bfd, sec);
+ name = bfd_section_name (sec);
}
switch (r)
/* A local symbol. */
Elf_Internal_Sym *isym;
struct elf_link_hash_table *elftab;
- bfd_size_type amt;
+ size_t amt;
isym = isymbuf + r_index;
if (isym->st_shndx == SHN_UNDEF)
&& ELF_ST_TYPE (isym->st_info) == STT_FUNC)
{
struct elf_link_hash_table *elftab;
- bfd_size_type amt;
+ size_t amt;
struct elf_link_hash_entry **lhashes = hashes;
/* Skip a local symbol if it aliases a
const char *sym_name;
char *new_name;
struct elf_link_hash_table *elftab;
- bfd_size_type amt;
+ size_t amt;
if (isym->st_shndx != sec_shndx)
continue;
elf32_mn10300_link_hash_table_create (bfd *abfd)
{
struct elf32_mn10300_link_hash_table *ret;
- bfd_size_type amt = sizeof (* ret);
+ size_t amt = sizeof (* ret);
ret = bfd_zmalloc (amt);
if (ret == NULL)
file. This gets the MN10300 architecture right based on the machine
number. */
-static void
-_bfd_mn10300_elf_final_write_processing (bfd *abfd, bfd_boolean linker)
+static bfd_boolean
+_bfd_mn10300_elf_final_write_processing (bfd *abfd)
{
unsigned long val;
elf_elfheader (abfd)->e_flags &= ~ (EF_MN10300_MACH);
elf_elfheader (abfd)->e_flags |= val;
- _bfd_elf_final_write_processing (abfd, linker);
+ return _bfd_elf_final_write_processing (abfd);
}
static bfd_boolean
flags | SEC_READONLY);
htab->root.srelplt = s;
if (s == NULL
- || ! bfd_set_section_alignment (abfd, s, ptralign))
+ || !bfd_set_section_alignment (s, ptralign))
return FALSE;
if (! _bfd_mn10300_elf_create_got_section (abfd, info))
? ".rela.bss" : ".rel.bss"),
flags | SEC_READONLY);
if (s == NULL
- || ! bfd_set_section_alignment (abfd, s, ptralign))
+ || !bfd_set_section_alignment (s, ptralign))
return FALSE;
}
}
/* It's OK to base decisions on the section name, because none
of the dynobj section names depend upon the input files. */
- name = bfd_get_section_name (dynobj, s);
+ name = bfd_section_name (s);
if (streq (name, ".plt"))
{
entry. The entries in the .rela.plt section
really apply to the .got section, which we
created ourselves and so know is not readonly. */
- outname = bfd_get_section_name (output_bfd,
- s->output_section);
+ outname = bfd_section_name (s->output_section);
target = bfd_get_section_by_name (output_bfd, outname + 5);
if (target != NULL
&& (target->flags & SEC_READONLY) != 0