[committed] MIPS: Add missing Octeon machine type handling

Maciej W. Rozycki macro@orcam.me.uk
Sun Nov 8 18:44:53 GMT 2026


Complement commit 2c62985659da ("MIPS: Add Octeon 3 support") and add 
missing AFL_EXT_OCTEON3 to machine type conversion in BFD and gold.  
Also add missing Octeon types to a.out support.
---
 bfd/aoutx.h      |    4 ++++
 bfd/elfxx-mips.c |    1 +
 gold/mips.cc     |    3 +++
 3 files changed, 8 insertions(+)

binutils-mips-afl-ext-octeon3.diff
Index: binutils-gdb/bfd/aoutx.h
===================================================================
--- binutils-gdb.orig/bfd/aoutx.h
+++ binutils-gdb/bfd/aoutx.h
@@ -813,6 +813,10 @@ NAME (aout, machine_type) (enum bfd_arch
 	case bfd_mach_mipsisa64r5:
 	case bfd_mach_mipsisa64r6:
 	case bfd_mach_mips_sb1:
+	case bfd_mach_mips_octeon:
+	case bfd_mach_mips_octeonp:
+	case bfd_mach_mips_octeon2:
+	case bfd_mach_mips_octeon3:
 	case bfd_mach_mips_xlr:
 	  /* FIXME: These should be MIPS3, MIPS4, MIPS16, MIPS32, etc.  */
 	  arch_flags = M_MIPS2;
Index: binutils-gdb/bfd/elfxx-mips.c
===================================================================
--- binutils-gdb.orig/bfd/elfxx-mips.c
+++ binutils-gdb/bfd/elfxx-mips.c
@@ -14798,6 +14798,7 @@ bfd_mips_isa_ext_mach (unsigned int isa_
     case AFL_EXT_OCTEON:      return bfd_mach_mips_octeon;
     case AFL_EXT_OCTEONP:     return bfd_mach_mips_octeonp;
     case AFL_EXT_OCTEON2:     return bfd_mach_mips_octeon2;
+    case AFL_EXT_OCTEON3:     return bfd_mach_mips_octeon3;
     case AFL_EXT_XLR:	      return bfd_mach_mips_xlr;
     default:		      return bfd_mach_mips3000;
     }
Index: binutils-gdb/gold/mips.cc
===================================================================
--- binutils-gdb.orig/gold/mips.cc
+++ binutils-gdb/gold/mips.cc
@@ -9018,6 +9018,9 @@ Target_mips<size, big_endian>::mips_isa_
     case elfcpp::AFL_EXT_OCTEON2:
       return mach_mips_octeon2;
 
+    case elfcpp::AFL_EXT_OCTEON3:
+      return mach_mips_octeon3;
+
     case elfcpp::AFL_EXT_XLR:
       return mach_mips_xlr;
 


More information about the Binutils mailing list