arc: Remove duplicated constant in include/elf/arc.h
authorAndrew Burgess <andrew.burgess@embecosm.com>
Tue, 15 Mar 2016 19:09:23 +0000 (19:09 +0000)
committerAndrew Burgess <andrew.burgess@embecosm.com>
Mon, 21 Mar 2016 16:44:49 +0000 (16:44 +0000)
In the include/elf/arc.h there are two constants that mask out the
machine architecture field.  One is used lots (EF_ARC_MACH_MSK), the
other is used only once (EF_ARC_MACH).  Remove EF_ARC_MACH.

bfd/ChangeLog:

* elf32-arc.c (arc_elf_final_write_processing): Switch to using
EF_ARC_MACH_MSK.

include/ChangeLog:

* elf/arc.h (EF_ARC_MACH): Delete.
(EF_ARC_MACH_MSK): Remove out of date comment.

bfd/ChangeLog
bfd/elf32-arc.c
include/ChangeLog
include/elf/arc.h

index fe63bd3920683cd86714792e0dadf499748852b1..f1bc44abe7376107858707e25eca8f1854ba2fa0 100644 (file)
@@ -1,3 +1,8 @@
+2016-03-21  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+       * elf32-arc.c (arc_elf_final_write_processing): Switch to using
+       EF_ARC_MACH_MSK.
+
 2016-03-21  Nick Clifton  <nickc@redhat.com>
 
        * warning.m4 (GCC_WARN_CFLAGS): Add -Wstack-usage=262144
index 4090b7a77176bbbf7924d7912df29d5265570443..7c856d01a58488a5b2755b2b2f8454fe26dc4961 100644 (file)
@@ -673,7 +673,7 @@ arc_elf_final_write_processing (bfd * abfd,
     default:
       abort ();
     }
-  if ((elf_elfheader (abfd)->e_flags & EF_ARC_MACH) == EF_ARC_CPU_GENERIC)
+  if ((elf_elfheader (abfd)->e_flags & EF_ARC_MACH_MSK) == EF_ARC_CPU_GENERIC)
     elf_elfheader (abfd)->e_flags |= val;
 
   elf_elfheader (abfd)->e_machine = emf;
index 8b488240f026ee720b2f55c47a8d3f1a23ac0ed6..7ce9cfad8869c4dce1c3a512c132d40dac80096a 100644 (file)
@@ -1,3 +1,8 @@
+2016-03-21  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+       * elf/arc.h (EF_ARC_MACH): Delete.
+       (EF_ARC_MACH_MSK): Remove out of date comment.
+
 2016-03-21  Andrew Burgess  <andrew.burgess@embecosm.com>
 
        * opcode/arc.h (ARC_OPCODE_BASE): Delete.
index e535f247b6c115e33564b9276f80f8da54c99a8d..0b7546521c757cff4c0d022060111eb42cdc5ebb 100644 (file)
@@ -39,15 +39,10 @@ END_RELOC_NUMBERS (R_ARC_max)
 
 /* Processor specific flags for the ELF header e_flags field.  */
 
-/* Four bit ARC machine type field.  */
 #define EF_ARC_MACH_MSK         0x000000ff
 #define EF_ARC_OSABI_MSK 0x00000f00
 #define EF_ARC_ALL_MSK  (EF_ARC_MACH_MSK | EF_ARC_OSABI_MSK)
 
-/* Four bit ARC machine type field.  */
-
-#define EF_ARC_MACH 0x0000000f
-
 /* Various CPU types.  */
 #define E_ARC_MACH_ARC600      0x00000002
 #define E_ARC_MACH_ARC601      0x00000004