aboutsummaryrefslogtreecommitdiff
path: root/bfd/elfnn-riscv.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2018-02-21 21:47:07 +1030
committerAlan Modra <amodra@gmail.com>2018-02-26 09:28:27 +1030
commit0aa13feeeb78fc9323bee329c4d91c30f25de121 (patch)
tree4df9139ef73182bdeb894c97be4c09b3364cc337 /bfd/elfnn-riscv.c
parentcf97bcb0c3f33460e9cfa57a2890df1c38a497d7 (diff)
downloadgdb-0aa13feeeb78fc9323bee329c4d91c30f25de121.zip
gdb-0aa13feeeb78fc9323bee329c4d91c30f25de121.tar.gz
gdb-0aa13feeeb78fc9323bee329c4d91c30f25de121.tar.bz2
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.
Diffstat (limited to 'bfd/elfnn-riscv.c')
-rw-r--r--bfd/elfnn-riscv.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/bfd/elfnn-riscv.c b/bfd/elfnn-riscv.c
index 2e54a4e..6403af9 100644
--- a/bfd/elfnn-riscv.c
+++ b/bfd/elfnn-riscv.c
@@ -122,11 +122,11 @@ struct riscv_elf_link_hash_table
== 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
@@ -470,7 +470,7 @@ bad_static_reloc (bfd *abfd, unsigned r_type, struct elf_link_hash_entry *h)
(*_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;
@@ -626,7 +626,7 @@ riscv_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
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
@@ -696,7 +696,7 @@ riscv_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
}
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;
@@ -1724,7 +1724,7 @@ riscv_elf_relocate_section (bfd *output_bfd,
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)
@@ -1888,7 +1888,7 @@ riscv_elf_relocate_section (bfd *output_bfd,
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;
@@ -1984,7 +1984,7 @@ riscv_elf_relocate_section (bfd *output_bfd,
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))