Skip to content

Commit

Permalink
remove AARCH64 support from capstone.
Browse files Browse the repository at this point in the history
  • Loading branch information
hzqst committed Jan 3, 2024
1 parent 086d0ba commit 1a789cc
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 9 deletions.
2 changes: 1 addition & 1 deletion scripts/build-capstone-x86-Debug.bat
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ if not "%SolutionDir:~-1%"=="\" SET "SolutionDir=%SolutionDir%\"

cd /d "%SolutionDir%"

call cmake -S "%SolutionDir%thirdparty\capstone" -B "%SolutionDir%thirdparty\build\capstone\x86\Debug" -A Win32 -DCMAKE_INSTALL_PREFIX="%SolutionDir%thirdparty\install\capstone\x86\Debug" -DCAPSTONE_ARCHITECHTURE_DEFAULT=FALSE -DCAPSTONE_ARM64_SUPPORT=FALSE -DCAPSTONE_ARM_SUPPORT=FALSE -DCAPSTONE_BPF_SUPPORT=FALSE -DCAPSTONE_BUILD_CSTEST=FALSE -DCAPSTONE_BUILD_CSTOOL=FALSE -DCAPSTONE_BUILD_DIET=FALSE -DCAPSTONE_BUILD_SHARED=FALSE -DCAPSTONE_BUILD_STATIC=TRUE -DCAPSTONE_BUILD_STATIC_RUNTIME=TRUE -DCAPSTONE_BUILD_TESTS=FALSE -DCAPSTONE_DEBUG=FALSE -DCAPSTONE_EVM_SUPPORT=FALSE -DCAPSTONE_INSTALL=FALSE -DCAPSTONE_M680X_SUPPORT=FALSE -DCAPSTONE_M68K_SUPPORT=FALSE -DCAPSTONE_MIPS_SUPPORT=FALSE -DCAPSTONE_MOS65XX_SUPPORT=FALSE -DCAPSTONE_OSXKERNEL_SUPPORT=FALSE -DCAPSTONE_PPC_SUPPORT=FALSE -DCAPSTONE_RISCV_SUPPORT=FALSE -DCAPSTONE_SH_SUPPORT=FALSE -DCAPSTONE_SPARC_SUPPORT=FALSE -DCAPSTONE_SYSZ_SUPPORT=FALSE -DCAPSTONE_TMS320C64X_SUPPORT=FALSE -DCAPSTONE_IMS320C64X_SUPPORT=FALSE -DCAPSTONE_TRICORE_SUPPORT=FALSE -DCAPSTONE_USE_DEFAULT_ALLOC=TRUE -DCAPSTONE_WASM_SUPPORT=FALSE -DCAPSTONE_X86_ATT_DISABLE=FALSE -DCAPSTONE_X86_REDUCE=FALSE -DCAPSTONE_X86_SUPPORT=TRUE -DCAPSTONE_XCORE_SUPPORT=FALSE
call cmake -S "%SolutionDir%thirdparty\capstone" -B "%SolutionDir%thirdparty\build\capstone\x86\Debug" -A Win32 -DCMAKE_INSTALL_PREFIX="%SolutionDir%thirdparty\install\capstone\x86\Debug" -DCAPSTONE_AARCH64_SUPPORT=FALSE -DCAPSTONE_ARCHITECHTURE_DEFAULT=FALSE -DCAPSTONE_ARM64_SUPPORT=FALSE -DCAPSTONE_ARM_SUPPORT=FALSE -DCAPSTONE_BPF_SUPPORT=FALSE -DCAPSTONE_BUILD_CSTEST=FALSE -DCAPSTONE_BUILD_CSTOOL=FALSE -DCAPSTONE_BUILD_DIET=FALSE -DCAPSTONE_BUILD_SHARED=FALSE -DCAPSTONE_BUILD_STATIC=TRUE -DCAPSTONE_BUILD_STATIC_RUNTIME=TRUE -DCAPSTONE_BUILD_TESTS=FALSE -DCAPSTONE_DEBUG=FALSE -DCAPSTONE_EVM_SUPPORT=FALSE -DCAPSTONE_INSTALL=FALSE -DCAPSTONE_M680X_SUPPORT=FALSE -DCAPSTONE_M68K_SUPPORT=FALSE -DCAPSTONE_MIPS_SUPPORT=FALSE -DCAPSTONE_MOS65XX_SUPPORT=FALSE -DCAPSTONE_OSXKERNEL_SUPPORT=FALSE -DCAPSTONE_PPC_SUPPORT=FALSE -DCAPSTONE_RISCV_SUPPORT=FALSE -DCAPSTONE_SH_SUPPORT=FALSE -DCAPSTONE_SPARC_SUPPORT=FALSE -DCAPSTONE_SYSZ_SUPPORT=FALSE -DCAPSTONE_TMS320C64X_SUPPORT=FALSE -DCAPSTONE_IMS320C64X_SUPPORT=FALSE -DCAPSTONE_TRICORE_SUPPORT=FALSE -DCAPSTONE_USE_DEFAULT_ALLOC=TRUE -DCAPSTONE_WASM_SUPPORT=FALSE -DCAPSTONE_X86_ATT_DISABLE=FALSE -DCAPSTONE_X86_REDUCE=FALSE -DCAPSTONE_X86_SUPPORT=TRUE -DCAPSTONE_XCORE_SUPPORT=FALSE

