/* CRIS-specific support for 32-bit ELF.
- Copyright (C) 2000-2018 Free Software Foundation, Inc.
+ Copyright (C) 2000-2019 Free Software Foundation, Inc.
Contributed by Axis Communications AB.
Written by Hans-Peter Nilsson, based on elf32-fr30.c
PIC and shlib bits based primarily on elf32-m68k.c and elf32-i386.c.
/* Set the howto pointer for an CRIS ELF reloc. */
-static void
+static bfd_boolean
cris_info_to_howto_rela (bfd * abfd ATTRIBUTE_UNUSED,
arelent * cache_ptr,
Elf_Internal_Rela * dst)
/* xgettext:c-format */
_bfd_error_handler (_("%pB: unsupported relocation type %#x"),
abfd, r_type);
- r_type = 0;
+ bfd_set_error (bfd_error_bad_value);
+ return FALSE;
}
cache_ptr->howto = & cris_elf_howto_table [r_type];
+ return TRUE;
}
bfd_reloc_status_type
_bfd_error_handler
((h->got.offset == (bfd_vma) -1)
/* xgettext:c-format */
- ? _("%pB, section %pA: No PLT nor GOT for relocation %s"
+ ? _("%pB, section %pA: no PLT nor GOT for relocation %s"
" against symbol `%s'")
/* xgettext:c-format */
- : _("%pB, section %pA: No PLT for relocation %s"
+ : _("%pB, section %pA: no PLT for relocation %s"
" against symbol `%s'"),
input_bfd,
input_section,
{
_bfd_error_handler
/* xgettext:c-format */
- (_("%pB, section %pA:\n v10/v32 compatible object"
+ (_("%pB, section %pA: v10/v32 compatible object"
" must not contain a PIC relocation"),
abfd, sec);
return FALSE;
/* FIXME: How do we make this optionally a warning only? */
_bfd_error_handler
/* xgettext:c-format */
- (_("%pB, section %pA:\n relocation %s should not"
+ (_("%pB, section %pA: relocation %s should not"
" be used in a shared object; recompile with -fPIC"),
abfd,
sec,
/* This relocation describes which C++ vtable entries are actually
used. Record for later use during GC. */
case R_CRIS_GNU_VTENTRY:
- BFD_ASSERT (h != NULL);
- if (h != NULL
- && !bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend))
+ if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend))
return FALSE;
break;
/* FIXME: How do we make this optionally a warning only? */
_bfd_error_handler
/* xgettext:c-format */
- (_("%pB, section `%pA', to symbol `%s':\n"
- " relocation %s should not be used"
+ (_("%pB, section `%pA', to symbol `%s':"
+ " relocation %s should not be used"
" in a shared object; recompile with -fPIC"),
s->section->owner,
s->section,
default:
_bfd_abort (__FILE__, __LINE__,
- _("Unexpected machine number"));
+ _("unexpected machine number"));
}
elf_elfheader (abfd)->e_flags = e_flags;