Automatic date update in version.in
[deliverable/binutils-gdb.git] / bfd / elf32-dlx.c
index 91441aa84d861e9587056551292a673c6173162d..b5c7d6e8a80387191eb9ddf9de0de59ef8b2f3bb 100644 (file)
@@ -1,5 +1,5 @@
 /* DLX specific support for 32-bit ELF
-   Copyright (C) 2002-2014 Free Software Foundation, Inc.
+   Copyright (C) 2002-2016 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -237,7 +237,7 @@ static reloc_howto_type dlx_elf_howto_table[]=
   /* No relocation.  */
   HOWTO (R_DLX_NONE,            /* Type. */
         0,                     /* Rightshift.  */
-        0,                     /* size (0 = byte, 1 = short, 2 = long).  */
+        3,                     /* size (0 = byte, 1 = short, 2 = long).  */
         0,                     /* Bitsize.  */
         FALSE,                 /* PC_relative.  */
         0,                     /* Bitpos.  */
@@ -429,7 +429,7 @@ elf32_dlx_check_relocs (bfd *abfd,
   const Elf_Internal_Rela *rel;
   const Elf_Internal_Rela *rel_end;
 
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     return TRUE;
 
   symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
@@ -546,7 +546,11 @@ dlx_rtype_to_howto (unsigned int r_type)
     case R_DLX_RELOC_16_LO:
       return & elf_dlx_reloc_16_lo;
     default:
-      BFD_ASSERT (r_type < (unsigned int) R_DLX_max);
+      if (r_type >= (unsigned int) R_DLX_max)
+       {
+         _bfd_error_handler (_("Invalid DLX reloc number: %d"), r_type);
+         r_type = 0;
+       }
       return & dlx_elf_howto_table[r_type];
     }
 }
This page took 0.025239 seconds and 4 git commands to generate.