[llvm] [BOLT][docs] Document commands to identify BOLT-ed binaries (PR #171458)

David Spickett via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 9 07:44:48 PST 2025


================
@@ -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>
----------------
DavidSpickett wrote:

I looked for something like `readelf -n <name of note> <binary>` but there is no such option unfortunately. You can dump the raw contents of the section with `-x <section name>` but this is not very useful here.

https://github.com/llvm/llvm-project/pull/171458


More information about the llvm-commits mailing list