This initial commit does not add any specific binary analyses yet, it merely contains the boilerplate to introduce a new BOLT-based tool. This basically combines the 4 first patches from the prototype pac-ret and stack-clash binary analyzer discussed in RFC https://discourse.llvm.org/t/rfc-bolt-based-binary-analysis-tool-to-verify-correctness-of-security-hardening/78148 and published at https://github.com/llvm/llvm-project/compare/main...kbeyls:llvm-project:bolt-gadget-scanner-prototype The introduction of such a BOLT-based binary analysis tool was proposed and discussed in at least the following places: - The RFC pointed to above - EuroLLVM 2024 round table https://discourse.llvm.org/t/summary-of-bolt-as-a-binary-analysis-tool-round-table-at-eurollvm/78441 The round table showed quite a few people interested in being able to build a custom binary analysis quickly with a tool like this. - Also at the US LLVM dev meeting a few weeks ago, I heard interest from a few people, asking when the tool would be available upstream. - The presentation "Adding Pointer Authentication ABI support for your ELF platform" (https://llvm.swoogo.com/2024devmtg/session/2512720/adding-pointer-authentication-abi-support-for-your-elf-platform) explicitly mentioned interest to extend the prototype tool to verify correct implementation of pauthabi.
21 lines
764 B
Markdown
21 lines
764 B
Markdown
# BOLT-based binary analysis
|
|
|
|
As part of post-link-time optimizing, BOLT needs to perform a range of analyses
|
|
on binaries such as recontructing control flow graphs, and more.
|
|
|
|
The `llvm-bolt-binary-analysis` tool enables running requested binary analyses
|
|
on binaries, and generating reports. It does this by building on top of the
|
|
analyses implemented in the BOLT libraries.
|
|
|
|
## Which binary analyses are implemented?
|
|
|
|
At the moment, no binary analyses are implemented.
|
|
|
|
The goal is to make it easy using a plug-in framework to add your own analyses.
|
|
|
|
## How to add your own binary analysis
|
|
|
|
_TODO: this section needs to be written. Ideally, we should have a simple
|
|
"example" or "template" analysis that can be the starting point for implementing
|
|
custom analyses_
|