Have info_to_howto functions return a success/fail status. Check this result. Stop...
[deliverable/binutils-gdb.git] / bfd / elfnn-aarch64.c
index a6d3cce88fcc9db1183a8c05a8168ea2736d60e4..59027ccaf979bb26070b629f3187627cbf8c0f2b 100644 (file)
@@ -2081,7 +2081,7 @@ elfNN_aarch64_howto_from_type (bfd *abfd, unsigned int r_type)
   return NULL;
 }
 
-static void
+static bfd_boolean
 elfNN_aarch64_info_to_howto (bfd *abfd, arelent *bfd_reloc,
                             Elf_Internal_Rela *elf_reloc)
 {
@@ -2089,6 +2089,14 @@ elfNN_aarch64_info_to_howto (bfd *abfd, arelent *bfd_reloc,
 
   r_type = ELFNN_R_TYPE (elf_reloc->r_info);
   bfd_reloc->howto = elfNN_aarch64_howto_from_type (abfd, r_type);
+
+  if (bfd_reloc->howto == NULL)
+    {
+      /* xgettext:c-format */
+      _bfd_error_handler (_("%pB: unsupported relocation type %#x"), abfd, r_type);
+      return FALSE;
+    }
+  return TRUE;
 }
 
 static reloc_howto_type *
This page took 0.024928 seconds and 4 git commands to generate.