GP-4465 get Golang analysis working on AARCH64, AppleSilicon + MachO

Inspired by PR #6157 (by seekbytes), adds support for Apple MachO AARCH64 binaries to existing golang analyzer.
This commit is contained in:
dev747368
2024-04-24 11:04:54 -04:00
parent 6132ddc3d0
commit 63512f3759
20 changed files with 623 additions and 129 deletions

View File

@@ -1,4 +1,7 @@
# Golang function names which do not return
#runtime.abort and runtime.systemstack_switch intentionally have bytes that can cause undefined instruction errors in Ghidra
runtime.abort
runtime.abort.abi0
runtime.exit.abi0
runtime.dieFromSignal
@@ -7,6 +10,12 @@ runtime.fatal
runtime.fatalthrow
runtime.fatalpanic
runtime.throw
runtime.systemstack_switch
runtime.newstack
runtime.newstack.abi0
runtime.mstart
runtime.mstart.abi0
runtime.mstart0
runtime.gopanic
runtime.goPanicExtendIndex

View File

@@ -1,26 +1,29 @@
<noReturnFunctionConstraints>
<executable_format name="Executable and Linking Format (ELF)">
<compiler id="golang">
<functionNamesFile>GolangFunctionsThatDoNotReturn</functionNamesFile>
</compiler>
<compiler name="rustc">
<functionNamesFile>RustFunctionsThatDoNotReturn</functionNamesFile>
</compiler>
<functionNamesFile>ElfFunctionsThatDoNotReturn</functionNamesFile>
</executable_format>
<executable_format name="Mac OS X Mach-O">
<functionNamesFile>MachOFunctionsThatDoNotReturn</functionNamesFile>
</executable_format>
<executable_format name="DYLD Cache">
<functionNamesFile>MachOFunctionsThatDoNotReturn</functionNamesFile>
</executable_format>
<executable_format name="Portable Executable (PE)">
<compiler id="golang">
<functionNamesFile>GolangFunctionsThatDoNotReturn</functionNamesFile>
</compiler>
<compiler name="rustc">
<functionNamesFile>RustFunctionsThatDoNotReturn</functionNamesFile>
</compiler>
<functionNamesFile>PEFunctionsThatDoNotReturn</functionNamesFile>
</executable_format>
<executable_format name="Executable and Linking Format (ELF)">
<compiler id="golang">
<functionNamesFile>GolangFunctionsThatDoNotReturn</functionNamesFile>
</compiler>
<compiler name="rustc">
<functionNamesFile>RustFunctionsThatDoNotReturn</functionNamesFile>
</compiler>
<functionNamesFile>ElfFunctionsThatDoNotReturn</functionNamesFile>
</executable_format>
<executable_format name="Mac OS X Mach-O">
<compiler id="golang">
<functionNamesFile>GolangFunctionsThatDoNotReturn</functionNamesFile>
</compiler>
<functionNamesFile>MachOFunctionsThatDoNotReturn</functionNamesFile>
</executable_format>
<executable_format name="DYLD Cache">
<functionNamesFile>MachOFunctionsThatDoNotReturn</functionNamesFile>
</executable_format>
<executable_format name="Portable Executable (PE)">
<compiler id="golang">
<functionNamesFile>GolangFunctionsThatDoNotReturn</functionNamesFile>
</compiler>
<compiler name="rustc">
<functionNamesFile>RustFunctionsThatDoNotReturn</functionNamesFile>
</compiler>
<functionNamesFile>PEFunctionsThatDoNotReturn</functionNamesFile>
</executable_format>
</noReturnFunctionConstraints>