This is an archive of the discontinued LLVM Phabricator instance.

[ELF] Delete R_PPC64_CALL_PLT from isRelExpr()
ClosedPublic

Authored by MaskRay on Jun 6 2019, 10:33 PM.

Details

Summary

It was added by D46654 but is actually never used.
R_PPC64_CALL_PLT (was: R_PPC_CALL_PLT) is a static link-time constant.

Diff Detail

Repository
rL LLVM

Event Timeline

MaskRay created this revision.Jun 6 2019, 10:33 PM
ruiu accepted this revision.Jun 6 2019, 11:10 PM

LGTM

Do you think you can add a test?

This revision is now accepted and ready to land.Jun 6 2019, 11:10 PM
MaskRay added a comment.EditedJun 7 2019, 2:30 AM

LGTM

Do you think you can add a test?

I cannot. I think D46654 could just add R_PPC_CALL, not R_PPC_CALL_PLT. R_PPC64_CALL_PLT is similar to R_PLT_PC. Since R_PLT_PC is not in isRelExpr(), R_PPC64_CALL_PLT does not have to be in the list, either.

Before the control reaches isRelExpr(), R_PPC64_CALL has been precluded by:

static bool isStaticLinkTimeConstant(RelExpr E, RelType Type, const Symbol &Sym,

                                   InputSectionBase &S, uint64_t RelOff) {
// These expressions always compute a constant
if (oneof<R_DTPREL, R_GOTPLT, R_GOT_OFF, R_HEXAGON_GOT, R_TLSLD_GOT_OFF,
          R_MIPS_GOT_LOCAL_PAGE, R_MIPS_GOTREL, R_MIPS_GOT_OFF,
          R_MIPS_GOT_OFF32, R_MIPS_GOT_GP_PC, R_MIPS_TLSGD,
          R_AARCH64_GOT_PAGE_PC, R_GOT_PC, R_GOTONLY_PC, R_GOTPLTONLY_PC,
          R_PLT_PC, R_TLSGD_GOT, R_TLSGD_GOTPLT, R_TLSGD_PC, R_PPC32_PLTREL,
          R_PPC64_CALL_PLT, R_PPC64_RELAX_TOC, R_TLSDESC_CALL, R_TLSDESC_PC,
          R_AARCH64_TLSDESC_PAGE, R_HINT, R_TLSLD_HINT, R_TLSIE_HINT>(E))
  return true;
This revision was automatically updated to reflect the committed changes.