unrecognized/unsupported reloc message

It must get boring translating all the variants we have of
unrecognized/unsupported/invalid/unexpected reloc number.  This patch
cuts down on the number of variations.

	* aoutx.h, * coff-alpha.c, * coff-i860.c, * coff-m68k.c,
	* coff-mcore.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c,
	* coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-w65.c,
	* elf-bfd.h, * elf-m10300.c, * elf.c, * elf32-avr.c, * elf32-bfin.c,
	* elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c,
	* elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c,
	* elf32-fr30.c, * elf32-frv.c, * elf32-i370.c, * elf32-i386.c,
	* elf32-i960.c, * elf32-ip2k.c, * elf32-iq2000.c, * elf32-lm32.c,
	* elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c,
	* elf32-m68k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c,
	* elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c,
	* elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-or1k.c,
	* elf32-pj.c, * elf32-ppc.c, * elf32-rl78.c, * elf32-rx.c,
	* elf32-s390.c, * elf32-sh.c, * elf32-spu.c, * elf32-tic6x.c,
	* elf32-v850.c, * elf32-vax.c, * elf32-visium.c, * elf32-wasm32.c,
	* elf32-xgate.c, * elf32-xtensa.c, * elf64-alpha.c,
	* elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c,
	* elf64-ppc.c, * elf64-s390.c, * elf64-sparc.c, * elf64-x86-64.c,
	* elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c,
	* elfnn-riscv.c, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-riscv.h,
	* elfxx-sparc.c, * elfxx-sparc.h, * reloc.c: Standardize
	unrecognized/unsupported reloc message.
This commit is contained in:
Alan Modra 2018-02-21 21:47:07 +10:30
parent cf97bcb0c3
commit 0aa13feeeb
81 changed files with 297 additions and 242 deletions

View File

@ -1,3 +1,28 @@
2018-02-26 Alan Modra <amodra@gmail.com>
* aoutx.h, * coff-alpha.c, * coff-i860.c, * coff-m68k.c,
* coff-mcore.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c,
* coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-w65.c,
* elf-bfd.h, * elf-m10300.c, * elf.c, * elf32-avr.c, * elf32-bfin.c,
* elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c,
* elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c,
* elf32-fr30.c, * elf32-frv.c, * elf32-i370.c, * elf32-i386.c,
* elf32-i960.c, * elf32-ip2k.c, * elf32-iq2000.c, * elf32-lm32.c,
* elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c,
* elf32-m68k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c,
* elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c,
* elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-or1k.c,
* elf32-pj.c, * elf32-ppc.c, * elf32-rl78.c, * elf32-rx.c,
* elf32-s390.c, * elf32-sh.c, * elf32-spu.c, * elf32-tic6x.c,
* elf32-v850.c, * elf32-vax.c, * elf32-visium.c, * elf32-wasm32.c,
* elf32-xgate.c, * elf32-xtensa.c, * elf64-alpha.c,
* elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c,
* elf64-ppc.c, * elf64-s390.c, * elf64-sparc.c, * elf64-x86-64.c,
* elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c,
* elfnn-riscv.c, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-riscv.h,
* elfxx-sparc.c, * elfxx-sparc.h, * reloc.c: Standardize
unrecognized/unsupported reloc message.
2018-02-26 Alan Modra <amodra@gmail.com> 2018-02-26 Alan Modra <amodra@gmail.com>
* elf32-ppc.c: Standardize error/warning messages. Use * elf32-ppc.c: Standardize error/warning messages. Use

View File

@ -4089,8 +4089,8 @@ aout_link_input_section_std (struct aout_final_link_info *flaginfo,
if (howto == NULL) if (howto == NULL)
{ {
(*flaginfo->info->callbacks->einfo) _bfd_error_handler (_("%pB: unsupported relocation type"),
(_("%P: %pB: unexpected relocation type\n"), input_bfd); input_bfd);
bfd_set_error (bfd_error_bad_value); bfd_set_error (bfd_error_bad_value);
return FALSE; return FALSE;
} }
@ -4410,8 +4410,8 @@ aout_link_input_section_ext (struct aout_final_link_info *flaginfo,
if (r_type >= TABLE_SIZE (howto_table_ext)) if (r_type >= TABLE_SIZE (howto_table_ext))
{ {
(*flaginfo->info->callbacks->einfo) _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
(_("%P: %pB: unexpected relocation type\n"), input_bfd); input_bfd, r_type);
bfd_set_error (bfd_error_bad_value); bfd_set_error (bfd_error_bad_value);
return FALSE; return FALSE;
} }

View File

@ -598,9 +598,8 @@ alpha_adjust_reloc_in (bfd *abfd,
if (intern->r_type > ALPHA_R_GPVALUE) if (intern->r_type > ALPHA_R_GPVALUE)
{ {
/* xgettext:c-format */ /* xgettext:c-format */
_bfd_error_handler _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
(_("%pB: unknown/unsupported relocation type %d"), abfd, intern->r_type);
abfd, intern->r_type);
bfd_set_error (bfd_error_bad_value); bfd_set_error (bfd_error_bad_value);
rptr->addend = 0; rptr->addend = 0;
rptr->howto = NULL; rptr->howto = NULL;
@ -1499,24 +1498,21 @@ alpha_relocate_section (bfd *output_bfd,
switch (r_type) switch (r_type)
{ {
case ALPHA_R_GPRELHIGH: case ALPHA_R_GPRELHIGH:
_bfd_error_handler _bfd_error_handler (_("%pB: %s unsupported"),
(_("%pB: unsupported relocation: ALPHA_R_GPRELHIGH"), input_bfd, "ALPHA_R_GPRELHIGH");
input_bfd);
bfd_set_error (bfd_error_bad_value); bfd_set_error (bfd_error_bad_value);
continue; continue;
case ALPHA_R_GPRELLOW: case ALPHA_R_GPRELLOW:
_bfd_error_handler _bfd_error_handler (_("%pB: %s unsupported"),
(_("%pB: unsupported relocation: ALPHA_R_GPRELLOW"), input_bfd, "ALPHA_R_GPRELLOW");
input_bfd);
bfd_set_error (bfd_error_bad_value); bfd_set_error (bfd_error_bad_value);
continue; continue;
default: default:
_bfd_error_handler /* xgettext:c-format */
/* xgettext:c-format */ _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
(_("%pB: unknown relocation type %d"), input_bfd, (int) r_type);
input_bfd, (int) r_type);
bfd_set_error (bfd_error_bad_value); bfd_set_error (bfd_error_bad_value);
continue; continue;

View File

@ -139,7 +139,7 @@ coff_i860_reloc (bfd *abfd,
these relocations. */ these relocations. */
static bfd_reloc_status_type static bfd_reloc_status_type
coff_i860_reloc_nyi (bfd *abfd ATTRIBUTE_UNUSED, coff_i860_reloc_nyi (bfd *abfd,
arelent *reloc_entry, arelent *reloc_entry,
asymbol *symbol ATTRIBUTE_UNUSED, asymbol *symbol ATTRIBUTE_UNUSED,
void *data ATTRIBUTE_UNUSED, void *data ATTRIBUTE_UNUSED,
@ -148,7 +148,7 @@ coff_i860_reloc_nyi (bfd *abfd ATTRIBUTE_UNUSED,
char **error_message ATTRIBUTE_UNUSED) char **error_message ATTRIBUTE_UNUSED)
{ {
reloc_howto_type *howto = reloc_entry->howto; reloc_howto_type *howto = reloc_entry->howto;
_bfd_error_handler (_("relocation `%s' not yet implemented"), howto->name); _bfd_error_handler (_("%pB: %s unsupported"), abfd, howto->name);
return bfd_reloc_notsupported; return bfd_reloc_notsupported;
} }

View File

@ -485,7 +485,7 @@ bfd_m68k_coff_create_embedded_relocs (bfd *abfd,
/* We can only relocate absolute longword relocs at run time. */ /* We can only relocate absolute longword relocs at run time. */
if (irel->r_type != R_RELLONG) if (irel->r_type != R_RELLONG)
{ {
*errmsg = _("unsupported reloc type"); *errmsg = _("unsupported relocation type");
bfd_set_error (bfd_error_bad_value); bfd_set_error (bfd_error_bad_value);
return FALSE; return FALSE;
} }

View File

@ -470,7 +470,7 @@ coff_mcore_relocate_section (bfd * output_bfd,
{ {
default: default:
/* xgettext: c-format */ /* xgettext: c-format */
_bfd_error_handler (_("%pB: unsupported relocation type 0x%02x"), _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
input_bfd, r_type); input_bfd, r_type);
bfd_set_error (bfd_error_bad_value); bfd_set_error (bfd_error_bad_value);
return FALSE; return FALSE;

View File

@ -1038,9 +1038,9 @@ coff_ppc_relocate_section (bfd *output_bfd,
switch (r_type) switch (r_type)
{ {
default: default:
_bfd_error_handler /* xgettext: c-format */
/* xgettext: c-format */ _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
(_("%pB: unsupported relocation type 0x%02x"), input_bfd, r_type); input_bfd, r_type);
bfd_set_error (bfd_error_bad_value); bfd_set_error (bfd_error_bad_value);
return FALSE; return FALSE;
case IMAGE_REL_PPC_TOCREL16: case IMAGE_REL_PPC_TOCREL16:
@ -1240,7 +1240,7 @@ coff_ppc_relocate_section (bfd *output_bfd,
_bfd_error_handler _bfd_error_handler
/* xgettext: c-format */ /* xgettext: c-format */
(_("Warning: unsupported reloc %s <file %pB, section %pA>\n" (_("warning: unsupported reloc %s <file %pB, section %pA>\n"
"sym %ld (%s), r_vaddr %" PRId64 " (%#" PRIx64 ")"), "sym %ld (%s), r_vaddr %" PRId64 " (%#" PRIx64 ")"),
howto->name, input_bfd, input_section, howto->name, input_bfd, input_section,
rel->r_symndx, my_name, rel->r_symndx, my_name,

View File

@ -2770,7 +2770,7 @@ xcoff_reloc_type_fail (bfd *input_bfd,
{ {
_bfd_error_handler _bfd_error_handler
/* xgettext: c-format */ /* xgettext: c-format */
(_("%pB: unsupported relocation type 0x%02x"), (_("%pB: unsupported relocation type %#x"),
input_bfd, (unsigned int) rel->r_type); input_bfd, (unsigned int) rel->r_type);
bfd_set_error (bfd_error_bad_value); bfd_set_error (bfd_error_bad_value);
return FALSE; return FALSE;

View File

@ -492,7 +492,7 @@ static const struct shcoff_reloc_map sh_reloc_map[] =
#define coff_bfd_reloc_name_lookup sh_coff_reloc_name_lookup #define coff_bfd_reloc_name_lookup sh_coff_reloc_name_lookup
static reloc_howto_type * static reloc_howto_type *
sh_coff_reloc_type_lookup (bfd * abfd ATTRIBUTE_UNUSED, sh_coff_reloc_type_lookup (bfd *abfd,
bfd_reloc_code_real_type code) bfd_reloc_code_real_type code)
{ {
unsigned int i; unsigned int i;
@ -501,7 +501,8 @@ sh_coff_reloc_type_lookup (bfd * abfd ATTRIBUTE_UNUSED,
if (sh_reloc_map[i].bfd_reloc_val == code) if (sh_reloc_map[i].bfd_reloc_val == code)
return &sh_coff_howtos[(int) sh_reloc_map[i].shcoff_reloc_val]; return &sh_coff_howtos[(int) sh_reloc_map[i].shcoff_reloc_val];
_bfd_error_handler (_("SH Error: unknown reloc type %d"), code); _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
abfd, (unsigned int) code);
return NULL; return NULL;
} }

View File

@ -165,7 +165,8 @@ tic4x_coff_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
Called after some initial checking by the tic4x_rtype_to_howto fn Called after some initial checking by the tic4x_rtype_to_howto fn
below. */ below. */
static void static void
tic4x_lookup_howto (arelent *internal, tic4x_lookup_howto (bfd *abfd,
arelent *internal,
struct internal_reloc *dst) struct internal_reloc *dst)
{ {
unsigned int i; unsigned int i;
@ -180,13 +181,13 @@ tic4x_lookup_howto (arelent *internal,
} }
} }
_bfd_error_handler (_("Unrecognized reloc type 0x%x"), _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
(unsigned int) dst->r_type); abfd, (unsigned int) dst->r_type);
abort(); abort();
} }
static reloc_howto_type * static reloc_howto_type *
coff_tic4x_rtype_to_howto (bfd *abfd ATTRIBUTE_UNUSED, coff_tic4x_rtype_to_howto (bfd *abfd,
asection *sec, asection *sec,
struct internal_reloc *rel, struct internal_reloc *rel,
struct coff_link_hash_entry *h ATTRIBUTE_UNUSED, struct coff_link_hash_entry *h ATTRIBUTE_UNUSED,
@ -201,7 +202,7 @@ coff_tic4x_rtype_to_howto (bfd *abfd ATTRIBUTE_UNUSED,
in the output section. */ in the output section. */
*addendp = (sec->output_section->vma + sec->output_offset) - sec->vma; *addendp = (sec->output_section->vma + sec->output_offset) - sec->vma;
tic4x_lookup_howto (&genrel, rel); tic4x_lookup_howto (abfd, &genrel, rel);
return genrel.howto; return genrel.howto;
} }
@ -256,7 +257,7 @@ tic4x_reloc_processing (arelent *relent,
/* !! relent->section = (asection *) NULL; */ /* !! relent->section = (asection *) NULL; */
/* Fill in the relent->howto field from reloc->r_type. */ /* Fill in the relent->howto field from reloc->r_type. */
tic4x_lookup_howto (relent, reloc); tic4x_lookup_howto (abfd, relent, reloc);
} }

View File

@ -260,7 +260,8 @@ tic54x_coff_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
Called after some initial checking by the tic54x_rtype_to_howto fn below. */ Called after some initial checking by the tic54x_rtype_to_howto fn below. */
static void static void
tic54x_lookup_howto (arelent *internal, tic54x_lookup_howto (bfd *abfd,
arelent *internal,
struct internal_reloc *dst) struct internal_reloc *dst)
{ {
unsigned i; unsigned i;
@ -275,8 +276,8 @@ tic54x_lookup_howto (arelent *internal,
} }
} }
_bfd_error_handler (_("Unrecognized reloc type 0x%x"), _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
(unsigned int) dst->r_type); abfd, (unsigned int) dst->r_type);
abort (); abort ();
} }
@ -286,7 +287,7 @@ tic54x_lookup_howto (arelent *internal,
#define coff_rtype_to_howto coff_tic54x_rtype_to_howto #define coff_rtype_to_howto coff_tic54x_rtype_to_howto
static reloc_howto_type * static reloc_howto_type *
coff_tic54x_rtype_to_howto (bfd *abfd ATTRIBUTE_UNUSED, coff_tic54x_rtype_to_howto (bfd *abfd,
asection *sec, asection *sec,
struct internal_reloc *rel, struct internal_reloc *rel,
struct coff_link_hash_entry *h ATTRIBUTE_UNUSED, struct coff_link_hash_entry *h ATTRIBUTE_UNUSED,
@ -303,7 +304,7 @@ coff_tic54x_rtype_to_howto (bfd *abfd ATTRIBUTE_UNUSED,
*addendp = (sec->output_section->vma + sec->output_offset) - sec->vma; *addendp = (sec->output_section->vma + sec->output_offset) - sec->vma;
} }
tic54x_lookup_howto (&genrel, rel); tic54x_lookup_howto (abfd, &genrel, rel);
return genrel.howto; return genrel.howto;
} }
@ -394,7 +395,7 @@ tic54x_reloc_processing (arelent *relent,
/* !! relent->section = (asection *) NULL;*/ /* !! relent->section = (asection *) NULL;*/
/* Fill in the relent->howto field from reloc->r_type. */ /* Fill in the relent->howto field from reloc->r_type. */
tic54x_lookup_howto (relent, reloc); tic54x_lookup_howto (abfd, relent, reloc);
} }
/* TI COFF v0, DOS tools (little-endian headers). */ /* TI COFF v0, DOS tools (little-endian headers). */

View File

@ -438,7 +438,7 @@ rtype2howto (arelent *cache_ptr, struct internal_reloc *dst)
} }
} }
_bfd_error_handler (_("Unrecognized reloc type 0x%x"), _bfd_error_handler (_("unsupported relocation type %#x"),
(unsigned int) dst->r_type); (unsigned int) dst->r_type);
cache_ptr->howto = tic80_howto_table + 0; cache_ptr->howto = tic80_howto_table + 0;
} }

View File

@ -349,7 +349,7 @@ w65_reloc16_extra_cases (bfd *abfd,
} }
break; break;
default: default:
printf (_("ignoring reloc %s\n"), reloc->howto->name); _bfd_error_handler (_("%pB: %s unsupported"), abfd, reloc->howto->name);
break; break;
} }

