[ELF][PPC64] Rename some PPC64 ELFv2 specific RelExpr from R_PPC_* to R_PPC64_*
authorFangrui Song <maskray@google.com>
Mon, 3 Jun 2019 06:21:33 +0000 (06:21 +0000)
committerFangrui Song <maskray@google.com>
Mon, 3 Jun 2019 06:21:33 +0000 (06:21 +0000)
commit8522d579b894b8e43ed0bfee5d3c9c2238805234
treec8444e47c9f8c4e0665930ef4ad69dd85a873a41
parentea0c66be55114087d2151401756612b49f3589eb
[ELF][PPC64] Rename some PPC64 ELFv2 specific RelExpr from R_PPC_* to R_PPC64_*

The following abstract relocation types (RelExpr) are PPC64 ELFv2 ABI specific,
not used by PPC32. So rename them to prevent confusion when the PPC32 port is improved.

* R_PPC_CALL R_PPC_CALL_PLT:
  R_PPC_CALL_PLT represents R_PPC64_REL14 and R_PPC64_REL24.
  If the function is not preemptable, R_PPC_CALL_PLT can be optimized to R_PPC_CALL:
  the formula adjusts the symbol VA from the global entry point to the local entry point.
* R_PPC_TOC: represents R_PPC64_TOC.  We don't have a test. Add one to ppc64-relocs.s
  Rename it to R_PPC64_TOCBASE because `@tocbase` is the assembly form.

Reviewed By: ruiu

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

llvm-svn: 362359
lld/ELF/Arch/PPC64.cpp
lld/ELF/InputSection.cpp
lld/ELF/Relocations.cpp
lld/ELF/Relocations.h
lld/test/ELF/ppc64-relocs.s