Upstream has added a compression mechanism for compiled sleigh files. They use Zlib to perform the compression and have added the source code to the Ghidra repo. However, this commit does not use Ghidra's Zlib source and instead searches for it on the host.
This commit also fixes a number of bugs that prevent various parts of the CI pipeline from working on supported OSes. These patches will be reported upstream.
Changed files:
```
M Ghidra/Features/Decompiler/src/decompile/cpp/Makefile
M Ghidra/Features/Decompiler/src/decompile/cpp/address.hh
M Ghidra/Features/Decompiler/src/decompile/cpp/architecture.hh
M Ghidra/Features/Decompiler/src/decompile/cpp/block.hh
M Ghidra/Features/Decompiler/src/decompile/cpp/comment.hh
A Ghidra/Features/Decompiler/src/decompile/cpp/compression.cc
A Ghidra/Features/Decompiler/src/decompile/cpp/compression.hh
M Ghidra/Features/Decompiler/src/decompile/cpp/float.cc
M Ghidra/Features/Decompiler/src/decompile/cpp/float.hh
M Ghidra/Features/Decompiler/src/decompile/cpp/flow.cc
M Ghidra/Features/Decompiler/src/decompile/cpp/fspec.cc
M Ghidra/Features/Decompiler/src/decompile/cpp/fspec.hh
M Ghidra/Features/Decompiler/src/decompile/cpp/funcdata.hh
M Ghidra/Features/Decompiler/src/decompile/cpp/funcdata_block.cc
M Ghidra/Features/Decompiler/src/decompile/cpp/ifacedecomp.cc
M Ghidra/Features/Decompiler/src/decompile/cpp/inject_sleigh.cc
M Ghidra/Features/Decompiler/src/decompile/cpp/jumptable.hh
M Ghidra/Features/Decompiler/src/decompile/cpp/marshal.cc
M Ghidra/Features/Decompiler/src/decompile/cpp/marshal.hh
M Ghidra/Features/Decompiler/src/decompile/cpp/op.cc
M Ghidra/Features/Decompiler/src/decompile/cpp/op.hh
M Ghidra/Features/Decompiler/src/decompile/cpp/options.cc
M Ghidra/Features/Decompiler/src/decompile/cpp/pcodeparse.cc
M Ghidra/Features/Decompiler/src/decompile/cpp/pcodeparse.y
M Ghidra/Features/Decompiler/src/decompile/cpp/semantics.cc
M Ghidra/Features/Decompiler/src/decompile/cpp/semantics.hh
A Ghidra/Features/Decompiler/src/decompile/cpp/slaformat.cc
A Ghidra/Features/Decompiler/src/decompile/cpp/slaformat.hh
M Ghidra/Features/Decompiler/src/decompile/cpp/sleigh.cc
M Ghidra/Features/Decompiler/src/decompile/cpp/sleigh_arch.cc
M Ghidra/Features/Decompiler/src/decompile/cpp/sleighbase.cc
M Ghidra/Features/Decompiler/src/decompile/cpp/sleighbase.hh
M Ghidra/Features/Decompiler/src/decompile/cpp/slgh_compile.cc
M Ghidra/Features/Decompiler/src/decompile/cpp/slgh_compile.hh
M Ghidra/Features/Decompiler/src/decompile/cpp/slghparse.cc
M Ghidra/Features/Decompiler/src/decompile/cpp/slghparse.hh
M Ghidra/Features/Decompiler/src/decompile/cpp/slghparse.y
M Ghidra/Features/Decompiler/src/decompile/cpp/slghpatexpress.cc
M Ghidra/Features/Decompiler/src/decompile/cpp/slghpatexpress.hh
M Ghidra/Features/Decompiler/src/decompile/cpp/slghpattern.cc
M Ghidra/Features/Decompiler/src/decompile/cpp/slghpattern.hh
M Ghidra/Features/Decompiler/src/decompile/cpp/slghscan.cc
M Ghidra/Features/Decompiler/src/decompile/cpp/slghscan.l
M Ghidra/Features/Decompiler/src/decompile/cpp/slghsymbol.cc
M Ghidra/Features/Decompiler/src/decompile/cpp/slghsymbol.hh
M Ghidra/Features/Decompiler/src/decompile/cpp/space.cc
M Ghidra/Features/Decompiler/src/decompile/cpp/space.hh
M Ghidra/Features/Decompiler/src/decompile/cpp/translate.cc
M Ghidra/Features/Decompiler/src/decompile/cpp/translate.hh
M Ghidra/Features/Decompiler/src/decompile/cpp/type.cc
M Ghidra/Features/Decompiler/src/decompile/unittests/testfuncproto.cc
M Ghidra/Features/Decompiler/src/decompile/unittests/testmarshal.cc
A Ghidra/Features/Decompiler/src/decompile/zlib/README.txt
A Ghidra/Features/Decompiler/src/decompile/zlib/adler32.c
A Ghidra/Features/Decompiler/src/decompile/zlib/deflate.c
A Ghidra/Features/Decompiler/src/decompile/zlib/deflate.h
A Ghidra/Features/Decompiler/src/decompile/zlib/gzguts.h
A Ghidra/Features/Decompiler/src/decompile/zlib/inffast.c
A Ghidra/Features/Decompiler/src/decompile/zlib/inffast.h
A Ghidra/Features/Decompiler/src/decompile/zlib/inffixed.h
A Ghidra/Features/Decompiler/src/decompile/zlib/inflate.c
A Ghidra/Features/Decompiler/src/decompile/zlib/inflate.h
A Ghidra/Features/Decompiler/src/decompile/zlib/inftrees.c
A Ghidra/Features/Decompiler/src/decompile/zlib/inftrees.h
A Ghidra/Features/Decompiler/src/decompile/zlib/trees.c
A Ghidra/Features/Decompiler/src/decompile/zlib/trees.h
A Ghidra/Features/Decompiler/src/decompile/zlib/zconf.h
A Ghidra/Features/Decompiler/src/decompile/zlib/zlib.h
A Ghidra/Features/Decompiler/src/decompile/zlib/zutil.c
A Ghidra/Features/Decompiler/src/decompile/zlib/zutil.h
M Ghidra/Processors/68000/data/languages/68000.ldefs
M Ghidra/Processors/AARCH64/certification.manifest
M Ghidra/Processors/AARCH64/data/languages/AARCH64.ldefs
M Ghidra/Processors/AARCH64/data/languages/AARCH64.opinion
A Ghidra/Processors/AARCH64/data/languages/AARCH64_swift.cspec
M Ghidra/Processors/AARCH64/data/languages/AppleSilicon.ldefs
M Ghidra/Processors/ARM/data/languages/ARM.ldefs
M Ghidra/Processors/Loongarch/data/languages/loongarch.ldefs
M Ghidra/Processors/MIPS/data/languages/mips.ldefs
M Ghidra/Processors/PA-RISC/data/languages/pa-risc.sinc
M Ghidra/Processors/PowerPC/data/languages/ppc.ldefs
M Ghidra/Processors/RISCV/data/languages/riscv.ldefs
M Ghidra/Processors/Sparc/data/languages/SparcV9.ldefs
M Ghidra/Processors/SuperH4/data/languages/SuperH4.ldefs
M Ghidra/Processors/Xtensa/data/languages/xtensa.ldefs
M Ghidra/Processors/x86/certification.manifest
A Ghidra/Processors/x86/data/languages/x86-64-swift.cspec
M Ghidra/Processors/x86/data/languages/x86.ldefs
M Ghidra/Processors/x86/data/languages/x86.opinion
```
* Major CMake refactor
* CI fixes
* Fix CMake errors
* Install graphviz on Windows
* More consistent CMake build types
* Fix compiler defines for Windows
* Fix more bugs
* Add standalone tool building support
* Fix typo
* Update README
* Install sleighLift before trying to smoketest it
* Test coverage preset
The compiler option '-fkeep-inline-functions' originally included with
the coverage build type causes errors with the message "undefined
reference to 'vtable for OpAction*'" for all OpAction subclasses.
This StackOverflow answer might help in resolving this?
https://stackoverflow.com/a/57504289
* Build documentation by default with CI presets
* Use COMPONENT for install commands
This allows for someone to specify which components they want to install
if they only want or need a subset
* Support cross compiling with host system sleigh compiler
* Various fixes found during review
* Move "_WINDOWS" define to CMakeLists.txt file
* Rename ToB 'tools' directory to 'extra-tools'
* Separate projects for sleigh tools
Library is still top-level CMakeLists.txt
More options
* CMake find_package(Git)
* Fix bad merge for patch paths
* Fix missing libconfig.h header install
* Fix issues with installation of headers
* More refactoring
* Refactor sleighexample into its own project/directory
* Refactor specfiles building into separate project/directory
* Check for termios.h header and set define if found
* Update READMEs
* Better consistency with install rules
* Build sleighLift as a standalone project with added source
* More changes to CMake subprojects
* Also add "Specs" component to sleigh installation config
* Try to be better at bootstrapping subprojects (hopefully this doesn't
bite us, but if it does, I'm happy to remove it and say "not
supported")
* Address some code review
* Add project sleigh_tool for tool subdirectory
Could make it easier to build just the tools
* Add help text to name the tool executable name
* Add license notice to CMake files
* Fix/Remove too specific CPack packaging configuration
* Consistent capitalization of Sleigh
Co-authored-by: Alex Cameron <asc@tetsuo.sh>
Errors with Ghidra repo FetchContent when using CMake less than this
version. FetchContent runs the patch step before update and so we lose
the patches, which can cause build errors.
CMake 3.15 can still be used if you specify your own Ghidra repo on the
command line.
* Consistent CMake project variable names - project name case
While there is not official convention, internally CMake uses the case
of the project name in auto-generated variables for the project, like
<ProjectName>_BINARY_DIR. We should follow that convention.
* README: Fix install spec directory variable name
Co-authored-by: Alex Cameron <asc@tetsuo.sh>
* Create sleigh_compile CMake module
Useful for other projects that want to compile slaspec files
* Expose sleigh_INSTALL_SPECDIR to reach specfiles
* Use configure_package_config_file
And adjust where the installation of the CMake config files are located
* Fix magic variable in sleighCompile module
* Use MAIN_DEPENDENCY in add_custom_command
* Move some variables around
* Revert needless change
* Cleaning sleighCompile
* Add documentation about new feature
* Docs update
* cmake: Add copyright notice to `sleighCompile` helper
Co-authored-by: Alex Cameron <asc@tetsuo.sh>
* sleigh-lift: Add support for loading PSPEC files
* sleigh-lift: Remove code to manually switch on `longMode`
* doc: Fix README usage text
* Update main.cpp
Co-authored-by: Peter Goodman <peter@trailofbits.com>
* cmake: Specify headers for the sla and decomp libraries
* example: Create `sleigh-lift` program
* Move `sleigh-lift` under tools and make it part of the same CMake project
* Turn on more stringent warnings
* Consolidate on types
* Only apply stringent compiler warnings for debug builds
* Add missing cassert include
* Rename `ParseBytes` => `ParseHexBytes`
* Fix types
* Add license header to `sleigh-lift`
* Add section to README introducing `sleigh-lift`
* Reword README
* Add `libsleigh.hh` which includes all SLEIGH headers and applies
appropriate pragmas to silence warnings
* Change `find_package` test to use the `libsleigh.hh` header
* Fix `libsleigh` header to check install directory
* Older version of Clang don't have `-Wdeprecated-copy` as a separate
warning to `-Wdeprecated`