<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - llvm-readelf incorrectly reports stackmap version."
href="https://bugs.llvm.org/show_bug.cgi?id=38278">38278</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>llvm-readelf incorrectly reports stackmap version.
</td>
</tr>
<tr>
<th>Product</th>
<td>new-bugs
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>OpenBSD
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>new bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>vext01@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>```
$ llvm-readelf -stackmap a.out
LLVM StackMap Version: 2
...
```
But if we look in the binary:
```
$ r2 a.out
[0x00400450]> s section..llvm_stackmaps
[0x00400680]> px 16
- offset - 0 1 2 3 4 5 6 7 8 9 A B C D E F 0123456789ABCDEF
0x00400680 0300 0000 0100 0000 0000 0000 0200 0000 ................
```
Byte 0 is the version field in the stackmap header.
2 versus 3.
The docs say 3 is correct:
<a href="https://llvm.org/docs/StackMaps.html#stack-map-format">https://llvm.org/docs/StackMaps.html#stack-map-format</a>
```
$ clang -v
clang version 7.0.0 (trunk 336996) (llvm/trunk 336905)
Target: x86_64-unknown-linux-gnu
```</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>