Changeset 93295 in vbox
- Timestamp:
- Jan 18, 2022 10:38:27 AM (3 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/formats/pecoff.h
r93115 r93295 1320 1320 typedef IMAGE_LOAD_CONFIG_DIRECTORY32_V12 const *PCIMAGE_LOAD_CONFIG_DIRECTORY32_V12; 1321 1321 1322 typedef IMAGE_LOAD_CONFIG_DIRECTORY32_V12 IMAGE_LOAD_CONFIG_DIRECTORY32; 1323 typedef PIMAGE_LOAD_CONFIG_DIRECTORY32_V12 PIMAGE_LOAD_CONFIG_DIRECTORY32; 1324 typedef PCIMAGE_LOAD_CONFIG_DIRECTORY32_V12 PCIMAGE_LOAD_CONFIG_DIRECTORY32; 1322 /** @since Visual C++ 2019 16.x (found in 16.11.9) / RS5_IMAGE_LOAD_CONFIG_DIRECTORY32. */ 1323 typedef struct _IMAGE_LOAD_CONFIG_DIRECTORY32_V13 1324 { 1325 uint32_t Size; /**< 0x00 - virtual address */ 1326 uint32_t TimeDateStamp; /**< 0x04 */ 1327 uint16_t MajorVersion; /**< 0x08 */ 1328 uint16_t MinorVersion; /**< 0x0a */ 1329 uint32_t GlobalFlagsClear; /**< 0x0c */ 1330 uint32_t GlobalFlagsSet; /**< 0x10 */ 1331 uint32_t CriticalSectionDefaultTimeout; /**< 0x14 */ 1332 uint32_t DeCommitFreeBlockThreshold; /**< 0x18 - virtual address */ 1333 uint32_t DeCommitTotalFreeThreshold; /**< 0x1c - virtual address */ 1334 uint32_t LockPrefixTable; /**< 0x20 */ 1335 uint32_t MaximumAllocationSize; /**< 0x24 */ 1336 uint32_t VirtualMemoryThreshold; /**< 0x28 - virtual address of pointer variable */ 1337 uint32_t ProcessHeapFlags; /**< 0x2c - virtual address of pointer variable */ 1338 uint32_t ProcessAffinityMask; /**< 0x30 - virtual address */ 1339 uint16_t CSDVersion; /**< 0x34 */ 1340 uint16_t DependentLoadFlags; /**< 0x36 */ 1341 uint32_t EditList; /**< 0x38 */ 1342 uint32_t SecurityCookie; /**< 0x3c - virtual address */ 1343 uint32_t SEHandlerTable; /**< 0x40 */ 1344 uint32_t SEHandlerCount; /**< 0x44 - virtual address */ 1345 uint32_t GuardCFCCheckFunctionPointer; /**< 0x48 */ 1346 uint32_t GuardCFDispatchFunctionPointer; /**< 0x4c - virtual address */ 1347 uint32_t GuardCFFunctionTable; /**< 0x50 */ 1348 uint32_t GuardCFFunctionCount; /**< 0x54 - virtual address */ 1349 uint32_t GuardFlags; /**< 0x58 - virtual address of pointer variable */ 1350 IMAGE_LOAD_CONFIG_CODE_INTEGRITY CodeIntegrity; /**< 0x5c */ 1351 uint32_t GuardAddressTakenIatEntryTable; /**< 0x68 - virtual address */ 1352 uint32_t GuardAddressTakenIatEntryCount; /**< 0x6c */ 1353 uint32_t GuardLongJumpTargetTable; /**< 0x70 - virtual address */ 1354 uint32_t GuardLongJumpTargetCount; /**< 0x74 */ 1355 uint32_t DynamicValueRelocTable; /**< 0x78 - virtual address */ 1356 uint32_t CHPEMetadataPointer; /**< 0x7c Not sure when this was renamed from HybridMetadataPointer. */ 1357 uint32_t GuardRFFailureRoutine; /**< 0x80 - virtual address */ 1358 uint32_t GuardRFFailureRoutineFunctionPointer; /**< 0x84 - virtual address of pointer variable */ 1359 uint32_t DynamicValueRelocTableOffset; /**< 0x88 */ 1360 uint16_t DynamicValueRelocTableSection; /**< 0x8c */ 1361 uint16_t Reserved2; /**< 0x8e */ 1362 uint32_t GuardRFVerifyStackPointerFunctionPointer; /**< 0x90 - virtual address of pointer variable */ 1363 uint32_t HotPatchTableOffset; /**< 0x94 */ 1364 uint32_t Reserved3; /**< 0x98 */ 1365 uint32_t EnclaveConfigurationPointer; /**< 0x9c - virtual address of pointer variable */ 1366 uint32_t VolatileMetadataPointer; /**< 0xa0 - virtual address of pointer variable */ 1367 uint32_t GuardEHContinuationTable; /**< 0xa4 - virtual address */ 1368 uint32_t GuardEHContinuationCount; /**< 0xa8 */ 1369 uint32_t GuardXFGCheckFunctionPointer; /**< 0xac - virtual address of pointer variable */ 1370 uint32_t GuardXFGDispatchFunctionPointer; /**< 0xb0 - virtual address of pointer variable */ 1371 uint32_t GuardXFGTableDispatchFunctionPointer; /**< 0xb4 - virtual address of pointer variable */ 1372 uint32_t CastGuardOsDeterminedFailureMode; /**< 0xb8 - virtual address */ 1373 } IMAGE_LOAD_CONFIG_DIRECTORY32_V13; 1374 AssertCompileSize(IMAGE_LOAD_CONFIG_DIRECTORY32_V13, 0xbc); 1375 typedef IMAGE_LOAD_CONFIG_DIRECTORY32_V13 *PIMAGE_LOAD_CONFIG_DIRECTORY32_V13; 1376 typedef IMAGE_LOAD_CONFIG_DIRECTORY32_V13 const *PCIMAGE_LOAD_CONFIG_DIRECTORY32_V13; 1377 1378 typedef IMAGE_LOAD_CONFIG_DIRECTORY32_V13 IMAGE_LOAD_CONFIG_DIRECTORY32; 1379 typedef PIMAGE_LOAD_CONFIG_DIRECTORY32_V13 PIMAGE_LOAD_CONFIG_DIRECTORY32; 1380 typedef PCIMAGE_LOAD_CONFIG_DIRECTORY32_V13 PCIMAGE_LOAD_CONFIG_DIRECTORY32; 1325 1381 1326 1382 … … 1800 1856 typedef IMAGE_LOAD_CONFIG_DIRECTORY64_V12 const *PCIMAGE_LOAD_CONFIG_DIRECTORY64_V12; 1801 1857 1802 typedef IMAGE_LOAD_CONFIG_DIRECTORY64_V12 IMAGE_LOAD_CONFIG_DIRECTORY64; 1803 typedef PIMAGE_LOAD_CONFIG_DIRECTORY64_V12 PIMAGE_LOAD_CONFIG_DIRECTORY64; 1804 typedef PCIMAGE_LOAD_CONFIG_DIRECTORY64_V12 PCIMAGE_LOAD_CONFIG_DIRECTORY64; 1858 /** @since Visual C++ 2019 16.x (found in 16.11.9) / RS5_IMAGE_LOAD_CONFIG_DIRECTORY32. */ 1859 typedef struct _IMAGE_LOAD_CONFIG_DIRECTORY64_V13 1860 { 1861 uint32_t Size; /**< 0x00 */ 1862 uint32_t TimeDateStamp; /**< 0x04 */ 1863 uint16_t MajorVersion; /**< 0x08 */ 1864 uint16_t MinorVersion; /**< 0x0a */ 1865 uint32_t GlobalFlagsClear; /**< 0x0c */ 1866 uint32_t GlobalFlagsSet; /**< 0x10 */ 1867 uint32_t CriticalSectionDefaultTimeout; /**< 0x14 */ 1868 uint64_t DeCommitFreeBlockThreshold; /**< 0x18 */ 1869 uint64_t DeCommitTotalFreeThreshold; /**< 0x20 */ 1870 uint64_t LockPrefixTable; /**< 0x28 - virtual address */ 1871 uint64_t MaximumAllocationSize; /**< 0x30 */ 1872 uint64_t VirtualMemoryThreshold; /**< 0x38 */ 1873 uint64_t ProcessAffinityMask; /**< 0x40 */ 1874 uint32_t ProcessHeapFlags; /**< 0x48 */ 1875 uint16_t CSDVersion; /**< 0x4c */ 1876 uint16_t DependentLoadFlags; /**< 0x4e */ 1877 uint64_t EditList; /**< 0x50 - virtual address */ 1878 uint64_t SecurityCookie; /**< 0x58 - virtual address */ 1879 uint64_t SEHandlerTable; /**< 0x60 */ 1880 uint64_t SEHandlerCount; /**< 0x68 */ 1881 uint64_t GuardCFCCheckFunctionPointer; /**< 0x70 - virtual address of pointer variable */ 1882 uint64_t GuardCFDispatchFunctionPointer; /**< 0x78 - virtual address of pointer variable */ 1883 uint64_t GuardCFFunctionTable; /**< 0x80 - virtual address */ 1884 uint64_t GuardCFFunctionCount; /**< 0x88 */ 1885 uint32_t GuardFlags; /**< 0x90 */ 1886 IMAGE_LOAD_CONFIG_CODE_INTEGRITY CodeIntegrity; /**< 0x94 */ 1887 uint64_t GuardAddressTakenIatEntryTable; /**< 0xa0 - virtual address */ 1888 uint64_t GuardAddressTakenIatEntryCount; /**< 0xa8 */ 1889 uint64_t GuardLongJumpTargetTable; /**< 0xb0 - virtual address */ 1890 uint64_t GuardLongJumpTargetCount; /**< 0xb8 */ 1891 uint64_t DynamicValueRelocTable; /**< 0xc0 - virtual address */ 1892 uint64_t CHPEMetadataPointer; /**< 0xc8 */ 1893 uint64_t GuardRFFailureRoutine; /**< 0xd0 - virtual address */ 1894 uint64_t GuardRFFailureRoutineFunctionPointer; /**< 0xd8 - virtual address of pointer variable */ 1895 uint32_t DynamicValueRelocTableOffset; /**< 0xe0 */ 1896 uint16_t DynamicValueRelocTableSection; /**< 0xe4 */ 1897 uint16_t Reserved2; /**< 0xe6 */ 1898 uint64_t GuardRFVerifyStackPointerFunctionPointer; /**< 0xe8 - virtual address of pointer variable */ 1899 uint32_t HotPatchTableOffset; /**< 0xf0 */ 1900 uint32_t Reserved3; /**< 0xf4 */ 1901 uint64_t EnclaveConfigurationPointer; /**< 0xf8 - seen in bcrypt and bcryptprimitives pointing to the string "L". */ 1902 uint64_t VolatileMetadataPointer; /**< 0x100 - virtual address of pointer variable */ 1903 uint64_t GuardEHContinuationTable; /**< 0x108 - virtual address */ 1904 uint64_t GuardEHContinuationCount; /**< 0x110 */ 1905 uint64_t GuardXFGCheckFunctionPointer; /**< 0x118 - virtual address of pointer variable */ 1906 uint64_t GuardXFGDispatchFunctionPointer; /**< 0x120 - virtual address of pointer variable */ 1907 uint64_t GuardXFGTableDispatchFunctionPointer; /**< 0x128 - virtual address of pointer variable */ 1908 uint64_t CastGuardOsDeterminedFailureMode; /**< 0x130 - virtual address */ 1909 } IMAGE_LOAD_CONFIG_DIRECTORY64_V13; 1910 AssertCompileSize(IMAGE_LOAD_CONFIG_DIRECTORY64_V13, 0x138); 1911 typedef IMAGE_LOAD_CONFIG_DIRECTORY64_V13 *PIMAGE_LOAD_CONFIG_DIRECTORY64_V13; 1912 typedef IMAGE_LOAD_CONFIG_DIRECTORY64_V13 const *PCIMAGE_LOAD_CONFIG_DIRECTORY64_V13; 1913 1914 typedef IMAGE_LOAD_CONFIG_DIRECTORY64_V13 IMAGE_LOAD_CONFIG_DIRECTORY64; 1915 typedef PIMAGE_LOAD_CONFIG_DIRECTORY64_V13 PIMAGE_LOAD_CONFIG_DIRECTORY64; 1916 typedef PCIMAGE_LOAD_CONFIG_DIRECTORY64_V13 PCIMAGE_LOAD_CONFIG_DIRECTORY64; 1805 1917 1806 1918 /** @} */ -
trunk/src/VBox/Runtime/common/ldr/ldrPE.cpp
r93115 r93295 3825 3825 * volatile everywhere! Trying to prevent the compiler being a smarta$$ and reorder stuff. 3826 3826 */ 3827 IMAGE_LOAD_CONFIG_DIRECTORY32_V12 volatile *pLoadCfg32 = (IMAGE_LOAD_CONFIG_DIRECTORY32_V12 volatile *)pLoadCfg; 3828 IMAGE_LOAD_CONFIG_DIRECTORY64_V12 volatile *pLoadCfg64 = pLoadCfg; 3829 3830 pLoadCfg64->GuardXFGTableDispatchFunctionPointer = pLoadCfg32->GuardXFGTableDispatchFunctionPointer; 3831 pLoadCfg64->GuardXFGDispatchFunctionPointer = pLoadCfg32->GuardXFGDispatchFunctionPointer; 3832 pLoadCfg64->GuardXFGCheckFunctionPointer = pLoadCfg32->GuardXFGCheckFunctionPointer; 3833 pLoadCfg64->GuardEHContinuationCount = pLoadCfg32->GuardEHContinuationCount; 3834 pLoadCfg64->GuardEHContinuationTable = pLoadCfg32->GuardEHContinuationTable; 3835 pLoadCfg64->VolatileMetadataPointer = pLoadCfg32->VolatileMetadataPointer; 3836 pLoadCfg64->EnclaveConfigurationPointer = pLoadCfg32->EnclaveConfigurationPointer; 3837 pLoadCfg64->Reserved3 = pLoadCfg32->Reserved3; 3838 pLoadCfg64->HotPatchTableOffset = pLoadCfg32->HotPatchTableOffset; 3827 IMAGE_LOAD_CONFIG_DIRECTORY32_V13 volatile *pLoadCfg32 = (IMAGE_LOAD_CONFIG_DIRECTORY32_V13 volatile *)pLoadCfg; 3828 IMAGE_LOAD_CONFIG_DIRECTORY64_V13 volatile *pLoadCfg64 = pLoadCfg; 3829 3830 pLoadCfg64->CastGuardOsDeterminedFailureMode = pLoadCfg32->CastGuardOsDeterminedFailureMode; 3831 pLoadCfg64->GuardXFGTableDispatchFunctionPointer = pLoadCfg32->GuardXFGTableDispatchFunctionPointer; 3832 pLoadCfg64->GuardXFGDispatchFunctionPointer = pLoadCfg32->GuardXFGDispatchFunctionPointer; 3833 pLoadCfg64->GuardXFGCheckFunctionPointer = pLoadCfg32->GuardXFGCheckFunctionPointer; 3834 pLoadCfg64->GuardEHContinuationCount = pLoadCfg32->GuardEHContinuationCount; 3835 pLoadCfg64->GuardEHContinuationTable = pLoadCfg32->GuardEHContinuationTable; 3836 pLoadCfg64->VolatileMetadataPointer = pLoadCfg32->VolatileMetadataPointer; 3837 pLoadCfg64->EnclaveConfigurationPointer = pLoadCfg32->EnclaveConfigurationPointer; 3838 pLoadCfg64->Reserved3 = pLoadCfg32->Reserved3; 3839 pLoadCfg64->HotPatchTableOffset = pLoadCfg32->HotPatchTableOffset; 3839 3840 pLoadCfg64->GuardRFVerifyStackPointerFunctionPointer = pLoadCfg32->GuardRFVerifyStackPointerFunctionPointer; 3840 pLoadCfg64->Reserved2 = pLoadCfg32->Reserved2;3841 pLoadCfg64->DynamicValueRelocTableSection = pLoadCfg32->DynamicValueRelocTableSection;3842 pLoadCfg64->DynamicValueRelocTableOffset = pLoadCfg32->DynamicValueRelocTableOffset;3843 pLoadCfg64->GuardRFFailureRoutineFunctionPointer = pLoadCfg32->GuardRFFailureRoutineFunctionPointer;3844 pLoadCfg64->GuardRFFailureRoutine = pLoadCfg32->GuardRFFailureRoutine;3845 pLoadCfg64->CHPEMetadataPointer = pLoadCfg32->CHPEMetadataPointer;3846 pLoadCfg64->DynamicValueRelocTable = pLoadCfg32->DynamicValueRelocTable;3847 pLoadCfg64->GuardLongJumpTargetCount = pLoadCfg32->GuardLongJumpTargetCount;3848 pLoadCfg64->GuardLongJumpTargetTable = pLoadCfg32->GuardLongJumpTargetTable;3849 pLoadCfg64->GuardAddressTakenIatEntryCount = pLoadCfg32->GuardAddressTakenIatEntryCount;3850 pLoadCfg64->GuardAddressTakenIatEntryTable = pLoadCfg32->GuardAddressTakenIatEntryTable;3851 pLoadCfg64->CodeIntegrity.Reserved = pLoadCfg32->CodeIntegrity.Reserved;3852 pLoadCfg64->CodeIntegrity.CatalogOffset = pLoadCfg32->CodeIntegrity.CatalogOffset;3853 pLoadCfg64->CodeIntegrity.Catalog = pLoadCfg32->CodeIntegrity.Catalog;3854 pLoadCfg64->CodeIntegrity.Flags = pLoadCfg32->CodeIntegrity.Flags;3855 pLoadCfg64->GuardFlags = pLoadCfg32->GuardFlags;3856 pLoadCfg64->GuardCFFunctionCount = pLoadCfg32->GuardCFFunctionCount;3857 pLoadCfg64->GuardCFFunctionTable = pLoadCfg32->GuardCFFunctionTable;3858 pLoadCfg64->GuardCFDispatchFunctionPointer = pLoadCfg32->GuardCFDispatchFunctionPointer;3859 pLoadCfg64->GuardCFCCheckFunctionPointer = pLoadCfg32->GuardCFCCheckFunctionPointer;3860 pLoadCfg64->SEHandlerCount = pLoadCfg32->SEHandlerCount;3861 pLoadCfg64->SEHandlerTable = pLoadCfg32->SEHandlerTable;3862 pLoadCfg64->SecurityCookie = pLoadCfg32->SecurityCookie;3863 pLoadCfg64->EditList = pLoadCfg32->EditList;3864 pLoadCfg64->DependentLoadFlags = pLoadCfg32->DependentLoadFlags;3865 pLoadCfg64->CSDVersion = pLoadCfg32->CSDVersion;3866 pLoadCfg64->ProcessHeapFlags = pLoadCfg32->ProcessHeapFlags; /* switched place with ProcessAffinityMask, but we're more than 16 byte off by now so it doesn't matter. */3867 pLoadCfg64->ProcessAffinityMask = pLoadCfg32->ProcessAffinityMask;3868 pLoadCfg64->VirtualMemoryThreshold = pLoadCfg32->VirtualMemoryThreshold;3869 pLoadCfg64->MaximumAllocationSize = pLoadCfg32->MaximumAllocationSize;3870 pLoadCfg64->LockPrefixTable = pLoadCfg32->LockPrefixTable;3871 pLoadCfg64->DeCommitTotalFreeThreshold = pLoadCfg32->DeCommitTotalFreeThreshold;3872 uint32_t u32DeCommitFreeBlockThreshold = pLoadCfg32->DeCommitFreeBlockThreshold;3873 pLoadCfg64->DeCommitFreeBlockThreshold = u32DeCommitFreeBlockThreshold;3841 pLoadCfg64->Reserved2 = pLoadCfg32->Reserved2; 3842 pLoadCfg64->DynamicValueRelocTableSection = pLoadCfg32->DynamicValueRelocTableSection; 3843 pLoadCfg64->DynamicValueRelocTableOffset = pLoadCfg32->DynamicValueRelocTableOffset; 3844 pLoadCfg64->GuardRFFailureRoutineFunctionPointer = pLoadCfg32->GuardRFFailureRoutineFunctionPointer; 3845 pLoadCfg64->GuardRFFailureRoutine = pLoadCfg32->GuardRFFailureRoutine; 3846 pLoadCfg64->CHPEMetadataPointer = pLoadCfg32->CHPEMetadataPointer; 3847 pLoadCfg64->DynamicValueRelocTable = pLoadCfg32->DynamicValueRelocTable; 3848 pLoadCfg64->GuardLongJumpTargetCount = pLoadCfg32->GuardLongJumpTargetCount; 3849 pLoadCfg64->GuardLongJumpTargetTable = pLoadCfg32->GuardLongJumpTargetTable; 3850 pLoadCfg64->GuardAddressTakenIatEntryCount = pLoadCfg32->GuardAddressTakenIatEntryCount; 3851 pLoadCfg64->GuardAddressTakenIatEntryTable = pLoadCfg32->GuardAddressTakenIatEntryTable; 3852 pLoadCfg64->CodeIntegrity.Reserved = pLoadCfg32->CodeIntegrity.Reserved; 3853 pLoadCfg64->CodeIntegrity.CatalogOffset = pLoadCfg32->CodeIntegrity.CatalogOffset; 3854 pLoadCfg64->CodeIntegrity.Catalog = pLoadCfg32->CodeIntegrity.Catalog; 3855 pLoadCfg64->CodeIntegrity.Flags = pLoadCfg32->CodeIntegrity.Flags; 3856 pLoadCfg64->GuardFlags = pLoadCfg32->GuardFlags; 3857 pLoadCfg64->GuardCFFunctionCount = pLoadCfg32->GuardCFFunctionCount; 3858 pLoadCfg64->GuardCFFunctionTable = pLoadCfg32->GuardCFFunctionTable; 3859 pLoadCfg64->GuardCFDispatchFunctionPointer = pLoadCfg32->GuardCFDispatchFunctionPointer; 3860 pLoadCfg64->GuardCFCCheckFunctionPointer = pLoadCfg32->GuardCFCCheckFunctionPointer; 3861 pLoadCfg64->SEHandlerCount = pLoadCfg32->SEHandlerCount; 3862 pLoadCfg64->SEHandlerTable = pLoadCfg32->SEHandlerTable; 3863 pLoadCfg64->SecurityCookie = pLoadCfg32->SecurityCookie; 3864 pLoadCfg64->EditList = pLoadCfg32->EditList; 3865 pLoadCfg64->DependentLoadFlags = pLoadCfg32->DependentLoadFlags; 3866 pLoadCfg64->CSDVersion = pLoadCfg32->CSDVersion; 3867 pLoadCfg64->ProcessHeapFlags = pLoadCfg32->ProcessHeapFlags; /* switched place with ProcessAffinityMask, but we're more than 16 byte off by now so it doesn't matter. */ 3868 pLoadCfg64->ProcessAffinityMask = pLoadCfg32->ProcessAffinityMask; 3869 pLoadCfg64->VirtualMemoryThreshold = pLoadCfg32->VirtualMemoryThreshold; 3870 pLoadCfg64->MaximumAllocationSize = pLoadCfg32->MaximumAllocationSize; 3871 pLoadCfg64->LockPrefixTable = pLoadCfg32->LockPrefixTable; 3872 pLoadCfg64->DeCommitTotalFreeThreshold = pLoadCfg32->DeCommitTotalFreeThreshold; 3873 uint32_t u32DeCommitFreeBlockThreshold = pLoadCfg32->DeCommitFreeBlockThreshold; 3874 pLoadCfg64->DeCommitFreeBlockThreshold = u32DeCommitFreeBlockThreshold; 3874 3875 /* the rest is equal. */ 3875 3876 Assert( RT_UOFFSETOF(IMAGE_LOAD_CONFIG_DIRECTORY32, DeCommitFreeBlockThreshold) … … 4455 4456 if (Dir.Size) 4456 4457 { 4458 const size_t cbExpectV13 = !pModPe->f64Bit 4459 ? sizeof(IMAGE_LOAD_CONFIG_DIRECTORY32_V13) 4460 : sizeof(IMAGE_LOAD_CONFIG_DIRECTORY64_V13); 4457 4461 const size_t cbExpectV12 = !pModPe->f64Bit 4458 4462 ? sizeof(IMAGE_LOAD_CONFIG_DIRECTORY32_V12) … … 4495 4499 4496 4500 bool fNewerStructureHack = false; 4497 if ( Dir.Size != cbExpectV12 4501 if ( Dir.Size != cbExpectV13 4502 && Dir.Size != cbExpectV12 4498 4503 && Dir.Size != cbExpectV11 4499 4504 && Dir.Size != cbExpectV10 … … 4510 4515 fNewerStructureHack = Dir.Size > cbNewHack /* These structure changes are slowly getting to us! More futher down. */ 4511 4516 && Dir.Size <= sizeof(u); 4512 Log(("rtldrPEOpen: %s: load cfg dir: unexpected dir size of %u bytes, expected %zu, %zu, %zu, %zu, %zu, %zu, %zu, %zu, %zu, %zu, %zu, or %zu.%s\n",4513 pszLogName, Dir.Size, cbExpectV1 2, cbExpectV11, cbExpectV10, cbExpectV9, cbExpectV8, cbExpectV7, cbExpectV6, cbExpectV5, cbExpectV4, cbExpectV3, cbExpectV2, cbExpectV1,4517 Log(("rtldrPEOpen: %s: load cfg dir: unexpected dir size of %u bytes, expected %zu, %zu, %zu, %zu, %zu, %zu, %zu, %zu, %zu, %zu, %zu, %zu, or %zu.%s\n", 4518 pszLogName, Dir.Size, cbExpectV13, cbExpectV12, cbExpectV11, cbExpectV10, cbExpectV9, cbExpectV8, cbExpectV7, cbExpectV6, cbExpectV5, cbExpectV4, cbExpectV3, cbExpectV2, cbExpectV1, 4514 4519 fNewerStructureHack ? " Will try ignore extra bytes if all zero." : "")); 4515 4520 if (!fNewerStructureHack) 4516 4521 return RTErrInfoSetF(pErrInfo, VERR_LDRPE_LOAD_CONFIG_SIZE, 4517 "Unexpected load config dir size of %u bytes; supported sized: %zu, %zu, %zu, %zu, %zu, %zu, %zu, %zu, %zu, %zu, %zu, or %zu",4518 Dir.Size, cbExpectV1 2, cbExpectV11, cbExpectV10, cbExpectV9, cbExpectV8, cbExpectV7, cbExpectV6, cbExpectV5, cbExpectV4, cbExpectV3, cbExpectV2, cbExpectV1);4522 "Unexpected load config dir size of %u bytes; supported sized: %zu, %zu, %zu, %zu, %zu, %zu, %zu, %zu, %zu, %zu, %zu, %zu, or %zu", 4523 Dir.Size, cbExpectV13, cbExpectV12, cbExpectV11, cbExpectV10, cbExpectV9, cbExpectV8, cbExpectV7, cbExpectV6, cbExpectV5, cbExpectV4, cbExpectV3, cbExpectV2, cbExpectV1); 4519 4524 } 4520 4525 … … 4555 4560 /* Kludge #2: This happens a lot. Structure changes, but the linker doesn't get 4556 4561 updated and stores some old size in the directory. Use the header size. */ 4557 else if ( u.Cfg64.Size == cbExpectV12 4562 else if ( u.Cfg64.Size == cbExpectV13 4563 || u.Cfg64.Size == cbExpectV12 4558 4564 || u.Cfg64.Size == cbExpectV11 4559 4565 || u.Cfg64.Size == cbExpectV10
Note:
See TracChangeset
for help on using the changeset viewer.