[llvm] [BOLT] Check if symbol is in data area of function (PR #160143)
Alexey Moksyakov via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 3 11:47:15 PST 2026
yavtuk wrote:
> Hi @yavtuk,
> Thank you for investigating the envoy binary and confirming that the $x marker appears to be missing where it is expected. It seems we are all aligned that this is caused by the use of incorrect assembler directives. Similar patterns have been observed in boringssl and are fairly common in jit generated code. The attempt to address this in LuaJIT (see https://github.com/LuaJIT/LuaJIT/issues/1022 ) shows that resolving it properly is not a trivial task.
> Given this, I think the question is how we should handle such cases at the BOLT level. When we detect this kind of inconsistency in binaries and still wanting to process them with BOLT ( despite their non-compliance with the standard ) what would be the most appropriate approach?
> The current patch proposes skipping functions with such inconsistencies and emitting a warning. Do you think it would be feasible to implement a workaround that would allow us to continue processing these functions safely despite the inconsistency? If it would be helpful in identifying that workaround in BOLT, we can also try building envoy with alternative linkers (e.g., mold and gnu ld) to see whether their behavior provides further insight.
> Looking forward to your thoughts.
Ok, we can try to solve it in BOLT, Let’s discuss it at the rally
https://github.com/llvm/llvm-project/pull/160143
More information about the llvm-commits
mailing list