Where can I find a reference for what every bit of the CorFlags value means?

可紊 提交于 2019-12-03 11:36:21

You are actually seeing a blend of info from the PE32 header (PE field) and the header of the manifest embedded in the assembly (the rest). This is all described in the Windows SDK, you'll need version 8 to get the new 32BITPREF flag. Use C:\Program Files (x86)\Windows Kits\8.0\Include\um\CorHdr.h, lots of comments in this file that describe the declarations.

I'll copy the section that describes the IMAGE_COR20_HEADER.Flags values:

COMIMAGE_FLAGS_ILONLY               =0x00000001,
COMIMAGE_FLAGS_32BITREQUIRED        =0x00000002,
COMIMAGE_FLAGS_IL_LIBRARY           =0x00000004,
COMIMAGE_FLAGS_STRONGNAMESIGNED     =0x00000008,
COMIMAGE_FLAGS_NATIVE_ENTRYPOINT    =0x00000010,
COMIMAGE_FLAGS_TRACKDEBUGDATA       =0x00010000,
COMIMAGE_FLAGS_32BITPREFERRED       =0x00020000,

So a displayed value of 0x20003 breaks down into 32BITPREFERRED (0x20000) plus 32BITREQUIRED (0x00002) plus ILONLY (0x00001)

The flags interpretation:

Any CPU: PE = PE32 and 32BIT = 0

x86: PE = PE32 and 32BIT = 1

64-bit: PE = PE32+ and 32BIT = 0

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!