Touches most files in bfd/, so likely will be blamed for everything..
[deliverable/binutils-gdb.git] / bfd / elf32-arc.c
index 1cc8bba76aa54a9f9cd53ad95789699d0a256f6b..4f7d1c138e01177de3b15e7809501122cca6ca39 100644 (file)
@@ -57,18 +57,18 @@ static reloc_howto_type elf_arc_howto_table[] =
 
   /* A standard 32 bit relocation.  */
   HOWTO (R_ARC_32,             /* type  */
-        0,                     /* rightshift  */
-        2,                     /* size (0 = byte, 1 = short, 2 = long)  */
-        32,                    /* bitsize  */
-        false,                 /* pc_relative  */
-        0,                     /* bitpos  */
+        0,                     /* rightshift  */
+        2,                     /* size (0 = byte, 1 = short, 2 = long)  */
+        32,                    /* bitsize  */
+        false,                 /* pc_relative  */
+        0,                     /* bitpos  */
         complain_overflow_bitfield, /* complain_on_overflow  */
-        bfd_elf_generic_reloc, /* special_function  */
+        bfd_elf_generic_reloc, /* special_function  */
         "R_ARC_32",            /* name  */
-        false,                 /* partial_inplace  */
-        0xffffffff,            /* src_mask  */
-        0xffffffff,            /* dst_mask  */
-        false),                /* pcrel_offset  */
+        false,                 /* partial_inplace  */
+        0xffffffff,            /* src_mask  */
+        0xffffffff,            /* dst_mask  */
+        false),                /* pcrel_offset  */
 
   /* A 26 bit absolute branch, right shifted by 2.  */
   HOWTO (R_ARC_B26,            /* type  */
@@ -95,10 +95,10 @@ static reloc_howto_type elf_arc_howto_table[] =
         complain_overflow_signed, /* complain_on_overflow  */
         bfd_elf_generic_reloc, /* special_function  */
         "R_ARC_B22_PCREL",     /* name  */
-        false,                 /* partial_inplace  */
+        true,                  /* partial_inplace  */
         0x07ffff80,            /* src_mask  */
         0x07ffff80,            /* dst_mask  */
-        true),                 /* pcrel_offset  */
+        false),                /* pcrel_offset  */
 
 };
 
@@ -155,7 +155,7 @@ static boolean
 arc_elf_object_p (abfd)
      bfd *abfd;
 {
-  int mach = bfd_mach_arc_5;
+  unsigned int mach = bfd_mach_arc_6;
 
   if (elf_elfheader(abfd)->e_machine == EM_ARC)
     {
@@ -163,10 +163,10 @@ arc_elf_object_p (abfd)
 
       switch (arch)
        {
-       default:
        case E_ARC_MACH_ARC5:
          mach = bfd_mach_arc_5;
          break;
+       default:
        case E_ARC_MACH_ARC6:
          mach = bfd_mach_arc_6;
          break;
@@ -193,10 +193,10 @@ arc_elf_final_write_processing (abfd, linker)
 
   switch (bfd_get_mach (abfd))
     {
-    default:
     case bfd_mach_arc_5:
       val = E_ARC_MACH_ARC5;
       break;
+    default:
     case bfd_mach_arc_6:
       val = E_ARC_MACH_ARC6;
       break;
@@ -207,7 +207,6 @@ arc_elf_final_write_processing (abfd, linker)
       val = E_ARC_MACH_ARC8;
       break;
     }
-  elf_elfheader (abfd)->e_machine = EM_ARC;
   elf_elfheader (abfd)->e_flags &=~ EF_ARC_MACH;
   elf_elfheader (abfd)->e_flags |= val;
 }
This page took 0.025481 seconds and 4 git commands to generate.