[BOLT][docs] Document commands to identify BOLT-ed binaries (#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.
This commit is contained in:
David Spickett
2025-12-10 09:27:57 +00:00
committed by GitHub
parent 6f1cab2e90
commit 4ff1bd53c2

View File

@@ -202,6 +202,26 @@ $ 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:
```
$ readelf -S <your-binary> | grep bolt
[11] .bolt.org.eh_frame PROGBITS <...>
<...>
[39] .note.bolt_info NOTE <...>
```
The note can be displayed with:
```
$ readelf -p .note.bolt_info <your-binary>
String dump of section '.note.bolt_info':
<...>
[ 10] BOLT revision: <...>
```
## License
BOLT is licensed under the [Apache License v2.0 with LLVM Exceptions](./LICENSE.TXT).