[AArch64] Add support for :tlsdesc: and TLSDESC_LD_PREL19
[deliverable/binutils-gdb.git] / bfd / elf32-arc.c
index b0c49ffb060653d66f1b1663837c6771f2a6cede..07af56b5bf06455e8957146f9751e0fd27195c99 100644 (file)
@@ -1,5 +1,5 @@
 /* ARC-specific support for 32-bit ELF
-   Copyright (C) 1994-2014 Free Software Foundation, Inc.
+   Copyright (C) 1994-2015 Free Software Foundation, Inc.
    Contributed by Doug Evans (dje@cygnus.com).
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -58,8 +58,8 @@ static reloc_howto_type elf_arc_howto_table[] =
   /* This reloc does nothing.  */
   HOWTO (R_ARC_NONE,           /* Type.  */
         0,                     /* Rightshift.  */
-        2,                     /* Size (0 = byte, 1 = short, 2 = long).  */
-        32,                    /* Bitsize.  */
+        3,                     /* Size (0 = byte, 1 = short, 2 = long).  */
+        0,                     /* Bitsize.  */
         FALSE,                 /* PC_relative.  */
         0,                     /* Bitpos.  */
         complain_overflow_bitfield, /* Complain_on_overflow.  */
@@ -172,7 +172,11 @@ arc_info_to_howto_rel (bfd *abfd ATTRIBUTE_UNUSED,
   unsigned int r_type;
 
   r_type = ELF32_R_TYPE (dst->r_info);
-  BFD_ASSERT (r_type < (unsigned int) R_ARC_max);
+  if (r_type >= (unsigned int) R_ARC_max)
+    {
+      _bfd_error_handler (_("%B: invalid ARC reloc number: %d"), abfd, r_type);
+      r_type = 0;
+    }
   cache_ptr->howto = &elf_arc_howto_table[r_type];
 }
 
@@ -236,9 +240,9 @@ arc_elf_final_write_processing (bfd *abfd,
   elf_elfheader (abfd)->e_flags |= val;
 }
 
-#define TARGET_LITTLE_SYM   bfd_elf32_littlearc_vec
+#define TARGET_LITTLE_SYM   arc_elf32_le_vec
 #define TARGET_LITTLE_NAME  "elf32-littlearc"
-#define TARGET_BIG_SYM      bfd_elf32_bigarc_vec
+#define TARGET_BIG_SYM      arc_elf32_be_vec
 #define TARGET_BIG_NAME            "elf32-bigarc"
 #define ELF_ARCH            bfd_arch_arc
 #define ELF_MACHINE_CODE    EM_ARC
This page took 0.02383 seconds and 4 git commands to generate.