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