View File

@ -1352,7 +1352,7 @@ struct elf_backend_data
(bfd *); (bfd *);
reloc_howto_type *(*elf_backend_mips_rtype_to_howto) reloc_howto_type *(*elf_backend_mips_rtype_to_howto)
(unsigned int, bfd_boolean); (bfd *, unsigned int, bfd_boolean);
/* The swapping table to use when dealing with ECOFF information. /* The swapping table to use when dealing with ECOFF information.
Used for the MIPS ELF .mdebug section. */ Used for the MIPS ELF .mdebug section. */

View File

@ -799,7 +799,7 @@ bfd_elf32_bfd_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
/* Set the howto pointer for an MN10300 ELF reloc. */ /* Set the howto pointer for an MN10300 ELF reloc. */
static void static void
mn10300_info_to_howto (bfd *abfd ATTRIBUTE_UNUSED, mn10300_info_to_howto (bfd *abfd,
arelent *cache_ptr, arelent *cache_ptr,
Elf_Internal_Rela *dst) Elf_Internal_Rela *dst)
{ {
@ -809,7 +809,7 @@ mn10300_info_to_howto (bfd *abfd ATTRIBUTE_UNUSED,
if (r_type >= R_MN10300_MAX) if (r_type >= R_MN10300_MAX)
{ {
/* xgettext:c-format */ /* xgettext:c-format */
_bfd_error_handler (_("%pB: unrecognised MN10300 reloc number: %d"), _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
abfd, r_type); abfd, r_type);
bfd_set_error (bfd_error_bad_value); bfd_set_error (bfd_error_bad_value);
r_type = R_MN10300_NONE; r_type = R_MN10300_NONE;

View File

@ -8967,10 +8967,9 @@ _bfd_elf_validate_reloc (bfd *abfd, arelent *areloc)
return TRUE; return TRUE;
fail: fail:
_bfd_error_handler /* xgettext:c-format */
/* xgettext:c-format */ _bfd_error_handler (_("%pB: %s unsupported"),
(_("%pB: unsupported relocation type %s"), abfd, areloc->howto->name);
abfd, areloc->howto->name);
bfd_set_error (bfd_error_bad_value); bfd_set_error (bfd_error_bad_value);
return FALSE; return FALSE;
} }

View File

@ -946,7 +946,7 @@ bfd_elf32_bfd_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
/* Set the howto pointer for an AVR ELF reloc. */ /* Set the howto pointer for an AVR ELF reloc. */
static void static void
avr_info_to_howto_rela (bfd *abfd ATTRIBUTE_UNUSED, avr_info_to_howto_rela (bfd *abfd,
arelent *cache_ptr, arelent *cache_ptr,
Elf_Internal_Rela *dst) Elf_Internal_Rela *dst)
{ {
@ -956,7 +956,8 @@ avr_info_to_howto_rela (bfd *abfd ATTRIBUTE_UNUSED,
if (r_type >= (unsigned int) R_AVR_max) if (r_type >= (unsigned int) R_AVR_max)
{ {
/* xgettext:c-format */ /* xgettext:c-format */
_bfd_error_handler (_("%pB: invalid AVR reloc number: %d"), abfd, r_type); _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
abfd, r_type);
r_type = 0; r_type = 0;
} }
cache_ptr->howto = &elf_avr_howto_table[r_type]; cache_ptr->howto = &elf_avr_howto_table[r_type];

View File

@ -4687,7 +4687,7 @@ bfinfdpic_check_relocs (bfd *abfd, struct bfd_link_info *info,
bad_reloc: bad_reloc:
_bfd_error_handler _bfd_error_handler
/* xgettext:c-format */ /* xgettext:c-format */
(_("%pB: unsupported relocation type %d"), (_("%pB: unsupported relocation type %#x"),
abfd, (int) ELF32_R_TYPE (rel->r_info)); abfd, (int) ELF32_R_TYPE (rel->r_info));
return FALSE; return FALSE;
} }
@ -5340,7 +5340,7 @@ bfd_bfin_elf32_create_embedded_relocs (bfd *abfd,
/* We can only relocate absolute longword relocs at run time. */ /* We can only relocate absolute longword relocs at run time. */
if (ELF32_R_TYPE (irel->r_info) != (int) R_BFIN_BYTE4_DATA) if (ELF32_R_TYPE (irel->r_info) != (int) R_BFIN_BYTE4_DATA)
{ {
*errmsg = _("unsupported reloc type"); *errmsg = _("unsupported relocation type");
bfd_set_error (bfd_error_bad_value); bfd_set_error (bfd_error_bad_value);
goto error_return; goto error_return;
} }

View File

@ -641,7 +641,7 @@ _bfd_cr16_elf_create_got_section (bfd * abfd, struct bfd_link_info * info)
/* Retrieve a howto ptr using a BFD reloc_code. */ /* Retrieve a howto ptr using a BFD reloc_code. */
static reloc_howto_type * static reloc_howto_type *
elf_cr16_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED, elf_cr16_reloc_type_lookup (bfd *abfd,
bfd_reloc_code_real_type code) bfd_reloc_code_real_type code)
{ {
unsigned int i; unsigned int i;
@ -650,7 +650,8 @@ elf_cr16_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED,
if (code == cr16_reloc_map[i].bfd_reloc_enum) if (code == cr16_reloc_map[i].bfd_reloc_enum)
return &cr16_elf_howto_table[cr16_reloc_map[i].cr16_reloc_type]; return &cr16_elf_howto_table[cr16_reloc_map[i].cr16_reloc_type];
_bfd_error_handler (_("Unsupported CR16 relocation type: 0x%x\n"), code); _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
abfd, code);
return NULL; return NULL;
} }
@ -671,7 +672,7 @@ elf_cr16_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
/* Retrieve a howto ptr using an internal relocation entry. */ /* Retrieve a howto ptr using an internal relocation entry. */
static void static void
elf_cr16_info_to_howto (bfd *abfd ATTRIBUTE_UNUSED, arelent *cache_ptr, elf_cr16_info_to_howto (bfd *abfd, arelent *cache_ptr,
Elf_Internal_Rela *dst) Elf_Internal_Rela *dst)
{ {
unsigned int r_type = ELF32_R_TYPE (dst->r_info); unsigned int r_type = ELF32_R_TYPE (dst->r_info);
@ -679,7 +680,7 @@ elf_cr16_info_to_howto (bfd *abfd ATTRIBUTE_UNUSED, arelent *cache_ptr,
if (r_type >= R_CR16_MAX) if (r_type >= R_CR16_MAX)
{ {
/* xgettext:c-format */ /* xgettext:c-format */
_bfd_error_handler (_("%pB: unrecognised CR16 reloc number: %d"), _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
abfd, r_type); abfd, r_type);
bfd_set_error (bfd_error_bad_value); bfd_set_error (bfd_error_bad_value);
r_type = R_CR16_NONE; r_type = R_CR16_NONE;
@ -2798,7 +2799,7 @@ bfd_cr16_elf32_create_embedded_relocs (bfd *abfd,
if (!((ELF32_R_TYPE (irel->r_info) == (int) R_CR16_NUM32a) if (!((ELF32_R_TYPE (irel->r_info) == (int) R_CR16_NUM32a)
|| (ELF32_R_TYPE (irel->r_info) == (int) R_CR16_NUM32))) || (ELF32_R_TYPE (irel->r_info) == (int) R_CR16_NUM32)))
{ {
*errmsg = _("unsupported reloc type"); *errmsg = _("unsupported relocation type");
bfd_set_error (bfd_error_bad_value); bfd_set_error (bfd_error_bad_value);
goto error_return; goto error_return;
} }

View File

@ -183,7 +183,8 @@ elf_cr16c_info_to_howto_rel (bfd *abfd ATTRIBUTE_UNUSED,
if (r_type >= RINDEX_16C_MAX) if (r_type >= RINDEX_16C_MAX)
{ {
/* xgettext:c-format */ /* xgettext:c-format */
_bfd_error_handler (_("%pB: invalid CR16C reloc number: %d"), abfd, r_type); _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
abfd, r_type);
r_type = 0; r_type = 0;
} }
cache_ptr->howto = &elf_howto_table[r_type]; cache_ptr->howto = &elf_howto_table[r_type];

View File

@ -464,7 +464,8 @@ cris_info_to_howto_rela (bfd * abfd ATTRIBUTE_UNUSED,
if (r_type >= R_CRIS_max) if (r_type >= R_CRIS_max)
{ {
/* xgettext:c-format */ /* xgettext:c-format */
_bfd_error_handler (_("%pB: invalid CRIS reloc number: %d"), abfd, r_type); _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
abfd, r_type);
r_type = 0; r_type = 0;
} }
cache_ptr->howto = & cris_elf_howto_table [r_type]; cache_ptr->howto = & cris_elf_howto_table [r_type];

View File

@ -419,14 +419,14 @@ elf_crx_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
/* Retrieve a howto ptr using an internal relocation entry. */ /* Retrieve a howto ptr using an internal relocation entry. */
static void static void
elf_crx_info_to_howto (bfd *abfd ATTRIBUTE_UNUSED, arelent *cache_ptr, elf_crx_info_to_howto (bfd *abfd, arelent *cache_ptr,
Elf_Internal_Rela *dst) Elf_Internal_Rela *dst)
{ {
unsigned int r_type = ELF32_R_TYPE (dst->r_info); unsigned int r_type = ELF32_R_TYPE (dst->r_info);
if (r_type >= R_CRX_MAX) if (r_type >= R_CRX_MAX)
{ {
/* xgettext:c-format */ /* xgettext:c-format */
_bfd_error_handler (_("%pB: unrecognised CRX reloc number: %d"), _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
abfd, r_type); abfd, r_type);
bfd_set_error (bfd_error_bad_value); bfd_set_error (bfd_error_bad_value);
r_type = R_CRX_NONE; r_type = R_CRX_NONE;

View File

@ -221,7 +221,7 @@ bfd_elf32_bfd_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
/* Set the howto pointer for an D10V ELF reloc. */ /* Set the howto pointer for an D10V ELF reloc. */
static void static void
d10v_info_to_howto_rel (bfd *abfd ATTRIBUTE_UNUSED, d10v_info_to_howto_rel (bfd *abfd,
arelent *cache_ptr, arelent *cache_ptr,
Elf_Internal_Rela *dst) Elf_Internal_Rela *dst)
{ {
@ -231,7 +231,8 @@ d10v_info_to_howto_rel (bfd *abfd ATTRIBUTE_UNUSED,
if (r_type >= (unsigned int) R_D10V_max) if (r_type >= (unsigned int) R_D10V_max)
{ {
/* xgettext:c-format */ /* xgettext:c-format */
_bfd_error_handler (_("%pB: invalid D10V reloc number: %d"), abfd, r_type); _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
abfd, r_type);
r_type = 0; r_type = 0;
} }
cache_ptr->howto = &elf_d10v_howto_table[r_type]; cache_ptr->howto = &elf_d10v_howto_table[r_type];

View File

@ -509,7 +509,7 @@ bfd_elf32_bfd_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
/* Set the howto pointer for an D30V ELF reloc (type REL). */ /* Set the howto pointer for an D30V ELF reloc (type REL). */
static void static void
d30v_info_to_howto_rel (bfd *abfd ATTRIBUTE_UNUSED, d30v_info_to_howto_rel (bfd *abfd,
arelent *cache_ptr, arelent *cache_ptr,
Elf_Internal_Rela *dst) Elf_Internal_Rela *dst)
{ {
@ -519,7 +519,8 @@ d30v_info_to_howto_rel (bfd *abfd ATTRIBUTE_UNUSED,
if (r_type >= (unsigned int) R_D30V_max) if (r_type >= (unsigned int) R_D30V_max)
{ {
/* xgettext:c-format */ /* xgettext:c-format */
_bfd_error_handler (_("%pB: invalid D30V reloc number: %d"), abfd, r_type); _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
abfd, r_type);
r_type = 0; r_type = 0;
} }
cache_ptr->howto = &elf_d30v_howto_table[r_type]; cache_ptr->howto = &elf_d30v_howto_table[r_type];
@ -528,7 +529,7 @@ d30v_info_to_howto_rel (bfd *abfd ATTRIBUTE_UNUSED,
/* Set the howto pointer for an D30V ELF reloc (type RELA). */ /* Set the howto pointer for an D30V ELF reloc (type RELA). */
static void static void
d30v_info_to_howto_rela (bfd *abfd ATTRIBUTE_UNUSED, d30v_info_to_howto_rela (bfd *abfd,
arelent *cache_ptr, arelent *cache_ptr,
Elf_Internal_Rela *dst) Elf_Internal_Rela *dst)
{ {
@ -538,7 +539,8 @@ d30v_info_to_howto_rela (bfd *abfd ATTRIBUTE_UNUSED,
if (r_type >= (unsigned int) R_D30V_max) if (r_type >= (unsigned int) R_D30V_max)
{ {
/* xgettext:c-format */ /* xgettext:c-format */
_bfd_error_handler (_("%pB: invalid D30V reloc number: %d"), abfd, r_type); _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
abfd, r_type);
r_type = 0; r_type = 0;
} }
cache_ptr->howto = &elf_d30v_howto_table[r_type]; cache_ptr->howto = &elf_d30v_howto_table[r_type];

View File

@ -530,7 +530,7 @@ elf32_dlx_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
} }
static reloc_howto_type * 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) switch (r_type)
{ {
@ -545,7 +545,8 @@ dlx_rtype_to_howto (unsigned int r_type)
default: default:
if (r_type >= (unsigned int) R_DLX_max) if (r_type >= (unsigned int) R_DLX_max)
{ {
_bfd_error_handler (_("Invalid DLX reloc number: %d"), r_type); _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
abfd, r_type);
r_type = 0; r_type = 0;
} }
return & dlx_elf_howto_table[r_type]; return & dlx_elf_howto_table[r_type];
@ -561,14 +562,14 @@ elf32_dlx_info_to_howto (bfd * abfd ATTRIBUTE_UNUSED,
} }
static void static void
elf32_dlx_info_to_howto_rel (bfd *abfd ATTRIBUTE_UNUSED, elf32_dlx_info_to_howto_rel (bfd *abfd,
arelent *cache_ptr, arelent *cache_ptr,
Elf_Internal_Rela *dst) Elf_Internal_Rela *dst)
{ {
unsigned int r_type; unsigned int r_type;
r_type = ELF32_R_TYPE (dst->r_info); r_type = ELF32_R_TYPE (dst->r_info);
cache_ptr->howto = dlx_rtype_to_howto (r_type); cache_ptr->howto = dlx_rtype_to_howto (abfd, r_type);
return; return;
} }

View File

@ -363,7 +363,7 @@ epiphany_elf_relax_section (bfd *abfd, asection *sec,
/* Set the howto pointer for a EPIPHANY ELF reloc. */ /* Set the howto pointer for a EPIPHANY ELF reloc. */
static void static void
epiphany_info_to_howto_rela (bfd * abfd ATTRIBUTE_UNUSED, epiphany_info_to_howto_rela (bfd * abfd,
arelent * cache_ptr, arelent * cache_ptr,
Elf_Internal_Rela * dst) Elf_Internal_Rela * dst)
{ {
@ -373,7 +373,8 @@ epiphany_info_to_howto_rela (bfd * abfd ATTRIBUTE_UNUSED,
if (r_type >= (unsigned int) R_EPIPHANY_max) if (r_type >= (unsigned int) R_EPIPHANY_max)
{ {
/* xgettext:c-format */ /* xgettext:c-format */
_bfd_error_handler (_("%pB: invalid Epiphany reloc number: %d"), abfd, r_type); _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
abfd, r_type);
r_type = 0; r_type = 0;
} }
cache_ptr->howto = & epiphany_elf_howto_table [r_type]; cache_ptr->howto = & epiphany_elf_howto_table [r_type];

View File

@ -378,7 +378,8 @@ fr30_info_to_howto_rela (bfd *abfd ATTRIBUTE_UNUSED,
if (r_type >= (unsigned int) R_FR30_max) if (r_type >= (unsigned int) R_FR30_max)
{ {
/* xgettext:c-format */ /* xgettext:c-format */
_bfd_error_handler (_("%pB: invalid FR30 reloc number: %d"), abfd, r_type); _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
abfd, r_type);
r_type = 0; r_type = 0;
} }
cache_ptr->howto = & fr30_elf_howto_table [r_type]; cache_ptr->howto = & fr30_elf_howto_table [r_type];

View File

@ -2554,7 +2554,8 @@ frv_info_to_howto_rela (bfd *abfd ATTRIBUTE_UNUSED,
if (r_type >= (unsigned int) R_FRV_max) if (r_type >= (unsigned int) R_FRV_max)
{ {
/* xgettext:c-format */ /* xgettext:c-format */
_bfd_error_handler (_("%pB: invalid FRV reloc number: %d"), abfd, r_type); _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
abfd, r_type);
r_type = 0; r_type = 0;
} }
cache_ptr->howto = & elf32_frv_howto_table [r_type]; cache_ptr->howto = & elf32_frv_howto_table [r_type];
@ -6250,10 +6251,9 @@ elf32_frv_check_relocs (bfd *abfd,
default: default:
bad_reloc: bad_reloc:
info->callbacks->einfo /* xgettext:c-format */
/* xgettext:c-format */ _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
(_("%pB: unsupported relocation type %i\n"), abfd, (unsigned int) ELF32_R_TYPE (rel->r_info));
abfd, ELF32_R_TYPE (rel->r_info));
return FALSE; return FALSE;
} }
} }

View File

@ -290,7 +290,7 @@ i370_elf_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
/* Set the howto pointer for an i370 ELF reloc. */ /* Set the howto pointer for an i370 ELF reloc. */
static void static void
i370_elf_info_to_howto (bfd *abfd ATTRIBUTE_UNUSED, i370_elf_info_to_howto (bfd *abfd,
arelent *cache_ptr, arelent *cache_ptr,
Elf_Internal_Rela *dst) Elf_Internal_Rela *dst)
{ {
@ -304,7 +304,7 @@ i370_elf_info_to_howto (bfd *abfd ATTRIBUTE_UNUSED,
if (r_type >= R_I370_max) if (r_type >= R_I370_max)
{ {
/* xgettext:c-format */ /* xgettext:c-format */
_bfd_error_handler (_("%pB: unrecognised I370 reloc number: %d"), _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
abfd, r_type); abfd, r_type);
bfd_set_error (bfd_error_bad_value); bfd_set_error (bfd_error_bad_value);
r_type = R_I370_NONE; r_type = R_I370_NONE;
@ -1078,7 +1078,7 @@ i370_elf_relocate_section (bfd *output_bfd,
|| !i370_elf_howto_table[(int)r_type]) || !i370_elf_howto_table[(int)r_type])
{ {
/* xgettext:c-format */ /* xgettext:c-format */
_bfd_error_handler (_("%pB: unknown relocation type %d"), _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
input_bfd, (int) r_type); input_bfd, (int) r_type);
bfd_set_error (bfd_error_bad_value); bfd_set_error (bfd_error_bad_value);
@ -1161,8 +1161,8 @@ i370_elf_relocate_section (bfd *output_bfd,
{ {
default: default:
_bfd_error_handler _bfd_error_handler
(_("%pB: unknown relocation type %d for symbol %s"), (_("%pB: unsupported relocation type %#x"),
input_bfd, (int) r_type, sym_name); input_bfd, (int) r_type);
bfd_set_error (bfd_error_bad_value); bfd_set_error (bfd_error_bad_value);
ret = FALSE; ret = FALSE;

View File

@ -381,8 +381,8 @@ elf_i386_rtype_to_howto (bfd *abfd, unsigned r_type)
>= R_386_vt - R_386_ext2)) >= R_386_vt - R_386_ext2))
{ {
/* xgettext:c-format */ /* xgettext:c-format */
_bfd_error_handler (_("%pB: invalid relocation type %d"), _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
abfd, (int) r_type); abfd, r_type);
indx = R_386_NONE; indx = R_386_NONE;
} }
/* PR 17512: file: 0f67f69d. */ /* PR 17512: file: 0f67f69d. */

View File

@ -137,7 +137,8 @@ elf32_i960_info_to_howto_rel (bfd *abfd ATTRIBUTE_UNUSED,
if (type >= R_960_max) if (type >= R_960_max)
{ {
/* xgettext:c-format */ /* xgettext:c-format */
_bfd_error_handler (_("%pB: invalid i960 reloc number: %d"), abfd, type); _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
abfd, type);
type = 0; type = 0;
} }

View File

@ -1232,7 +1232,7 @@ ip2k_elf_relax_section (bfd *abfd,
/* Set the howto pointer for a IP2K ELF reloc. */ /* Set the howto pointer for a IP2K ELF reloc. */
static void static void
ip2k_info_to_howto_rela (bfd * abfd ATTRIBUTE_UNUSED, ip2k_info_to_howto_rela (bfd * abfd,
arelent * cache_ptr, arelent * cache_ptr,
Elf_Internal_Rela * dst) Elf_Internal_Rela * dst)
{ {
@ -1242,7 +1242,8 @@ ip2k_info_to_howto_rela (bfd * abfd ATTRIBUTE_UNUSED,
if (r_type >= (unsigned int) R_IP2K_max) if (r_type >= (unsigned int) R_IP2K_max)
{ {
/* xgettext:c-format */ /* xgettext:c-format */
_bfd_error_handler (_("%pB: invalid IP2K reloc number: %d"), abfd, r_type); _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
abfd, r_type);
r_type = 0; r_type = 0;
} }
cache_ptr->howto = & ip2k_elf_howto_table [r_type]; cache_ptr->howto = & ip2k_elf_howto_table [r_type];

View File

@ -438,7 +438,8 @@ iq2000_info_to_howto_rela (bfd * abfd ATTRIBUTE_UNUSED,
if (r_type >= (unsigned int) R_IQ2000_max) if (r_type >= (unsigned int) R_IQ2000_max)
{ {
/* xgettext:c-format */ /* xgettext:c-format */
_bfd_error_handler (_("%pB: invalid IQ2000 reloc number: %d"), abfd, r_type); _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
abfd, r_type);
r_type = 0; r_type = 0;
} }
cache_ptr->howto = & iq2000_elf_howto_table [r_type]; cache_ptr->howto = & iq2000_elf_howto_table [r_type];

View File

@ -526,7 +526,7 @@ lm32_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
/* Set the howto pointer for an Lattice Mico32 ELF reloc. */ /* Set the howto pointer for an Lattice Mico32 ELF reloc. */
static void static void
lm32_info_to_howto_rela (bfd *abfd ATTRIBUTE_UNUSED, lm32_info_to_howto_rela (bfd *abfd,
arelent *cache_ptr, arelent *cache_ptr,
Elf_Internal_Rela *dst) Elf_Internal_Rela *dst)
{ {
@ -536,7 +536,8 @@ lm32_info_to_howto_rela (bfd *abfd ATTRIBUTE_UNUSED,
if (r_type >= (unsigned int) R_LM32_max) if (r_type >= (unsigned int) R_LM32_max)
{ {
/* xgettext:c-format */ /* xgettext:c-format */
_bfd_error_handler (_("%pB: invalid LM32 reloc number: %d"), abfd, r_type); _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
abfd, r_type);
r_type = 0; r_type = 0;
} }
cache_ptr->howto = &lm32_elf_howto_table[r_type]; cache_ptr->howto = &lm32_elf_howto_table[r_type];

View File

@ -292,10 +292,9 @@ m32c_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED, const char *r_name)
/* Set the howto pointer for an M32C ELF reloc. */ /* Set the howto pointer for an M32C ELF reloc. */
static void static void
m32c_info_to_howto_rela m32c_info_to_howto_rela (bfd *abfd,
(bfd * abfd ATTRIBUTE_UNUSED, arelent *cache_ptr,
arelent * cache_ptr, Elf_Internal_Rela *dst)
Elf_Internal_Rela * dst)
{ {
unsigned int r_type; unsigned int r_type;
@ -303,7 +302,8 @@ m32c_info_to_howto_rela
if (r_type >= (unsigned int) R_M32C_max) if (r_type >= (unsigned int) R_M32C_max)
{ {
/* xgettext:c-format */ /* xgettext:c-format */
_bfd_error_handler (_("%pB: invalid M32C reloc number: %d"), abfd, r_type); _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
abfd, r_type);
r_type = 0; r_type = 0;
} }
cache_ptr->howto = & m32c_elf_howto_table [r_type]; cache_ptr->howto = & m32c_elf_howto_table [r_type];

View File

@ -1283,7 +1283,8 @@ m32r_info_to_howto_rel (bfd *abfd ATTRIBUTE_UNUSED,
if (r_type > (unsigned int) R_M32R_GNU_VTENTRY) if (r_type > (unsigned int) R_M32R_GNU_VTENTRY)
{ {
/* xgettext:c-format */ /* xgettext:c-format */
_bfd_error_handler (_("%pB: invalid M32R reloc number: %d"), abfd, r_type); _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
abfd, r_type);
r_type = 0; r_type = 0;
} }
cache_ptr->howto = &m32r_elf_howto_table[r_type]; cache_ptr->howto = &m32r_elf_howto_table[r_type];
@ -2401,7 +2402,7 @@ m32r_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
if (r_type < 0 || r_type >= (int) R_M32R_max) if (r_type < 0 || r_type >= (int) R_M32R_max)
{ {
/* xgettext:c-format */ /* xgettext:c-format */
_bfd_error_handler (_("%pB: unknown relocation type %d"), _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
input_bfd, (int) r_type); input_bfd, (int) r_type);
bfd_set_error (bfd_error_bad_value); bfd_set_error (bfd_error_bad_value);
ret = FALSE; ret = FALSE;

View File

@ -378,7 +378,7 @@ bfd_elf32_bfd_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
/* Set the howto pointer for an M68HC11 ELF reloc. */ /* Set the howto pointer for an M68HC11 ELF reloc. */
static void static void
m68hc11_info_to_howto_rel (bfd *abfd ATTRIBUTE_UNUSED, m68hc11_info_to_howto_rel (bfd *abfd,
arelent *cache_ptr, Elf_Internal_Rela *dst) arelent *cache_ptr, Elf_Internal_Rela *dst)
{ {
unsigned int r_type; unsigned int r_type;
@ -387,7 +387,8 @@ m68hc11_info_to_howto_rel (bfd *abfd ATTRIBUTE_UNUSED,
if (r_type >= (unsigned int) R_M68HC11_max) if (r_type >= (unsigned int) R_M68HC11_max)
{ {
/* xgettext:c-format */ /* xgettext:c-format */
_bfd_error_handler (_("%pB: invalid M68HC11 reloc number: %d"), abfd, r_type); _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
abfd, r_type);
r_type = 0; r_type = 0;
} }
cache_ptr->howto = &elf_m68hc11_howto_table[r_type]; cache_ptr->howto = &elf_m68hc11_howto_table[r_type];

View File

@ -498,7 +498,7 @@ bfd_elf32_bfd_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
/* Set the howto pointer for an M68HC11 ELF reloc. */ /* Set the howto pointer for an M68HC11 ELF reloc. */
static void static void
m68hc11_info_to_howto_rel (bfd *abfd ATTRIBUTE_UNUSED, m68hc11_info_to_howto_rel (bfd *abfd,
arelent *cache_ptr, Elf_Internal_Rela *dst) arelent *cache_ptr, Elf_Internal_Rela *dst)
{ {
unsigned int r_type; unsigned int r_type;
@ -507,7 +507,8 @@ m68hc11_info_to_howto_rel (bfd *abfd ATTRIBUTE_UNUSED,
if (r_type >= (unsigned int) R_M68HC11_max) if (r_type >= (unsigned int) R_M68HC11_max)
{ {
/* xgettext:c-format */ /* xgettext:c-format */
_bfd_error_handler (_("%pB: invalid M68HC12 reloc number: %d"), abfd, r_type); _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
abfd, r_type);
r_type = 0; r_type = 0;
} }
cache_ptr->howto = &elf_m68hc11_howto_table[r_type]; cache_ptr->howto = &elf_m68hc11_howto_table[r_type];

View File

@ -349,8 +349,8 @@ rtype_to_howto (bfd *abfd, arelent *cache_ptr, Elf_Internal_Rela *dst)
if (indx >= (unsigned int) R_68K_max) if (indx >= (unsigned int) R_68K_max)
{ {
/* xgettext:c-format */ /* xgettext:c-format */
_bfd_error_handler (_("%pB: invalid relocation type %d"), _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
abfd, (int) indx); abfd, indx);
indx = R_68K_NONE; indx = R_68K_NONE;
} }
cache_ptr->howto = &howto_table[indx]; cache_ptr->howto = &howto_table[indx];
@ -4385,7 +4385,7 @@ bfd_m68k_elf32_create_embedded_relocs (bfd *abfd, struct bfd_link_info *info,
/* We can only relocate absolute longword relocs at run time. */ /* We can only relocate absolute longword relocs at run time. */
if (ELF32_R_TYPE (irel->r_info) != (int) R_68K_32) if (ELF32_R_TYPE (irel->r_info) != (int) R_68K_32)
{ {
*errmsg = _("unsupported reloc type"); *errmsg = _("unsupported relocation type");
bfd_set_error (bfd_error_bad_value); bfd_set_error (bfd_error_bad_value);
goto error_return; goto error_return;
} }

View File

@ -97,10 +97,9 @@ mcore_elf_unsupported_reloc (bfd * abfd,
BFD_ASSERT (reloc_entry->howto != (reloc_howto_type *)0); BFD_ASSERT (reloc_entry->howto != (reloc_howto_type *)0);
/* xgettext:c-format */ /* xgettext:c-format */
_bfd_error_handler (_("%pB: Relocation %s (%d) is not currently supported.\n"), _bfd_error_handler (_("%pB: %s unsupported"),
abfd, abfd,
reloc_entry->howto->name, reloc_entry->howto->name);
reloc_entry->howto->type);
return bfd_reloc_notsupported; return bfd_reloc_notsupported;
} }
@ -338,7 +337,7 @@ mcore_elf_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
/* Set the howto pointer for a RCE ELF reloc. */ /* Set the howto pointer for a RCE ELF reloc. */
static void static void
mcore_elf_info_to_howto (bfd * abfd ATTRIBUTE_UNUSED, mcore_elf_info_to_howto (bfd * abfd,
arelent * cache_ptr, arelent * cache_ptr,
Elf_Internal_Rela * dst) Elf_Internal_Rela * dst)
{ {
@ -352,7 +351,7 @@ mcore_elf_info_to_howto (bfd * abfd ATTRIBUTE_UNUSED,
if (r_type >= R_MCORE_max) if (r_type >= R_MCORE_max)
{ {
/* xgettext:c-format */ /* xgettext:c-format */
_bfd_error_handler (_("%pB: unrecognised MCore reloc number: %d"), _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
abfd, r_type); abfd, r_type);
bfd_set_error (bfd_error_bad_value); bfd_set_error (bfd_error_bad_value);
r_type = R_MCORE_NONE; r_type = R_MCORE_NONE;
@ -437,7 +436,7 @@ mcore_elf_relocate_section (bfd * output_bfd,
|| ! mcore_elf_howto_table [(int)r_type]) || ! mcore_elf_howto_table [(int)r_type])
{ {
/* xgettext:c-format */ /* xgettext:c-format */
_bfd_error_handler (_("%pB: Unknown relocation type %d\n"), _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
input_bfd, (int) r_type); input_bfd, (int) r_type);
bfd_set_error (bfd_error_bad_value); bfd_set_error (bfd_error_bad_value);
@ -452,10 +451,9 @@ mcore_elf_relocate_section (bfd * output_bfd,
if (howto->special_function == mcore_elf_unsupported_reloc) if (howto->special_function == mcore_elf_unsupported_reloc)
{ {
/* xgettext:c-format */ /* xgettext:c-format */
_bfd_error_handler (_("%pB: Relocation %s (%d) is not currently supported.\n"), _bfd_error_handler (_("%pB: %s unsupported"),
input_bfd, input_bfd,
howto->name, howto->name);
(int)r_type);
bfd_set_error (bfd_error_bad_value); bfd_set_error (bfd_error_bad_value);
ret = FALSE; ret = FALSE;

View File

@ -376,10 +376,9 @@ mep_final_link_relocate
/* Set the howto pointer for a MEP ELF reloc. */ /* Set the howto pointer for a MEP ELF reloc. */
static void static void
mep_info_to_howto_rela mep_info_to_howto_rela (bfd *abfd,
(bfd * abfd ATTRIBUTE_UNUSED, arelent *cache_ptr,
arelent * cache_ptr, Elf_Internal_Rela *dst)
Elf_Internal_Rela * dst)
{ {
unsigned int r_type; unsigned int r_type;
@ -387,7 +386,8 @@ mep_info_to_howto_rela
if (r_type >= R_MEP_max) if (r_type >= R_MEP_max)
{ {
/* xgettext:c-format */ /* xgettext:c-format */
_bfd_error_handler (_("%pB: invalid MEP reloc number: %d"), abfd, r_type); _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
abfd, r_type);
r_type = 0; r_type = 0;
} }
cache_ptr->howto = & mep_elf_howto_table [r_type]; cache_ptr->howto = & mep_elf_howto_table [r_type];

View File

@ -865,7 +865,7 @@ tpoff (struct bfd_link_info *info, bfd_vma address)
} }
static void static void
metag_info_to_howto_rela (bfd *abfd ATTRIBUTE_UNUSED, metag_info_to_howto_rela (bfd *abfd,
arelent *cache_ptr, arelent *cache_ptr,
Elf_Internal_Rela *dst) Elf_Internal_Rela *dst)
{ {
@ -875,7 +875,8 @@ metag_info_to_howto_rela (bfd *abfd ATTRIBUTE_UNUSED,
if (r_type >= (unsigned int) R_METAG_MAX) if (r_type >= (unsigned int) R_METAG_MAX)
{ {
/* xgettext:c-format */ /* xgettext:c-format */
_bfd_error_handler (_("%pB: invalid METAG reloc number: %d"), abfd, r_type); _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
abfd, r_type);
r_type = 0; r_type = 0;
} }
cache_ptr->howto = & elf_metag_howto_table [r_type]; cache_ptr->howto = & elf_metag_howto_table [r_type];

View File

@ -639,7 +639,7 @@ microblaze_elf_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
/* Set the howto pointer for a RCE ELF reloc. */ /* Set the howto pointer for a RCE ELF reloc. */
static void static void
microblaze_elf_info_to_howto (bfd * abfd ATTRIBUTE_UNUSED, microblaze_elf_info_to_howto (bfd * abfd,
arelent * cache_ptr, arelent * cache_ptr,
Elf_Internal_Rela * dst) Elf_Internal_Rela * dst)
{ {
@ -653,7 +653,7 @@ microblaze_elf_info_to_howto (bfd * abfd ATTRIBUTE_UNUSED,
if (r_type >= R_MICROBLAZE_max) if (r_type >= R_MICROBLAZE_max)
{ {
/* xgettext:c-format */ /* xgettext:c-format */
_bfd_error_handler (_("%pB: unrecognised MicroBlaze reloc number: %d"), _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
abfd, r_type); abfd, r_type);
bfd_set_error (bfd_error_bad_value); bfd_set_error (bfd_error_bad_value);
r_type = R_MICROBLAZE_NONE; r_type = R_MICROBLAZE_NONE;
@ -929,7 +929,7 @@ microblaze_elf_relocate_section (bfd *output_bfd,
if (r_type < 0 || r_type >= (int) R_MICROBLAZE_max) if (r_type < 0 || r_type >= (int) R_MICROBLAZE_max)
{ {
/* xgettext:c-format */ /* xgettext:c-format */
_bfd_error_handler (_("%pB: unknown relocation type %d"), _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
input_bfd, (int) r_type); input_bfd, (int) r_type);
bfd_set_error (bfd_error_bad_value); bfd_set_error (bfd_error_bad_value);
ret = FALSE; ret = FALSE;

View File

@ -57,8 +57,6 @@ static bfd_reloc_status_type mips32_64bit_reloc
(bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **); (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
static reloc_howto_type *bfd_elf32_bfd_reloc_type_lookup static reloc_howto_type *bfd_elf32_bfd_reloc_type_lookup
(bfd *, bfd_reloc_code_real_type); (bfd *, bfd_reloc_code_real_type);
static reloc_howto_type *mips_elf32_rtype_to_howto
(unsigned int, bfd_boolean);
static void mips_info_to_howto_rel static void mips_info_to_howto_rel
(bfd *, arelent *, Elf_Internal_Rela *); (bfd *, arelent *, Elf_Internal_Rela *);
static void mips_info_to_howto_rela static void mips_info_to_howto_rela
@ -2196,7 +2194,8 @@ bfd_elf32_bfd_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
/* Given a MIPS Elf_Internal_Rel, fill in an arelent structure. */ /* Given a MIPS Elf_Internal_Rel, fill in an arelent structure. */
static reloc_howto_type * static reloc_howto_type *
mips_elf32_rtype_to_howto (unsigned int r_type, mips_elf32_rtype_to_howto (bfd *abfd,
unsigned int r_type,
bfd_boolean rela_p ATTRIBUTE_UNUSED) bfd_boolean rela_p ATTRIBUTE_UNUSED)
{ {
switch (r_type) switch (r_type)
@ -2222,7 +2221,8 @@ mips_elf32_rtype_to_howto (unsigned int r_type,
return &elf_mips16_howto_table_rel[r_type - R_MIPS16_min]; return &elf_mips16_howto_table_rel[r_type - R_MIPS16_min];
if (r_type >= (unsigned int) R_MIPS_max) if (r_type >= (unsigned int) R_MIPS_max)
{ {
_bfd_error_handler (_("Unrecognised MIPS reloc number: %d"), r_type); _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
abfd, r_type);
bfd_set_error (bfd_error_bad_value); bfd_set_error (bfd_error_bad_value);
r_type = R_MIPS_NONE; r_type = R_MIPS_NONE;
} }
@ -2240,7 +2240,7 @@ mips_info_to_howto_rel (bfd *abfd, arelent *cache_ptr, Elf_Internal_Rela *dst)
r_type = ELF32_R_TYPE (dst->r_info); r_type = ELF32_R_TYPE (dst->r_info);
bed = get_elf_backend_data (abfd); bed = get_elf_backend_data (abfd);
cache_ptr->howto = bed->elf_backend_mips_rtype_to_howto (r_type, FALSE); cache_ptr->howto = bed->elf_backend_mips_rtype_to_howto (abfd, r_type, FALSE);
/* The addend for a GPREL16 or LITERAL relocation comes from the GP /* The addend for a GPREL16 or LITERAL relocation comes from the GP
value for the object file. We get the addend now, rather than value for the object file. We get the addend now, rather than

View File

@ -124,7 +124,7 @@ moxie_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED, const char *r_name)
/* Set the howto pointer for an MOXIE ELF reloc. */ /* Set the howto pointer for an MOXIE ELF reloc. */
static void static void
moxie_info_to_howto_rela (bfd *abfd ATTRIBUTE_UNUSED, moxie_info_to_howto_rela (bfd *abfd,
arelent *cache_ptr, arelent *cache_ptr,
Elf_Internal_Rela *dst) Elf_Internal_Rela *dst)
{ {
@ -134,7 +134,8 @@ moxie_info_to_howto_rela (bfd *abfd ATTRIBUTE_UNUSED,
if (r_type >= (unsigned int) R_MOXIE_max) if (r_type >= (unsigned int) R_MOXIE_max)
{ {
/* xgettext:c-format */ /* xgettext:c-format */
_bfd_error_handler (_("%pB: invalid Moxie reloc number: %d"), abfd, r_type); _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
abfd, r_type);
r_type = 0; r_type = 0;
} }
cache_ptr->howto = & moxie_elf_howto_table [r_type]; cache_ptr->howto = & moxie_elf_howto_table [r_type];

View File

@ -632,7 +632,7 @@ bfd_elf32_bfd_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
/* Set the howto pointer for an MSP430 ELF reloc. */ /* Set the howto pointer for an MSP430 ELF reloc. */
static void static void
msp430_info_to_howto_rela (bfd * abfd ATTRIBUTE_UNUSED, msp430_info_to_howto_rela (bfd * abfd,
arelent * cache_ptr, arelent * cache_ptr,
Elf_Internal_Rela * dst) Elf_Internal_Rela * dst)
{ {
@ -645,7 +645,8 @@ msp430_info_to_howto_rela (bfd * abfd ATTRIBUTE_UNUSED,
if (r_type >= (unsigned int) R_MSP430x_max) if (r_type >= (unsigned int) R_MSP430x_max)
{ {
/* xgettext:c-format */ /* xgettext:c-format */
_bfd_error_handler (_("%pB: invalid MSP430X reloc number: %d"), abfd, r_type); _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
abfd, r_type);
r_type = 0; r_type = 0;
} }
cache_ptr->howto = elf_msp430x_howto_table + r_type; cache_ptr->howto = elf_msp430x_howto_table + r_type;
@ -655,7 +656,8 @@ msp430_info_to_howto_rela (bfd * abfd ATTRIBUTE_UNUSED,
if (r_type >= (unsigned int) R_MSP430_max) if (r_type >= (unsigned int) R_MSP430_max)
{ {
/* xgettext:c-format */ /* xgettext:c-format */
_bfd_error_handler (_("%pB: invalid MSP430 reloc number: %d"), abfd, r_type); _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
abfd, r_type);
r_type = 0; r_type = 0;
} }
cache_ptr->howto = &elf_msp430_howto_table[r_type]; cache_ptr->howto = &elf_msp430_howto_table[r_type];

View File

@ -228,10 +228,9 @@ mt_elf_relocate_hi16
/* Set the howto pointer for a MT ELF reloc. */ /* Set the howto pointer for a MT ELF reloc. */
static void static void
mt_info_to_howto_rela mt_info_to_howto_rela (bfd *abfd,
(bfd * abfd ATTRIBUTE_UNUSED, arelent *cache_ptr,
arelent * cache_ptr, Elf_Internal_Rela *dst)
Elf_Internal_Rela * dst)
{ {
unsigned int r_type; unsigned int r_type;
@ -239,7 +238,8 @@ mt_info_to_howto_rela
if (r_type >= (unsigned int) R_MT_max) if (r_type >= (unsigned int) R_MT_max)
{ {
/* xgettext:c-format */ /* xgettext:c-format */
_bfd_error_handler (_("%pB: invalid MT reloc number: %d"), abfd, r_type); _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
abfd, r_type);
r_type = 0; r_type = 0;
} }
cache_ptr->howto = & mt_elf_howto_table [r_type]; cache_ptr->howto = & mt_elf_howto_table [r_type];

View File

@ -2894,7 +2894,8 @@ nds32_info_to_howto_rel (bfd *abfd ATTRIBUTE_UNUSED, arelent *cache_ptr,
if (r_type > R_NDS32_GNU_VTENTRY) if (r_type > R_NDS32_GNU_VTENTRY)
{ {
/* xgettext:c-format */ /* xgettext:c-format */
_bfd_error_handler (_("%pB: invalid NDS32 reloc number: %d"), abfd, r_type); _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
abfd, r_type);
r_type = 0; r_type = 0;
} }
cache_ptr->howto = bfd_elf32_bfd_reloc_type_table_lookup (r_type); cache_ptr->howto = bfd_elf32_bfd_reloc_type_table_lookup (r_type);
@ -4449,7 +4450,7 @@ nds32_elf_relocate_section (bfd * output_bfd ATTRIBUTE_UNUSED,
if (r_type >= R_NDS32_max) if (r_type >= R_NDS32_max)
{ {
/* xgettext:c-format */ /* xgettext:c-format */
_bfd_error_handler (_("%pB: error: unknown relocation type %d."), _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
input_bfd, r_type); input_bfd, r_type);
bfd_set_error (bfd_error_bad_value); bfd_set_error (bfd_error_bad_value);
ret = FALSE; ret = FALSE;

View File

@ -702,7 +702,7 @@ or1k_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
/* Set the howto pointer for an Or1k ELF reloc. */ /* Set the howto pointer for an Or1k ELF reloc. */
static void static void
or1k_info_to_howto_rela (bfd * abfd ATTRIBUTE_UNUSED, or1k_info_to_howto_rela (bfd * abfd,
arelent * cache_ptr, arelent * cache_ptr,
Elf_Internal_Rela * dst) Elf_Internal_Rela * dst)
{ {
@ -712,7 +712,8 @@ or1k_info_to_howto_rela (bfd * abfd ATTRIBUTE_UNUSED,
if (r_type >= (unsigned int) R_OR1K_max) if (r_type >= (unsigned int) R_OR1K_max)
{ {
/* xgettext:c-format */ /* xgettext:c-format */
_bfd_error_handler (_("%pB: invalid OR1K reloc number: %d"), abfd, r_type); _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
abfd, r_type);
r_type = 0; r_type = 0;
} }
cache_ptr->howto = & or1k_elf_howto_table[r_type]; cache_ptr->howto = & or1k_elf_howto_table[r_type];

View File

@ -311,7 +311,7 @@ pj_elf_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
/* Given an ELF reloc, fill in the howto field of a relent. */ /* Given an ELF reloc, fill in the howto field of a relent. */
static void static void
pj_elf_info_to_howto (bfd *abfd ATTRIBUTE_UNUSED, pj_elf_info_to_howto (bfd *abfd,
arelent *cache_ptr, arelent *cache_ptr,
Elf_Internal_Rela *dst) Elf_Internal_Rela *dst)
{ {
@ -322,7 +322,7 @@ pj_elf_info_to_howto (bfd *abfd ATTRIBUTE_UNUSED,
if (r >= R_PJ_max) if (r >= R_PJ_max)
{ {
/* xgettext:c-format */ /* xgettext:c-format */
_bfd_error_handler (_("%pB: unrecognised PicoJava reloc number: %d"), _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
abfd, r); abfd, r);
bfd_set_error (bfd_error_bad_value); bfd_set_error (bfd_error_bad_value);
r = R_PJ_NONE; r = R_PJ_NONE;

View File

@ -2029,7 +2029,7 @@ ppc_elf_info_to_howto (bfd *abfd,
if (r_type >= R_PPC_max) if (r_type >= R_PPC_max)
{ {
/* xgettext:c-format */ /* xgettext:c-format */
_bfd_error_handler (_("%pB: unsupported reloc type %#x"), _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
abfd, r_type); abfd, r_type);
bfd_set_error (bfd_error_bad_value); bfd_set_error (bfd_error_bad_value);
r_type = R_PPC_NONE; r_type = R_PPC_NONE;
@ -2041,7 +2041,7 @@ ppc_elf_info_to_howto (bfd *abfd,
if (!cache_ptr->howto) if (!cache_ptr->howto)
{ {
/* xgettext:c-format */ /* xgettext:c-format */
_bfd_error_handler (_("%pB: unsupported reloc type %#x"), _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
abfd, r_type); abfd, r_type);
bfd_set_error (bfd_error_bad_value); bfd_set_error (bfd_error_bad_value);

View File

@ -289,7 +289,8 @@ rl78_info_to_howto_rela (bfd * abfd ATTRIBUTE_UNUSED,
if (r_type >= (unsigned int) R_RL78_max) if (r_type >= (unsigned int) R_RL78_max)
{ {
/* xgettext:c-format */ /* xgettext:c-format */
_bfd_error_handler (_("%pB: invalid RL78 reloc number: %d"), abfd, r_type); _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
abfd, r_type);
r_type = 0; r_type = 0;
} }
cache_ptr->howto = rl78_elf_howto_table + r_type; cache_ptr->howto = rl78_elf_howto_table + r_type;

View File

@ -301,9 +301,9 @@ rx_reloc_name_lookup (bfd * abfd ATTRIBUTE_UNUSED, const char * r_name)
/* Set the howto pointer for an RX ELF reloc. */ /* Set the howto pointer for an RX ELF reloc. */
static void static void
rx_info_to_howto_rela (bfd * abfd ATTRIBUTE_UNUSED, rx_info_to_howto_rela (bfd *abfd,
arelent * cache_ptr, arelent *cache_ptr,
Elf_Internal_Rela * dst) Elf_Internal_Rela *dst)
{ {
unsigned int r_type; unsigned int r_type;
@ -311,7 +311,8 @@ rx_info_to_howto_rela (bfd * abfd ATTRIBUTE_UNUSED,
if (r_type >= (unsigned int) R_RX_max) if (r_type >= (unsigned int) R_RX_max)
{ {
/* xgettext:c-format */ /* xgettext:c-format */
_bfd_error_handler (_("%pB: invalid RX reloc number: %d"), abfd, r_type); _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
abfd, r_type);
r_type = 0; r_type = 0;
} }
cache_ptr->howto = rx_elf_howto_table + r_type; cache_ptr->howto = rx_elf_howto_table + r_type;

View File

@ -343,8 +343,8 @@ elf_s390_info_to_howto (bfd *abfd ATTRIBUTE_UNUSED,
if (r_type >= sizeof (elf_howto_table) / sizeof (elf_howto_table[0])) if (r_type >= sizeof (elf_howto_table) / sizeof (elf_howto_table[0]))
{ {
/* xgettext:c-format */ /* xgettext:c-format */
_bfd_error_handler (_("%pB: invalid relocation type %d"), _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
abfd, (int) r_type); abfd, r_type);
r_type = R_390_NONE; r_type = R_390_NONE;
} }
cache_ptr->howto = &elf_howto_table[r_type]; cache_ptr->howto = &elf_howto_table[r_type];

View File

@ -488,7 +488,7 @@ sh_elf_info_to_howto (bfd *abfd, arelent *cache_ptr, Elf_Internal_Rela *dst)
|| (r >= R_SH_FIRST_INVALID_RELOC_6 && r <= R_SH_LAST_INVALID_RELOC_6)) || (r >= R_SH_FIRST_INVALID_RELOC_6 && r <= R_SH_LAST_INVALID_RELOC_6))
{ {
/* xgettext:c-format */ /* xgettext:c-format */
_bfd_error_handler (_("%pB: unrecognised SH reloc number: %d"), _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
abfd, r); abfd, r);
bfd_set_error (bfd_error_bad_value); bfd_set_error (bfd_error_bad_value);
r = R_SH_NONE; r = R_SH_NONE;

View File

@ -146,7 +146,7 @@ spu_elf_bfd_to_reloc_type (bfd_reloc_code_real_type code)
} }
static void static void
spu_elf_info_to_howto (bfd *abfd ATTRIBUTE_UNUSED, spu_elf_info_to_howto (bfd *abfd,
arelent *cache_ptr, arelent *cache_ptr,
Elf_Internal_Rela *dst) Elf_Internal_Rela *dst)
{ {
@ -157,7 +157,7 @@ spu_elf_info_to_howto (bfd *abfd ATTRIBUTE_UNUSED,
if (r_type >= R_SPU_max) if (r_type >= R_SPU_max)
{ {
/* xgettext:c-format */ /* xgettext:c-format */
_bfd_error_handler (_("%pB: unrecognised SPU reloc number: %d"), _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
abfd, r_type); abfd, r_type);
bfd_set_error (bfd_error_bad_value); bfd_set_error (bfd_error_bad_value);
r_type = R_SPU_NONE; r_type = R_SPU_NONE;

View File

@ -2606,7 +2606,7 @@ elf32_tic6x_relocate_section (bfd *output_bfd,
default: default:
/* Unknown relocation. */ /* Unknown relocation. */
/* xgettext:c-format */ /* xgettext:c-format */
_bfd_error_handler (_("%pB: invalid relocation type %d"), _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
input_bfd, r_type); input_bfd, r_type);
ok = FALSE; ok = FALSE;
continue; continue;

View File

@ -490,7 +490,8 @@ v850_elf_perform_relocation (bfd *abfd,
{ {
default: default:
#ifdef DEBUG #ifdef DEBUG
fprintf (stderr, "%pB: reloc number %d not recognised\n", abfd, r_type); _bfd_error_handler ("%pB: unsupported relocation type %#x",
abfd, r_type);
#endif #endif
return bfd_reloc_notsupported; return bfd_reloc_notsupported;
@ -1885,7 +1886,7 @@ v850_elf_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
/* Set the howto pointer for an V850 ELF reloc. */ /* Set the howto pointer for an V850 ELF reloc. */
static void static void
v850_elf_info_to_howto_rel (bfd *abfd ATTRIBUTE_UNUSED, v850_elf_info_to_howto_rel (bfd *abfd,
arelent *cache_ptr, arelent *cache_ptr,
Elf_Internal_Rela *dst) Elf_Internal_Rela *dst)
{ {
@ -1895,7 +1896,8 @@ v850_elf_info_to_howto_rel (bfd *abfd ATTRIBUTE_UNUSED,
if (r_type >= (unsigned int) R_V850_max) if (r_type >= (unsigned int) R_V850_max)
{ {
/* xgettext:c-format */ /* xgettext:c-format */
_bfd_error_handler (_("%pB: invalid V850 reloc number: %d"), abfd, r_type); _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
abfd, r_type);
r_type = 0; r_type = 0;
} }
cache_ptr->howto = &v850_elf_howto_table[r_type]; cache_ptr->howto = &v850_elf_howto_table[r_type];
@ -1904,8 +1906,8 @@ v850_elf_info_to_howto_rel (bfd *abfd ATTRIBUTE_UNUSED,
/* Set the howto pointer for a V850 ELF reloc (type RELA). */ /* Set the howto pointer for a V850 ELF reloc (type RELA). */
static void static void
v850_elf_info_to_howto_rela (bfd *abfd ATTRIBUTE_UNUSED, v850_elf_info_to_howto_rela (bfd *abfd,
arelent * cache_ptr, arelent *cache_ptr,
Elf_Internal_Rela *dst) Elf_Internal_Rela *dst)
{ {
unsigned int r_type; unsigned int r_type;
@ -1914,7 +1916,8 @@ v850_elf_info_to_howto_rela (bfd *abfd ATTRIBUTE_UNUSED,
if (r_type >= (unsigned int) R_V850_max) if (r_type >= (unsigned int) R_V850_max)
{ {
/* xgettext:c-format */ /* xgettext:c-format */
_bfd_error_handler (_("%pB: invalid V850 reloc number: %d"), abfd, r_type); _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
abfd, r_type);
r_type = 0; r_type = 0;
} }
cache_ptr->howto = &v850_elf_howto_table[r_type]; cache_ptr->howto = &v850_elf_howto_table[r_type];
@ -2145,7 +2148,8 @@ v850_elf_final_link_relocate (reloc_howto_type *howto,
default: default:
#ifdef DEBUG #ifdef DEBUG
fprintf (stderr, "%pB: reloc number %d not recognised\n", input_bfd, r_type); _bfd_error_handler ("%pB: unsupported relocation type %#x",
input_bfd, r_type);
#endif #endif
return bfd_reloc_notsupported; return bfd_reloc_notsupported;
} }

View File

@ -287,7 +287,7 @@ rtype_to_howto (bfd *abfd, arelent *cache_ptr, Elf_Internal_Rela *dst)
if (r_type >= R_VAX_max) if (r_type >= R_VAX_max)
{ {
/* xgettext:c-format */ /* xgettext:c-format */
_bfd_error_handler (_("%pB: unrecognised VAX reloc number: %d"), _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
abfd, r_type); abfd, r_type);
bfd_set_error (bfd_error_bad_value); bfd_set_error (bfd_error_bad_value);
r_type = R_VAX_NONE; r_type = R_VAX_NONE;

View File

@ -459,7 +459,7 @@ visium_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED, const char *r_name)
/* Set the howto pointer for a VISIUM ELF reloc. */ /* Set the howto pointer for a VISIUM ELF reloc. */
static void static void
visium_info_to_howto_rela (bfd *abfd ATTRIBUTE_UNUSED, arelent *cache_ptr, visium_info_to_howto_rela (bfd *abfd, arelent *cache_ptr,
Elf_Internal_Rela *dst) Elf_Internal_Rela *dst)
{ {
unsigned int r_type = ELF32_R_TYPE (dst->r_info); unsigned int r_type = ELF32_R_TYPE (dst->r_info);
@ -478,7 +478,8 @@ visium_info_to_howto_rela (bfd *abfd ATTRIBUTE_UNUSED, arelent *cache_ptr,
if (r_type >= (unsigned int) R_VISIUM_max) if (r_type >= (unsigned int) R_VISIUM_max)
{ {
/* xgettext:c-format */ /* xgettext:c-format */
_bfd_error_handler (_("%pB: invalid Visium reloc number: %d"), abfd, r_type); _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
abfd, r_type);
r_type = 0; r_type = 0;
} }
cache_ptr->howto = &visium_elf_howto_table[r_type]; cache_ptr->howto = &visium_elf_howto_table[r_type];

View File

@ -103,8 +103,8 @@ elf32_wasm32_rtype_to_howto (bfd *abfd, unsigned r_type)
if (i >= ARRAY_SIZE (elf32_wasm32_howto_table)) if (i >= ARRAY_SIZE (elf32_wasm32_howto_table))
{ {
/* xgettext:c-format */ /* xgettext:c-format */
_bfd_error_handler (_("%pB: invalid relocation type %d"), _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
abfd, (int) r_type); abfd, r_type);
i = R_WASM32_NONE; i = R_WASM32_NONE;
} }
@ -117,7 +117,7 @@ elf32_wasm32_rtype_to_howto (bfd *abfd, unsigned r_type)
/* Translate the ELF-internal relocation RELA into CACHE_PTR. */ /* Translate the ELF-internal relocation RELA into CACHE_PTR. */
static void static void
elf32_wasm32_info_to_howto_rela (bfd *abfd ATTRIBUTE_UNUSED, elf32_wasm32_info_to_howto_rela (bfd *abfd,
arelent *cache_ptr, arelent *cache_ptr,
Elf_Internal_Rela *dst) Elf_Internal_Rela *dst)
{ {

View File

@ -415,7 +415,7 @@ bfd_elf32_bfd_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED, const char *r_name)
/* Set the howto pointer for an XGATE ELF reloc. */ /* Set the howto pointer for an XGATE ELF reloc. */
static void static void
xgate_info_to_howto_rel (bfd *abfd ATTRIBUTE_UNUSED, xgate_info_to_howto_rel (bfd *abfd,
arelent *cache_ptr, arelent *cache_ptr,
Elf_Internal_Rela *dst) Elf_Internal_Rela *dst)
{ {
@ -425,7 +425,8 @@ xgate_info_to_howto_rel (bfd *abfd ATTRIBUTE_UNUSED,
if (r_type >= (unsigned int) R_XGATE_max) if (r_type >= (unsigned int) R_XGATE_max)
{ {
/* xgettext:c-format */ /* xgettext:c-format */
_bfd_error_handler (_("%pB: invalid XGate reloc number: %d"), abfd, r_type); _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
abfd, r_type);
r_type = 0; r_type = 0;
} }
cache_ptr->howto = &elf_xgate_howto_table[r_type]; cache_ptr->howto = &elf_xgate_howto_table[r_type];

View File

@ -473,7 +473,7 @@ elf_xtensa_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
it in the BFD internal arelent representation of the relocation. */ it in the BFD internal arelent representation of the relocation. */
static void static void
elf_xtensa_info_to_howto_rela (bfd *abfd ATTRIBUTE_UNUSED, elf_xtensa_info_to_howto_rela (bfd *abfd,
arelent *cache_ptr, arelent *cache_ptr,
Elf_Internal_Rela *dst) Elf_Internal_Rela *dst)
{ {
@ -482,7 +482,8 @@ elf_xtensa_info_to_howto_rela (bfd *abfd ATTRIBUTE_UNUSED,
if (r_type >= (unsigned int) R_XTENSA_max) if (r_type >= (unsigned int) R_XTENSA_max)
{ {
/* xgettext:c-format */ /* xgettext:c-format */
_bfd_error_handler (_("%pB: invalid XTENSA reloc number: %d"), abfd, r_type); _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
abfd, r_type);
r_type = 0; r_type = 0;
} }
cache_ptr->howto = &elf_howto_table[r_type]; cache_ptr->howto = &elf_howto_table[r_type];

View File

@ -1101,7 +1101,7 @@ elf64_alpha_bfd_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
/* Given an Alpha ELF reloc type, fill in an arelent structure. */ /* Given an Alpha ELF reloc type, fill in an arelent structure. */
static void static void
elf64_alpha_info_to_howto (bfd *abfd ATTRIBUTE_UNUSED, arelent *cache_ptr, elf64_alpha_info_to_howto (bfd *abfd, arelent *cache_ptr,
Elf_Internal_Rela *dst) Elf_Internal_Rela *dst)
{ {
unsigned r_type = ELF64_R_TYPE(dst->r_info); unsigned r_type = ELF64_R_TYPE(dst->r_info);
@ -1109,7 +1109,7 @@ elf64_alpha_info_to_howto (bfd *abfd ATTRIBUTE_UNUSED, arelent *cache_ptr,
if (r_type >= R_ALPHA_max) if (r_type >= R_ALPHA_max)
{ {
/* xgettext:c-format */ /* xgettext:c-format */
_bfd_error_handler (_("%pB: unrecognised Alpha reloc number: %d"), _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
abfd, r_type); abfd, r_type);
bfd_set_error (bfd_error_bad_value); bfd_set_error (bfd_error_bad_value);
r_type = R_ALPHA_NONE; r_type = R_ALPHA_NONE;
@ -4097,7 +4097,7 @@ elf64_alpha_relocate_section_r (bfd *output_bfd ATTRIBUTE_UNUSED,
{ {
_bfd_error_handler _bfd_error_handler
/* xgettext:c-format */ /* xgettext:c-format */
(_("%pB: unknown relocation type %d"), (_("%pB: unsupported relocation type %#x"),
input_bfd, (int) r_type); input_bfd, (int) r_type);
bfd_set_error (bfd_error_bad_value); bfd_set_error (bfd_error_bad_value);
ret_val = FALSE; ret_val = FALSE;
@ -4245,7 +4245,7 @@ elf64_alpha_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
{ {
_bfd_error_handler _bfd_error_handler
/* xgettext:c-format */ /* xgettext:c-format */
(_("%pB: unknown relocation type %d"), (_("%pB: unsupported relocation type %#x"),
input_bfd, (int) r_type); input_bfd, (int) r_type);
bfd_set_error (bfd_error_bad_value); bfd_set_error (bfd_error_bad_value);
ret_val = FALSE; ret_val = FALSE;

View File

@ -3425,10 +3425,9 @@ elf64_ia64_relocate_section (bfd *output_bfd,
r_type = ELF64_R_TYPE (rel->r_info); r_type = ELF64_R_TYPE (rel->r_info);
if (r_type > R_IA64_MAX_RELOC_CODE) if (r_type > R_IA64_MAX_RELOC_CODE)
{ {
_bfd_error_handler /* xgettext:c-format */
/* xgettext:c-format */ _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
(_("%pB: unknown relocation type %d"), input_bfd, (int) r_type);
input_bfd, (int) r_type);
bfd_set_error (bfd_error_bad_value); bfd_set_error (bfd_error_bad_value);
ret_val = FALSE; ret_val = FALSE;
continue; continue;

View File

@ -80,8 +80,6 @@ static void mips_elf64_be_swap_reloca_out
(bfd *, const Elf_Internal_Rela *, bfd_byte *); (bfd *, const Elf_Internal_Rela *, bfd_byte *);
static reloc_howto_type *bfd_elf64_bfd_reloc_type_lookup static reloc_howto_type *bfd_elf64_bfd_reloc_type_lookup
(bfd *, bfd_reloc_code_real_type); (bfd *, bfd_reloc_code_real_type);
static reloc_howto_type *mips_elf64_rtype_to_howto
(unsigned int, bfd_boolean);
static void mips_elf64_info_to_howto_rel static void mips_elf64_info_to_howto_rel
(bfd *, arelent *, Elf_Internal_Rela *); (bfd *, arelent *, Elf_Internal_Rela *);
static void mips_elf64_info_to_howto_rela static void mips_elf64_info_to_howto_rela
@ -3574,7 +3572,7 @@ bfd_elf64_bfd_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
/* Given a MIPS Elf_Internal_Rel, fill in an arelent structure. */ /* Given a MIPS Elf_Internal_Rel, fill in an arelent structure. */
static reloc_howto_type * static reloc_howto_type *
mips_elf64_rtype_to_howto (unsigned int r_type, bfd_boolean rela_p) mips_elf64_rtype_to_howto (bfd *abfd, unsigned int r_type, bfd_boolean rela_p)
{ {
switch (r_type) switch (r_type)
{ {
@ -3612,7 +3610,8 @@ mips_elf64_rtype_to_howto (unsigned int r_type, bfd_boolean rela_p)
} }
if (r_type >= R_MIPS_max) if (r_type >= R_MIPS_max)
{ {
_bfd_error_handler (_("unrecognised MIPS reloc number: %d"), r_type); _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
abfd, r_type);
bfd_set_error (bfd_error_bad_value); bfd_set_error (bfd_error_bad_value);
r_type = R_MIPS_NONE; r_type = R_MIPS_NONE;
} }
@ -3805,7 +3804,7 @@ mips_elf64_slurp_one_reloc_table (bfd *abfd, asection *asect,
relent->addend = rela.r_addend; relent->addend = rela.r_addend;
relent->howto = mips_elf64_rtype_to_howto (type, rela_p); relent->howto = mips_elf64_rtype_to_howto (abfd, type, rela_p);
++relent; ++relent;
} }

View File

@ -1251,7 +1251,7 @@ mmix_elf_perform_relocation (asection *isec, reloc_howto_type *howto,
/* Set the howto pointer for an MMIX ELF reloc (type RELA). */ /* Set the howto pointer for an MMIX ELF reloc (type RELA). */
static void static void
mmix_info_to_howto_rela (bfd *abfd ATTRIBUTE_UNUSED, mmix_info_to_howto_rela (bfd *abfd,
arelent *cache_ptr, arelent *cache_ptr,
Elf_Internal_Rela *dst) Elf_Internal_Rela *dst)
{ {
@ -1261,7 +1261,8 @@ mmix_info_to_howto_rela (bfd *abfd ATTRIBUTE_UNUSED,
if (r_type >= (unsigned int) R_MMIX_max) if (r_type >= (unsigned int) R_MMIX_max)
{ {
/* xgettext:c-format */ /* xgettext:c-format */
_bfd_error_handler (_("%pB: invalid MMIX reloc number: %d"), abfd, r_type); _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
abfd, r_type);
r_type = 0; r_type = 0;
} }
cache_ptr->howto = &elf_mmix_howto_table[r_type]; cache_ptr->howto = &elf_mmix_howto_table[r_type];

View File

@ -2514,7 +2514,7 @@ ppc64_elf_info_to_howto (bfd *abfd, arelent *cache_ptr,
if (type >= ARRAY_SIZE (ppc64_elf_howto_table)) if (type >= ARRAY_SIZE (ppc64_elf_howto_table))
{ {
/* xgettext:c-format */ /* xgettext:c-format */
_bfd_error_handler (_("%pB: unsupported reloc type %#x"), _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
abfd, type); abfd, type);
type = R_PPC64_NONE; type = R_PPC64_NONE;
} }

View File

@ -370,8 +370,8 @@ elf_s390_info_to_howto (bfd *abfd ATTRIBUTE_UNUSED,
if (r_type >= sizeof (elf_howto_table) / sizeof (elf_howto_table[0])) if (r_type >= sizeof (elf_howto_table) / sizeof (elf_howto_table[0]))
{ {
/* xgettext:c-format */ /* xgettext:c-format */
_bfd_error_handler (_("%pB: invalid relocation type %d"), _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
abfd, (int) r_type); abfd, r_type);
r_type = R_390_NONE; r_type = R_390_NONE;
} }
cache_ptr->howto = &elf_howto_table[r_type]; cache_ptr->howto = &elf_howto_table[r_type];

View File

@ -122,15 +122,15 @@ elf64_sparc_slurp_one_reloc_table (bfd *abfd, asection *asect,
r_type = ELF64_R_TYPE_ID (rela.r_info); r_type = ELF64_R_TYPE_ID (rela.r_info);
if (r_type == R_SPARC_OLO10) if (r_type == R_SPARC_OLO10)
{ {
relent->howto = _bfd_sparc_elf_info_to_howto_ptr (R_SPARC_LO10); relent->howto = _bfd_sparc_elf_info_to_howto_ptr (abfd, R_SPARC_LO10);
relent[1].address = relent->address; relent[1].address = relent->address;
relent++; relent++;
relent->sym_ptr_ptr = bfd_abs_section_ptr->symbol_ptr_ptr; relent->sym_ptr_ptr = bfd_abs_section_ptr->symbol_ptr_ptr;
relent->addend = ELF64_R_TYPE_DATA (rela.r_info); relent->addend = ELF64_R_TYPE_DATA (rela.r_info);
relent->howto = _bfd_sparc_elf_info_to_howto_ptr (R_SPARC_13); relent->howto = _bfd_sparc_elf_info_to_howto_ptr (abfd, R_SPARC_13);
} }
else else
relent->howto = _bfd_sparc_elf_info_to_howto_ptr (r_type); relent->howto = _bfd_sparc_elf_info_to_howto_ptr (abfd, r_type);
} }
canon_reloc_count (asect) += relent - relents; canon_reloc_count (asect) += relent - relents;

View File

@ -282,8 +282,8 @@ elf_x86_64_rtype_to_howto (bfd *abfd, unsigned r_type)
if (r_type >= (unsigned int) R_X86_64_standard) if (r_type >= (unsigned int) R_X86_64_standard)
{ {
/* xgettext:c-format */ /* xgettext:c-format */
_bfd_error_handler (_("%pB: invalid relocation type %d"), _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
abfd, (int) r_type); abfd, r_type);
r_type = R_X86_64_NONE; r_type = R_X86_64_NONE;
} }
i = r_type; i = r_type;

View File

@ -66,8 +66,6 @@ static bfd_reloc_status_type mips16_gprel_reloc
(bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **); (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
static reloc_howto_type *bfd_elf32_bfd_reloc_type_lookup static reloc_howto_type *bfd_elf32_bfd_reloc_type_lookup
(bfd *, bfd_reloc_code_real_type); (bfd *, bfd_reloc_code_real_type);
static reloc_howto_type *mips_elf_n32_rtype_to_howto
(unsigned int, bfd_boolean);
static void mips_info_to_howto_rel static void mips_info_to_howto_rel
(bfd *, arelent *, Elf_Internal_Rela *); (bfd *, arelent *, Elf_Internal_Rela *);
static void mips_info_to_howto_rela static void mips_info_to_howto_rela
@ -3402,7 +3400,7 @@ bfd_elf32_bfd_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
/* Given a MIPS Elf_Internal_Rel, fill in an arelent structure. */ /* Given a MIPS Elf_Internal_Rel, fill in an arelent structure. */
static reloc_howto_type * static reloc_howto_type *
mips_elf_n32_rtype_to_howto (unsigned int r_type, bfd_boolean rela_p) mips_elf_n32_rtype_to_howto (bfd *abfd, unsigned int r_type, bfd_boolean rela_p)
{ {
switch (r_type) switch (r_type)
{ {
@ -3440,7 +3438,8 @@ mips_elf_n32_rtype_to_howto (unsigned int r_type, bfd_boolean rela_p)
} }
if (r_type >= R_MIPS_max) if (r_type >= R_MIPS_max)
{ {
_bfd_error_handler (_("unrecognised MIPS reloc number: %d"), r_type); _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
abfd, r_type);
bfd_set_error (bfd_error_bad_value); bfd_set_error (bfd_error_bad_value);
r_type = R_MIPS_NONE; r_type = R_MIPS_NONE;
} }
@ -3460,7 +3459,7 @@ mips_info_to_howto_rel (bfd *abfd, arelent *cache_ptr, Elf_Internal_Rela *dst)
unsigned int r_type; unsigned int r_type;
r_type = ELF32_R_TYPE (dst->r_info); r_type = ELF32_R_TYPE (dst->r_info);
cache_ptr->howto = mips_elf_n32_rtype_to_howto (r_type, FALSE); cache_ptr->howto = mips_elf_n32_rtype_to_howto (abfd, r_type, FALSE);
/* The addend for a GPREL16 or LITERAL relocation comes from the GP /* The addend for a GPREL16 or LITERAL relocation comes from the GP
value for the object file. We get the addend now, rather than value for the object file. We get the addend now, rather than
@ -3474,13 +3473,13 @@ mips_info_to_howto_rel (bfd *abfd, arelent *cache_ptr, Elf_Internal_Rela *dst)
/* Given a MIPS Elf_Internal_Rela, fill in an arelent structure. */ /* Given a MIPS Elf_Internal_Rela, fill in an arelent structure. */
static void static void
mips_info_to_howto_rela (bfd *abfd ATTRIBUTE_UNUSED, mips_info_to_howto_rela (bfd *abfd,
arelent *cache_ptr, Elf_Internal_Rela *dst) arelent *cache_ptr, Elf_Internal_Rela *dst)
{ {
unsigned int r_type; unsigned int r_type;
r_type = ELF32_R_TYPE (dst->r_info); r_type = ELF32_R_TYPE (dst->r_info);
cache_ptr->howto = mips_elf_n32_rtype_to_howto (r_type, TRUE); cache_ptr->howto = mips_elf_n32_rtype_to_howto (abfd, r_type, TRUE);
cache_ptr->addend = dst->r_addend; cache_ptr->addend = dst->r_addend;
} }

View File

@ -1972,7 +1972,7 @@ elfNN_aarch64_bfd_reloc_from_howto (reloc_howto_type *howto)
/* Given R_TYPE, return the bfd internal relocation enumerator. */ /* Given R_TYPE, return the bfd internal relocation enumerator. */
static bfd_reloc_code_real_type static bfd_reloc_code_real_type
elfNN_aarch64_bfd_reloc_from_type (unsigned int r_type) elfNN_aarch64_bfd_reloc_from_type (bfd *abfd, unsigned int r_type)
{ {
static bfd_boolean initialized_p = FALSE; static bfd_boolean initialized_p = FALSE;
/* Indexed by R_TYPE, values are offsets in the howto_table. */ /* Indexed by R_TYPE, values are offsets in the howto_table. */
@ -1995,7 +1995,8 @@ elfNN_aarch64_bfd_reloc_from_type (unsigned int r_type)
/* PR 17512: file: b371e70a. */ /* PR 17512: file: b371e70a. */
if (r_type >= R_AARCH64_end) if (r_type >= R_AARCH64_end)
{ {
_bfd_error_handler (_("Invalid AArch64 reloc number: %d"), r_type); _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
abfd, r_type);
bfd_set_error (bfd_error_bad_value); bfd_set_error (bfd_error_bad_value);
return BFD_RELOC_AARCH64_NONE; return BFD_RELOC_AARCH64_NONE;
} }
@ -2054,7 +2055,7 @@ elfNN_aarch64_howto_from_bfd_reloc (bfd_reloc_code_real_type code)
} }
static reloc_howto_type * static reloc_howto_type *
elfNN_aarch64_howto_from_type (unsigned int r_type) elfNN_aarch64_howto_from_type (bfd *abfd, unsigned int r_type)
{ {
bfd_reloc_code_real_type val; bfd_reloc_code_real_type val;
reloc_howto_type *howto; reloc_howto_type *howto;
@ -2070,7 +2071,7 @@ elfNN_aarch64_howto_from_type (unsigned int r_type)
if (r_type == R_AARCH64_NONE) if (r_type == R_AARCH64_NONE)
return &elfNN_aarch64_howto_none; return &elfNN_aarch64_howto_none;
val = elfNN_aarch64_bfd_reloc_from_type (r_type); val = elfNN_aarch64_bfd_reloc_from_type (abfd, r_type);
howto = elfNN_aarch64_howto_from_bfd_reloc (val); howto = elfNN_aarch64_howto_from_bfd_reloc (val);
if (howto != NULL) if (howto != NULL)
@ -2081,13 +2082,13 @@ elfNN_aarch64_howto_from_type (unsigned int r_type)
} }
static void static void
elfNN_aarch64_info_to_howto (bfd *abfd ATTRIBUTE_UNUSED, arelent *bfd_reloc, elfNN_aarch64_info_to_howto (bfd *abfd, arelent *bfd_reloc,
Elf_Internal_Rela *elf_reloc) Elf_Internal_Rela *elf_reloc)
{ {
unsigned int r_type; unsigned int r_type;
r_type = ELFNN_R_TYPE (elf_reloc->r_info); r_type = ELFNN_R_TYPE (elf_reloc->r_info);
bfd_reloc->howto = elfNN_aarch64_howto_from_type (r_type); bfd_reloc->howto = elfNN_aarch64_howto_from_type (abfd, r_type);
} }
static reloc_howto_type * static reloc_howto_type *
@ -2727,11 +2728,11 @@ aarch64_relocate (unsigned int r_type, bfd *input_bfd, asection *input_section,
reloc_howto_type *howto; reloc_howto_type *howto;
bfd_vma place; bfd_vma place;
howto = elfNN_aarch64_howto_from_type (r_type); howto = elfNN_aarch64_howto_from_type (input_bfd, r_type);
place = (input_section->output_section->vma + input_section->output_offset place = (input_section->output_section->vma + input_section->output_offset
+ offset); + offset);
r_type = elfNN_aarch64_bfd_reloc_from_type (r_type); r_type = elfNN_aarch64_bfd_reloc_from_type (input_bfd, r_type);
value = _bfd_aarch64_elf_resolve_relocation (r_type, place, value, 0, FALSE); value = _bfd_aarch64_elf_resolve_relocation (r_type, place, value, 0, FALSE);
return _bfd_aarch64_elf_put_addend (input_bfd, return _bfd_aarch64_elf_put_addend (input_bfd,
input_section->contents + offset, r_type, input_section->contents + offset, r_type,
@ -4708,7 +4709,7 @@ aarch64_tls_transition (bfd *input_bfd,
unsigned long r_symndx) unsigned long r_symndx)
{ {
bfd_reloc_code_real_type bfd_r_type bfd_reloc_code_real_type bfd_r_type
= elfNN_aarch64_bfd_reloc_from_type (r_type); = elfNN_aarch64_bfd_reloc_from_type (input_bfd, r_type);
if (! aarch64_can_relax_tls (input_bfd, info, bfd_r_type, h, r_symndx)) if (! aarch64_can_relax_tls (input_bfd, info, bfd_r_type, h, r_symndx))
return bfd_r_type; return bfd_r_type;
@ -5793,7 +5794,7 @@ elfNN_aarch64_tls_relax (struct elf_aarch64_link_hash_table *globals,
BFD_ASSERT (globals && input_bfd && contents && rel); BFD_ASSERT (globals && input_bfd && contents && rel);
switch (elfNN_aarch64_bfd_reloc_from_type (r_type)) switch (elfNN_aarch64_bfd_reloc_from_type (input_bfd, r_type))
{ {
case BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE21: case BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE21:
case BFD_RELOC_AARCH64_TLSGD_ADR_PAGE21: case BFD_RELOC_AARCH64_TLSGD_ADR_PAGE21:
@ -6215,7 +6216,8 @@ elfNN_aarch64_relocate_section (bfd *output_bfd,
r_symndx = ELFNN_R_SYM (rel->r_info); r_symndx = ELFNN_R_SYM (rel->r_info);
r_type = ELFNN_R_TYPE (rel->r_info); r_type = ELFNN_R_TYPE (rel->r_info);
howto = bfd_reloc.howto = elfNN_aarch64_howto_from_type (r_type); bfd_reloc.howto = elfNN_aarch64_howto_from_type (input_bfd, r_type);
howto = bfd_reloc.howto;
if (howto == NULL) if (howto == NULL)
return _bfd_unrecognized_reloc (input_bfd, input_section, r_type); return _bfd_unrecognized_reloc (input_bfd, input_section, r_type);
@ -6343,7 +6345,7 @@ elfNN_aarch64_relocate_section (bfd *output_bfd,
h, &unresolved_reloc, h, &unresolved_reloc,
save_addend, &addend, sym); save_addend, &addend, sym);
switch (elfNN_aarch64_bfd_reloc_from_type (r_type)) switch (elfNN_aarch64_bfd_reloc_from_type (input_bfd, r_type))
{ {
case BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC: case BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC:
case BFD_RELOC_AARCH64_TLSGD_ADR_PAGE21: case BFD_RELOC_AARCH64_TLSGD_ADR_PAGE21:
@ -6386,7 +6388,7 @@ elfNN_aarch64_relocate_section (bfd *output_bfd,
bfd_elfNN_swap_reloca_out (output_bfd, &rela, loc); bfd_elfNN_swap_reloca_out (output_bfd, &rela, loc);
bfd_reloc_code_real_type real_type = bfd_reloc_code_real_type real_type =
elfNN_aarch64_bfd_reloc_from_type (r_type); elfNN_aarch64_bfd_reloc_from_type (input_bfd, r_type);
if (real_type == BFD_RELOC_AARCH64_TLSLD_ADR_PREL21 if (real_type == BFD_RELOC_AARCH64_TLSLD_ADR_PREL21
|| real_type == BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21 || real_type == BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21
@ -6581,7 +6583,7 @@ elfNN_aarch64_relocate_section (bfd *output_bfd,
if (r != bfd_reloc_ok && r != bfd_reloc_continue) if (r != bfd_reloc_ok && r != bfd_reloc_continue)
{ {
bfd_reloc_code_real_type real_r_type bfd_reloc_code_real_type real_r_type
= elfNN_aarch64_bfd_reloc_from_type (r_type); = elfNN_aarch64_bfd_reloc_from_type (input_bfd, r_type);
switch (r) switch (r)
{ {

View File

@ -3842,9 +3842,9 @@ elfNN_ia64_relocate_section (bfd *output_bfd,
r_type = ELFNN_R_TYPE (rel->r_info); r_type = ELFNN_R_TYPE (rel->r_info);
if (r_type > R_IA64_MAX_RELOC_CODE) if (r_type > R_IA64_MAX_RELOC_CODE)
{ {
_bfd_error_handler /* xgettext:c-format */
/* xgettext:c-format */ _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
(_("%pB: unknown relocation type %d"), input_bfd, (int) r_type); input_bfd, (int) r_type);
bfd_set_error (bfd_error_bad_value); bfd_set_error (bfd_error_bad_value);
ret_val = FALSE; ret_val = FALSE;
continue; continue;

View File

@ -122,11 +122,11 @@ struct riscv_elf_link_hash_table
== RISCV_ELF_DATA ? ((struct riscv_elf_link_hash_table *) ((p)->hash)) : NULL) == RISCV_ELF_DATA ? ((struct riscv_elf_link_hash_table *) ((p)->hash)) : NULL)
static void static void
riscv_info_to_howto_rela (bfd *abfd ATTRIBUTE_UNUSED, riscv_info_to_howto_rela (bfd *abfd,
arelent *cache_ptr, arelent *cache_ptr,
Elf_Internal_Rela *dst) Elf_Internal_Rela *dst)
{ {
cache_ptr->howto = riscv_elf_rtype_to_howto (ELFNN_R_TYPE (dst->r_info)); cache_ptr->howto = riscv_elf_rtype_to_howto (abfd, ELFNN_R_TYPE (dst->r_info));
} }
static void static void
@ -470,7 +470,7 @@ bad_static_reloc (bfd *abfd, unsigned r_type, struct elf_link_hash_entry *h)
(*_bfd_error_handler) (*_bfd_error_handler)
(_("%pB: relocation %s against `%s' can not be used when making a shared " (_("%pB: relocation %s against `%s' can not be used when making a shared "
"object; recompile with -fPIC"), "object; recompile with -fPIC"),
abfd, riscv_elf_rtype_to_howto (r_type)->name, abfd, riscv_elf_rtype_to_howto (abfd, r_type)->name,
h != NULL ? h->root.root.string : "a local symbol"); h != NULL ? h->root.root.string : "a local symbol");
bfd_set_error (bfd_error_bad_value); bfd_set_error (bfd_error_bad_value);
return FALSE; return FALSE;
@ -626,7 +626,7 @@ riscv_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
symbol. */ symbol. */
if ((bfd_link_pic (info) if ((bfd_link_pic (info)
&& (sec->flags & SEC_ALLOC) != 0 && (sec->flags & SEC_ALLOC) != 0
&& (! riscv_elf_rtype_to_howto (r_type)->pc_relative && (! riscv_elf_rtype_to_howto (abfd, r_type)->pc_relative
|| (h != NULL || (h != NULL
&& (! info->symbolic && (! info->symbolic
|| h->root.type == bfd_link_hash_defweak || h->root.type == bfd_link_hash_defweak
@ -696,7 +696,7 @@ riscv_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
} }
p->count += 1; p->count += 1;
p->pc_count += riscv_elf_rtype_to_howto (r_type)->pc_relative; p->pc_count += riscv_elf_rtype_to_howto (abfd, r_type)->pc_relative;
} }
break; break;
@ -1724,7 +1724,7 @@ riscv_elf_relocate_section (bfd *output_bfd,
bfd_boolean unresolved_reloc, is_ie = FALSE; bfd_boolean unresolved_reloc, is_ie = FALSE;
bfd_vma pc = sec_addr (input_section) + rel->r_offset; bfd_vma pc = sec_addr (input_section) + rel->r_offset;
int r_type = ELFNN_R_TYPE (rel->r_info), tls_type; int r_type = ELFNN_R_TYPE (rel->r_info), tls_type;
reloc_howto_type *howto = riscv_elf_rtype_to_howto (r_type); reloc_howto_type *howto = riscv_elf_rtype_to_howto (input_bfd, r_type);
const char *msg = NULL; const char *msg = NULL;
if (r_type == R_RISCV_GNU_VTINHERIT || r_type == R_RISCV_GNU_VTENTRY) if (r_type == R_RISCV_GNU_VTINHERIT || r_type == R_RISCV_GNU_VTENTRY)
@ -1888,7 +1888,7 @@ riscv_elf_relocate_section (bfd *output_bfd,
howto, howto,
input_bfd); input_bfd);
r_type = ELFNN_R_TYPE (rel->r_info); r_type = ELFNN_R_TYPE (rel->r_info);
howto = riscv_elf_rtype_to_howto (r_type); howto = riscv_elf_rtype_to_howto (input_bfd, r_type);
if (!riscv_record_pcrel_hi_reloc (&pcrel_relocs, pc, if (!riscv_record_pcrel_hi_reloc (&pcrel_relocs, pc,
relocation, absolute)) relocation, absolute))
r = bfd_reloc_overflow; r = bfd_reloc_overflow;
@ -1984,7 +1984,7 @@ riscv_elf_relocate_section (bfd *output_bfd,
howto, howto,
input_bfd); input_bfd);
r_type = ELFNN_R_TYPE (rel->r_info); r_type = ELFNN_R_TYPE (rel->r_info);
howto = riscv_elf_rtype_to_howto (r_type); howto = riscv_elf_rtype_to_howto (input_bfd, r_type);
if (!riscv_record_pcrel_hi_reloc (&pcrel_relocs, pc, if (!riscv_record_pcrel_hi_reloc (&pcrel_relocs, pc,
relocation + rel->r_addend, relocation + rel->r_addend,
absolute)) absolute))

View File

@ -881,7 +881,7 @@ static bfd *reldyn_sorting_bfd;
_bfd_elf_add_dynamic_entry (info, tag, val) _bfd_elf_add_dynamic_entry (info, tag, val)
#define MIPS_ELF_RTYPE_TO_HOWTO(abfd, rtype, rela) \ #define MIPS_ELF_RTYPE_TO_HOWTO(abfd, rtype, rela) \
(get_elf_backend_data (abfd)->elf_backend_mips_rtype_to_howto (rtype, rela)) (get_elf_backend_data (abfd)->elf_backend_mips_rtype_to_howto (abfd, rtype, rela))
/* The name of the dynamic relocation section. */ /* The name of the dynamic relocation section. */
#define MIPS_ELF_REL_DYN_NAME(INFO) \ #define MIPS_ELF_REL_DYN_NAME(INFO) \

View File

@ -948,11 +948,12 @@ riscv_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED, const char *r_name)
} }
reloc_howto_type * reloc_howto_type *
riscv_elf_rtype_to_howto (unsigned int r_type) riscv_elf_rtype_to_howto (bfd *abfd, unsigned int r_type)
{ {
if (r_type >= ARRAY_SIZE (howto_table)) if (r_type >= ARRAY_SIZE (howto_table))
{ {
(*_bfd_error_handler) (_("unrecognized relocation (0x%x)"), r_type); (*_bfd_error_handler) (_("%pB: unsupported relocation type %#x"),
abfd, r_type);
bfd_set_error (bfd_error_bad_value); bfd_set_error (bfd_error_bad_value);
return NULL; return NULL;
} }

View File

@ -30,4 +30,4 @@ extern reloc_howto_type *
riscv_reloc_type_lookup (bfd *, bfd_reloc_code_real_type); riscv_reloc_type_lookup (bfd *, bfd_reloc_code_real_type);
extern reloc_howto_type * extern reloc_howto_type *
riscv_elf_rtype_to_howto (unsigned int r_type); riscv_elf_rtype_to_howto (bfd *, unsigned int r_type);

View File

@ -614,7 +614,7 @@ _bfd_sparc_elf_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
} }
reloc_howto_type * reloc_howto_type *
_bfd_sparc_elf_info_to_howto_ptr (unsigned int r_type) _bfd_sparc_elf_info_to_howto_ptr (bfd *abfd, unsigned int r_type)
{ {
switch (r_type) switch (r_type)
{ {
@ -636,7 +636,8 @@ _bfd_sparc_elf_info_to_howto_ptr (unsigned int r_type)
default: default:
if (r_type >= (unsigned int) R_SPARC_max_std) if (r_type >= (unsigned int) R_SPARC_max_std)
{ {
_bfd_error_handler (_("invalid relocation type %d"), (int) r_type); _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
abfd, r_type);
r_type = R_SPARC_NONE; r_type = R_SPARC_NONE;
} }
return &_bfd_sparc_elf_howto_table[r_type]; return &_bfd_sparc_elf_howto_table[r_type];
@ -649,12 +650,12 @@ _bfd_sparc_elf_info_to_howto_ptr (unsigned int r_type)
((r_info) & 0xff) ((r_info) & 0xff)
void void
_bfd_sparc_elf_info_to_howto (bfd *abfd ATTRIBUTE_UNUSED, arelent *cache_ptr, _bfd_sparc_elf_info_to_howto (bfd *abfd, arelent *cache_ptr,
Elf_Internal_Rela *dst) Elf_Internal_Rela *dst)
{ {
unsigned int r_type = SPARC_ELF_R_TYPE (dst->r_info); unsigned int r_type = SPARC_ELF_R_TYPE (dst->r_info);
cache_ptr->howto = _bfd_sparc_elf_info_to_howto_ptr (r_type); cache_ptr->howto = _bfd_sparc_elf_info_to_howto_ptr (abfd, r_type);
} }

View File

@ -100,7 +100,7 @@ extern reloc_howto_type *_bfd_sparc_elf_reloc_name_lookup
extern void _bfd_sparc_elf_info_to_howto extern void _bfd_sparc_elf_info_to_howto
(bfd *, arelent *, Elf_Internal_Rela *); (bfd *, arelent *, Elf_Internal_Rela *);
extern reloc_howto_type *_bfd_sparc_elf_info_to_howto_ptr extern reloc_howto_type *_bfd_sparc_elf_info_to_howto_ptr
(unsigned int); (bfd*, unsigned int);
extern bfd_boolean _bfd_sparc_elf_mkobject extern bfd_boolean _bfd_sparc_elf_mkobject
(bfd *); (bfd *);
extern struct bfd_link_hash_table *_bfd_sparc_elf_link_hash_table_create extern struct bfd_link_hash_table *_bfd_sparc_elf_link_hash_table_create

View File

@ -8388,7 +8388,7 @@ bfd_boolean
_bfd_unrecognized_reloc (bfd * abfd, sec_ptr section, unsigned int r_type) _bfd_unrecognized_reloc (bfd * abfd, sec_ptr section, unsigned int r_type)
{ {
/* xgettext:c-format */ /* xgettext:c-format */
_bfd_error_handler (_("%pB: unrecognized relocation (%#x) in section `%pA'"), _bfd_error_handler (_("%pB: unrecognized relocation type %#x in section `%pA'"),
abfd, r_type, section); abfd, r_type, section);
/* PR 21803: Suggest the most likely cause of this error. */ /* PR 21803: Suggest the most likely cause of this error. */