X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=bfd%2Felf32-epiphany.c;h=c45f0b35042877cc051ffe5984ac2887f101637a;hb=0394eed15c5bf24943850f356785152c3d65ab94;hp=9840da5141942e6417aba6b38482f12ff94ab59f;hpb=07d6d2b8345ef3dc82eab49635acac9ee67dbb18;p=deliverable%2Fbinutils-gdb.git diff --git a/bfd/elf32-epiphany.c b/bfd/elf32-epiphany.c index 9840da5141..c45f0b3504 100644 --- a/bfd/elf32-epiphany.c +++ b/bfd/elf32-epiphany.c @@ -1,5 +1,5 @@ /* Adapteva epiphany specific support for 32-bit ELF - Copyright (C) 2000-2017 Free Software Foundation, Inc. + Copyright (C) 2000-2019 Free Software Foundation, Inc. Contributed by Embecosm on behalf of Adapteva, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -362,8 +362,8 @@ epiphany_elf_relax_section (bfd *abfd, asection *sec, /* Set the howto pointer for a EPIPHANY ELF reloc. */ -static void -epiphany_info_to_howto_rela (bfd * abfd ATTRIBUTE_UNUSED, +static bfd_boolean +epiphany_info_to_howto_rela (bfd * abfd, arelent * cache_ptr, Elf_Internal_Rela * dst) { @@ -373,10 +373,13 @@ epiphany_info_to_howto_rela (bfd * abfd ATTRIBUTE_UNUSED, if (r_type >= (unsigned int) R_EPIPHANY_max) { /* xgettext:c-format */ - _bfd_error_handler (_("%B: invalid Epiphany reloc number: %d"), abfd, r_type); - r_type = 0; + _bfd_error_handler (_("%pB: unsupported relocation type %#x"), + abfd, r_type); + bfd_set_error (bfd_error_bad_value); + return FALSE; } cache_ptr->howto = & epiphany_elf_howto_table [r_type]; + return TRUE; } /* Perform a single relocation. @@ -515,7 +518,7 @@ epiphany_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, name = bfd_elf_string_from_elf_section (input_bfd, symtab_hdr->sh_link, sym->st_name); - name = (name == NULL) ? bfd_section_name (input_bfd, sec) : name; + name = name == NULL ? bfd_section_name (sec) : name; } else {