From da3a8dda54cfb490013c3da3731efd25f0e2bb96 Mon Sep 17 00:00:00 2001 From: Alexander Taylor Date: Thu, 21 Mar 2024 13:03:39 -0400 Subject: Add Motorola M-CORE Linux platform support. --- platform/linux/platform_linux.cpp | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'platform/linux/platform_linux.cpp') diff --git a/platform/linux/platform_linux.cpp b/platform/linux/platform_linux.cpp index 3bbb7248..0102fa42 100644 --- a/platform/linux/platform_linux.cpp +++ b/platform/linux/platform_linux.cpp @@ -460,6 +460,30 @@ extern "C" } #ifdef ULTIMATE_EDITION + Ref mcore_le = Architecture::GetByName("mcore_le"); + if (mcore_le) + { + Ref platform; + + platform = new LinuxCSkyV1Platform(mcore_le, "linux-mcore_le"); + Platform::Register("linux", platform); + // Linux binaries sometimes have an OS identifier of zero, even though 3 is the correct one + BinaryViewType::RegisterPlatform("ELF", 0, platform); + BinaryViewType::RegisterPlatform("ELF", 3, platform); + } + + Ref mcore_be = Architecture::GetByName("mcore_be"); + if (mcore_be) + { + Ref platform; + + platform = new LinuxCSkyV1Platform(mcore_be, "linux-mcore_be"); + Platform::Register("linux", platform); + // Linux binaries sometimes have an OS identifier of zero, even though 3 is the correct one + BinaryViewType::RegisterPlatform("ELF", 0, platform); + BinaryViewType::RegisterPlatform("ELF", 3, platform); + } + Ref cskyv1 = Architecture::GetByName("csky_le_v1"); if (cskyv1) { -- cgit v1.3.1