GP-4738: Ghidra native components (decompiler, GNU demangler, etc) now

run properly on Windows ARM using x86 emulation
This commit is contained in:
Ryan Kurtz 2024-07-01 10:20:08 -04:00
parent b78c975ee3
commit 1b10ce4689
3 changed files with 19 additions and 13 deletions

View File

@ -474,13 +474,13 @@ public class Application {
exactFilename);
}
// Allow win_x86_32 to be used for win_x86_64 as fallback
if (file == null && Platform.CURRENT_PLATFORM == Platform.WIN_X86_64) {
file = getModuleFile(module, "build/os/" + Platform.WIN_X86_32.getDirectoryName(),
// Allow win_x86_64 to be used for win_arm_64 as fallback (requires Windows emulation)
if (file == null && Platform.CURRENT_PLATFORM == Platform.WIN_ARM_64) {
file = getModuleFile(module, "build/os/" + Platform.WIN_X86_64.getDirectoryName(),
exactFilename);
}
if (file == null && Platform.CURRENT_PLATFORM == Platform.WIN_X86_64) {
file = getModuleFile(module, "os/" + Platform.WIN_X86_32.getDirectoryName(),
if (file == null && Platform.CURRENT_PLATFORM == Platform.WIN_ARM_64) {
file = getModuleFile(module, "os/" + Platform.WIN_X86_64.getDirectoryName(),
exactFilename);
}
@ -520,12 +520,12 @@ public class Application {
file = findModuleFile("os/" + Platform.CURRENT_PLATFORM.getDirectoryName(), path);
}
// Allow win_x86_32 to be used for win_x86_64 as fallback
if (file == null && Platform.CURRENT_PLATFORM == Platform.WIN_X86_64) {
file = findModuleFile("build/os/" + Platform.WIN_X86_32.getDirectoryName(), path);
// Allow win_x86_64 to be used for win_arm_64 as fallback (requires Windows emulation)
if (file == null && Platform.CURRENT_PLATFORM == Platform.WIN_ARM_64) {
file = findModuleFile("build/os/" + Platform.WIN_X86_64.getDirectoryName(), path);
}
if (file == null && Platform.CURRENT_PLATFORM == Platform.WIN_X86_64) {
file = findModuleFile("os/" + Platform.WIN_X86_32.getDirectoryName(), path);
if (file == null && Platform.CURRENT_PLATFORM == Platform.WIN_ARM_64) {
file = findModuleFile("os/" + Platform.WIN_X86_64.getDirectoryName(), path);
}
// Allow mac_x86_64 to be used for mac_arm_64 as fallback (requires macOS Rosetta 2)

View File

@ -34,6 +34,11 @@ public enum Platform {
* Identifies a Windows x86 64-bit OS.
*/
WIN_X86_64(OperatingSystem.WINDOWS, Architecture.X86_64, "win_x86_64", ".dll", ".exe"),
/**
* Identifies a Windows ARM 64-bit OS.
*/
WIN_ARM_64(OperatingSystem.WINDOWS, Architecture.ARM_64, "win_arm_64", ".dll", ".exe"),
/**
* Identifies a Linux x86 32-bit OS.

View File

@ -19,7 +19,7 @@
<h1>Ghidra Installation Guide</h1>
<p>
The installation information provided is effective as of Ghidra 11.1 and is subject to change with
The installation information provided is effective as of Ghidra 11.1.2 and is subject to change with
future releases.
</p>
@ -68,7 +68,7 @@ future releases.
<h2><a name="Platforms"></a>Platforms Supported</h2>
<ul>
<li>Windows 10 or later (x86 64-bit)</li>
<li>Windows 10 or later (64-bit)</li>
<li>Linux (64-bit)</li>
<li>macOS 10.13 or later</li>
</ul>
@ -318,6 +318,7 @@ public Ghidra release includes native binaries for the following platforms.
<p>NOTE: For some non-public Ghidra releases macOS natives may be omitted.</p>
<ul>
<li>Windows 10 or later, x86 64-bit</li>
<li>Windows 10 or later, ARM 64-bit (using x86 emulation)</li>
<li>Linux x86 64-bit</li>
<li>macOS x86 64-bit</li>
<li>macOS ARM 64-bit</li>
@ -330,7 +331,7 @@ public Ghidra release includes native binaries for the following platforms.
<li>FreeBSD ARM 64-bit (no debugger support)</li>
</ul>
<p>For supported systems where native binaries have not been supplied, or those that are supplied
fail to run properly, it may be neccessary to build the native Ghidra binaries.
fail to run properly, it may be necessary to build the native Ghidra binaries.
In order to build native binaries for your platform, you will need the following installed on your
system:</p>
<ul>