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

Rafael Auler via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 8 11:49:35 PST 2022


rafauler accepted this revision.
rafauler added a comment.
This revision is now accepted and ready to land.

LGTM



================
Comment at: bolt/lib/Rewrite/RewriteInstance.cpp:1260
+
+  BinaryFunction *BF = BC->getBinaryFunctionAtAddress(EntryAddress);
+  if (BF && BC->isAArch64()) {
----------------
yota9 wrote:
> 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
Oh, I see. Thanks!


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