diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2011-12-22 00:37:50 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2011-12-22 00:37:50 +0000 |
commit | 69bbda03918a18bd4477bb254d51346ee3033567 (patch) | |
tree | 08fae27863d97a957b4c37f93c0fbc2d6e07de7a /lib/MC/ELFObjectWriter.h | |
parent | e99183d2ace21eb25325304c164b21bf2910fc63 (diff) |
Move the ARM specific parts of the ELF writer to Target/ARM.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147115 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC/ELFObjectWriter.h')
-rw-r--r-- | lib/MC/ELFObjectWriter.h | 36 |
1 files changed, 4 insertions, 32 deletions
diff --git a/lib/MC/ELFObjectWriter.h b/lib/MC/ELFObjectWriter.h index 59734e8a27..71140f10e8 100644 --- a/lib/MC/ELFObjectWriter.h +++ b/lib/MC/ELFObjectWriter.h @@ -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 { |