diff options
| author | Nguyễn Gia Phong <cnx@loang.net> | 2024-12-19 13:36:42 +0900 |
|---|---|---|
| committer | Nguyễn Gia Phong <cnx@loang.net> | 2025-01-09 17:01:53 +0900 |
| commit | c6ac2488c9bfac7db4d5efdcac7a85449ef15d37 (patch) | |
| tree | eefde3ba3efa1b1c04cea41b04ec476d24277d3b /patches/e9patch-zydis-4.1.0.patch | |
| parent | e7551939f40f3097bb6a358a48e5fc24825d7369 (diff) | |
| download | loftix-c6ac2488c9bfac7db4d5efdcac7a85449ef15d37.tar.gz | |
Update E9Patch
Diffstat (limited to 'patches/e9patch-zydis-4.1.0.patch')
| -rw-r--r-- | patches/e9patch-zydis-4.1.0.patch | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/patches/e9patch-zydis-4.1.0.patch b/patches/e9patch-zydis-4.1.0.patch new file mode 100644 index 0000000..9ce42d6 --- /dev/null +++ b/patches/e9patch-zydis-4.1.0.patch @@ -0,0 +1,29 @@ +commit c02dd23b12fd687a041ab3b872b3f989cd1342dc +Author: Nguyễn Gia Phong <cnx@loang.net> +Date: 2024-11-18 15:13:17 +0900 + + Make compatible with Zydis 4.1.0 + +diff --git a/src/e9tool/e9x86_64.cpp b/src/e9tool/e9x86_64.cpp +index 6a7f5cff3692..03eb3a41dd66 100644 +--- a/src/e9tool/e9x86_64.cpp ++++ b/src/e9tool/e9x86_64.cpp +@@ -152,8 +152,7 @@ void e9tool::getInstrInfo(const ELF *elf, const Instr *I, InstrInfo *info, + ZydisDecodedOperand operands[ZYDIS_MAX_OPERAND_COUNT]; + + ZyanStatus result = ZydisDecoderDecodeFull(&decoder, +- elf->data + I->offset, I->size, D, operands, ZYDIS_MAX_OPERAND_COUNT, +- 0); ++ elf->data + I->offset, I->size, D, operands); + if (!ZYAN_SUCCESS(result) || I->size != D->length || + D->operand_count > sizeof(info->op) / sizeof(info->op[0])) + error("failed to decompress instruction at address 0x%lx; decode " +@@ -336,7 +335,7 @@ void e9tool::getInstrInfo(const ELF *elf, const Instr *I, InstrInfo *info, + info->string.section = elf->strs + shdr->sh_name; + result = ZydisFormatterFormatInstruction(&formatter, D, operands, + D->operand_count_visible, info->string.instr, +- sizeof(info->string.instr)-1, I->address); ++ sizeof(info->string.instr)-1, I->address, ZYAN_NULL); + if (!ZYAN_SUCCESS(result)) + error("failed to decompress instruction at address 0x%lx; " + "formatting failed", I->address); |
