Move the ARM specific parts of the ELF writer to Target/ARM.
[oota-llvm.git] / lib / MC / ELFObjectWriter.h
index 59734e8a272eb42fd0e4e5974f0280b4f1ec33d2..71140f10e808ca7322c60b2fe90d5541494f2f07 100644 (file)
@@ -152,7 +152,7 @@ class ELFObjectWriter : public MCObjectWriter {
                                            const MCFragment &F,
                                            const MCFixup &Fixup,
                                            bool IsPCRel) const {
-      return NULL;
+      return TargetObjectWriter->ExplicitRelSym(Asm, Target, F, Fixup, IsPCRel);
     }
 
     bool is64Bit() const { return TargetObjectWriter->is64Bit(); }
@@ -243,8 +243,9 @@ class ELFObjectWriter : public MCObjectWriter {
     virtual void WriteHeader(uint64_t SectionDataSize,
                              unsigned NumberOfSections);
 
-    /// Default e_flags = 0
-    virtual unsigned getEFlags() const { return 0; }
+    virtual unsigned getEFlags() const {
+      return TargetObjectWriter->getEFlags();
+    }
 
     virtual void WriteSymbolEntry(MCDataFragment *SymtabF,
                                   MCDataFragment *ShndxF,
@@ -356,35 +357,6 @@ class ELFObjectWriter : public MCObjectWriter {
                                    uint64_t &RelocOffset) {}
   };
 
-  //===- ARMELFObjectWriter -------------------------------------------===//
-
-  class ARMELFObjectWriter : public ELFObjectWriter {
-  public:
-    // FIXME: MCAssembler can't yet return the Subtarget,
-    enum { DefaultEABIVersion = 0x05000000U };
-
-    ARMELFObjectWriter(MCELFObjectTargetWriter *MOTW,
-                       raw_ostream &_OS,
-                       bool IsLittleEndian);
-
-    virtual ~ARMELFObjectWriter();
-
-    virtual unsigned getEFlags() const;
-  protected:
-    virtual const MCSymbol *ExplicitRelSym(const MCAssembler &Asm,
-                                           const MCValue &Target,
-                                           const MCFragment &F,
-                                           const MCFixup &Fixup,
-                                           bool IsPCRel) const;
-
-    virtual unsigned GetRelocType(const MCValue &Target, const MCFixup &Fixup,
-                                  bool IsPCRel, bool IsRelocWithSymbol,
-                                  int64_t Addend) const;
-  private:
-    unsigned GetRelocTypeInner(const MCValue &Target,
-                               const MCFixup &Fixup, bool IsPCRel) const;
-  };
-
   //===- PPCELFObjectWriter -------------------------------------------===//
 
   class PPCELFObjectWriter : public ELFObjectWriter {