[PATCH] D45642: [PPC64] V2 abi: Add glink section for lazy symbol resolution.

Sean Fertile via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 27 11:20:04 PDT 2018


sfertile added a comment.

I've moved the lazy resolver stubs to .plt section as suggested and will hopefully post the updated patch shortly. Everything seems to be working as expected. I had to re implement the plt call-stubs as thunks before I could do that move, but that was something that was going to have to be done eventually anyways.



================
Comment at: ELF/SyntheticSections.cpp:1208
+  // machine.
+  if (Config->EMachine == EM_PPC64 && ELF64LEKind &&
+      !InX::Glink->empty()) {
----------------
grimar wrote:
> Did you mean `Config->EMachine == EM_PPC64 && Config->IsLE` ?
> 
> Given the comment, should `Config->IsLE` check be omitted?
> 
> Actually, it seems it could be the following then.
> 
> `if (InX::Glink && !InX::Glink->empty()) { ...`
Yeah I meant `Config->EMachine == EM_PPC64 && Config->IsLE`,  but what I should be checking is `Config->EMachine == EM_PPC64 &&  Config->EFlags == 2`.

I've since added the eflag check I want in https://reviews.llvm.org/D46076 


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D45642





More information about the llvm-commits mailing list