Home | History | Annotate | Download | only in LD
      1 //===- ELFBinaryReader.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_Binary_READER_H
     10 #define MCLD_ELF_Binary_READER_H
     11 #ifdef ENABLE_UNITTEST
     12 #include <gtest.h>
     13 #endif
     14 
     15 #include <mcld/LD/BinaryReader.h>
     16 
     17 namespace mcld {
     18 
     19 class Module;
     20 class Input;
     21 class IRBuilder;
     22 class GNULDBackend;
     23 class LinkerConfig;
     24 
     25 /** \lclass ELFBinaryReader
     26  *  \brief ELFBinaryReader reads target-independent parts of Binary file
     27  */
     28 class ELFBinaryReader : public BinaryReader
     29 {
     30 public:
     31   ELFBinaryReader(GNULDBackend& pBackend,
     32                   IRBuilder& pBuilder,
     33                   const LinkerConfig& pConfig);
     34 
     35   ~ELFBinaryReader();
     36 
     37   virtual bool readBinary(Input& pInput);
     38 
     39 private:
     40   GNULDBackend& m_Backend;
     41   IRBuilder& m_Builder;
     42   const LinkerConfig& m_Config;
     43 };
     44 
     45 } // namespace of mcld
     46 
     47 #endif
     48 
     49