[PATCH] D120850: [BOLT] Handle ifuncs trampolines for aarch64

Vladislav Khmelevsky via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 8 11:35:55 PST 2022


yota9 marked an inline comment as done.
yota9 added inline comments.


================
Comment at: bolt/lib/Rewrite/RewriteInstance.cpp:1260
+
+  BinaryFunction *BF = BC->getBinaryFunctionAtAddress(EntryAddress);
+  if (BF && BC->isAArch64()) {
----------------
rafauler wrote:
> I don't understand why the BinaryFunction is already created for ifuncs? For X86, both ifuncs and regular PLTs are pretty similar, except for the relocation type.
Because the symtab contains the trampoline IFUNC symbol and it is already disassembled. Currently it does not work because such trampolines are moved to the new text section and since the adrp+add does not have relocations (like in plt) - the "got" address becomes wrong


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D120850/new/

https://reviews.llvm.org/D120850



More information about the llvm-commits mailing list