Automatic date update in version.in
[deliverable/binutils-gdb.git] / bfd / elf32-crx.c
index 90948bcfb8595580c682372e85bb1a554317af6e..0f9069c8b79673d3e2f092830d1349371a4ba52e 100644 (file)
@@ -82,8 +82,8 @@ static reloc_howto_type crx_elf_howto_table[] =
 {
   HOWTO (R_CRX_NONE,           /* type */
         0,                     /* rightshift */
-        2,                     /* size */
-        32,                    /* bitsize */
+        3,                     /* size */
+        0,                     /* bitsize */
         FALSE,                 /* pc_relative */
         0,                     /* bitpos */
         complain_overflow_dont,/* complain_on_overflow */
@@ -423,7 +423,13 @@ elf_crx_info_to_howto (bfd *abfd ATTRIBUTE_UNUSED, arelent *cache_ptr,
                       Elf_Internal_Rela *dst)
 {
   unsigned int r_type = ELF32_R_TYPE (dst->r_info);
-  BFD_ASSERT (r_type < (unsigned int) R_CRX_MAX);
+  if (r_type >= R_CRX_MAX)
+    {
+      (*_bfd_error_handler) (_("%B: unrecognised CRX reloc number: %d"),
+                            abfd, r_type);
+      bfd_set_error (bfd_error_bad_value);
+      r_type = R_CRX_NONE;
+    }
   cache_ptr->howto = &crx_elf_howto_table[r_type];
 }
 
This page took 0.02382 seconds and 4 git commands to generate.