This is an archive of the discontinued LLVM Phabricator instance.

[ELF][PPC64] Rename some PPC64 ELFv2 specific RelExpr from R_PPC_* to R_PPC64_*
ClosedPublic

Authored by MaskRay on Jun 2 2019, 11:02 PM.

Details

Summary

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

Diff Detail

Repository
rL LLVM

Event Timeline

MaskRay created this revision.Jun 2 2019, 11:02 PM
Herald added a project: Restricted Project. · View Herald Transcript
ruiu accepted this revision.Jun 2 2019, 11:09 PM

LGTM

This revision is now accepted and ready to land.Jun 2 2019, 11:09 PM
MaskRay updated this revision to Diff 202656.Jun 2 2019, 11:14 PM

Fix an out-of-date comment in ppc64-relocs.s as a drive-by change

This revision was automatically updated to reflect the committed changes.