[PATCH] Add ELF MIPS machine flag value for Octeon3 processors.

Andrew Pinski andrew.pinski@caviumnetworks.com
Thu Feb 6 00:56:00 GMT 2014


Just like https://sourceware.org/ml/binutils/2009-12/msg00024.html .
Cavium is working on Binutils support for the new Octeon 3 processors.
 Since Octeon3 extends the ISA used by the existing
Octeon2 support we are using a new EF_MIPS_MACH value for the new processor.

This patch adds E_MIPS_MACH_OCTEON3 and the corresponding readelf
support.

OK to commit?

Thanks,
Andrew Pinski

binutils/ChangeLog:
* readelf.c  (get_machine_flags): Handle E_MIPS_MACH_OCTEON3case.

elfcpp/ChangeLog:
* mips.h (E_MIPS_MACH_OCTEON3): New enum constant.

include/elf/ChangeLog:
* mips.h (E_MIPS_MACH_OCTEON3): New machine flag.
-------------- next part --------------
diff --git a/binutils/readelf.c b/binutils/readelf.c
index 7d228d6..1123548 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -2808,6 +2808,7 @@ get_machine_flags (unsigned e_flags, unsigned e_machine)
   	    case E_MIPS_MACH_LS3A: strcat (buf, ", loongson-3a"); break;
 	    case E_MIPS_MACH_OCTEON: strcat (buf, ", octeon"); break;
 	    case E_MIPS_MACH_OCTEON2: strcat (buf, ", octeon2"); break;
+	    case E_MIPS_MACH_OCTEON3: strcat (buf, ", octeon3"); break;
 	    case E_MIPS_MACH_XLR:  strcat (buf, ", xlr"); break;
 	    case 0:
 	    /* We simply ignore the field in this case to avoid confusion:
diff --git a/elfcpp/mips.h b/elfcpp/mips.h
index 8c2d8f4..db65998 100644
--- a/elfcpp/mips.h
+++ b/elfcpp/mips.h
@@ -164,6 +164,7 @@ enum
   E_MIPS_MACH_OCTEON = 0x008b0000,
   E_MIPS_MACH_XLR = 0x008c0000,
   E_MIPS_MACH_OCTEON2 = 0x008d0000,
+  E_MIPS_MACH_OCTEON3 = 0x008e0000,
   E_MIPS_MACH_5400 = 0x00910000,
   E_MIPS_MACH_5500 = 0x00980000,
   E_MIPS_MACH_9000 = 0x00990000,
diff --git a/include/elf/mips.h b/include/elf/mips.h
index 2c5a9a6..7a62875 100644
--- a/include/elf/mips.h
+++ b/include/elf/mips.h
@@ -275,6 +275,7 @@ END_RELOC_NUMBERS (R_MIPS_maxext)
 #define E_MIPS_MACH_OCTEON	0x008b0000
 #define E_MIPS_MACH_XLR     	0x008c0000
 #define E_MIPS_MACH_OCTEON2	0x008d0000
+#define E_MIPS_MACH_OCTEON3	0x008e0000
 #define E_MIPS_MACH_5400	0x00910000
 #define E_MIPS_MACH_5900	0x00920000
 #define E_MIPS_MACH_5500	0x00980000


More information about the Binutils mailing list