Skip to content

Commit 4ff1bd5

Browse files
[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.
1 parent 6f1cab2 commit 4ff1bd5

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

bolt/README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,26 @@ $ merge-fdata *.fdata > combined.fdata
202202
Use `combined.fdata` for **Step 3** above to generate a universally optimized
203203
binary.
204204

205+
## Identifying a Binary Modified By BOLT
206+
207+
A binary that has been modified by BOLT will include a `bolt_info` note and may
208+
have extra sections with `bolt` in their name.
209+
210+
You can use `readelf` to find these:
211+
```
212+
$ readelf -S <your-binary> | grep bolt
213+
[11] .bolt.org.eh_frame PROGBITS <...>
214+
<...>
215+
[39] .note.bolt_info NOTE <...>
216+
```
217+
The note can be displayed with:
218+
```
219+
$ readelf -p .note.bolt_info <your-binary>
220+
String dump of section '.note.bolt_info':
221+
<...>
222+
[ 10] BOLT revision: <...>
223+
```
224+
205225
## License
206226

207227
BOLT is licensed under the [Apache License v2.0 with LLVM Exceptions](./LICENSE.TXT).

0 commit comments

Comments
 (0)