[binutils-gdb] MIPS: Add missing Octeon machine type handling
Maciej W. Rozycki
macro@sourceware.org
Sun Nov 8 18:44:42 GMT 2026
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=b13db0254577b781ee0a95682d42239cf72d9a95
commit b13db0254577b781ee0a95682d42239cf72d9a95
Author: Maciej W. Rozycki <macro@orcam.me.uk>
Date: Sun Nov 8 18:21:56 2026 +0000
MIPS: Add missing Octeon machine type handling
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.
Diff:
---
bfd/aoutx.h | 4 ++++
bfd/elfxx-mips.c | 1 +
gold/mips.cc | 3 +++
3 files changed, 8 insertions(+)
diff --git a/bfd/aoutx.h b/bfd/aoutx.h
index bf20a91a1a6..ee5512ce7f3 100644
--- a/bfd/aoutx.h
+++ b/bfd/aoutx.h
@@ -813,6 +813,10 @@ NAME (aout, machine_type) (enum bfd_architecture 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;
diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c
index 4e8ffa5bc25..b89ff47652f 100644
--- a/bfd/elfxx-mips.c
+++ b/bfd/elfxx-mips.c
@@ -14798,6 +14798,7 @@ bfd_mips_isa_ext_mach (unsigned int isa_ext)
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;
}
diff --git a/gold/mips.cc b/gold/mips.cc
index f823d59b0f2..46de404cda0 100644
--- a/gold/mips.cc
+++ b/gold/mips.cc
@@ -9018,6 +9018,9 @@ Target_mips<size, big_endian>::mips_isa_ext_mach(unsigned int isa_ext)
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-cvs
mailing list