diff options
| author | Galen Williamson <galen@vector35.com> | 2025-02-10 14:57:07 -0500 |
|---|---|---|
| committer | Galen Williamson <galen@vector35.com> | 2025-02-10 17:36:14 -0500 |
| commit | 840072d5603a454db162ffcaf8e6dc2311f0d012 (patch) | |
| tree | cdb02a9fdbdab82e64ea0c1e11eb4115494b696e /platform/linux/platform_linux.cpp | |
| parent | b4e75ef9995500049f90a2569eee07c1b3505c21 (diff) | |
[mips] Merging PR https://github.com/Vector35/binaryninja-api/pull/6013: adding mips3 support
Diffstat (limited to 'platform/linux/platform_linux.cpp')
| -rw-r--r-- | platform/linux/platform_linux.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/platform/linux/platform_linux.cpp b/platform/linux/platform_linux.cpp index 9a57c430..0a70f5b5 100644 --- a/platform/linux/platform_linux.cpp +++ b/platform/linux/platform_linux.cpp @@ -352,27 +352,37 @@ extern "C" Ref<Architecture> mipsel = Architecture::GetByName("mipsel32"); Ref<Architecture> mipseb = Architecture::GetByName("mips32"); + Ref<Architecture> mips3el = Architecture::GetByName("mipsel3"); + Ref<Architecture> mips3eb = Architecture::GetByName("mips3"); Ref<Architecture> mips64eb = Architecture::GetByName("mips64"); Ref<Architecture> cnmips64eb = Architecture::GetByName("cavium-mips64"); - if (mipsel && mipseb && mips64eb && cnmips64eb) + if (mipsel && mipseb && mips64eb && cnmips64eb && mips3el && mips3eb) { - Ref<Platform> platformLE, platformBE, platformBE64, platformBE64cn; + Ref<Platform> platformLE, platformBE, platformBE64, platformBE64cn, platform3LE, platform3BE; platformLE = new LinuxMipsPlatform(mipsel, "linux-mipsel"); platformBE = new LinuxMipsPlatform(mipseb, "linux-mips"); + platform3LE = new LinuxMipsPlatform(mips3el, "linux-mipsel3"); + platform3BE = new LinuxMipsPlatform(mips3eb, "linux-mips3"); platformBE64 = new LinuxMips64Platform(mips64eb, "linux-mips64"); platformBE64cn = new LinuxMips64Platform(cnmips64eb, "linux-cnmips64"); Platform::Register("linux", platformLE); Platform::Register("linux", platformBE); + Platform::Register("linux", platform3LE); + Platform::Register("linux", platform3BE); Platform::Register("linux", platformBE64); Platform::Register("linux", platformBE64cn); // Linux binaries sometimes have an OS identifier of zero, even though 3 is the correct one BinaryViewType::RegisterPlatform("ELF", 0, mipsel, platformLE); BinaryViewType::RegisterPlatform("ELF", 0, mipseb, platformBE); + BinaryViewType::RegisterPlatform("ELF", 0, mips3el, platform3LE); + BinaryViewType::RegisterPlatform("ELF", 0, mips3eb, platform3BE); BinaryViewType::RegisterPlatform("ELF", 0, mips64eb, platformBE64); BinaryViewType::RegisterPlatform("ELF", 0, cnmips64eb, platformBE64cn); BinaryViewType::RegisterPlatform("ELF", 3, mipsel, platformLE); BinaryViewType::RegisterPlatform("ELF", 3, mipseb, platformBE); + BinaryViewType::RegisterPlatform("ELF", 3, mips3el, platform3LE); + BinaryViewType::RegisterPlatform("ELF", 3, mips3eb, platform3BE); BinaryViewType::RegisterPlatform("ELF", 3, mips64eb, platformBE64); BinaryViewType::RegisterPlatform("ELF", 3, cnmips64eb, platformBE64cn); } |
