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>
28 namespace Mono
.PEToolkit
{
31 public enum SectionCharacteristics
: uint {
35 IMAGE_SCN_TYPE_REG
= 0x00000000,
40 IMAGE_SCN_TYPE_DSECT
= 0x00000001,
45 IMAGE_SCN_TYPE_NOLOAD
= 0x00000002,
50 IMAGE_SCN_TYPE_GROUP
= 0x00000004,
55 IMAGE_SCN_TYPE_NO_PAD
= 0x00000008,
60 IMAGE_SCN_TYPE_COPY
= 0x00000010,
63 /// Section contains code.
65 IMAGE_SCN_CNT_CODE
= 0x00000020,
68 /// Section contains initialized data.
70 IMAGE_SCN_CNT_INITIALIZED_DATA
= 0x00000040,
73 /// Section contains uninitialized data.
75 IMAGE_SCN_CNT_UNINITIALIZED_DATA
= 0x00000080,
80 IMAGE_SCN_LNK_OTHER
= 0x00000100,
83 /// Section contains comments or some other type of information.
85 IMAGE_SCN_LNK_INFO
= 0x00000200,
90 IMAGE_SCN_TYPE_OVER
= 0x00000400,
93 /// Section contents will not become part of image.
95 IMAGE_SCN_LNK_REMOVE
= 0x00000800,
98 /// Section contents comdat.
100 IMAGE_SCN_LNK_COMDAT
= 0x00001000,
104 /// Reset speculative exceptions handling bits in the TLB entries for this section.
107 /// IMAGE_SCN_MEM_PROTECTED - Obsolete.
109 IMAGE_SCN_NO_DEFER_SPEC_EXC
= 0x00004000,
112 /// Section content can be accessed relative to GP (MIPS).
114 IMAGE_SCN_GPREL
= 0x00008000,
118 IMAGE_SCN_MEM_FARDATA
= 0x00008000,
123 IMAGE_SCN_MEM_PURGEABLE
= 0x00020000,
128 IMAGE_SCN_MEM_16BIT
= 0x00020000,
133 IMAGE_SCN_MEM_LOCKED
= 0x00040000,
138 IMAGE_SCN_MEM_PRELOAD
= 0x00080000,
143 /// IMAGE_SCN_MEM_SYSHEAP - Obsolete 0x00010000
145 IMAGE_SCN_ALIGN_1BYTES
= 0x00100000,
147 IMAGE_SCN_ALIGN_2BYTES
= 0x00200000,
148 IMAGE_SCN_ALIGN_4BYTES
= 0x00300000,
149 IMAGE_SCN_ALIGN_8BYTES
= 0x00400000,
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,
167 /// Section contains extended relocations.
169 IMAGE_SCN_LNK_NRELOC_OVFL
= 0x01000000,
172 /// Section can be discarded.
174 IMAGE_SCN_MEM_DISCARDABLE
= 0x02000000,
177 /// Section is not cachable.
179 IMAGE_SCN_MEM_NOT_CACHED
= 0x04000000,
182 /// Section is not pageable.
184 IMAGE_SCN_MEM_NOT_PAGED
= 0x08000000,
187 /// Section is shareable.
189 IMAGE_SCN_MEM_SHARED
= 0x10000000,
192 /// Section is executable.
194 IMAGE_SCN_MEM_EXECUTE
= 0x20000000,
197 /// Section is readable.
199 IMAGE_SCN_MEM_READ
= 0x40000000,
202 /// Section is writeable.
204 IMAGE_SCN_MEM_WRITE
= 0x80000000,
208 /// TLS index is scaled.
210 IMAGE_SCN_SCALE_INDEX
= 0x00000001,