**** Merged from MCS ****
[mono-project.git] / mcs / class / Mono.PEToolkit / Characteristics.cs
blob523a4c22a0c8078d234038cc18a326b47d181d61
2 //
3 // Permission is hereby granted, free of charge, to any person obtaining
4 // a copy of this software and associated documentation files (the
5 // "Software"), to deal in the Software without restriction, including
6 // without limitation the rights to use, copy, modify, merge, publish,
7 // distribute, sublicense, and/or sell copies of the Software, and to
8 // permit persons to whom the Software is furnished to do so, subject to
9 // the following conditions:
10 //
11 // The above copyright notice and this permission notice shall be
12 // included in all copies or substantial portions of the Software.
13 //
14 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 * Copyright (c) 2002 Sergey Chaban <serge@wildwestsoftware.com>
26 using System;
28 namespace Mono.PEToolkit {
30 [Flags]
31 public enum Characteristics : ushort {
34 /// <summary>
35 /// Relocation info stripped from file.
36 /// </summary>
37 /// <remarks>
38 /// IMAGE_FILE_RELOCS_STRIPPED
39 /// </remarks>
40 RELOCS_STRIPPED = 0x0001,
44 /// <summary>
45 /// File is executable
46 /// (i.e. file is neither object file nor library file,
47 /// so there are no unresolved externel references).
48 /// </summary>
49 /// <remarks>
50 /// IMAGE_FILE_EXECUTABLE_IMAGE
51 /// </remarks>
52 EXECUTABLE_IMAGE = 0x0002,
55 /// <summary>
56 /// Line nunbers stripped from file.
57 /// </summary>
58 /// <remarks>
59 /// IMAGE_FILE_LINE_NUMS_STRIPPED
60 /// </remarks>
61 LINE_NUMS_STRIPPED = 0x0004,
64 /// <summary>
65 /// Local symbols stripped from file.
66 /// </summary>
67 /// <remarks>
68 /// IMAGE_FILE_LOCAL_SYMS_STRIPPED
69 /// </remarks>
70 LOCAL_SYMS_STRIPPED = 0x0008,
73 /// <summary>
74 /// Agressively trim working set
75 /// </summary>
76 /// <remarks>
77 /// IMAGE_FILE_AGGRESIVE_WS_TRIM
78 /// </remarks>
79 AGGRESIVE_WS_TRIM = 0x0010,
82 /// <summary>
83 /// App can handle >2gb addresses
84 /// </summary>
85 /// <remarks>
86 /// IMAGE_FILE_LARGE_ADDRESS_AWARE
87 /// </remarks>
88 LARGE_ADDRESS_AWARE = 0x0020,
91 /// <summary>
92 /// Bytes of machine word are reversed.
93 /// </summary>
94 /// <remarks>
95 /// IMAGE_FILE_BYTES_REVERSED_LO
96 /// </remarks>
97 BYTES_REVERSED_LO = 0x0080,
100 /// <summary>
101 /// 32 bit word machine.
102 /// </summary>
103 /// <remarks>
104 /// IMAGE_FILE_32BIT_MACHINE
105 /// </remarks>
106 MACHINE_32BIT = 0x0100,
109 /// <summary>
110 /// Debugging info stripped from file in .DBG file
111 /// </summary>
112 /// <remarks>
113 /// IMAGE_FILE_DEBUG_STRIPPED
114 /// </remarks>
115 DEBUG_STRIPPED = 0x0200,
118 /// <summary>
119 /// If Image is on removable media, copy and run from the swap file.
120 /// </summary>
121 /// <remarks>
122 /// IMAGE_FILE_REMOVABLE_RUN_FROM_SWAP
123 /// </remarks>
124 REMOVABLE_RUN_FROM_SWAP = 0x0400,
127 /// <summary>
128 /// If Image is on Net, copy and run from the swap file.
129 /// </summary>
130 /// <remarks>
131 /// IMAGE_FILE_NET_RUN_FROM_SWAP
132 /// </remarks>
133 NET_RUN_FROM_SWAP = 0x0800,
136 /// <summary>
137 /// This flag is used to indicate that the file
138 /// is a system sile, such as device driver.
139 /// </summary>
140 /// <remarks>
141 /// IMAGE_FILE_SYSTEM
142 /// </remarks>
143 SYSTEM = 0x1000,
146 /// <summary>
147 /// This flag indicates that the file
148 /// is a dynamic library (DLL).
149 /// </summary>
150 /// <remarks>
151 /// IMAGE_FILE_DLL
152 /// </remarks>
153 DLL = 0x2000,
156 /// <summary>
157 /// File should only be run on a uni-processor (UP) machine.
158 /// </summary>
159 /// <remarks>
160 /// IMAGE_FILE_UP_SYSTEM_ONLY
161 /// </remarks>
162 UP_SYSTEM_ONLY = 0x4000,
165 /// <summary>
166 /// Bytes of machine word are reversed.
167 /// </summary>
168 /// <remarks>
169 /// IMAGE_FILE_BYTES_REVERSED_HI
170 /// </remarks>
171 BYTES_REVERSED_HI = 0x8000,
175 /// <summary>
176 /// Default flags that must be set in CIL-only image.
177 /// </summary>
178 /// <remarks>
179 /// See Partition II, 24.2.2.1
180 /// </remarks>
181 CIL_DEFAULT = LINE_NUMS_STRIPPED |
182 LOCAL_SYMS_STRIPPED |
183 DEBUG_STRIPPED