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

Asher Dobrescu via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 7 08:47:37 PDT 2025


Asher8118 wrote:

Thanks for your comments, @paschalis-mpeis. I've tried to address them. 
>Trying to understand the cases we hit this. Is this the case where we fail on a symbol in a code-marked region

We hit this when we ask BOLT to read code from a data area. So references to a symbol from a data area (marked with $d) that are called from a code area (marked with $x) will hit this. The two examples you offered hit this issue.
>Note that replacing `BL` with a `B` does not trigger it.

That's because there's no link to a data area without `BL`, as with BL we save the return address to the link register.

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


More information about the llvm-commits mailing list