diff options
author | Nick Clifton <nickc@redhat.com> | 2017-07-24 11:27:33 +0100 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2017-07-24 11:27:33 +0100 |
commit | 47aeb64c10ec9c9f06d2d2f4451f417d63b023e1 (patch) | |
tree | b29b88b2fe25f814ad01225d316dd28688ca4ca1 /bfd/elf32-arm.c | |
parent | 645b28002711eba22e8a4df3733a01206ab7d36d (diff) |
Improve "unrecognized relocation" error messages to add the suggestion that the linker might be out of date.
PR 21803
* reloc.c (_bfd_unrecognized_reloc): New function. Reports
an unrecognized reloc and sets the bfd_error value.
* libbfd.h: Regenerate.
* elf32-arm.c (elf32_arm_final_link_relocate): Use the new
function.
* elf32-i386.c (elf_i386_relocate_section): Likewise.
* elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
* elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
* elfnn-aarch64.c (elfNN_aarch64_relocate_section): Likewise.
* elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
Diffstat (limited to 'bfd/elf32-arm.c')
-rw-r--r-- | bfd/elf32-arm.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c index e8c346d869..bad8540c6f 100644 --- a/bfd/elf32-arm.c +++ b/bfd/elf32-arm.c @@ -9906,6 +9906,7 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto, return bfd_reloc_notsupported; BFD_ASSERT (is_arm_elf (input_bfd)); + BFD_ASSERT (howto != NULL); /* Some relocation types map to different relocations depending on the target. We pick the right one here. */ @@ -12289,8 +12290,10 @@ elf32_arm_relocate_section (bfd * output_bfd, || r_type == R_ARM_GNU_VTINHERIT) continue; - bfd_reloc.howto = elf32_arm_howto_from_type (r_type); - howto = bfd_reloc.howto; + howto = bfd_reloc.howto = elf32_arm_howto_from_type (r_type); + + if (howto == NULL) + return _bfd_unrecognized_reloc (input_bfd, input_section, r_type); h = NULL; sym = NULL; |