• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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_LD_ELFBINARYREADER_H_
10 #define MCLD_LD_ELFBINARYREADER_H_
11 
12 #include "mcld/LD/BinaryReader.h"
13 
14 namespace mcld {
15 
16 class Input;
17 class IRBuilder;
18 class LinkerConfig;
19 
20 /** \lclass ELFBinaryReader
21  *  \brief ELFBinaryReader reads target-independent parts of Binary file
22  */
23 class ELFBinaryReader : public BinaryReader {
24  public:
25   ELFBinaryReader(IRBuilder& pBuilder, const LinkerConfig& pConfig);
26 
27   ~ELFBinaryReader();
28 
29   bool isMyFormat(Input& pInput, bool& pContinue) const;
30 
31   bool readBinary(Input& pInput);
32 
33  private:
34   IRBuilder& m_Builder;
35   const LinkerConfig& m_Config;
36 };
37 
38 }  // namespace mcld
39 
40 #endif  // MCLD_LD_ELFBINARYREADER_H_
41