X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=bfd%2Felf32-moxie.c;h=f8ef5eec4f316fd77d042550f92c906e96d16050;hb=2fdb65f247379befd548a33ea185172968b9ebb9;hp=7a617a81b2b8b3adacab69d115ddbb285d256459;hpb=0aa13feeeb78fc9323bee329c4d91c30f25de121;p=deliverable%2Fbinutils-gdb.git diff --git a/bfd/elf32-moxie.c b/bfd/elf32-moxie.c index 7a617a81b2..f8ef5eec4f 100644 --- a/bfd/elf32-moxie.c +++ b/bfd/elf32-moxie.c @@ -1,8 +1,8 @@ /* moxie-specific support for 32-bit ELF. - Copyright (C) 2009-2018 Free Software Foundation, Inc. + Copyright (C) 2009-2020 Free Software Foundation, Inc. Copied from elf32-fr30.c which is.. - Copyright (C) 1998-2018 Free Software Foundation, Inc. + Copyright (C) 1998-2020 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -123,7 +123,7 @@ moxie_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED, const char *r_name) /* Set the howto pointer for an MOXIE ELF reloc. */ -static void +static bfd_boolean moxie_info_to_howto_rela (bfd *abfd, arelent *cache_ptr, Elf_Internal_Rela *dst) @@ -136,9 +136,11 @@ moxie_info_to_howto_rela (bfd *abfd, /* 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 = & moxie_elf_howto_table [r_type]; + return TRUE; } /* Perform a single relocation. By default we use the standard BFD @@ -241,7 +243,7 @@ moxie_elf_relocate_section (bfd *output_bfd, 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 {