VirtualBox

Changeset 60297 in vbox for trunk/include/iprt


Ignore:
Timestamp:
Apr 3, 2016 5:10:48 PM (9 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
106343
Message:

ldrPE.cpp/pecoff.h: Added version 5 of the load config structures, new error code VERR_LDRPE_GUARD_CF_STUFF. Added a pErrInfo parameter to rtldrPEValidateDirectoriesAndRememberStuff so it can report back why it fails.

Location:
trunk/include/iprt
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/err.h

    r58738 r60297  
    14531453/** The PE loader encountered a lock prefix table, a feature which hasn't been implemented yet. */
    14541454#define VERR_LDRPE_LOCK_PREFIX_TABLE            (-627)
     1455/** The PE loader encountered some Guard CF stuff in the load config.   */
     1456#define VERR_LDRPE_GUARD_CF_STUFF               (-628)
    14551457/** The ELF loader doesn't handle foreign endianness. */
    14561458#define VERR_LDRELF_ODD_ENDIAN                  (-630)
  • trunk/include/iprt/formats/pecoff.h

    r59931 r60297  
    678678typedef IMAGE_LOAD_CONFIG_DIRECTORY32_V4 const *PCIMAGE_LOAD_CONFIG_DIRECTORY32_V4;
    679679
    680 typedef IMAGE_LOAD_CONFIG_DIRECTORY32_V4   IMAGE_LOAD_CONFIG_DIRECTORY32;
    681 typedef PIMAGE_LOAD_CONFIG_DIRECTORY32_V4  PIMAGE_LOAD_CONFIG_DIRECTORY32;
    682 typedef PCIMAGE_LOAD_CONFIG_DIRECTORY32_V4 PCIMAGE_LOAD_CONFIG_DIRECTORY32;
     680/** @since  Windows 10 build 10286 (or maybe earlier). */
     681typedef struct _IMAGE_LOAD_CONFIG_DIRECTORY32_V5
     682{
     683    uint32_t  Size;
     684    uint32_t  TimeDateStamp;
     685    uint16_t  MajorVersion;
     686    uint16_t  MinorVersion;
     687    uint32_t  GlobalFlagsClear;
     688    uint32_t  GlobalFlagsSet;
     689    uint32_t  CriticalSectionDefaultTimeout;
     690    uint32_t  DeCommitFreeBlockThreshold;
     691    uint32_t  DeCommitTotalFreeThreshold;
     692    uint32_t  LockPrefixTable;
     693    uint32_t  MaximumAllocationSize;
     694    uint32_t  VirtualMemoryThreshold;
     695    uint32_t  ProcessHeapFlags;
     696    uint32_t  ProcessAffinityMask;
     697    uint16_t  CSDVersion;
     698    uint16_t  Reserved1;
     699    uint32_t  EditList;
     700    uint32_t  SecurityCookie;
     701    uint32_t  SEHandlerTable;
     702    uint32_t  SEHandlerCount;
     703    uint32_t  GuardCFCCheckFunctionPointer;
     704    uint32_t  Reserved2;
     705    uint32_t  GuardCFFunctionTable;
     706    uint32_t  GuardCFFunctionCount;
     707    uint32_t  GuardFlags;
     708    IMAGE_LOAD_CONFIG_CODE_INTEGRITY  CodeIntegrity;
     709    uint32_t  GuardAddressTakenIatEntryTable;
     710    uint32_t  GuardAddressTakenIatEntryCount;
     711    uint32_t  GuardLongJumpTargetTable;
     712    uint32_t  GuardLongJumpTargetCount;
     713} IMAGE_LOAD_CONFIG_DIRECTORY32_V5;
     714AssertCompileSize(IMAGE_LOAD_CONFIG_DIRECTORY32_V5, 0x78);
     715typedef IMAGE_LOAD_CONFIG_DIRECTORY32_V5 *PIMAGE_LOAD_CONFIG_DIRECTORY32_V5;
     716typedef IMAGE_LOAD_CONFIG_DIRECTORY32_V5 const *PCIMAGE_LOAD_CONFIG_DIRECTORY32_V5;
     717
     718typedef IMAGE_LOAD_CONFIG_DIRECTORY32_V5   IMAGE_LOAD_CONFIG_DIRECTORY32;
     719typedef PIMAGE_LOAD_CONFIG_DIRECTORY32_V5  PIMAGE_LOAD_CONFIG_DIRECTORY32;
     720typedef PCIMAGE_LOAD_CONFIG_DIRECTORY32_V5 PCIMAGE_LOAD_CONFIG_DIRECTORY32;
     721
    683722
    684723/* No _IMAGE_LOAD_CONFIG_DIRECTORY64_V1 exists. */
     
    779818typedef IMAGE_LOAD_CONFIG_DIRECTORY64_V4 const *PCIMAGE_LOAD_CONFIG_DIRECTORY64_V4;
    780819
    781 typedef IMAGE_LOAD_CONFIG_DIRECTORY64_V4   IMAGE_LOAD_CONFIG_DIRECTORY64;
    782 typedef PIMAGE_LOAD_CONFIG_DIRECTORY64_V4  PIMAGE_LOAD_CONFIG_DIRECTORY64;
    783 typedef PCIMAGE_LOAD_CONFIG_DIRECTORY64_V4 PCIMAGE_LOAD_CONFIG_DIRECTORY64;
     820/** @since  Windows 10 build 10286 (or maybe earlier). */
     821typedef struct _IMAGE_LOAD_CONFIG_DIRECTORY64_V5
     822{
     823    uint32_t  Size;
     824    uint32_t  TimeDateStamp;
     825    uint16_t  MajorVersion;
     826    uint16_t  MinorVersion;
     827    uint32_t  GlobalFlagsClear;
     828    uint32_t  GlobalFlagsSet;
     829    uint32_t  CriticalSectionDefaultTimeout;
     830    uint64_t  DeCommitFreeBlockThreshold;
     831    uint64_t  DeCommitTotalFreeThreshold;
     832    uint64_t  LockPrefixTable;
     833    uint64_t  MaximumAllocationSize;
     834    uint64_t  VirtualMemoryThreshold;
     835    uint64_t  ProcessAffinityMask;
     836    uint32_t  ProcessHeapFlags;
     837    uint16_t  CSDVersion;
     838    uint16_t  Reserved1;
     839    uint64_t  EditList;
     840    uint64_t  SecurityCookie;
     841    uint64_t  SEHandlerTable;
     842    uint64_t  SEHandlerCount;
     843    uint64_t  GuardCFCCheckFunctionPointer;
     844    uint64_t  Reserved2;
     845    uint64_t  GuardCFFunctionTable;
     846    uint64_t  GuardCFFunctionCount;
     847    uint32_t  GuardFlags;
     848    IMAGE_LOAD_CONFIG_CODE_INTEGRITY  CodeIntegrity;
     849    uint64_t  GuardAddressTakenIatEntryTable;
     850    uint64_t  GuardAddressTakenIatEntryCount;
     851    uint64_t  GuardLongJumpTargetTable;
     852    uint64_t  GuardLongJumpTargetCount;
     853} IMAGE_LOAD_CONFIG_DIRECTORY64_V5;
     854AssertCompileSize(IMAGE_LOAD_CONFIG_DIRECTORY64_V5, 0xc0);
     855typedef IMAGE_LOAD_CONFIG_DIRECTORY64_V5 *PIMAGE_LOAD_CONFIG_DIRECTORY64_V5;
     856typedef IMAGE_LOAD_CONFIG_DIRECTORY64_V5 const *PCIMAGE_LOAD_CONFIG_DIRECTORY64_V5;
     857
     858typedef IMAGE_LOAD_CONFIG_DIRECTORY64_V5   IMAGE_LOAD_CONFIG_DIRECTORY64;
     859typedef PIMAGE_LOAD_CONFIG_DIRECTORY64_V5  PIMAGE_LOAD_CONFIG_DIRECTORY64;
     860typedef PCIMAGE_LOAD_CONFIG_DIRECTORY64_V5 PCIMAGE_LOAD_CONFIG_DIRECTORY64;
    784861
    785862/** @} */
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette