# Anvill 机器码到 LLVM bitcode 提升器

> Trail of Bits 基于 Remill 开发的机器码提升器，目标是生成高质量的 LLVM bitcode，使其接近 Clang 编译语义等价的 C 函数时产生的结果，再交由 Rellic 进一步反编译为 C。其 anvill-decompile-spec 工具读取描述二进制底层 ABI 信息的 Protobuf 规格文件，把其中的函数和全局变量提升为 LLVM IR 或 bitcode；一组 LLVM 遍负责降级 Remill 内建函数，并恢复栈帧、跳转表和 switch 结构。README 称 main 分支读取的规格文件由一个仍在开发、尚未开源的 Ghidra 插件生成，开源的 Binary Ninja 规格生成脚本则保留在 binja-final-version 标签中。

- 类型：工具
- 目标：二进制
- 类别：二进制分析库
- 关联：基础工具
- 来源复核于：2026-10-27
- 收录于：2026-11-09
- 原始资源：<https://github.com/lifting-bits/anvill>
- 一手来源：<https://github.com/lifting-bits/anvill/blob/9948d26cd993952d6010a59f27a198cbe3c79c1d/README.md>
- 目录页面：<https://awesomerea.org/zh/resources/anvill/>
- 记录 JSON：<https://awesomerea.org/resources/anvill/record.json>
- 英文版：[English](https://awesomerea.org/resources/anvill/index.md)

## 使用条件与局限

- 最新 GitHub 发行版为 v0.1.39（2021-02-22）；后续标签达到 v0.2.1。固定的 master 提交比该标签多六个提交，最后一次代码改动日期为 2022-12-06。
- Linux 曾在 Ubuntu 20.04 上测试。CMakeLists.txt 要求 CMake 3.19；README 还列出 Clang 12+、Remill、Python 3.9 与 Ghidra。CI 在 Ubuntu 20.04 和 macOS 11 上使用 LLVM 14 与 15 构建。
- anvill-decompile-spec 需要描述函数、全局变量与内存区域的 Protobuf 规格文件。README 建议开源用户使用 binja-final-version 标签；CI 从私有仓库安装 Ghidra 规格生成器。支持的调用约定包括 x86、x86-64、AArch32、AArch64 与 SPARC。
- CI 使用加密的 Binary Ninja 归档及受口令保护的 AMP 挑战二进制进行集成测试。
- 许可证：AGPL-3.0。使用 -DANVILL_ENABLE_TESTS=true 启用单元测试。

## 一手来源

1. <https://github.com/lifting-bits/anvill/blob/9948d26cd993952d6010a59f27a198cbe3c79c1d/README.md>
2. <https://github.com/lifting-bits/anvill/blob/9948d26cd993952d6010a59f27a198cbe3c79c1d/bin/Decompile/Main.cpp>
3. <https://github.com/lifting-bits/anvill/blob/9948d26cd993952d6010a59f27a198cbe3c79c1d/data_specifications/specification.proto>
4. <https://github.com/lifting-bits/anvill/blob/9948d26cd993952d6010a59f27a198cbe3c79c1d/docs/SpecificationFormat.md>
5. <https://github.com/lifting-bits/anvill/tree/9948d26cd993952d6010a59f27a198cbe3c79c1d/lib/Passes>
6. <https://github.com/lifting-bits/anvill/tree/9948d26cd993952d6010a59f27a198cbe3c79c1d/lib/Arch>
7. <https://github.com/lifting-bits/anvill/tree/9948d26cd993952d6010a59f27a198cbe3c79c1d/python/anvill>
8. <https://github.com/lifting-bits/anvill/blob/9948d26cd993952d6010a59f27a198cbe3c79c1d/CMakeLists.txt>
9. <https://github.com/lifting-bits/anvill/blob/9948d26cd993952d6010a59f27a198cbe3c79c1d/Dockerfile>
10. <https://github.com/lifting-bits/anvill/blob/9948d26cd993952d6010a59f27a198cbe3c79c1d/.github/workflows/build.yml>
11. <https://github.com/lifting-bits/anvill/blob/9948d26cd993952d6010a59f27a198cbe3c79c1d/ci/install_binja.sh>
12. <https://github.com/lifting-bits/anvill/blob/9948d26cd993952d6010a59f27a198cbe3c79c1d/LICENSE>
13. <https://github.com/lifting-bits/anvill/releases/tag/v0.1.39>
14. <https://github.com/lifting-bits/anvill/tree/8662cdcca6e63ea10322928a89a0168a6a4270e9>
15. <https://github.com/lifting-bits/rellic/blob/370abaad86ae5adad82f85b81aff14557462b7f2/README.md>

## 同分区更多条目：原生二进制

- [XRefer 二进制导航插件](https://awesomerea.org/zh/resources/xrefer/index.md) · 工具
- [dsdump（paradiseduo 封装版）Mach-O 类信息导出工具](https://awesomerea.org/zh/resources/paradiseduo-dsdump/index.md) · 工具
- [Dr. Memory](https://awesomerea.org/zh/resources/dr-memory/index.md) · 工具
- [Intel XED](https://awesomerea.org/zh/resources/intel-xed/index.md) · 工具
- [Keystone](https://awesomerea.org/zh/resources/keystone/index.md) · 工具
- [Microsoft Detours](https://awesomerea.org/zh/resources/microsoft-detours/index.md) · 工具

## 关于此条目

说明已依据一手来源复核。
原创说明采用 MIT 许可；外部项目、论文与素材保留各自的权利和许可。
