Home | History | Annotate | Download | only in MC
      1 //===- ZOption.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_MC_ZOPTION_H
     10 #define MCLD_MC_ZOPTION_H
     11 
     12 #include <llvm/Support/DataTypes.h>
     13 
     14 namespace mcld {
     15 
     16 /** \class ZOption
     17  *  \brief The -z options for GNU ld compatibility.
     18  */
     19 class ZOption
     20 {
     21 public:
     22   enum Kind {
     23     CombReloc,
     24     NoCombReloc,
     25     Defs,
     26     ExecStack,
     27     NoExecStack,
     28     InitFirst,
     29     InterPose,
     30     LoadFltr,
     31     MulDefs,
     32     NoCopyReloc,
     33     NoDefaultLib,
     34     NoDelete,
     35     NoDLOpen,
     36     NoDump,
     37     Relro,
     38     NoRelro,
     39     Lazy,
     40     Now,
     41     Origin,
     42     CommPageSize,
     43     MaxPageSize,
     44     Unknown
     45   };
     46 
     47 public:
     48   ZOption();
     49 
     50   Kind kind() const { return m_Kind; }
     51 
     52   void setKind(Kind pKind) { m_Kind = pKind; }
     53 
     54   uint64_t pageSize() const { return m_PageSize; }
     55 
     56   void setPageSize(uint64_t pPageSize) { m_PageSize = pPageSize; }
     57 
     58 private:
     59   Kind m_Kind;
     60   uint64_t m_PageSize;
     61 };
     62 
     63 } // namespace of mcld
     64 
     65 #endif
     66 
     67