[PATCH] D46204: [PPC64] V2 abi: Emit plt call stubs to the text section rather then the plt section.

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 4 17:32:01 PDT 2018


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

LGTM



================
Comment at: ELF/Thunks.cpp:197-203
+// Any call site that needs to call through a plt entry needs a call stub in
+// the .text section. The call stub is responsible for:
+// 1) Saving the toc-pointer to the stack.
+// 2) Loading the target functions address from the procedure linkage table into
+//    r12 for use by the target functions global entry point, and into the count
+//    register.
+// 3) Transfering control to the target function through an indirect branch.
----------------
Thank you for writing this!


================
Comment at: ELF/Thunks.cpp:509
+  uint16_t OffHa = (Off + 0x8000) >> 16;
+  uint16_t OffLo = (uint16_t)Off;
+
----------------
Please remove the cast if it doesn't cause your compiler to emit a warning.


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D46204





More information about the llvm-commits mailing list