call cmake --build "%SolutionDir%thirdparty\build\capstone\x86\Debug" --config Debug --target install
2 changes: 1 addition & 1 deletion scripts/build-capstone-x86-Release.bat
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ if not "%SolutionDir:~-1%"=="\" SET "SolutionDir=%SolutionDir%\"

cd /d "%SolutionDir%"

call cmake -S "%SolutionDir%thirdparty\capstone" -B "%SolutionDir%thirdparty\build\capstone\x86\Release" -A Win32 -DCMAKE_INSTALL_PREFIX="%SolutionDir%thirdparty\install\capstone\x86\Release" -DCAPSTONE_ARCHITECHTURE_DEFAULT=FALSE -DCAPSTONE_ARM64_SUPPORT=FALSE -DCAPSTONE_ARM_SUPPORT=FALSE -DCAPSTONE_BPF_SUPPORT=FALSE -DCAPSTONE_BUILD_CSTEST=FALSE -DCAPSTONE_BUILD_CSTOOL=FALSE -DCAPSTONE_BUILD_DIET=FALSE -DCAPSTONE_BUILD_SHARED=FALSE -DCAPSTONE_BUILD_STATIC=TRUE -DCAPSTONE_BUILD_STATIC_RUNTIME=TRUE -DCAPSTONE_BUILD_TESTS=FALSE -DCAPSTONE_DEBUG=FALSE -DCAPSTONE_EVM_SUPPORT=FALSE -DCAPSTONE_INSTALL=FALSE -DCAPSTONE_M680X_SUPPORT=FALSE -DCAPSTONE_M68K_SUPPORT=FALSE -DCAPSTONE_MIPS_SUPPORT=FALSE -DCAPSTONE_MOS65XX_SUPPORT=FALSE -DCAPSTONE_OSXKERNEL_SUPPORT=FALSE -DCAPSTONE_PPC_SUPPORT=FALSE -DCAPSTONE_RISCV_SUPPORT=FALSE -DCAPSTONE_SH_SUPPORT=FALSE -DCAPSTONE_SPARC_SUPPORT=FALSE -DCAPSTONE_SYSZ_SUPPORT=FALSE -DCAPSTONE_TMS320C64X_SUPPORT=FALSE -DCAPSTONE_IMS320C64X_SUPPORT=FALSE -DCAPSTONE_TRICORE_SUPPORT=FALSE -DCAPSTONE_USE_DEFAULT_ALLOC=TRUE -DCAPSTONE_WASM_SUPPORT=FALSE -DCAPSTONE_X86_ATT_DISABLE=FALSE -DCAPSTONE_X86_REDUCE=FALSE -DCAPSTONE_X86_SUPPORT=TRUE -DCAPSTONE_XCORE_SUPPORT=FALSE
call cmake -S "%SolutionDir%thirdparty\capstone" -B "%SolutionDir%thirdparty\build\capstone\x86\Release" -A Win32 -DCMAKE_INSTALL_PREFIX="%SolutionDir%thirdparty\install\capstone\x86\Release" -DCAPSTONE_AARCH64_SUPPORT=FALSE -DCAPSTONE_ARCHITECHTURE_DEFAULT=FALSE -DCAPSTONE_ARM64_SUPPORT=FALSE -DCAPSTONE_ARM_SUPPORT=FALSE -DCAPSTONE_BPF_SUPPORT=FALSE -DCAPSTONE_BUILD_CSTEST=FALSE -DCAPSTONE_BUILD_CSTOOL=FALSE -DCAPSTONE_BUILD_DIET=FALSE -DCAPSTONE_BUILD_SHARED=FALSE -DCAPSTONE_BUILD_STATIC=TRUE -DCAPSTONE_BUILD_STATIC_RUNTIME=TRUE -DCAPSTONE_BUILD_TESTS=FALSE -DCAPSTONE_DEBUG=FALSE -DCAPSTONE_EVM_SUPPORT=FALSE -DCAPSTONE_INSTALL=FALSE -DCAPSTONE_M680X_SUPPORT=FALSE -DCAPSTONE_M68K_SUPPORT=FALSE -DCAPSTONE_MIPS_SUPPORT=FALSE -DCAPSTONE_MOS65XX_SUPPORT=FALSE -DCAPSTONE_OSXKERNEL_SUPPORT=FALSE -DCAPSTONE_PPC_SUPPORT=FALSE -DCAPSTONE_RISCV_SUPPORT=FALSE -DCAPSTONE_SH_SUPPORT=FALSE -DCAPSTONE_SPARC_SUPPORT=FALSE -DCAPSTONE_SYSZ_SUPPORT=FALSE -DCAPSTONE_TMS320C64X_SUPPORT=FALSE -DCAPSTONE_IMS320C64X_SUPPORT=FALSE -DCAPSTONE_TRICORE_SUPPORT=FALSE -DCAPSTONE_USE_DEFAULT_ALLOC=TRUE -DCAPSTONE_WASM_SUPPORT=FALSE -DCAPSTONE_X86_ATT_DISABLE=FALSE -DCAPSTONE_X86_REDUCE=FALSE -DCAPSTONE_X86_SUPPORT=TRUE -DCAPSTONE_XCORE_SUPPORT=FALSE

