[llvm] [BOLT] Check if symbol is in data area of function (PR #160143)

Alexey Moksyakov via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 20 07:04:00 PST 2026


yavtuk wrote:

> > Hello, Ash,
> > how much of this code actually exists? From the test, it's not clear to me why first_block is not marked with $x. Is the original code written in assembly or generated from a high-level programming language?
> 
> Hello, the test is meant to be a small reproducer of a crash encountered so it does exist.
> 
> > it's not clear to me why first_block is not marked with $x.
> 
> The crash occurs when we branch from a code area into a data area and then back into code, which is why `first_block` is marked with `$d` and not `$x`.

what do you mean we branch to data area? I see that $x is lack for first_block, due to $d is 0 size, address first_block == $d.
from my point of view this assembler is not correct because for each instruction linker must put $x.
```
$d
$x
first_block:
....

```


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


More information about the llvm-commits mailing list