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