• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //===- DynObjReader.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_DYNAMIC_SHARED_OBJECT_READER_H
10 #define MCLD_DYNAMIC_SHARED_OBJECT_READER_H
11 #ifdef ENABLE_UNITTEST
12 #include <gtest.h>
13 #endif
14 #include "mcld/LD/LDReader.h"
15 #include <llvm/Support/system_error.h>
16 
17 namespace mcld {
18 
19 class TargetLDBackend;
20 class Input;
21 
22 /** \class DynObjReader
23  *  \brief DynObjReader provides an common interface for different object
24  *  formats.
25  */
26 class DynObjReader : public LDReader
27 {
28 protected:
DynObjReader()29   DynObjReader()
30   { }
31 
32 public:
~DynObjReader()33   virtual ~DynObjReader() { }
34 
35   virtual bool readHeader(Input& pFile) = 0;
36 
37   virtual bool readSymbols(Input& pFile) = 0;
38 
39 };
40 
41 } // namespace of mcld
42 
43 #endif
44 
45