[llvm] [BOLT] support mold linker generated PLT in disassembling (PR #115256)
Patrick Zhang via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 14 23:12:38 PST 2024
patrickphzhang wrote:
Following the suggestions of @maksfb, @ayermolo and @tcwzxx, I have re-implemented the commit as follows:
1. Added a new interface named `analyzePLTHeader()` in the `X86MCPlusBuilder` to analyze the size of different PLT headers more generically;
2. The logic of the `disassemblePLTSectionX86()` function is split into two parts. The first part is a new function named `disassemblePLTHeaderX86()`, which disassembles the PLT's preamble instructions and calls the `analyzePLTHeader()` interface to get the header size. The second part calls the `disassemblePLTHeaderX86()` function and determines the disassemble offset;
3. The `plt-mold-header` test case.
Please review the code and let me know if any other changes are needed. Also please inform me if a new _pull request_ is required. Thanks a lot.
https://github.com/llvm/llvm-project/pull/115256
More information about the llvm-commits
mailing list