[PATCH] D138135: [WIP][ELF] Support LoongArch

WÁNG Xuěruì via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 24 03:04:06 PST 2022


xen0n added inline comments.


================
Comment at: lld/ELF/Arch/LoongArch.cpp:240
+  if (config->is64)
+    write64le(buf, in.plt->getVA());
+  else
----------------
MaskRay wrote:
> This is likely something like `s.getPltVA()`
I believe the current approach is correct, which is also the case for ARM, AArch64, MIPS and RISCV. In other words it's not like X86 where the entries initially all point to (directly or somewhere near) the corresponding PLT entries themselves; all point to the PLT header which is the resolver snippet. When I write `s.getPltVA()` instead I just get executables that infinitely loop on their first call through PLT.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D138135



More information about the llvm-commits mailing list