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
14namespace mcld {
15
16class Module;
17class Input;
18class IRBuilder;
19class LinkerConfig;
20
21/** \lclass ELFBinaryReader
22 *  \brief ELFBinaryReader reads target-independent parts of Binary file
23 */
24class ELFBinaryReader : public BinaryReader
25{
26public:
27  ELFBinaryReader(IRBuilder& pBuilder, const LinkerConfig& pConfig);
28
29  ~ELFBinaryReader();
30
31  bool isMyFormat(Input& pInput, bool &pContinue) const;
32
33  bool readBinary(Input& pInput);
34
35private:
36  IRBuilder& m_Builder;
37  const LinkerConfig& m_Config;
38};
39
40} // namespace of mcld
41
42#endif
43
44