This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH] Add ELF MIPS machine flag value for Octeon2 processors.
- From: David Daney <ddaney at caviumnetworks dot com>
- To: binutils at sourceware dot org
- Cc: "Adam Nemet" <adambnemet at gmail dot com>, "Kapoor, Prasun" <Prasun dot Kapoor at caviumnetworks dot com>
- Date: Wed, 02 Dec 2009 12:10:37 -0800
- Subject: [PATCH] Add ELF MIPS machine flag value for Octeon2 processors.
Cavium Networks is working on Binutils support for the new Octeon2
family processors. Since Octeon2 extends the ISA used by the existing
Octeon support we are using a new EF_MIPS_MACH value for the new
processor.
This patch adds E_MIPS_MACH_OCTEON2 and the corresponding readelf
support.
Tested on x86_64-pc-linux-gnu.
OK to commit?
include/
2009-12-02 David Daney <ddaney@caviumnetworks.com>
Adam Nemet <adambnemet@gmail.com>
* elf/mips.h (E_MIPS_MACH_OCTEON2): New machine flag.
binutils/
2009-12-02 David Daney <ddaney@caviumnetworks.com>
Adam Nemet <adambnemet@gmail.com>
* readelf.c (get_machine_flags): Handle E_MIPS_MACH_OCTEON2 case.
Index: binutils/readelf.c
===================================================================
RCS file: /cvs/src/src/binutils/readelf.c,v
retrieving revision 1.472
diff -u -p -r1.472 readelf.c
--- binutils/readelf.c 1 Dec 2009 16:37:32 -0000 1.472
+++ binutils/readelf.c 2 Dec 2009 19:53:59 -0000
@@ -2337,6 +2337,7 @@ get_machine_flags (unsigned e_flags, uns
case E_MIPS_MACH_LS2E: strcat (buf, ", loongson-2e"); break;
case E_MIPS_MACH_LS2F: strcat (buf, ", loongson-2f"); break;
case E_MIPS_MACH_OCTEON: strcat (buf, ", octeon"); break;
+ case E_MIPS_MACH_OCTEON2: strcat (buf, ", octeon2"); break;
case E_MIPS_MACH_XLR: strcat (buf, ", xlr"); break;
case 0:
/* We simply ignore the field in this case to avoid confusion:
Index: include/elf/mips.h
===================================================================
RCS file: /cvs/src/src/include/elf/mips.h,v
retrieving revision 1.41
diff -u -p -r1.41 mips.h
--- include/elf/mips.h 2 Sep 2009 07:21:39 -0000 1.41
+++ include/elf/mips.h 2 Dec 2009 19:53:59 -0000
@@ -215,6 +215,7 @@ END_RELOC_NUMBERS (R_MIPS_maxext)
#define E_MIPS_MACH_SB1 0x008a0000
#define E_MIPS_MACH_OCTEON 0x008b0000
#define E_MIPS_MACH_XLR 0x008c0000
+#define E_MIPS_MACH_OCTEON2 0x008d0000
#define E_MIPS_MACH_5400 0x00910000
#define E_MIPS_MACH_5500 0x00980000
#define E_MIPS_MACH_9000 0x00990000