call cmake --build "%SolutionDir%thirdparty\build\capstone\x86\Release" --config Release --target install
4 changes: 4 additions & 0 deletions src/LoadBlob.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ bool BlobVerifyStringRange(PVOID Ptr, ULONG Size, PVOID ValidBase, ULONG ValidSi

BlobHandle_t LoadBlobFromBuffer(BYTE* pBuffer, DWORD dwBufferSize, PVOID BlobSectionBase, ULONG BlobSectionSize)
{
#if defined(METAHOOK_BLOB_SUPPORT) || defined(_DEBUG)
auto pBlobModule = (BlobModule_t *)malloc(sizeof(BlobModule_t));

if (!pBlobModule)
Expand Down Expand Up @@ -299,6 +300,9 @@ BlobHandle_t LoadBlobFromBuffer(BYTE* pBuffer, DWORD dwBufferSize, PVOID BlobSec
}

return pBlobModule;
#else
return NULL;
#endif
}

BlobHandle_t LoadBlobFile(const char *szFileName, PVOID BlobSectionBase, ULONG BlobSectionSize)
Expand Down
14 changes: 7 additions & 7 deletions src/metahook.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -521,14 +521,14 @@ int MH_LoadPlugin(const std::string &filepath, const std::string &filename)
{
plug->iInterfaceVersion = 2;

if (CommandLine()->CheckParm("-metahook_legacy_v2_api"))
{
//if (CommandLine()->CheckParm("-metahook_legacy_v2_api"))
//{
((IPluginsV2*)plug->pPluginAPI)->Init(&gMetaHookAPI_LegacyV2, &gInterface, &gMetaSave);
}
else
{
((IPluginsV2*)plug->pPluginAPI)->Init(&gMetaHookAPI, &gInterface, &gMetaSave);
}
//}
//else
//{
// ((IPluginsV2*)plug->pPluginAPI)->Init(&gMetaHookAPI, &gInterface, &gMetaSave);
//}
}
else
{
Expand Down

0 comments on commit 1a789cc

Please sign in to comment.