Ghidra is a software reverse engineering (SRE) framework
changes for M1
Tom Nelson31b3db431e7d
diff --git a/Ghidra/Features/Decompiler/build.gradle b/Ghidra/Features/Decompiler/build.gradleindex f398c9414d..d0251eb6a9 100644--- a/Ghidra/Features/Decompiler/build.gradle+++ b/Ghidra/Features/Decompiler/build.gradle@@ -546,6 +546,7 @@ model {}}else if (b.toolChain in Clang) {+ b.cppCompiler.args "-std=c++11"b.cppCompiler.args "-Wall"b.cppCompiler.args "-O2" // for DEBUG, comment this line out// b.cppCompiler.args "-g" // for DEBUG, uncomment this linediff --git a/Ghidra/Features/Decompiler/src/decompile/cpp/types.h b/Ghidra/Features/Decompiler/src/decompile/cpp/types.hindex d549d65959..d109066370 100644--- a/Ghidra/Features/Decompiler/src/decompile/cpp/types.h+++ b/Ghidra/Features/Decompiler/src/decompile/cpp/types.h@@ -181,6 +181,20 @@ typedef char int1;typedef uint8 uintp;#endif+#if defined (__APPLE_CC__) && defined (__aarch64__)+#define HOST_ENDIAN 0+typedef unsigned int uintm;+typedef int intm;+typedef unsigned long uint8;+typedef long int8;+typedef unsigned int uint4;+typedef int int4;+typedef unsigned short uint2;+typedef short int2;+typedef unsigned char uint1;+typedef char int1;+typedef uint8 uintp;+#endif#if defined(_WINDOWS)#pragma warning (disable:4312)diff --git a/build.gradle b/build.gradleindex bbe7667495..ecd372c4a5 100644--- a/build.gradle+++ b/build.gradle@@ -265,6 +265,7 @@ String getCurrentPlatformName() {boolean isX86_32 = archName.equals("x86") || archName.equals("i386");boolean isX86_64 = archName.equals("x86_64") || archName.equals("amd64");+ boolean isAARCH_64 = archName.equals("aarch64");if (osName.startsWith("Windows")) {if (isX86_32) {@@ -283,6 +284,9 @@ String getCurrentPlatformName() {if (isX86_64) {return 'osx64'}+ if (isAARCH_64) {+ return 'aarch64'+ }}throw new GradleException("Unrecognized current platform -> osName = $osName, archName = $archName")}