[llvm] [BOLT][BTI] Disassemble PLT entries when processing BTI binaries (PR #169663)

Gergely Bálint via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 7 04:44:18 PST 2026


bgergely0 wrote:

Hi @maksfb !

In the followup PR (https://github.com/llvm/llvm-project/pull/169663) , I implement PLT patching the way I described in the last office hours. But now I realize why what you mentioned about `AnalyzePLTEntry` can be a problem.

With the follow-up PR, two locations in code need the PLT instructions: `AnalyzePLTEntry` and `patchPLTEntryForBTI`. 
I see two ways of moving forward with this:
- merge this PR and the next with `patchPLTEntryForBTI`: this would create two different ways of decoding PLTs. Note that refactoring `AnalyzePLTEntry` to use the disassembled PLT functions is non-trivial, as `AnalyzePLTEntry` happens before `disassembleFunctions`.
- other option is to not merge this PR, retarget the followup to main, and change `patchPLTEntryForBTI` to decode PLT instructions again - this would essentially duplicate the disassembly part of `AnalyzePLTEntry`.

Do you have a preference between the two? 

(cc: @paschalis-mpeis)

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


More information about the llvm-commits mailing list