[llvm] [BOLT][BTI] Refactor: move applyBTIFixup under MCPlusBuilder (PR #177164)
Gergely Bálint via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 27 02:07:25 PST 2026
bgergely0 wrote:
> is it worth creating a separate pass where the plt entries patches separately? this pass can be configurable depending on compilers and linkers and not overload the long jump pass logic
Hi! My opinion is that we only want to patch what's strictly needed to get BTI to work. Extra landing pads have a performance penalty. For security purposes, we also want the minimum needed landing pads. This is the reason to do the patching when stubs are relaxed.
if/when the PLT sections gets reemitted by default, we could maybe save which PLTs need BTIs, and lay out the section with this info, instead of patching them one-by-one. But we still need to get this info from longJmp pass.
https://github.com/llvm/llvm-project/pull/177164
More information about the llvm-commits
mailing list