• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //===- ScriptReader.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_SCRIPT_SCRIPTREADER_H_
10 #define MCLD_SCRIPT_SCRIPTREADER_H_
11 
12 #include "mcld/LD/LDReader.h"
13 
14 namespace mcld {
15 
16 class ArchiveReader;
17 class DynObjReader;
18 class GroupReader;
19 class Input;
20 class LinkerConfig;
21 class LinkerScript;
22 class Module;
23 class ObjectReader;
24 class ScriptFile;
25 class TargetLDBackend;
26 
27 class ScriptReader : public LDReader {
28  public:
29   ScriptReader(ObjectReader& pObjectReader,
30                ArchiveReader& pArchiveReader,
31                DynObjReader& pDynObjReader,
32                GroupReader& pGroupReader);
33 
34   ~ScriptReader();
35 
36   /// readScript
37   bool readScript(const LinkerConfig& pConfig, ScriptFile& pScriptFile);
38 
39   /// isMyFormat
40   bool isMyFormat(Input& pInput, bool& pContinue) const;
41 
42  private:
43   ObjectReader& m_ObjectReader;
44   ArchiveReader& m_ArchiveReader;
45   DynObjReader& m_DynObjReader;
46   GroupReader& m_GroupReader;
47 };
48 
49 }  // namespace mcld
50 
51 #endif  // MCLD_SCRIPT_SCRIPTREADER_H_
52