[all-commits] [llvm/llvm-project] 8dbea4: [PowerPC] Support for R_PPC64_REL24_NOTOC calls wh...

Victor Huang via All-commits all-commits at lists.llvm.org
Wed Jul 29 12:51:10 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 8dbea4785c107aa975b6671025a3cea7829b8370
      https://github.com/llvm/llvm-project/commit/8dbea4785c107aa975b6671025a3cea7829b8370
  Author: Victor Huang <wei.huang at ibm.com>
  Date:   2020-07-29 (Wed, 29 Jul 2020)

  Changed paths:
    M lld/ELF/Arch/PPC64.cpp
    M lld/ELF/Thunks.cpp
    A lld/test/ELF/ppc64-pcrel-call-to-extern.s
    M llvm/include/llvm/Object/ELF.h

  Log Message:
  -----------
  [PowerPC] Support for R_PPC64_REL24_NOTOC calls where the caller has no TOC and the callee is not DSO local

This patch supports the situation where caller does not have a valid TOC and
calls using the R_PPC64_REL24_NOTOC relocation and the callee is not DSO local.
In this case the call cannot be made directly since the callee may or may not
require a valid TOC pointer. As a result this situation require a PC-relative
plt stub to set up r12.

Reviewed By: sfertile, MaskRay, stefanp

Differential Revision: https://reviews.llvm.org/D83669




More information about the All-commits mailing list