X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=bfd%2Felf32-dlx.c;h=6995de45fccfeb2a6300629148f15c55d43902a3;hb=5496abe1c5c31aa6648e8fdb15e4122025bcabfe;hp=468e6cbfaca361e32c899b9e576354e92b0f622e;hpb=219d1afa89d0d53ca93a684cac341f16470f3ca0;p=deliverable%2Fbinutils-gdb.git diff --git a/bfd/elf32-dlx.c b/bfd/elf32-dlx.c index 468e6cbfac..6995de45fc 100644 --- a/bfd/elf32-dlx.c +++ b/bfd/elf32-dlx.c @@ -1,5 +1,5 @@ /* DLX specific support for 32-bit ELF - Copyright (C) 2002-2018 Free Software Foundation, Inc. + Copyright (C) 2002-2020 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -138,7 +138,7 @@ elf32_dlx_relocate16 (bfd *abfd, if (strcmp (input_section->name, symbol->section->output_section->name) != 0) { _bfd_error_handler - (_("BFD Link Error: branch (PC rel16) to section (%s) not supported"), + (_("branch (PC rel16) to section (%s) not supported"), symbol->section->output_section->name); return bfd_reloc_undefined; } @@ -201,7 +201,7 @@ elf32_dlx_relocate26 (bfd *abfd, if (strcmp (input_section->name, symbol->section->output_section->name) != 0) { _bfd_error_handler - (_("BFD Link Error: jump (PC rel26) to section (%s) not supported"), + (_("jump (PC rel26) to section (%s) not supported"), symbol->section->output_section->name); return bfd_reloc_undefined; } @@ -465,9 +465,7 @@ elf32_dlx_check_relocs (bfd *abfd, /* This relocation describes which C++ vtable entries are actually used. Record for later use during GC. */ case R_DLX_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; } @@ -530,7 +528,7 @@ elf32_dlx_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED, } static reloc_howto_type * -dlx_rtype_to_howto (unsigned int r_type) +dlx_rtype_to_howto (bfd *abfd, unsigned int r_type) { switch (r_type) { @@ -545,31 +543,33 @@ dlx_rtype_to_howto (unsigned int r_type) default: if (r_type >= (unsigned int) R_DLX_max) { - _bfd_error_handler (_("Invalid DLX reloc number: %d"), r_type); - r_type = 0; + _bfd_error_handler (_("%pB: unsupported relocation type %#x"), + abfd, r_type); + bfd_set_error (bfd_error_bad_value); + return NULL; } return & dlx_elf_howto_table[r_type]; } } -static void +static bfd_boolean elf32_dlx_info_to_howto (bfd * abfd ATTRIBUTE_UNUSED, arelent * cache_ptr ATTRIBUTE_UNUSED, Elf_Internal_Rela * dst ATTRIBUTE_UNUSED) { - abort (); + return FALSE; } -static void -elf32_dlx_info_to_howto_rel (bfd *abfd ATTRIBUTE_UNUSED, +static bfd_boolean +elf32_dlx_info_to_howto_rel (bfd *abfd, arelent *cache_ptr, Elf_Internal_Rela *dst) { unsigned int r_type; r_type = ELF32_R_TYPE (dst->r_info); - cache_ptr->howto = dlx_rtype_to_howto (r_type); - return; + cache_ptr->howto = dlx_rtype_to_howto (abfd, r_type); + return cache_ptr->howto != NULL; } #define TARGET_BIG_SYM dlx_elf32_be_vec