mirror of
https://github.com/intel/llvm.git
synced 2026-01-12 10:17:28 +08:00
[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:
@@ -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).
|
||||
|
||||
Reference in New Issue
Block a user