/* ADI Blackfin BFD support for 32-bit ELF.
- Copyright (C) 2005-2018 Free Software Foundation, Inc.
+ Copyright (C) 2005-2019 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
static bfd_reloc_status_type
bfin_imm16_reloc (bfd *abfd,
- arelent *reloc_entry,
- asymbol *symbol,
- void * data,
- asection *input_section,
- bfd *output_bfd,
- char **error_message ATTRIBUTE_UNUSED)
+ arelent *reloc_entry,
+ asymbol *symbol,
+ void * data,
+ asection *input_section,
+ bfd *output_bfd,
+ char **error_message ATTRIBUTE_UNUSED)
{
bfd_vma relocation, x;
bfd_size_type reloc_addr = reloc_entry->address;
static bfd_reloc_status_type
bfin_bfd_reloc (bfd *abfd,
arelent *reloc_entry,
- asymbol *symbol,
- void * data,
- asection *input_section,
- bfd *output_bfd,
- char **error_message ATTRIBUTE_UNUSED)
+ asymbol *symbol,
+ void * data,
+ asection *input_section,
+ bfd *output_bfd,
+ char **error_message ATTRIBUTE_UNUSED)
{
bfd_vma relocation;
bfd_size_type addr = reloc_entry->address;
};
-static void
-bfin_info_to_howto (bfd *abfd ATTRIBUTE_UNUSED,
+static bfd_boolean
+bfin_info_to_howto (bfd *abfd,
arelent *cache_ptr,
Elf_Internal_Rela *dst)
{
cache_ptr->howto = &bfin_gnuext_howto_table [r_type - BFIN_GNUEXT_RELOC_MIN];
else
- cache_ptr->howto = (reloc_howto_type *) NULL;
+ {
+ /* xgettext:c-format */
+ _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
+ abfd, r_type);
+ bfd_set_error (bfd_error_bad_value);
+ return FALSE;
+ }
+
+ return TRUE;
}
/* Given a BFD reloc type, return the howto. */
/* Set by ld emulation if --data-in-l1. */
bfd_boolean elf32_bfin_data_in_l1 = 0;
-static void
-elf32_bfin_final_write_processing (bfd *abfd,
- bfd_boolean linker ATTRIBUTE_UNUSED)
+static bfd_boolean
+elf32_bfin_final_write_processing (bfd *abfd)
{
if (elf32_bfin_code_in_l1)
elf_elfheader (abfd)->e_flags |= EF_BFIN_CODE_IN_L1;
if (elf32_bfin_data_in_l1)
elf_elfheader (abfd)->e_flags |= EF_BFIN_DATA_IN_L1;
+ return _bfd_elf_final_write_processing (abfd);
}
/* Return TRUE if the name is a local label.
/* This relocation describes which C++ vtable entries
are actually used. Record for later use during GC. */
case R_BFIN_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;
#define bfd_elf32_bfd_reloc_name_lookup \
bfin_bfd_reloc_name_lookup
#define elf_info_to_howto bfin_info_to_howto
-#define elf_info_to_howto_rel 0
+#define elf_info_to_howto_rel NULL
#define elf_backend_object_p elf32_bfin_object_p
#define bfd_elf32_bfd_is_local_label_name \