[llvm] [BOLT] Rework user-facing documentation of BOLT gadget scanner (PR #176446)
Anatoly Trosinenko via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 20 09:09:31 PST 2026
================
@@ -1,23 +1,77 @@
# BOLT-based binary analysis
-As part of post-link-time optimizing, BOLT needs to perform a range of analyses
+As part of post-link-time optimization, BOLT needs to perform a range of analyses
on binaries such as reconstructing control flow graphs, and more.
-The `llvm-bolt-binary-analysis` tool enables running requested binary analyses
+The `llvm-bolt-binary-analysis` tool enables running requested 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?
+## Usage
-* [Security scanners](#security-scanners)
- * [pac-ret analysis](#pac-ret-analysis)
+```
+llvm-bolt-binary-analysis --scanners=<list> [options] <binary>
+```
+
+The `--scanners=` option accepts a comma-separated list of analyses to run on
+the provided binary. The binary to be analyzed can be either ELF executable or
+shared object. Similar to other BOLT tools, `llvm-bolt-binary-analysis` expects
+`binary` to be unstripped and preferably linked with `--emit-relocs` linker option.
+
+In addition to options printed by `llvm-bolt-binary-analysis --help-hidden`,
+other relevant BOLT options can generally be passed, see `llvm-bolt --help-hidden`.
----------------
atrosinenko wrote:
I was almost sure there exists an issue on this, but turned out nobody ever created it, thus opened one: #176969.
https://github.com/llvm/llvm-project/pull/176446
More information about the llvm-commits
mailing list