[llvm] [BOLT][docs] Add commands to identify BOLT-ed binaries (PR #171458)
David Spickett via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 9 07:41:55 PST 2025
https://github.com/DavidSpickett created https://github.com/llvm/llvm-project/pull/171458
These have been useful to me in the past and I don't see any docs referencing the `bolt_info` note either.
There is a test checking that it is emitted, so I assume it's something we are ok with people looking for.
>From 321c3cef31508b06276b9fd0524724d89200e57f Mon Sep 17 00:00:00 2001
From: David Spickett <david.spickett at linaro.org>
Date: Tue, 9 Dec 2025 15:39:22 +0000
Subject: [PATCH] [BOLT][docs] Add commands to identify BOLT-ed binaries
These have been useful to me in the past and I don't see
any docs referencing the `bolt_info` note either.
There is a test checking that it is emitted, so I assume
it's something we are ok with people looking for.
---
bolt/README.md | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/bolt/README.md b/bolt/README.md
index 55f742c5019f5..3544f58e0d580 100644
--- a/bolt/README.md
+++ b/bolt/README.md
@@ -202,6 +202,27 @@ $ merge-fdata *.fdata > combined.fdata
Use `combined.fdata` for **Step 3** above to generate a universally optimized
binary.
+## Identifying a Binary Modified By BOLT
+
+A binary that has been modified by BOLT will include a `bolt_info` note and may
+have extra sections with `bolt` in their name.
+
+You can use `readelf` to find these:
+```
+$ llvm-readelf -S <your-binary> | grep bolt
+ [11] .bolt.org.eh_frame PROGBITS <...>
+<...>
+ [39] .note.bolt_info NOTE <...>
+```
+The note can be displayed with:
+```
+$ llvm-readelf -n <your-binary>
+<...>
+Displaying notes found in: .note.bolt_info
+ <...>
+ Version: BOLT revision: <...>
+```
+
## License
BOLT is licensed under the [Apache License v2.0 with LLVM Exceptions](./LICENSE.TXT).
More information about the llvm-commits
mailing list