diff options
| author | Brian Potchik <brian@vector35.com> | 2026-02-17 07:20:51 -0500 |
|---|---|---|
| committer | Brian Potchik <brian@vector35.com> | 2026-02-17 07:20:51 -0500 |
| commit | 56da69aa61654521424cf1af87bcce41a1c0df01 (patch) | |
| tree | 5ee87934d47933b48c8e9858a7b5e1c3deaf62d7 /view/macho/universaltransform.h | |
| parent | da19d7e633872ad1c4ba5155e714062ba5c8e5ae (diff) | |
Handle Universal binaries through container transform system.
Diffstat (limited to 'view/macho/universaltransform.h')
| -rw-r--r-- | view/macho/universaltransform.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/view/macho/universaltransform.h b/view/macho/universaltransform.h new file mode 100644 index 00000000..2d54d65e --- /dev/null +++ b/view/macho/universaltransform.h @@ -0,0 +1,24 @@ +#pragma once + +#include "binaryninjaapi.h" +#include "machoview.h" + +namespace BinaryNinja +{ + void InitUniversalTransform(); + + class UniversalTransform : public Transform + { + public: + static const std::map<std::pair<cpu_type_t, cpu_subtype_t>, std::string>& GetArchitectures(); + static std::string ArchitectureToString(cpu_type_t cpuType, cpu_subtype_t cpuSubType, bool& is64Bit); + static bool ParseHeaders(Ref<BinaryView> data, FatHeader& fatHeader, std::vector<FatArch64>& fatArchEntries, bool& isFat64, std::string& errorMsg); + + UniversalTransform(); + + virtual bool Decode(const DataBuffer& input, DataBuffer& output, const std::map<std::string, DataBuffer>& params) override; + virtual bool DecodeWithContext(Ref<TransformContext> context, const std::map<std::string, DataBuffer>& params) override; + virtual bool Encode(const DataBuffer& input, DataBuffer& output, const std::map<std::string, DataBuffer>& params) override; + virtual bool CanDecode(Ref<BinaryView> input) const override; + }; +} |
