1 //===- ELFObjectWriter.h --------------------------------------------------===// 2 // 3 // The MCLinker Project 4 // 5 // This file is distributed under the University of Illinois Open Source 6 // License. See LICENSE.TXT for details. 7 // 8 //===----------------------------------------------------------------------===// 9 #ifndef MCLD_ELF_OBJECT_WRITER_H 10 #define MCLD_ELF_OBJECT_WRITER_H 11 #ifdef ENABLE_UNITTEST 12 #include <gtest.h> 13 #endif 14 #include <llvm/Support/system_error.h> 15 #include <mcld/LD/ObjectWriter.h> 16 #include <mcld/LD/ELFWriter.h> 17 18 namespace mcld 19 { 20 21 class Input; 22 class MCLinker; 23 class GNULDBackend; 24 25 /** \class ELFObjectWriter 26 * \brief ELFObjectWriter writes the target-independent parts of object files. 27 * ELFObjectWriter reads a MCLDFile and writes into raw_ostream 28 * 29 */ 30 class ELFObjectWriter : public ObjectWriter, protected ELFWriter 31 { 32 public: 33 ELFObjectWriter(GNULDBackend& pBackend, MCLinker& pLinker); 34 35 ~ELFObjectWriter(); 36 37 llvm::error_code writeObject(Output& pOutput) 38 { return llvm::make_error_code(llvm::errc::not_supported); } 39 40 private: 41 MCLinker& m_Linker; 42 }; 43 44 } // namespace of mcld 45 46 #endif 47