2007-03-28 Chris Toshok <toshok@ximian.com>
[mono-project.git] / mcs / class / Mono.PEToolkit / SectionCharacteristics.cs
blob2dc57acf75ceda679ac21386f731f48a86f92e4c
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 SectionCharacteristics : uint {
32 /// <summary>
33 /// Reserved.
34 /// </summary>
35 IMAGE_SCN_TYPE_REG = 0x00000000,
37 /// <summary>
38 /// Reserved.
39 /// </summary>
40 IMAGE_SCN_TYPE_DSECT = 0x00000001,
42 /// <summary>
43 /// Reserved.
44 /// </summary>
45 IMAGE_SCN_TYPE_NOLOAD = 0x00000002,
47 /// <summary>
48 /// Reserved.
49 /// </summary>
50 IMAGE_SCN_TYPE_GROUP = 0x00000004,
52 /// <summary>
53 /// Reserved.
54 /// </summary>
55 IMAGE_SCN_TYPE_NO_PAD = 0x00000008,
57 /// <summary>
58 /// Reserved.
59 /// </summary>
60 IMAGE_SCN_TYPE_COPY = 0x00000010,
62 /// <summary>
63 /// Section contains code.
64 /// </summary>
65 IMAGE_SCN_CNT_CODE = 0x00000020,
67 /// <summary>
68 /// Section contains initialized data.
69 /// </summary>
70 IMAGE_SCN_CNT_INITIALIZED_DATA = 0x00000040,
72 /// <summary>
73 /// Section contains uninitialized data.
74 /// </summary>
75 IMAGE_SCN_CNT_UNINITIALIZED_DATA = 0x00000080,
77 /// <summary>
78 /// Reserved.
79 /// </summary>
80 IMAGE_SCN_LNK_OTHER = 0x00000100,
82 /// <summary>
83 /// Section contains comments or some other type of information.
84 /// </summary>
85 IMAGE_SCN_LNK_INFO = 0x00000200,
87 /// <summary>
88 /// Reserved.
89 /// </summary>
90 IMAGE_SCN_TYPE_OVER = 0x00000400,
92 /// <summary>
93 /// Section contents will not become part of image.
94 /// </summary>
95 IMAGE_SCN_LNK_REMOVE = 0x00000800,
97 /// <summary>
98 /// Section contents comdat.
99 /// </summary>
100 IMAGE_SCN_LNK_COMDAT = 0x00001000,
103 /// <summary>
104 /// Reset speculative exceptions handling bits in the TLB entries for this section.
105 /// </summary>
106 /// <remarks>
107 /// IMAGE_SCN_MEM_PROTECTED - Obsolete.
108 /// </remarks>
109 IMAGE_SCN_NO_DEFER_SPEC_EXC = 0x00004000,
111 /// <summary>
112 /// Section content can be accessed relative to GP (MIPS).
113 /// </summary>
114 IMAGE_SCN_GPREL = 0x00008000,
116 /// <summary>
117 /// </summary>
118 IMAGE_SCN_MEM_FARDATA = 0x00008000,
120 /// <summary>
121 /// Obsolete.
122 /// </summary>
123 IMAGE_SCN_MEM_PURGEABLE = 0x00020000,
125 /// <summary>
126 /// Obsolete.
127 /// </summary>
128 IMAGE_SCN_MEM_16BIT = 0x00020000,
130 /// <summary>
131 /// Obsolete.
132 /// </summary>
133 IMAGE_SCN_MEM_LOCKED = 0x00040000,
135 /// <summary>
136 /// Obsolete.
137 /// </summary>
138 IMAGE_SCN_MEM_PRELOAD = 0x00080000,
140 /// <summary>
141 /// </summary>
142 /// <remarks>
143 /// IMAGE_SCN_MEM_SYSHEAP - Obsolete 0x00010000
144 /// </remarks>
145 IMAGE_SCN_ALIGN_1BYTES = 0x00100000,
147 IMAGE_SCN_ALIGN_2BYTES = 0x00200000,
148 IMAGE_SCN_ALIGN_4BYTES = 0x00300000,
149 IMAGE_SCN_ALIGN_8BYTES = 0x00400000,
151 // default alignment
152 IMAGE_SCN_ALIGN_16BYTES = 0x00500000,
154 IMAGE_SCN_ALIGN_32BYTES = 0x00600000,
155 IMAGE_SCN_ALIGN_64BYTES = 0x00700000,
156 IMAGE_SCN_ALIGN_128BYTES = 0x00800000,
157 IMAGE_SCN_ALIGN_256BYTES = 0x00900000,
158 IMAGE_SCN_ALIGN_512BYTES = 0x00A00000,
159 IMAGE_SCN_ALIGN_1024BYTES = 0x00B00000,
160 IMAGE_SCN_ALIGN_2048BYTES = 0x00C00000,
161 IMAGE_SCN_ALIGN_4096BYTES = 0x00D00000,
162 IMAGE_SCN_ALIGN_8192BYTES = 0x00E00000,
164 IMAGE_SCN_ALIGN_MASK = 0x00F00000,
166 /// <summary>
167 /// Section contains extended relocations.
168 /// </summary>
169 IMAGE_SCN_LNK_NRELOC_OVFL = 0x01000000,
171 /// <summary>
172 /// Section can be discarded.
173 /// </summary>
174 IMAGE_SCN_MEM_DISCARDABLE = 0x02000000,
176 /// <summary>
177 /// Section is not cachable.
178 /// </summary>
179 IMAGE_SCN_MEM_NOT_CACHED = 0x04000000,
181 /// <summary>
182 /// Section is not pageable.
183 /// </summary>
184 IMAGE_SCN_MEM_NOT_PAGED = 0x08000000,
186 /// <summary>
187 /// Section is shareable.
188 /// </summary>
189 IMAGE_SCN_MEM_SHARED = 0x10000000,
191 /// <summary>
192 /// Section is executable.
193 /// </summary>
194 IMAGE_SCN_MEM_EXECUTE = 0x20000000,
196 /// <summary>
197 /// Section is readable.
198 /// </summary>
199 IMAGE_SCN_MEM_READ = 0x40000000,
201 /// <summary>
202 /// Section is writeable.
203 /// </summary>
204 IMAGE_SCN_MEM_WRITE = 0x80000000,
207 /// <summary>
208 /// TLS index is scaled.
209 /// </summary>
210 IMAGE_SCN_SCALE_INDEX = 0x00000001,