Completely rewrite ELFObjectWriter::RecordRelocation.
[oota-llvm.git] / lib / Target / SystemZ / MCTargetDesc / SystemZMCObjectWriter.cpp
index 76e1d24a93703e0fe53d113d26999bdb87cceeda..54c6987ca2f14719f886f9741a3bbd796d3195e6 100644 (file)
@@ -26,9 +26,6 @@ protected:
   // Override MCELFObjectTargetWriter.
   unsigned GetRelocType(const MCValue &Target, const MCFixup &Fixup,
                         bool IsPCRel) const override;
-  const MCSymbol *ExplicitRelSym(const MCAssembler &Asm, const MCValue &Target,
-                                 const MCFragment &F, const MCFixup &Fixup,
-                                 bool IsPCRel) const override;
 };
 } // end anonymous namespace
 
@@ -111,21 +108,6 @@ unsigned SystemZObjectWriter::GetRelocType(const MCValue &Target,
   }
 }
 
-const MCSymbol *SystemZObjectWriter::ExplicitRelSym(const MCAssembler &Asm,
-                                                    const MCValue &Target,
-                                                    const MCFragment &F,
-                                                    const MCFixup &Fixup,
-                                                    bool IsPCRel) const {
-  // The addend in a PC-relative R_390_* relocation is always applied to
-  // the PC-relative part of the address.  If some kind of indirection
-  // is applied to the symbol first, we can't use an addend there too.
-  if (!Target.isAbsolute() &&
-      Target.getSymA()->getKind() != MCSymbolRefExpr::VK_None &&
-      IsPCRel)
-    return &Target.getSymA()->getSymbol().AliasedSymbol();
-  return NULL;
-}
-
 MCObjectWriter *llvm::createSystemZObjectWriter(raw_ostream &OS,
                                                 uint8_t OSABI) {
   MCELFObjectTargetWriter *MOTW = new SystemZObjectWriter(OSABI);