/* TILE-Gx-specific support for ELF.
- Copyright (C) 2011-2018 Free Software Foundation, Inc.
+ Copyright (C) 2011-2019 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
}
reloc_howto_type *
-tilegx_reloc_type_lookup (bfd * abfd ATTRIBUTE_UNUSED,
+tilegx_reloc_type_lookup (bfd * abfd,
bfd_reloc_code_real_type code)
{
unsigned int i;
- entry->table[0].type);
}
+ /* xgettext:c-format */
+ _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
+ abfd, (int) code);
+ bfd_set_error (bfd_error_bad_value);
return NULL;
}
return NULL;
}
-void
+bfd_boolean
tilegx_info_to_howto_rela (bfd *abfd ATTRIBUTE_UNUSED,
arelent *cache_ptr,
Elf_Internal_Rela *dst)
if (r_type <= (unsigned int) R_TILEGX_IMM8_Y1_TLS_ADD)
cache_ptr->howto = &tilegx_elf_howto_table [r_type];
else if (r_type - R_TILEGX_GNU_VTINHERIT
- <= (unsigned int) R_TILEGX_GNU_VTENTRY)
+ <= ((unsigned int) R_TILEGX_GNU_VTENTRY
+ - (unsigned int) R_TILEGX_GNU_VTINHERIT))
cache_ptr->howto
= &tilegx_elf_howto_table2 [r_type - R_TILEGX_GNU_VTINHERIT];
else
- abort ();
+ {
+ /* xgettext:c-format */
+ _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
+ abfd, r_type);
+ bfd_set_error (bfd_error_bad_value);
+ return FALSE;
+ }
+ return TRUE;
}
typedef tilegx_bundle_bits (*tilegx_create_func)(int);
(bed->dynamic_sec_flags
| SEC_READONLY));
if (s == NULL
- || ! bfd_set_section_alignment (abfd, s, bed->s->log_file_align))
+ || !bfd_set_section_alignment (s, bed->s->log_file_align))
return FALSE;
htab->srelgot = s;
s = s_got = bfd_make_section_anyway_with_flags (abfd, ".got", flags);
if (s == NULL
- || !bfd_set_section_alignment (abfd, s, bed->s->log_file_align))
+ || !bfd_set_section_alignment (s, bed->s->log_file_align))
return FALSE;
htab->sgot = s;
{
s = bfd_make_section_anyway_with_flags (abfd, ".got.plt", flags);
if (s == NULL
- || !bfd_set_section_alignment (abfd, s,
- bed->s->log_file_align))
+ || !bfd_set_section_alignment (s, bed->s->log_file_align))
return FALSE;
htab->sgotplt = s;
name = (bfd_elf_string_from_elf_section
(input_bfd, symtab_hdr->sh_link, sym->st_name));
if (name == NULL || *name == '\0')
- name = bfd_section_name (input_bfd, sec);
+ name = bfd_section_name (sec);
}
switch (r_type)
rel->r_offset) != (bfd_vma) -1)
_bfd_error_handler
/* xgettext:c-format */
- (_("%pB(%pA+%#Lx): unresolvable %s relocation against symbol `%s'"),
+ (_("%pB(%pA+%#" PRIx64 "): "
+ "unresolvable %s relocation against symbol `%s'"),
input_bfd,
input_section,
- rel->r_offset,
+ (uint64_t) rel->r_offset,
howto->name,
h->root.root.string);
{
_bfd_error_handler
/* xgettext:c-format */
- (_("%pB: Cannot link together %s and %s objects."),
+ (_("%pB: cannot link together %s and %s objects"),
ibfd, targ1, targ2);
bfd_set_error (bfd_error_bad_value);
return FALSE;