Home | History | Annotate | Download | only in mcld
      1 //===- ScriptOptions.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_LDLITE_SCRIPT_OPTIONS_H
     10 #define MCLD_LDLITE_SCRIPT_OPTIONS_H
     11 #include <llvm/Support/CommandLine.h>
     12 #include <string>
     13 
     14 namespace mcld {
     15 
     16 class LinkerScript;
     17 
     18 /** \class ScriptOptions
     19  *  \brief ScriptOptions are used to modify the default link script. Some
     20  *  positional options, such as --defsym, also can modify default link script
     21  *  is not listed here. These special options belong to Positional Options.
     22  */
     23 class ScriptOptions
     24 {
     25 public:
     26   ScriptOptions();
     27 
     28   bool parse(LinkerScript& pScript);
     29 
     30 private:
     31   llvm::cl::list<std::string>& m_WrapList;
     32   llvm::cl::list<std::string>& m_PortList;
     33   llvm::cl::list<std::string>& m_AddressMapList;
     34   llvm::cl::opt<unsigned long long>& m_BssSegAddr;
     35   llvm::cl::opt<unsigned long long>& m_DataSegAddr;
     36   llvm::cl::opt<unsigned long long>& m_TextSegAddr;
     37 };
     38 
     39 } // namespace of mcld
     40 
     41 #endif
     42 
     43