+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>
* elf32-ppc.c: Standardize error/warning messages. Use
if (howto == NULL)
{
- (*flaginfo->info->callbacks->einfo)
- (_("%P: %pB: unexpected relocation type\n"), input_bfd);
+ _bfd_error_handler (_("%pB: unsupported relocation type"),
+ input_bfd);
bfd_set_error (bfd_error_bad_value);
return FALSE;
}
if (r_type >= TABLE_SIZE (howto_table_ext))
{
- (*flaginfo->info->callbacks->einfo)
- (_("%P: %pB: unexpected relocation type\n"), input_bfd);
+ _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
+ input_bfd, r_type);
bfd_set_error (bfd_error_bad_value);
return FALSE;
}
if (intern->r_type > ALPHA_R_GPVALUE)
{
/* xgettext:c-format */
- _bfd_error_handler
- (_("%pB: unknown/unsupported relocation type %d"),
- abfd, intern->r_type);
+ _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
+ abfd, intern->r_type);
bfd_set_error (bfd_error_bad_value);
rptr->addend = 0;
rptr->howto = NULL;
switch (r_type)
{
case ALPHA_R_GPRELHIGH:
- _bfd_error_handler
- (_("%pB: unsupported relocation: ALPHA_R_GPRELHIGH"),
- input_bfd);
+ _bfd_error_handler (_("%pB: %s unsupported"),
+ input_bfd, "ALPHA_R_GPRELHIGH");
bfd_set_error (bfd_error_bad_value);
continue;
case ALPHA_R_GPRELLOW:
- _bfd_error_handler
- (_("%pB: unsupported relocation: ALPHA_R_GPRELLOW"),
- input_bfd);
+ _bfd_error_handler (_("%pB: %s unsupported"),
+ input_bfd, "ALPHA_R_GPRELLOW");
bfd_set_error (bfd_error_bad_value);
continue;
default:
- _bfd_error_handler
- /* xgettext:c-format */
- (_("%pB: unknown relocation type %d"),
- input_bfd, (int) r_type);
+ /* xgettext:c-format */
+ _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
+ input_bfd, (int) r_type);
bfd_set_error (bfd_error_bad_value);
continue;
these relocations. */
static bfd_reloc_status_type
-coff_i860_reloc_nyi (bfd *abfd ATTRIBUTE_UNUSED,
+coff_i860_reloc_nyi (bfd *abfd,
arelent *reloc_entry,
asymbol *symbol ATTRIBUTE_UNUSED,
void *data ATTRIBUTE_UNUSED,
char **error_message ATTRIBUTE_UNUSED)
{
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;
}
/* We can only relocate absolute longword relocs at run time. */
if (irel->r_type != R_RELLONG)
{
- *errmsg = _("unsupported reloc type");
+ *errmsg = _("unsupported relocation type");
bfd_set_error (bfd_error_bad_value);
return FALSE;
}
{
default:
/* xgettext: c-format */
- _bfd_error_handler (_("%pB: unsupported relocation type 0x%02x"),
+ _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
input_bfd, r_type);
bfd_set_error (bfd_error_bad_value);
return FALSE;
switch (r_type)
{
default:
- _bfd_error_handler
- /* xgettext: c-format */
- (_("%pB: unsupported relocation type 0x%02x"), input_bfd, r_type);
+ /* xgettext: c-format */
+ _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
+ input_bfd, r_type);
bfd_set_error (bfd_error_bad_value);
return FALSE;
case IMAGE_REL_PPC_TOCREL16:
_bfd_error_handler
/* 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 ")"),
howto->name, input_bfd, input_section,
rel->r_symndx, my_name,
{
_bfd_error_handler
/* xgettext: c-format */
- (_("%pB: unsupported relocation type 0x%02x"),
+ (_("%pB: unsupported relocation type %#x"),
input_bfd, (unsigned int) rel->r_type);
bfd_set_error (bfd_error_bad_value);
return FALSE;
#define coff_bfd_reloc_name_lookup sh_coff_reloc_name_lookup
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)
{
unsigned int i;
if (sh_reloc_map[i].bfd_reloc_val == code)
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;
}
Called after some initial checking by the tic4x_rtype_to_howto fn
below. */
static void
-tic4x_lookup_howto (arelent *internal,
+tic4x_lookup_howto (bfd *abfd,
+ arelent *internal,
struct internal_reloc *dst)
{
unsigned int i;
}
}
- _bfd_error_handler (_("Unrecognized reloc type 0x%x"),
- (unsigned int) dst->r_type);
+ _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
+ abfd, (unsigned int) dst->r_type);
abort();
}
static reloc_howto_type *
-coff_tic4x_rtype_to_howto (bfd *abfd ATTRIBUTE_UNUSED,
+coff_tic4x_rtype_to_howto (bfd *abfd,
asection *sec,
struct internal_reloc *rel,
struct coff_link_hash_entry *h ATTRIBUTE_UNUSED,
in the output section. */
*addendp = (sec->output_section->vma + sec->output_offset) - sec->vma;
- tic4x_lookup_howto (&genrel, rel);
+ tic4x_lookup_howto (abfd, &genrel, rel);
return genrel.howto;
}
/* !! relent->section = (asection *) NULL; */
/* Fill in the relent->howto field from reloc->r_type. */
- tic4x_lookup_howto (relent, reloc);
+ tic4x_lookup_howto (abfd, relent, reloc);
}
Called after some initial checking by the tic54x_rtype_to_howto fn below. */
static void
-tic54x_lookup_howto (arelent *internal,
+tic54x_lookup_howto (bfd *abfd,
+ arelent *internal,
struct internal_reloc *dst)
{
unsigned i;
}
}
- _bfd_error_handler (_("Unrecognized reloc type 0x%x"),
- (unsigned int) dst->r_type);
+ _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
+ abfd, (unsigned int) dst->r_type);
abort ();
}
#define coff_rtype_to_howto coff_tic54x_rtype_to_howto
static reloc_howto_type *
-coff_tic54x_rtype_to_howto (bfd *abfd ATTRIBUTE_UNUSED,
+coff_tic54x_rtype_to_howto (bfd *abfd,
asection *sec,
struct internal_reloc *rel,
struct coff_link_hash_entry *h ATTRIBUTE_UNUSED,
*addendp = (sec->output_section->vma + sec->output_offset) - sec->vma;
}
- tic54x_lookup_howto (&genrel, rel);
+ tic54x_lookup_howto (abfd, &genrel, rel);
return genrel.howto;
}
/* !! relent->section = (asection *) NULL;*/
/* 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). */
}
}
- _bfd_error_handler (_("Unrecognized reloc type 0x%x"),
+ _bfd_error_handler (_("unsupported relocation type %#x"),
(unsigned int) dst->r_type);
cache_ptr->howto = tic80_howto_table + 0;
}
}
break;
default:
- printf (_("ignoring reloc %s\n"), reloc->howto->name);
+ _bfd_error_handler (_("%pB: %s unsupported"), abfd, reloc->howto->name);
break;
}
(bfd *);
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.
Used for the MIPS ELF .mdebug section. */
/* Set the howto pointer for an MN10300 ELF reloc. */
static void
-mn10300_info_to_howto (bfd *abfd ATTRIBUTE_UNUSED,
+mn10300_info_to_howto (bfd *abfd,
arelent *cache_ptr,
Elf_Internal_Rela *dst)
{
if (r_type >= R_MN10300_MAX)
{
/* xgettext:c-format */
- _bfd_error_handler (_("%pB: unrecognised MN10300 reloc number: %d"),
+ _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
abfd, r_type);
bfd_set_error (bfd_error_bad_value);
r_type = R_MN10300_NONE;
return TRUE;
fail:
- _bfd_error_handler
- /* xgettext:c-format */
- (_("%pB: unsupported relocation type %s"),
- abfd, areloc->howto->name);
+ /* xgettext:c-format */
+ _bfd_error_handler (_("%pB: %s unsupported"),
+ abfd, areloc->howto->name);
bfd_set_error (bfd_error_bad_value);
return FALSE;
}
/* Set the howto pointer for an AVR ELF reloc. */
static void
-avr_info_to_howto_rela (bfd *abfd ATTRIBUTE_UNUSED,
+avr_info_to_howto_rela (bfd *abfd,
arelent *cache_ptr,
Elf_Internal_Rela *dst)
{
if (r_type >= (unsigned int) R_AVR_max)
{
/* 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;
}
cache_ptr->howto = &elf_avr_howto_table[r_type];
bad_reloc:
_bfd_error_handler
/* xgettext:c-format */
- (_("%pB: unsupported relocation type %d"),
+ (_("%pB: unsupported relocation type %#x"),
abfd, (int) ELF32_R_TYPE (rel->r_info));
return FALSE;
}
/* We can only relocate absolute longword relocs at run time. */
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);
goto error_return;
}
/* Retrieve a howto ptr using a BFD reloc_code. */
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)
{
unsigned int i;
if (code == cr16_reloc_map[i].bfd_reloc_enum)
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;
}
/* Retrieve a howto ptr using an internal relocation entry. */
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)
{
unsigned int r_type = ELF32_R_TYPE (dst->r_info);
if (r_type >= R_CR16_MAX)
{
/* xgettext:c-format */
- _bfd_error_handler (_("%pB: unrecognised CR16 reloc number: %d"),
+ _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
abfd, r_type);
bfd_set_error (bfd_error_bad_value);
r_type = R_CR16_NONE;
if (!((ELF32_R_TYPE (irel->r_info) == (int) R_CR16_NUM32a)
|| (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);
goto error_return;
}
if (r_type >= RINDEX_16C_MAX)
{
/* 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;
}
cache_ptr->howto = &elf_howto_table[r_type];
if (r_type >= R_CRIS_max)
{
/* 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;
}
cache_ptr->howto = & cris_elf_howto_table [r_type];
/* Retrieve a howto ptr using an internal relocation entry. */
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)
{
unsigned int r_type = ELF32_R_TYPE (dst->r_info);
if (r_type >= R_CRX_MAX)
{
/* xgettext:c-format */
- _bfd_error_handler (_("%pB: unrecognised CRX reloc number: %d"),
+ _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
abfd, r_type);
bfd_set_error (bfd_error_bad_value);
r_type = R_CRX_NONE;
/* Set the howto pointer for an D10V ELF reloc. */
static void
-d10v_info_to_howto_rel (bfd *abfd ATTRIBUTE_UNUSED,
+d10v_info_to_howto_rel (bfd *abfd,
arelent *cache_ptr,
Elf_Internal_Rela *dst)
{
if (r_type >= (unsigned int) R_D10V_max)
{
/* 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;
}
cache_ptr->howto = &elf_d10v_howto_table[r_type];
/* Set the howto pointer for an D30V ELF reloc (type REL). */
static void
-d30v_info_to_howto_rel (bfd *abfd ATTRIBUTE_UNUSED,
+d30v_info_to_howto_rel (bfd *abfd,
arelent *cache_ptr,
Elf_Internal_Rela *dst)
{
if (r_type >= (unsigned int) R_D30V_max)
{
/* 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;
}
cache_ptr->howto = &elf_d30v_howto_table[r_type];
/* Set the howto pointer for an D30V ELF reloc (type RELA). */
static void
-d30v_info_to_howto_rela (bfd *abfd ATTRIBUTE_UNUSED,
+d30v_info_to_howto_rela (bfd *abfd,
arelent *cache_ptr,
Elf_Internal_Rela *dst)
{
if (r_type >= (unsigned int) R_D30V_max)
{
/* 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;
}
cache_ptr->howto = &elf_d30v_howto_table[r_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)
{
default:
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;
}
return & dlx_elf_howto_table[r_type];
}
static void
-elf32_dlx_info_to_howto_rel (bfd *abfd ATTRIBUTE_UNUSED,
+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);
+ cache_ptr->howto = dlx_rtype_to_howto (abfd, r_type);
return;
}
/* Set the howto pointer for a EPIPHANY ELF reloc. */
static void
-epiphany_info_to_howto_rela (bfd * abfd ATTRIBUTE_UNUSED,
+epiphany_info_to_howto_rela (bfd * abfd,
arelent * cache_ptr,
Elf_Internal_Rela * dst)
{
if (r_type >= (unsigned int) R_EPIPHANY_max)
{
/* 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;
}
cache_ptr->howto = & epiphany_elf_howto_table [r_type];
if (r_type >= (unsigned int) R_FR30_max)
{
/* 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;
}
cache_ptr->howto = & fr30_elf_howto_table [r_type];
if (r_type >= (unsigned int) R_FRV_max)
{
/* 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;
}
cache_ptr->howto = & elf32_frv_howto_table [r_type];
default:
bad_reloc:
- info->callbacks->einfo
- /* xgettext:c-format */
- (_("%pB: unsupported relocation type %i\n"),
- abfd, ELF32_R_TYPE (rel->r_info));
+ /* xgettext:c-format */
+ _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
+ abfd, (unsigned int) ELF32_R_TYPE (rel->r_info));
return FALSE;
}
}
/* Set the howto pointer for an i370 ELF reloc. */
static void
-i370_elf_info_to_howto (bfd *abfd ATTRIBUTE_UNUSED,
+i370_elf_info_to_howto (bfd *abfd,
arelent *cache_ptr,
Elf_Internal_Rela *dst)
{
if (r_type >= R_I370_max)
{
/* xgettext:c-format */
- _bfd_error_handler (_("%pB: unrecognised I370 reloc number: %d"),
+ _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
abfd, r_type);
bfd_set_error (bfd_error_bad_value);
r_type = R_I370_NONE;
|| !i370_elf_howto_table[(int)r_type])
{
/* xgettext:c-format */
- _bfd_error_handler (_("%pB: unknown relocation type %d"),
+ _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
input_bfd, (int) r_type);
bfd_set_error (bfd_error_bad_value);
{
default:
_bfd_error_handler
- (_("%pB: unknown relocation type %d for symbol %s"),
- input_bfd, (int) r_type, sym_name);
+ (_("%pB: unsupported relocation type %#x"),
+ input_bfd, (int) r_type);
bfd_set_error (bfd_error_bad_value);
ret = FALSE;
>= R_386_vt - R_386_ext2))
{
/* xgettext:c-format */
- _bfd_error_handler (_("%pB: invalid relocation type %d"),
- abfd, (int) r_type);
+ _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
+ abfd, r_type);
indx = R_386_NONE;
}
/* PR 17512: file: 0f67f69d. */
if (type >= R_960_max)
{
/* 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;
}
/* Set the howto pointer for a IP2K ELF reloc. */
static void
-ip2k_info_to_howto_rela (bfd * abfd ATTRIBUTE_UNUSED,
+ip2k_info_to_howto_rela (bfd * abfd,
arelent * cache_ptr,
Elf_Internal_Rela * dst)
{
if (r_type >= (unsigned int) R_IP2K_max)
{
/* 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;
}
cache_ptr->howto = & ip2k_elf_howto_table [r_type];
if (r_type >= (unsigned int) R_IQ2000_max)
{
/* 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;
}
cache_ptr->howto = & iq2000_elf_howto_table [r_type];
/* Set the howto pointer for an Lattice Mico32 ELF reloc. */
static void
-lm32_info_to_howto_rela (bfd *abfd ATTRIBUTE_UNUSED,
+lm32_info_to_howto_rela (bfd *abfd,
arelent *cache_ptr,
Elf_Internal_Rela *dst)
{
if (r_type >= (unsigned int) R_LM32_max)
{
/* 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;
}
cache_ptr->howto = &lm32_elf_howto_table[r_type];
/* Set the howto pointer for an M32C ELF reloc. */
static void
-m32c_info_to_howto_rela
- (bfd * abfd ATTRIBUTE_UNUSED,
- arelent * cache_ptr,
- Elf_Internal_Rela * dst)
+m32c_info_to_howto_rela (bfd *abfd,
+ arelent *cache_ptr,
+ Elf_Internal_Rela *dst)
{
unsigned int r_type;
if (r_type >= (unsigned int) R_M32C_max)
{
/* 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;
}
cache_ptr->howto = & m32c_elf_howto_table [r_type];
if (r_type > (unsigned int) R_M32R_GNU_VTENTRY)
{
/* 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;
}
cache_ptr->howto = &m32r_elf_howto_table[r_type];
if (r_type < 0 || r_type >= (int) R_M32R_max)
{
/* xgettext:c-format */
- _bfd_error_handler (_("%pB: unknown relocation type %d"),
+ _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
input_bfd, (int) r_type);
bfd_set_error (bfd_error_bad_value);
ret = FALSE;
/* Set the howto pointer for an M68HC11 ELF reloc. */
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)
{
unsigned int r_type;
if (r_type >= (unsigned int) R_M68HC11_max)
{
/* 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;
}
cache_ptr->howto = &elf_m68hc11_howto_table[r_type];
/* Set the howto pointer for an M68HC11 ELF reloc. */
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)
{
unsigned int r_type;
if (r_type >= (unsigned int) R_M68HC11_max)
{
/* 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;
}
cache_ptr->howto = &elf_m68hc11_howto_table[r_type];
if (indx >= (unsigned int) R_68K_max)
{
/* xgettext:c-format */
- _bfd_error_handler (_("%pB: invalid relocation type %d"),
- abfd, (int) indx);
+ _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
+ abfd, indx);
indx = R_68K_NONE;
}
cache_ptr->howto = &howto_table[indx];
/* We can only relocate absolute longword relocs at run time. */
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);
goto error_return;
}
BFD_ASSERT (reloc_entry->howto != (reloc_howto_type *)0);
/* xgettext:c-format */
- _bfd_error_handler (_("%pB: Relocation %s (%d) is not currently supported.\n"),
+ _bfd_error_handler (_("%pB: %s unsupported"),
abfd,
- reloc_entry->howto->name,
- reloc_entry->howto->type);
+ reloc_entry->howto->name);
return bfd_reloc_notsupported;
}
/* Set the howto pointer for a RCE ELF reloc. */
static void
-mcore_elf_info_to_howto (bfd * abfd ATTRIBUTE_UNUSED,
+mcore_elf_info_to_howto (bfd * abfd,
arelent * cache_ptr,
Elf_Internal_Rela * dst)
{
if (r_type >= R_MCORE_max)
{
/* xgettext:c-format */
- _bfd_error_handler (_("%pB: unrecognised MCore reloc number: %d"),
+ _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
abfd, r_type);
bfd_set_error (bfd_error_bad_value);
r_type = R_MCORE_NONE;
|| ! mcore_elf_howto_table [(int)r_type])
{
/* 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);
bfd_set_error (bfd_error_bad_value);
if (howto->special_function == mcore_elf_unsupported_reloc)
{
/* xgettext:c-format */
- _bfd_error_handler (_("%pB: Relocation %s (%d) is not currently supported.\n"),
+ _bfd_error_handler (_("%pB: %s unsupported"),
input_bfd,
- howto->name,
- (int)r_type);
+ howto->name);
bfd_set_error (bfd_error_bad_value);
ret = FALSE;
/* Set the howto pointer for a MEP ELF reloc. */
static void
-mep_info_to_howto_rela
- (bfd * abfd ATTRIBUTE_UNUSED,
- arelent * cache_ptr,
- Elf_Internal_Rela * dst)
+mep_info_to_howto_rela (bfd *abfd,
+ arelent *cache_ptr,
+ Elf_Internal_Rela *dst)
{
unsigned int r_type;
if (r_type >= R_MEP_max)
{
/* 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;
}
cache_ptr->howto = & mep_elf_howto_table [r_type];
}
static void
-metag_info_to_howto_rela (bfd *abfd ATTRIBUTE_UNUSED,
+metag_info_to_howto_rela (bfd *abfd,
arelent *cache_ptr,
Elf_Internal_Rela *dst)
{
if (r_type >= (unsigned int) R_METAG_MAX)
{
/* 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;
}
cache_ptr->howto = & elf_metag_howto_table [r_type];
/* Set the howto pointer for a RCE ELF reloc. */
static void
-microblaze_elf_info_to_howto (bfd * abfd ATTRIBUTE_UNUSED,
+microblaze_elf_info_to_howto (bfd * abfd,
arelent * cache_ptr,
Elf_Internal_Rela * dst)
{
if (r_type >= R_MICROBLAZE_max)
{
/* xgettext:c-format */
- _bfd_error_handler (_("%pB: unrecognised MicroBlaze reloc number: %d"),
+ _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
abfd, r_type);
bfd_set_error (bfd_error_bad_value);
r_type = R_MICROBLAZE_NONE;
if (r_type < 0 || r_type >= (int) R_MICROBLAZE_max)
{
/* xgettext:c-format */
- _bfd_error_handler (_("%pB: unknown relocation type %d"),
+ _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
input_bfd, (int) r_type);
bfd_set_error (bfd_error_bad_value);
ret = FALSE;
(bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
static reloc_howto_type *bfd_elf32_bfd_reloc_type_lookup
(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
(bfd *, arelent *, Elf_Internal_Rela *);
static void mips_info_to_howto_rela
/* Given a MIPS Elf_Internal_Rel, fill in an arelent structure. */
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)
{
switch (r_type)
return &elf_mips16_howto_table_rel[r_type - R_MIPS16_min];
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);
r_type = R_MIPS_NONE;
}
r_type = ELF32_R_TYPE (dst->r_info);
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
value for the object file. We get the addend now, rather than
/* Set the howto pointer for an MOXIE ELF reloc. */
static void
-moxie_info_to_howto_rela (bfd *abfd ATTRIBUTE_UNUSED,
+moxie_info_to_howto_rela (bfd *abfd,
arelent *cache_ptr,
Elf_Internal_Rela *dst)
{
if (r_type >= (unsigned int) R_MOXIE_max)
{
/* 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;
}
cache_ptr->howto = & moxie_elf_howto_table [r_type];
/* Set the howto pointer for an MSP430 ELF reloc. */
static void
-msp430_info_to_howto_rela (bfd * abfd ATTRIBUTE_UNUSED,
+msp430_info_to_howto_rela (bfd * abfd,
arelent * cache_ptr,
Elf_Internal_Rela * dst)
{
if (r_type >= (unsigned int) R_MSP430x_max)
{
/* 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;
}
cache_ptr->howto = elf_msp430x_howto_table + r_type;
if (r_type >= (unsigned int) R_MSP430_max)
{
/* 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;
}
cache_ptr->howto = &elf_msp430_howto_table[r_type];
/* Set the howto pointer for a MT ELF reloc. */
static void
-mt_info_to_howto_rela
- (bfd * abfd ATTRIBUTE_UNUSED,
- arelent * cache_ptr,
- Elf_Internal_Rela * dst)
+mt_info_to_howto_rela (bfd *abfd,
+ arelent *cache_ptr,
+ Elf_Internal_Rela *dst)
{
unsigned int r_type;
if (r_type >= (unsigned int) R_MT_max)
{
/* 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;
}
cache_ptr->howto = & mt_elf_howto_table [r_type];
if (r_type > R_NDS32_GNU_VTENTRY)
{
/* 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;
}
cache_ptr->howto = bfd_elf32_bfd_reloc_type_table_lookup (r_type);
if (r_type >= R_NDS32_max)
{
/* xgettext:c-format */
- _bfd_error_handler (_("%pB: error: unknown relocation type %d."),
+ _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
input_bfd, r_type);
bfd_set_error (bfd_error_bad_value);
ret = FALSE;
/* Set the howto pointer for an Or1k ELF reloc. */
static void
-or1k_info_to_howto_rela (bfd * abfd ATTRIBUTE_UNUSED,
+or1k_info_to_howto_rela (bfd * abfd,
arelent * cache_ptr,
Elf_Internal_Rela * dst)
{
if (r_type >= (unsigned int) R_OR1K_max)
{
/* 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;
}
cache_ptr->howto = & or1k_elf_howto_table[r_type];
/* Given an ELF reloc, fill in the howto field of a relent. */
static void
-pj_elf_info_to_howto (bfd *abfd ATTRIBUTE_UNUSED,
+pj_elf_info_to_howto (bfd *abfd,
arelent *cache_ptr,
Elf_Internal_Rela *dst)
{
if (r >= R_PJ_max)
{
/* xgettext:c-format */
- _bfd_error_handler (_("%pB: unrecognised PicoJava reloc number: %d"),
+ _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
abfd, r);
bfd_set_error (bfd_error_bad_value);
r = R_PJ_NONE;
if (r_type >= R_PPC_max)
{
/* xgettext:c-format */
- _bfd_error_handler (_("%pB: unsupported reloc type %#x"),
+ _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
abfd, r_type);
bfd_set_error (bfd_error_bad_value);
r_type = R_PPC_NONE;
if (!cache_ptr->howto)
{
/* xgettext:c-format */
- _bfd_error_handler (_("%pB: unsupported reloc type %#x"),
+ _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
abfd, r_type);
bfd_set_error (bfd_error_bad_value);
if (r_type >= (unsigned int) R_RL78_max)
{
/* 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;
}
cache_ptr->howto = rl78_elf_howto_table + r_type;
/* Set the howto pointer for an RX ELF reloc. */
static void
-rx_info_to_howto_rela (bfd * abfd ATTRIBUTE_UNUSED,
- arelent * cache_ptr,
- Elf_Internal_Rela * dst)
+rx_info_to_howto_rela (bfd *abfd,
+ arelent *cache_ptr,
+ Elf_Internal_Rela *dst)
{
unsigned int r_type;
if (r_type >= (unsigned int) R_RX_max)
{
/* 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;
}
cache_ptr->howto = rx_elf_howto_table + r_type;
if (r_type >= sizeof (elf_howto_table) / sizeof (elf_howto_table[0]))
{
/* xgettext:c-format */
- _bfd_error_handler (_("%pB: invalid relocation type %d"),
- abfd, (int) r_type);
+ _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
+ abfd, r_type);
r_type = R_390_NONE;
}
cache_ptr->howto = &elf_howto_table[r_type];
|| (r >= R_SH_FIRST_INVALID_RELOC_6 && r <= R_SH_LAST_INVALID_RELOC_6))
{
/* xgettext:c-format */
- _bfd_error_handler (_("%pB: unrecognised SH reloc number: %d"),
+ _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
abfd, r);
bfd_set_error (bfd_error_bad_value);
r = R_SH_NONE;
}
static void
-spu_elf_info_to_howto (bfd *abfd ATTRIBUTE_UNUSED,
+spu_elf_info_to_howto (bfd *abfd,
arelent *cache_ptr,
Elf_Internal_Rela *dst)
{
if (r_type >= R_SPU_max)
{
/* xgettext:c-format */
- _bfd_error_handler (_("%pB: unrecognised SPU reloc number: %d"),
+ _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
abfd, r_type);
bfd_set_error (bfd_error_bad_value);
r_type = R_SPU_NONE;
default:
/* Unknown relocation. */
/* xgettext:c-format */
- _bfd_error_handler (_("%pB: invalid relocation type %d"),
+ _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
input_bfd, r_type);
ok = FALSE;
continue;
{
default:
#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
return bfd_reloc_notsupported;
/* Set the howto pointer for an V850 ELF reloc. */
static void
-v850_elf_info_to_howto_rel (bfd *abfd ATTRIBUTE_UNUSED,
+v850_elf_info_to_howto_rel (bfd *abfd,
arelent *cache_ptr,
Elf_Internal_Rela *dst)
{
if (r_type >= (unsigned int) R_V850_max)
{
/* 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;
}
cache_ptr->howto = &v850_elf_howto_table[r_type];
/* Set the howto pointer for a V850 ELF reloc (type RELA). */
static void
-v850_elf_info_to_howto_rela (bfd *abfd ATTRIBUTE_UNUSED,
- arelent * cache_ptr,
+v850_elf_info_to_howto_rela (bfd *abfd,
+ arelent *cache_ptr,
Elf_Internal_Rela *dst)
{
unsigned int r_type;
if (r_type >= (unsigned int) R_V850_max)
{
/* 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;
}
cache_ptr->howto = &v850_elf_howto_table[r_type];
default:
#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
return bfd_reloc_notsupported;
}
if (r_type >= R_VAX_max)
{
/* xgettext:c-format */
- _bfd_error_handler (_("%pB: unrecognised VAX reloc number: %d"),
+ _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
abfd, r_type);
bfd_set_error (bfd_error_bad_value);
r_type = R_VAX_NONE;
/* Set the howto pointer for a VISIUM ELF reloc. */
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)
{
unsigned int r_type = ELF32_R_TYPE (dst->r_info);
if (r_type >= (unsigned int) R_VISIUM_max)
{
/* 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;
}
cache_ptr->howto = &visium_elf_howto_table[r_type];
if (i >= ARRAY_SIZE (elf32_wasm32_howto_table))
{
/* xgettext:c-format */
- _bfd_error_handler (_("%pB: invalid relocation type %d"),
- abfd, (int) r_type);
+ _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
+ abfd, r_type);
i = R_WASM32_NONE;
}
/* Translate the ELF-internal relocation RELA into CACHE_PTR. */
static void
-elf32_wasm32_info_to_howto_rela (bfd *abfd ATTRIBUTE_UNUSED,
+elf32_wasm32_info_to_howto_rela (bfd *abfd,
arelent *cache_ptr,
Elf_Internal_Rela *dst)
{
/* Set the howto pointer for an XGATE ELF reloc. */
static void
-xgate_info_to_howto_rel (bfd *abfd ATTRIBUTE_UNUSED,
+xgate_info_to_howto_rel (bfd *abfd,
arelent *cache_ptr,
Elf_Internal_Rela *dst)
{
if (r_type >= (unsigned int) R_XGATE_max)
{
/* 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;
}
cache_ptr->howto = &elf_xgate_howto_table[r_type];
it in the BFD internal arelent representation of the relocation. */
static void
-elf_xtensa_info_to_howto_rela (bfd *abfd ATTRIBUTE_UNUSED,
+elf_xtensa_info_to_howto_rela (bfd *abfd,
arelent *cache_ptr,
Elf_Internal_Rela *dst)
{
if (r_type >= (unsigned int) R_XTENSA_max)
{
/* 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;
}
cache_ptr->howto = &elf_howto_table[r_type];
/* Given an Alpha ELF reloc type, fill in an arelent structure. */
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)
{
unsigned r_type = ELF64_R_TYPE(dst->r_info);
if (r_type >= R_ALPHA_max)
{
/* xgettext:c-format */
- _bfd_error_handler (_("%pB: unrecognised Alpha reloc number: %d"),
+ _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
abfd, r_type);
bfd_set_error (bfd_error_bad_value);
r_type = R_ALPHA_NONE;
{
_bfd_error_handler
/* xgettext:c-format */
- (_("%pB: unknown relocation type %d"),
+ (_("%pB: unsupported relocation type %#x"),
input_bfd, (int) r_type);
bfd_set_error (bfd_error_bad_value);
ret_val = FALSE;
{
_bfd_error_handler
/* xgettext:c-format */
- (_("%pB: unknown relocation type %d"),
+ (_("%pB: unsupported relocation type %#x"),
input_bfd, (int) r_type);
bfd_set_error (bfd_error_bad_value);
ret_val = FALSE;
r_type = ELF64_R_TYPE (rel->r_info);
if (r_type > R_IA64_MAX_RELOC_CODE)
{
- _bfd_error_handler
- /* xgettext:c-format */
- (_("%pB: unknown relocation type %d"),
- input_bfd, (int) r_type);
+ /* xgettext:c-format */
+ _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
+ input_bfd, (int) r_type);
bfd_set_error (bfd_error_bad_value);
ret_val = FALSE;
continue;
(bfd *, const Elf_Internal_Rela *, bfd_byte *);
static reloc_howto_type *bfd_elf64_bfd_reloc_type_lookup
(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
(bfd *, arelent *, Elf_Internal_Rela *);
static void mips_elf64_info_to_howto_rela
/* Given a MIPS Elf_Internal_Rel, fill in an arelent structure. */
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)
{
}
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);
r_type = R_MIPS_NONE;
}
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;
}
/* Set the howto pointer for an MMIX ELF reloc (type RELA). */
static void
-mmix_info_to_howto_rela (bfd *abfd ATTRIBUTE_UNUSED,
+mmix_info_to_howto_rela (bfd *abfd,
arelent *cache_ptr,
Elf_Internal_Rela *dst)
{
if (r_type >= (unsigned int) R_MMIX_max)
{
/* 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;
}
cache_ptr->howto = &elf_mmix_howto_table[r_type];
if (type >= ARRAY_SIZE (ppc64_elf_howto_table))
{
/* xgettext:c-format */
- _bfd_error_handler (_("%pB: unsupported reloc type %#x"),
+ _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
abfd, type);
type = R_PPC64_NONE;
}
if (r_type >= sizeof (elf_howto_table) / sizeof (elf_howto_table[0]))
{
/* xgettext:c-format */
- _bfd_error_handler (_("%pB: invalid relocation type %d"),
- abfd, (int) r_type);
+ _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
+ abfd, r_type);
r_type = R_390_NONE;
}
cache_ptr->howto = &elf_howto_table[r_type];
r_type = ELF64_R_TYPE_ID (rela.r_info);
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++;
relent->sym_ptr_ptr = bfd_abs_section_ptr->symbol_ptr_ptr;
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
- 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;
if (r_type >= (unsigned int) R_X86_64_standard)
{
/* xgettext:c-format */
- _bfd_error_handler (_("%pB: invalid relocation type %d"),
- abfd, (int) r_type);
+ _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
+ abfd, r_type);
r_type = R_X86_64_NONE;
}
i = r_type;
(bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
static reloc_howto_type *bfd_elf32_bfd_reloc_type_lookup
(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
(bfd *, arelent *, Elf_Internal_Rela *);
static void mips_info_to_howto_rela
/* Given a MIPS Elf_Internal_Rel, fill in an arelent structure. */
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)
{
}
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);
r_type = R_MIPS_NONE;
}
unsigned int r_type;
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
value for the object file. We get the addend now, rather than
/* Given a MIPS Elf_Internal_Rela, fill in an arelent structure. */
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)
{
unsigned int r_type;
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;
}
\f
/* Given R_TYPE, return the bfd internal relocation enumerator. */
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;
/* Indexed by R_TYPE, values are offsets in the howto_table. */
/* PR 17512: file: b371e70a. */
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);
return BFD_RELOC_AARCH64_NONE;
}
}
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;
reloc_howto_type *howto;
if (r_type == R_AARCH64_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);
if (howto != NULL)
}
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)
{
unsigned int r_type;
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 *
reloc_howto_type *howto;
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
+ 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);
return _bfd_aarch64_elf_put_addend (input_bfd,
input_section->contents + offset, r_type,
unsigned long r_symndx)
{
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))
return bfd_r_type;
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_TLSGD_ADR_PAGE21:
r_symndx = ELFNN_R_SYM (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)
return _bfd_unrecognized_reloc (input_bfd, input_section, r_type);
h, &unresolved_reloc,
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_ADR_PAGE21:
bfd_elfNN_swap_reloca_out (output_bfd, &rela, loc);
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
|| real_type == BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21
if (r != bfd_reloc_ok && r != bfd_reloc_continue)
{
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)
{
r_type = ELFNN_R_TYPE (rel->r_info);
if (r_type > R_IA64_MAX_RELOC_CODE)
{
- _bfd_error_handler
- /* xgettext:c-format */
- (_("%pB: unknown relocation type %d"), input_bfd, (int) r_type);
+ /* xgettext:c-format */
+ _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
+ input_bfd, (int) r_type);
bfd_set_error (bfd_error_bad_value);
ret_val = FALSE;
continue;
== RISCV_ELF_DATA ? ((struct riscv_elf_link_hash_table *) ((p)->hash)) : NULL)
static void
-riscv_info_to_howto_rela (bfd *abfd ATTRIBUTE_UNUSED,
+riscv_info_to_howto_rela (bfd *abfd,
arelent *cache_ptr,
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
(*_bfd_error_handler)
(_("%pB: relocation %s against `%s' can not be used when making a shared "
"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");
bfd_set_error (bfd_error_bad_value);
return FALSE;
symbol. */
if ((bfd_link_pic (info)
&& (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
&& (! info->symbolic
|| h->root.type == bfd_link_hash_defweak
}
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;
bfd_boolean unresolved_reloc, is_ie = FALSE;
bfd_vma pc = sec_addr (input_section) + rel->r_offset;
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;
if (r_type == R_RISCV_GNU_VTINHERIT || r_type == R_RISCV_GNU_VTENTRY)
howto,
input_bfd);
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,
relocation, absolute))
r = bfd_reloc_overflow;
howto,
input_bfd);
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,
relocation + rel->r_addend,
absolute))
_bfd_elf_add_dynamic_entry (info, tag, val)
#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. */
#define MIPS_ELF_REL_DYN_NAME(INFO) \
}
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))
{
- (*_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);
return NULL;
}
riscv_reloc_type_lookup (bfd *, bfd_reloc_code_real_type);
extern reloc_howto_type *
-riscv_elf_rtype_to_howto (unsigned int r_type);
+riscv_elf_rtype_to_howto (bfd *, unsigned int r_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)
{
default:
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;
}
return &_bfd_sparc_elf_howto_table[r_type];
((r_info) & 0xff)
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)
{
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);
}
\f
extern void _bfd_sparc_elf_info_to_howto
(bfd *, arelent *, Elf_Internal_Rela *);
extern reloc_howto_type *_bfd_sparc_elf_info_to_howto_ptr
- (unsigned int);
+ (bfd*, unsigned int);
extern bfd_boolean _bfd_sparc_elf_mkobject
(bfd *);
extern struct bfd_link_hash_table *_bfd_sparc_elf_link_hash_table_create
_bfd_unrecognized_reloc (bfd * abfd, sec_ptr section, unsigned int r_type)
{
/* 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);
/* PR 21803: Suggest the most likely cause of this error. */