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:
11 // The above copyright notice and this permission notice shall be
12 // included in all copies or substantial portions of the Software.
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>
\r
28 namespace Mono.PEToolkit {
\r
31 public enum SectionCharacteristics : uint {
\r
35 IMAGE_SCN_TYPE_REG = 0x00000000,
\r
40 IMAGE_SCN_TYPE_DSECT = 0x00000001,
\r
45 IMAGE_SCN_TYPE_NOLOAD = 0x00000002,
\r
50 IMAGE_SCN_TYPE_GROUP = 0x00000004,
\r
55 IMAGE_SCN_TYPE_NO_PAD = 0x00000008,
\r
60 IMAGE_SCN_TYPE_COPY = 0x00000010,
\r
63 /// Section contains code.
\r
65 IMAGE_SCN_CNT_CODE = 0x00000020,
\r
68 /// Section contains initialized data.
\r
70 IMAGE_SCN_CNT_INITIALIZED_DATA = 0x00000040,
\r
73 /// Section contains uninitialized data.
\r
75 IMAGE_SCN_CNT_UNINITIALIZED_DATA = 0x00000080,
\r
80 IMAGE_SCN_LNK_OTHER = 0x00000100,
\r
83 /// Section contains comments or some other type of information.
\r
85 IMAGE_SCN_LNK_INFO = 0x00000200,
\r
90 IMAGE_SCN_TYPE_OVER = 0x00000400,
\r
93 /// Section contents will not become part of image.
\r
95 IMAGE_SCN_LNK_REMOVE = 0x00000800,
\r
98 /// Section contents comdat.
\r
100 IMAGE_SCN_LNK_COMDAT = 0x00001000,
\r
104 /// Reset speculative exceptions handling bits in the TLB entries for this section.
\r
107 /// IMAGE_SCN_MEM_PROTECTED - Obsolete.
\r
109 IMAGE_SCN_NO_DEFER_SPEC_EXC = 0x00004000,
\r
112 /// Section content can be accessed relative to GP (MIPS).
\r
114 IMAGE_SCN_GPREL = 0x00008000,
\r
118 IMAGE_SCN_MEM_FARDATA = 0x00008000,
\r
123 IMAGE_SCN_MEM_PURGEABLE = 0x00020000,
\r
128 IMAGE_SCN_MEM_16BIT = 0x00020000,
\r
133 IMAGE_SCN_MEM_LOCKED = 0x00040000,
\r
138 IMAGE_SCN_MEM_PRELOAD = 0x00080000,
\r
143 /// IMAGE_SCN_MEM_SYSHEAP - Obsolete 0x00010000
\r
145 IMAGE_SCN_ALIGN_1BYTES = 0x00100000,
\r
147 IMAGE_SCN_ALIGN_2BYTES = 0x00200000,
\r
148 IMAGE_SCN_ALIGN_4BYTES = 0x00300000,
\r
149 IMAGE_SCN_ALIGN_8BYTES = 0x00400000,
\r
151 // default alignment
\r
152 IMAGE_SCN_ALIGN_16BYTES = 0x00500000,
\r
154 IMAGE_SCN_ALIGN_32BYTES = 0x00600000,
\r
155 IMAGE_SCN_ALIGN_64BYTES = 0x00700000,
\r
156 IMAGE_SCN_ALIGN_128BYTES = 0x00800000,
\r
157 IMAGE_SCN_ALIGN_256BYTES = 0x00900000,
\r
158 IMAGE_SCN_ALIGN_512BYTES = 0x00A00000,
\r
159 IMAGE_SCN_ALIGN_1024BYTES = 0x00B00000,
\r
160 IMAGE_SCN_ALIGN_2048BYTES = 0x00C00000,
\r
161 IMAGE_SCN_ALIGN_4096BYTES = 0x00D00000,
\r
162 IMAGE_SCN_ALIGN_8192BYTES = 0x00E00000,
\r
164 IMAGE_SCN_ALIGN_MASK = 0x00F00000,
\r
167 /// Section contains extended relocations.
\r
169 IMAGE_SCN_LNK_NRELOC_OVFL = 0x01000000,
\r
172 /// Section can be discarded.
\r
174 IMAGE_SCN_MEM_DISCARDABLE = 0x02000000,
\r
177 /// Section is not cachable.
\r
179 IMAGE_SCN_MEM_NOT_CACHED = 0x04000000,
\r
182 /// Section is not pageable.
\r
184 IMAGE_SCN_MEM_NOT_PAGED = 0x08000000,
\r
187 /// Section is shareable.
\r
189 IMAGE_SCN_MEM_SHARED = 0x10000000,
\r
192 /// Section is executable.
\r
194 IMAGE_SCN_MEM_EXECUTE = 0x20000000,
\r
197 /// Section is readable.
\r
199 IMAGE_SCN_MEM_READ = 0x40000000,
\r
202 /// Section is writeable.
\r
204 IMAGE_SCN_MEM_WRITE = 0x80000000,
\r
208 /// TLS index is scaled.
\r
210 IMAGE_SCN_SCALE_INDEX = 0x00000001,
\r