[llvm] [BOLT] support mold linker generated PLT in disassembling (PR #115256)
Patrick Zhang via llvm-commits
llvm-commits at lists.llvm.org
Sun Nov 10 23:35:55 PST 2024
patrickphzhang wrote:
Following the suggestion of @tcwzxx, I have re-implemented the patch as follows:
1. Set the initial **offset** to 0.
2. Check if the section name is exactly '.plt' to skip other sections like '.plt.sec'.
1) Disassemble the first instruction;
2) Check if the first instruction is an `endbr`.
3) Update the **offset** to 32 (mold plt header size) if it is.
3. Disassemble the PLT section from the **offset**.
Please review the code and let me know if any other changes are needed.
https://github.com/llvm/llvm-project/pull/115256
More information about the llvm-commits
mailing list