ies for this section.
#define IMAGE_SCN_GPREL 0x00008000 // Section content can be accessed relative to GP
#define IMAGE_SCN_MEM_FARDATA 0x00008000
// IMAGE_SCN_MEM_SYSHEAP - Obsolete 0x00010000
#define IMAGE_SCN_MEM_PURGEABLE 0x00020000
#define IMAGE_SCN_MEM_16BIT 0x00020000
#define IMAGE_SCN_MEM_LOCKED 0x00040000
#define IMAGE_SCN_MEM_PRELOAD 0x00080000
#define IMAGE_SCN_ALIGN_1BYTES 0x00100000 //
#define IMAGE_SCN_ALIGN_2BYTES 0x00200000 //
#define IMAGE_SCN_ALIGN_4BYTES 0x00300000 //
#define IMAGE_SCN_ALIGN_8BYTES 0x00400000 //
#define IMAGE_SCN_ALIGN_16BYTES 0x00500000 // Default alignment if no others are specified.
#define IMAGE_SCN_ALIGN_32BYTES 0x00600000 //
#define IMAGE_SCN_ALIGN_64BYTES 0x00700000 //
#define IMAGE_SCN_ALIGN_128BYTES 0x00800000 //
#define IMAGE_SCN_ALIGN_256BYTES 0x00900000 //
#define IMAGE_SCN_ALIGN_512BYTES 0x00A00000 //
#define IMAGE_SCN_ALIGN_1024BYTES 0x00B00000 //
#define IMAGE_SCN_ALIGN_2048BYTES 0x00C00000 //
#define IMAGE_SCN_ALIGN_4096BYTES 0x00D00000 //
#define IMAGE_SCN_ALIGN_8192BYTES 0x00E00000 //
// Unused 0x00F00000
#define IMAGE_SCN_ALIGN_MASK 0x00F00000
#define IMAGE_SCN_LNK_NRELOC_OVFL 0x01000000 // Section contains extended relocations.
#define IMAGE_SCN_MEM_DISCARDABLE 0x02000000 // Section can be discarded.
#define IMAGE_SCN_MEM_NOT_CACHED 0x04000000 // Section is not cachable.
#define IMAGE_SCN_MEM_NOT_PAGED 0x08000000 // Section is not pageable.
#define IMAGE_SCN_MEM_SHARED 0x10000000 // Section is shareable.
#define IMAGE_SCN_MEM_EXECUTE 0x20000000 // Section is executable.
#define IMAGE_SCN_MEM_READ 0x40000000 // Section is readable.
#define IMAGE_SCN_MEM_WRITE 0x80000000 // Section is writeable.
//
// TLS Characteristic Flags
//
#define IMAGE_SCN_SCALE_INDEX 0x00000001 // Tls index is scaled
常用的值的翻译:
数值 |
含义 |
IMAGE_SCN_CNT_CODE 0x00000020 |
The section contains executable code. 包含代码,常与 0x10000000一起设置。 |
IMAGE_SCN_CNT_INITIALIZED_DATA 0x00000040 |
The section contains initialized data. 该区块包含以初始化的数据。 |
IMAGE_SCN_CNT_UNINITIALIZED_DATA 0x00000080 |
The section contains uninitialized data. 该区块包含未初始化的数据。 |
IMAGE_SCN_MEM_DISCARDABLE 0x02000000 |
The section can be discarded as needed. 该区块可被丢弃,因为当它一旦被装入后, 进程就不在需要它了,典型的如重定位区块。 |
IMAGE_SCN_MEM_SHARED 0x10000000 |
The section can be shared in memory. 该区块为共享区块。 |
IMAGE_SCN_MEM_EXECUTE 0x20000000 |
The section can be executed as code. 该区块可以执行。通常当0x00000020被设置 时候,该标志也被设置。 |
IMAGE_SCN_MEM_READ 0x40000000 |
The section can be read. 该区块可读,可执行文件中的区块总是设置该 标志。 |
IMAGE_SCN_MEM_WRITE 0x80000000 |
The section can be written to. 该区块可写。 |
更多资料请参考官方文档:
https://msdn.microsoft.com/en-us/library/windows/desktop/ms680341(v=vs.85).aspx
例子:
|