This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
RE: [PATCHv3 3/7] arc: Remove duplicated constant in include/elf/arc.h
- From: Claudiu Zissulescu <Claudiu dot Zissulescu at synopsys dot com>
- To: Andrew Burgess <andrew dot burgess at embecosm dot com>, "binutils at sourceware dot org" <binutils at sourceware dot org>
- Cc: "Claudiu dot Zissulescu at synopsys dot com" <Claudiu dot Zissulescu at synopsys dot com>, "Cupertino dot Miranda at synopsys dot com" <Cupertino dot Miranda at synopsys dot com>, "noamca at mellanox dot com" <noamca at mellanox dot com>, Nick Clifton <nickc at redhat dot com>, Andreas Schwab <schwab at suse dot de>
- Date: Wed, 16 Mar 2016 11:00:37 +0000
- Subject: RE: [PATCHv3 3/7] arc: Remove duplicated constant in include/elf/arc.h
- Authentication-results: sourceware.org; auth=none
- References: <cover dot 1456947552 dot git dot andrew dot burgess at embecosm dot com> <cover dot 1458082098 dot git dot andrew dot burgess at embecosm dot com> <4777df0b03f0641f712a09593da9fe394c7d2891 dot 1458082098 dot git dot andrew dot burgess at embecosm dot com>
From my side, it looks alright.
//Claudiu
> -----Original Message-----
> From: Andrew Burgess [mailto:andrew.burgess@embecosm.com]
> Sent: Wednesday, March 16, 2016 12:02 AM
> To: binutils@sourceware.org
> Cc: Claudiu.Zissulescu@synopsys.com; Cupertino.Miranda@synopsys.com;
> noamca@mellanox.com; Nick Clifton; Andreas Schwab; Andrew Burgess
> Subject: [PATCHv3 3/7] arc: Remove duplicated constant in include/elf/arc.h
>
> 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 | 5 +++++
> bfd/elf32-arc.c | 2 +-
> include/ChangeLog | 5 +++++
> include/elf/arc.h | 5 -----
> 4 files changed, 11 insertions(+), 6 deletions(-)
>
> diff --git a/bfd/ChangeLog b/bfd/ChangeLog
> index 740fd44..d2532f0 100644
> --- a/bfd/ChangeLog
> +++ b/bfd/ChangeLog
> @@ -1,3 +1,8 @@
> +2016-03-15 Andrew Burgess <andrew.burgess@embecosm.com>
> +
> + * elf32-arc.c (arc_elf_final_write_processing): Switch to using
> + EF_ARC_MACH_MSK.
> +
> 2016-03-15 H.J. Lu <hongjiu.lu@intel.com>
>
> PR ld/19827
> diff --git a/bfd/elf32-arc.c b/bfd/elf32-arc.c
> index 4090b7a..7c856d0 100644
> --- a/bfd/elf32-arc.c
> +++ b/bfd/elf32-arc.c
> @@ -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;
> diff --git a/include/ChangeLog b/include/ChangeLog
> index 2930b80..b083a8d 100644
> --- a/include/ChangeLog
> +++ b/include/ChangeLog
> @@ -1,5 +1,10 @@
> 2016-03-15 Andrew Burgess <andrew.burgess@embecosm.com>
>
> + * elf/arc.h (EF_ARC_MACH): Delete.
> + (EF_ARC_MACH_MSK): Remove out of date comment.
> +
> +2016-03-15 Andrew Burgess <andrew.burgess@embecosm.com>
> +
> * opcode/arc.h (ARC_OPCODE_BASE): Delete.
>
> 2016-03-15 H.J. Lu <hongjiu.lu@intel.com>
> diff --git a/include/elf/arc.h b/include/elf/arc.h
> index e535f24..0b75465 100644
> --- a/include/elf/arc.h
> +++ b/include/elf/arc.h
> @@ -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
> --
> 2.5.1