Changeset 64204 in vbox
- Timestamp:
- Oct 11, 2016 10:36:05 AM (9 years ago)
- svn:sync-xref-src-repo-rev:
- 111195
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/formats/pecoff.h
r62474 r64204 577 577 uint32_t ProcessAffinityMask; 578 578 uint16_t CSDVersion; 579 uint16_t Reserved1;579 uint16_t DependentLoadFlags; 580 580 uint32_t EditList; 581 581 uint32_t SecurityCookie; … … 602 602 uint32_t ProcessAffinityMask; 603 603 uint16_t CSDVersion; 604 uint16_t Reserved1;604 uint16_t DependentLoadFlags; 605 605 uint32_t EditList; 606 606 uint32_t SecurityCookie; … … 629 629 uint32_t ProcessAffinityMask; 630 630 uint16_t CSDVersion; 631 uint16_t Reserved1;631 uint16_t DependentLoadFlags; 632 632 uint32_t EditList; 633 633 uint32_t SecurityCookie; … … 635 635 uint32_t SEHandlerCount; 636 636 uint32_t GuardCFCCheckFunctionPointer; 637 uint32_t Reserved2;637 uint32_t GuardCFDispatchFunctionPointer; 638 638 uint32_t GuardCFFunctionTable; 639 639 uint32_t GuardCFFunctionCount; … … 662 662 uint32_t ProcessAffinityMask; 663 663 uint16_t CSDVersion; 664 uint16_t Reserved1;664 uint16_t DependentLoadFlags; 665 665 uint32_t EditList; 666 666 uint32_t SecurityCookie; … … 668 668 uint32_t SEHandlerCount; 669 669 uint32_t GuardCFCCheckFunctionPointer; 670 uint32_t Reserved2;670 uint32_t GuardCFDispatchFunctionPointer; 671 671 uint32_t GuardCFFunctionTable; 672 672 uint32_t GuardCFFunctionCount; … … 696 696 uint32_t ProcessAffinityMask; 697 697 uint16_t CSDVersion; 698 uint16_t Reserved1;698 uint16_t DependentLoadFlags; 699 699 uint32_t EditList; 700 700 uint32_t SecurityCookie; … … 702 702 uint32_t SEHandlerCount; 703 703 uint32_t GuardCFCCheckFunctionPointer; 704 uint32_t Reserved2;704 uint32_t GuardCFDispatchFunctionPointer; 705 705 uint32_t GuardCFFunctionTable; 706 706 uint32_t GuardCFFunctionCount; … … 716 716 typedef IMAGE_LOAD_CONFIG_DIRECTORY32_V5 const *PCIMAGE_LOAD_CONFIG_DIRECTORY32_V5; 717 717 718 typedef IMAGE_LOAD_CONFIG_DIRECTORY32_V5 IMAGE_LOAD_CONFIG_DIRECTORY32; 719 typedef PIMAGE_LOAD_CONFIG_DIRECTORY32_V5 PIMAGE_LOAD_CONFIG_DIRECTORY32; 720 typedef PCIMAGE_LOAD_CONFIG_DIRECTORY32_V5 PCIMAGE_LOAD_CONFIG_DIRECTORY32; 718 /** @since Windows 10 build 14383 (or maybe earlier). */ 719 typedef struct _IMAGE_LOAD_CONFIG_DIRECTORY32_V6 720 { 721 uint32_t Size; /**< 0x00 */ 722 uint32_t TimeDateStamp; /**< 0x04 */ 723 uint16_t MajorVersion; /**< 0x08 */ 724 uint16_t MinorVersion; /**< 0x0a */ 725 uint32_t GlobalFlagsClear; /**< 0x0c */ 726 uint32_t GlobalFlagsSet; /**< 0x10 */ 727 uint32_t CriticalSectionDefaultTimeout; /**< 0x14 */ 728 uint32_t DeCommitFreeBlockThreshold; /**< 0x18 */ 729 uint32_t DeCommitTotalFreeThreshold; /**< 0x1c */ 730 uint32_t LockPrefixTable; /**< 0x20 */ 731 uint32_t MaximumAllocationSize; /**< 0x24 */ 732 uint32_t VirtualMemoryThreshold; /**< 0x28 */ 733 uint32_t ProcessHeapFlags; /**< 0x2c */ 734 uint32_t ProcessAffinityMask; /**< 0x30 */ 735 uint16_t CSDVersion; /**< 0x34 */ 736 uint16_t DependentLoadFlags; /**< 0x36 */ 737 uint32_t EditList; /**< 0x38 */ 738 uint32_t SecurityCookie; /**< 0x3c */ 739 uint32_t SEHandlerTable; /**< 0x40 */ 740 uint32_t SEHandlerCount; /**< 0x44 */ 741 uint32_t GuardCFCCheckFunctionPointer; /**< 0x48 */ 742 uint32_t GuardCFDispatchFunctionPointer; /**< 0x4c */ 743 uint32_t GuardCFFunctionTable; /**< 0x50 */ 744 uint32_t GuardCFFunctionCount; /**< 0x54 */ 745 uint32_t GuardFlags; /**< 0x58 */ 746 IMAGE_LOAD_CONFIG_CODE_INTEGRITY CodeIntegrity; /**< 0x5c */ 747 uint32_t GuardAddressTakenIatEntryTable; /**< 0x68 */ 748 uint32_t GuardAddressTakenIatEntryCount; /**< 0x6c */ 749 uint32_t GuardLongJumpTargetTable; /**< 0x70 */ 750 uint32_t GuardLongJumpTargetCount; /**< 0x74 */ 751 uint32_t DynamicValueRelocTable; /**< 0x78 */ 752 uint32_t HybridMetadataPointer; /**< 0x7c */ 753 } IMAGE_LOAD_CONFIG_DIRECTORY32_V6; 754 AssertCompileSize(IMAGE_LOAD_CONFIG_DIRECTORY32_V6, 0x80); 755 typedef IMAGE_LOAD_CONFIG_DIRECTORY32_V6 *PIMAGE_LOAD_CONFIG_DIRECTORY32_V6; 756 typedef IMAGE_LOAD_CONFIG_DIRECTORY32_V6 const *PCIMAGE_LOAD_CONFIG_DIRECTORY32_V6; 757 758 /** @since Windows 10 build 14901 (or maybe earlier). */ 759 typedef struct _IMAGE_LOAD_CONFIG_DIRECTORY32_V7 760 { 761 uint32_t Size; /**< 0x00 */ 762 uint32_t TimeDateStamp; /**< 0x04 */ 763 uint16_t MajorVersion; /**< 0x08 */ 764 uint16_t MinorVersion; /**< 0x0a */ 765 uint32_t GlobalFlagsClear; /**< 0x0c */ 766 uint32_t GlobalFlagsSet; /**< 0x10 */ 767 uint32_t CriticalSectionDefaultTimeout; /**< 0x14 */ 768 uint32_t DeCommitFreeBlockThreshold; /**< 0x18 */ 769 uint32_t DeCommitTotalFreeThreshold; /**< 0x1c */ 770 uint32_t LockPrefixTable; /**< 0x20 */ 771 uint32_t MaximumAllocationSize; /**< 0x24 */ 772 uint32_t VirtualMemoryThreshold; /**< 0x28 */ 773 uint32_t ProcessHeapFlags; /**< 0x2c */ 774 uint32_t ProcessAffinityMask; /**< 0x30 */ 775 uint16_t CSDVersion; /**< 0x34 */ 776 uint16_t DependentLoadFlags; /**< 0x36 */ 777 uint32_t EditList; /**< 0x38 */ 778 uint32_t SecurityCookie; /**< 0x3c */ 779 uint32_t SEHandlerTable; /**< 0x40 */ 780 uint32_t SEHandlerCount; /**< 0x44 */ 781 uint32_t GuardCFCCheckFunctionPointer; /**< 0x48 */ 782 uint32_t GuardCFDispatchFunctionPointer; /**< 0x4c */ 783 uint32_t GuardCFFunctionTable; /**< 0x50 */ 784 uint32_t GuardCFFunctionCount; /**< 0x54 */ 785 uint32_t GuardFlags; /**< 0x58 */ 786 IMAGE_LOAD_CONFIG_CODE_INTEGRITY CodeIntegrity; /**< 0x5c */ 787 uint32_t GuardAddressTakenIatEntryTable; /**< 0x68 */ 788 uint32_t GuardAddressTakenIatEntryCount; /**< 0x6c */ 789 uint32_t GuardLongJumpTargetTable; /**< 0x70 */ 790 uint32_t GuardLongJumpTargetCount; /**< 0x74 */ 791 uint32_t DynamicValueRelocTable; /**< 0x78 */ 792 uint32_t HybridMetadataPointer; /**< 0x7c */ 793 uint32_t FailFastIndirectProc; /**< 0x80 - temporary name, rename when we get symbols */ 794 uint32_t FailFastPointer; /**< 0x84 - temporary name, rename when we get symbols */ 795 uint32_t UnknownZero1; /**< 0x88 - temporary name, rename when we get symbols */ 796 } IMAGE_LOAD_CONFIG_DIRECTORY32_V7; 797 AssertCompileSize(IMAGE_LOAD_CONFIG_DIRECTORY32_V7, 0x8c); 798 typedef IMAGE_LOAD_CONFIG_DIRECTORY32_V7 *PIMAGE_LOAD_CONFIG_DIRECTORY32_V7; 799 typedef IMAGE_LOAD_CONFIG_DIRECTORY32_V7 const *PCIMAGE_LOAD_CONFIG_DIRECTORY32_V7; 800 801 typedef IMAGE_LOAD_CONFIG_DIRECTORY32_V7 IMAGE_LOAD_CONFIG_DIRECTORY32; 802 typedef PIMAGE_LOAD_CONFIG_DIRECTORY32_V7 PIMAGE_LOAD_CONFIG_DIRECTORY32; 803 typedef PCIMAGE_LOAD_CONFIG_DIRECTORY32_V7 PCIMAGE_LOAD_CONFIG_DIRECTORY32; 721 804 722 805 … … 740 823 uint32_t ProcessHeapFlags; 741 824 uint16_t CSDVersion; 742 uint16_t Reserved1;825 uint16_t DependentLoadFlags; 743 826 uint64_t EditList; 744 827 uint64_t SecurityCookie; … … 768 851 uint32_t ProcessHeapFlags; 769 852 uint16_t CSDVersion; 770 uint16_t Reserved1;853 uint16_t DependentLoadFlags; 771 854 uint64_t EditList; 772 855 uint64_t SecurityCookie; … … 774 857 uint64_t SEHandlerCount; 775 858 uint64_t GuardCFCCheckFunctionPointer; 776 uint64_t Reserved2;859 uint64_t GuardCFDispatchFunctionPointer; 777 860 uint64_t GuardCFFunctionTable; 778 861 uint64_t GuardCFFunctionCount; … … 787 870 typedef struct _IMAGE_LOAD_CONFIG_DIRECTORY64_V4 788 871 { 789 uint32_t Size; 790 uint32_t TimeDateStamp; 791 uint16_t MajorVersion; 792 uint16_t MinorVersion; 793 uint32_t GlobalFlagsClear; 794 uint32_t GlobalFlagsSet; 795 uint32_t CriticalSectionDefaultTimeout; 796 uint64_t DeCommitFreeBlockThreshold; 797 uint64_t DeCommitTotalFreeThreshold; 798 uint64_t LockPrefixTable; 799 uint64_t MaximumAllocationSize; 800 uint64_t VirtualMemoryThreshold; 801 uint64_t ProcessAffinityMask; 802 uint32_t ProcessHeapFlags; 803 uint16_t CSDVersion; 804 uint16_t Reserved1;805 uint64_t EditList; 806 uint64_t SecurityCookie; 807 uint64_t SEHandlerTable; 808 uint64_t SEHandlerCount; 809 uint64_t GuardCFCCheckFunctionPointer; 810 uint64_t Reserved2;811 uint64_t GuardCFFunctionTable; 812 uint64_t GuardCFFunctionCount; 813 uint32_t GuardFlags; 814 IMAGE_LOAD_CONFIG_CODE_INTEGRITY CodeIntegrity;872 uint32_t Size; /**< 0x00 */ 873 uint32_t TimeDateStamp; /**< 0x04 */ 874 uint16_t MajorVersion; /**< 0x08 */ 875 uint16_t MinorVersion; /**< 0x0a */ 876 uint32_t GlobalFlagsClear; /**< 0x0c */ 877 uint32_t GlobalFlagsSet; /**< 0x10 */ 878 uint32_t CriticalSectionDefaultTimeout; /**< 0x14 */ 879 uint64_t DeCommitFreeBlockThreshold; /**< 0x18 */ 880 uint64_t DeCommitTotalFreeThreshold; /**< 0x20 */ 881 uint64_t LockPrefixTable; /**< 0x28 */ 882 uint64_t MaximumAllocationSize; /**< 0x30 */ 883 uint64_t VirtualMemoryThreshold; /**< 0x38 */ 884 uint64_t ProcessAffinityMask; /**< 0x40 */ 885 uint32_t ProcessHeapFlags; /**< 0x48 */ 886 uint16_t CSDVersion; /**< 0x4c */ 887 uint16_t DependentLoadFlags; /**< 0x4e */ 888 uint64_t EditList; /**< 0x50 */ 889 uint64_t SecurityCookie; /**< 0x58 */ 890 uint64_t SEHandlerTable; /**< 0x60 */ 891 uint64_t SEHandlerCount; /**< 0x68 */ 892 uint64_t GuardCFCCheckFunctionPointer; /**< 0x70 */ 893 uint64_t GuardCFDispatchFunctionPointer; /**< 0x78 */ 894 uint64_t GuardCFFunctionTable; /**< 0x80 */ 895 uint64_t GuardCFFunctionCount; /**< 0x88 */ 896 uint32_t GuardFlags; /**< 0x90 */ 897 IMAGE_LOAD_CONFIG_CODE_INTEGRITY CodeIntegrity; /**< 0x94 */ 815 898 } IMAGE_LOAD_CONFIG_DIRECTORY64_V4; 816 899 AssertCompileSize(IMAGE_LOAD_CONFIG_DIRECTORY64_V4, 0xa0); … … 821 904 typedef struct _IMAGE_LOAD_CONFIG_DIRECTORY64_V5 822 905 { 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; 906 uint32_t Size; /**< 0x00 */ 907 uint32_t TimeDateStamp; /**< 0x04 */ 908 uint16_t MajorVersion; /**< 0x08 */ 909 uint16_t MinorVersion; /**< 0x0a */ 910 uint32_t GlobalFlagsClear; /**< 0x0c */ 911 uint32_t GlobalFlagsSet; /**< 0x10 */ 912 uint32_t CriticalSectionDefaultTimeout; /**< 0x14 */ 913 uint64_t DeCommitFreeBlockThreshold; /**< 0x18 */ 914 uint64_t DeCommitTotalFreeThreshold; /**< 0x20 */ 915 uint64_t LockPrefixTable; /**< 0x28 */ 916 uint64_t MaximumAllocationSize; /**< 0x30 */ 917 uint64_t VirtualMemoryThreshold; /**< 0x38 */ 918 uint64_t ProcessAffinityMask; /**< 0x40 */ 919 uint32_t ProcessHeapFlags; /**< 0x48 */ 920 uint16_t CSDVersion; /**< 0x4c */ 921 uint16_t DependentLoadFlags; /**< 0x4e */ 922 uint64_t EditList; /**< 0x50 */ 923 uint64_t SecurityCookie; /**< 0x58 */ 924 uint64_t SEHandlerTable; /**< 0x60 */ 925 uint64_t SEHandlerCount; /**< 0x68 */ 926 uint64_t GuardCFCCheckFunctionPointer; /**< 0x70 */ 927 uint64_t GuardCFDispatchFunctionPointer; /**< 0x78 */ 928 uint64_t GuardCFFunctionTable; /**< 0x80 */ 929 uint64_t GuardCFFunctionCount; /**< 0x88 */ 930 uint32_t GuardFlags; /**< 0x90 */ 931 IMAGE_LOAD_CONFIG_CODE_INTEGRITY CodeIntegrity; /**< 0x94 */ 932 uint64_t GuardAddressTakenIatEntryTable; /**< 0xa0 */ 933 uint64_t GuardAddressTakenIatEntryCount; /**< 0xa8 */ 934 uint64_t GuardLongJumpTargetTable; /**< 0xb0 */ 935 uint64_t GuardLongJumpTargetCount; /**< 0xb8 */ 853 936 } IMAGE_LOAD_CONFIG_DIRECTORY64_V5; 854 937 AssertCompileSize(IMAGE_LOAD_CONFIG_DIRECTORY64_V5, 0xc0); … … 856 939 typedef IMAGE_LOAD_CONFIG_DIRECTORY64_V5 const *PCIMAGE_LOAD_CONFIG_DIRECTORY64_V5; 857 940 858 typedef IMAGE_LOAD_CONFIG_DIRECTORY64_V5 IMAGE_LOAD_CONFIG_DIRECTORY64; 859 typedef PIMAGE_LOAD_CONFIG_DIRECTORY64_V5 PIMAGE_LOAD_CONFIG_DIRECTORY64; 860 typedef PCIMAGE_LOAD_CONFIG_DIRECTORY64_V5 PCIMAGE_LOAD_CONFIG_DIRECTORY64; 941 /** @since Windows 10 build 14393 (or maybe earlier). */ 942 typedef struct _IMAGE_LOAD_CONFIG_DIRECTORY64_V6 943 { 944 uint32_t Size; /**< 0x00 */ 945 uint32_t TimeDateStamp; /**< 0x04 */ 946 uint16_t MajorVersion; /**< 0x08 */ 947 uint16_t MinorVersion; /**< 0x0a */ 948 uint32_t GlobalFlagsClear; /**< 0x0c */ 949 uint32_t GlobalFlagsSet; /**< 0x10 */ 950 uint32_t CriticalSectionDefaultTimeout; /**< 0x14 */ 951 uint64_t DeCommitFreeBlockThreshold; /**< 0x18 */ 952 uint64_t DeCommitTotalFreeThreshold; /**< 0x20 */ 953 uint64_t LockPrefixTable; /**< 0x28 */ 954 uint64_t MaximumAllocationSize; /**< 0x30 */ 955 uint64_t VirtualMemoryThreshold; /**< 0x38 */ 956 uint64_t ProcessAffinityMask; /**< 0x40 */ 957 uint32_t ProcessHeapFlags; /**< 0x48 */ 958 uint16_t CSDVersion; /**< 0x4c */ 959 uint16_t DependentLoadFlags; /**< 0x4e */ 960 uint64_t EditList; /**< 0x50 */ 961 uint64_t SecurityCookie; /**< 0x58 */ 962 uint64_t SEHandlerTable; /**< 0x60 */ 963 uint64_t SEHandlerCount; /**< 0x68 */ 964 uint64_t GuardCFCCheckFunctionPointer; /**< 0x70 */ 965 uint64_t GuardCFDispatchFunctionPointer; /**< 0x78 */ 966 uint64_t GuardCFFunctionTable; /**< 0x80 */ 967 uint64_t GuardCFFunctionCount; /**< 0x88 */ 968 uint32_t GuardFlags; /**< 0x90 */ 969 IMAGE_LOAD_CONFIG_CODE_INTEGRITY CodeIntegrity; /**< 0x94 */ 970 uint64_t GuardAddressTakenIatEntryTable; /**< 0xa0 */ 971 uint64_t GuardAddressTakenIatEntryCount; /**< 0xa8 */ 972 uint64_t GuardLongJumpTargetTable; /**< 0xb0 */ 973 uint64_t GuardLongJumpTargetCount; /**< 0xb8 */ 974 uint64_t DynamicValueRelocTable; /**< 0xc0 */ 975 uint64_t HybridMetadataPointer; /**< 0xc8 */ 976 } IMAGE_LOAD_CONFIG_DIRECTORY64_V6; 977 AssertCompileSize(IMAGE_LOAD_CONFIG_DIRECTORY64_V6, 0xd0); 978 typedef IMAGE_LOAD_CONFIG_DIRECTORY64_V6 *PIMAGE_LOAD_CONFIG_DIRECTORY64_V6; 979 typedef IMAGE_LOAD_CONFIG_DIRECTORY64_V6 const *PCIMAGE_LOAD_CONFIG_DIRECTORY64_V6; 980 981 /** @since Windows 10 build 14901 (or maybe earlier). */ 982 typedef struct _IMAGE_LOAD_CONFIG_DIRECTORY64_V7 983 { 984 uint32_t Size; /**< 0x00 */ 985 uint32_t TimeDateStamp; /**< 0x04 */ 986 uint16_t MajorVersion; /**< 0x08 */ 987 uint16_t MinorVersion; /**< 0x0a */ 988 uint32_t GlobalFlagsClear; /**< 0x0c */ 989 uint32_t GlobalFlagsSet; /**< 0x10 */ 990 uint32_t CriticalSectionDefaultTimeout; /**< 0x14 */ 991 uint64_t DeCommitFreeBlockThreshold; /**< 0x18 */ 992 uint64_t DeCommitTotalFreeThreshold; /**< 0x20 */ 993 uint64_t LockPrefixTable; /**< 0x28 */ 994 uint64_t MaximumAllocationSize; /**< 0x30 */ 995 uint64_t VirtualMemoryThreshold; /**< 0x38 */ 996 uint64_t ProcessAffinityMask; /**< 0x40 */ 997 uint32_t ProcessHeapFlags; /**< 0x48 */ 998 uint16_t CSDVersion; /**< 0x4c */ 999 uint16_t DependentLoadFlags; /**< 0x4e */ 1000 uint64_t EditList; /**< 0x50 */ 1001 uint64_t SecurityCookie; /**< 0x58 */ 1002 uint64_t SEHandlerTable; /**< 0x60 */ 1003 uint64_t SEHandlerCount; /**< 0x68 */ 1004 uint64_t GuardCFCCheckFunctionPointer; /**< 0x70 */ 1005 uint64_t GuardCFDispatchFunctionPointer; /**< 0x78 */ 1006 uint64_t GuardCFFunctionTable; /**< 0x80 */ 1007 uint64_t GuardCFFunctionCount; /**< 0x88 */ 1008 uint32_t GuardFlags; /**< 0x90 */ 1009 IMAGE_LOAD_CONFIG_CODE_INTEGRITY CodeIntegrity; /**< 0x94 */ 1010 uint64_t GuardAddressTakenIatEntryTable; /**< 0xa0 */ 1011 uint64_t GuardAddressTakenIatEntryCount; /**< 0xa8 */ 1012 uint64_t GuardLongJumpTargetTable; /**< 0xb0 */ 1013 uint64_t GuardLongJumpTargetCount; /**< 0xb8 */ 1014 uint64_t DynamicValueRelocTable; /**< 0xc0 */ 1015 uint64_t HybridMetadataPointer; /**< 0xc8 */ 1016 uint64_t FailFastIndirectProc; /**< 0xd0 - temporary name, rename when we get symbols */ 1017 uint64_t FailFastPointer; /**< 0xd8 - temporary name, rename when we get symbols */ 1018 uint64_t UnknownZero1; /**< 0xe0 - temporary name, rename when we get symbols */ 1019 } IMAGE_LOAD_CONFIG_DIRECTORY64_V7; 1020 AssertCompileSize(IMAGE_LOAD_CONFIG_DIRECTORY64_V7, 0xe8); 1021 typedef IMAGE_LOAD_CONFIG_DIRECTORY64_V7 *PIMAGE_LOAD_CONFIG_DIRECTORY64_V7; 1022 typedef IMAGE_LOAD_CONFIG_DIRECTORY64_V7 const *PCIMAGE_LOAD_CONFIG_DIRECTORY64_V7; 1023 1024 typedef IMAGE_LOAD_CONFIG_DIRECTORY64_V7 IMAGE_LOAD_CONFIG_DIRECTORY64; 1025 typedef PIMAGE_LOAD_CONFIG_DIRECTORY64_V7 PIMAGE_LOAD_CONFIG_DIRECTORY64; 1026 typedef PCIMAGE_LOAD_CONFIG_DIRECTORY64_V7 PCIMAGE_LOAD_CONFIG_DIRECTORY64; 861 1027 862 1028 /** @} */ -
trunk/src/VBox/Runtime/common/ldr/ldrPE.cpp
r63561 r64204 2972 2972 * volatile everywhere! Trying to prevent the compiler being a smarta$$ and reorder stuff. 2973 2973 */ 2974 IMAGE_LOAD_CONFIG_DIRECTORY32_V 5 volatile *pLoadCfg32 = (IMAGE_LOAD_CONFIG_DIRECTORY32_V5volatile *)pLoadCfg;2975 IMAGE_LOAD_CONFIG_DIRECTORY64_V 5volatile *pLoadCfg64 = pLoadCfg;2974 IMAGE_LOAD_CONFIG_DIRECTORY32_V7 volatile *pLoadCfg32 = (IMAGE_LOAD_CONFIG_DIRECTORY32_V7 volatile *)pLoadCfg; 2975 IMAGE_LOAD_CONFIG_DIRECTORY64_V7 volatile *pLoadCfg64 = pLoadCfg; 2976 2976 2977 2977 pLoadCfg64->GuardAddressTakenIatEntryTable = pLoadCfg32->GuardAddressTakenIatEntryTable; … … 2986 2986 pLoadCfg64->GuardCFFunctionCount = pLoadCfg32->GuardCFFunctionCount; 2987 2987 pLoadCfg64->GuardCFFunctionTable = pLoadCfg32->GuardCFFunctionTable; 2988 pLoadCfg64-> Reserved2 = pLoadCfg32->Reserved2;2988 pLoadCfg64->GuardCFDispatchFunctionPointer = pLoadCfg32->GuardCFDispatchFunctionPointer; 2989 2989 pLoadCfg64->GuardCFCCheckFunctionPointer = pLoadCfg32->GuardCFCCheckFunctionPointer; 2990 2990 pLoadCfg64->SEHandlerCount = pLoadCfg32->SEHandlerCount; … … 2992 2992 pLoadCfg64->SecurityCookie = pLoadCfg32->SecurityCookie; 2993 2993 pLoadCfg64->EditList = pLoadCfg32->EditList; 2994 pLoadCfg64-> Reserved1 = pLoadCfg32->Reserved1;2994 pLoadCfg64->DependentLoadFlags = pLoadCfg32->DependentLoadFlags; 2995 2995 pLoadCfg64->CSDVersion = pLoadCfg32->CSDVersion; 2996 2996 pLoadCfg64->ProcessHeapFlags = pLoadCfg32->ProcessHeapFlags; /* switched place with ProcessAffinityMask, but we're more than 16 byte off by now so it doesn't matter. */ … … 3518 3518 { 3519 3519 IMAGE_LOAD_CONFIG_DIRECTORY64 Cfg64; 3520 uint8_t abZeros[sizeof(IMAGE_LOAD_CONFIG_DIRECTORY64_V 5) * 4];3520 uint8_t abZeros[sizeof(IMAGE_LOAD_CONFIG_DIRECTORY64_V7) * 4]; 3521 3521 } u; 3522 3522 … … 3529 3529 if (Dir.Size) 3530 3530 { 3531 const size_t cbExpectV7 = !pModPe->f64Bit 3532 ? sizeof(IMAGE_LOAD_CONFIG_DIRECTORY32_V7) 3533 : sizeof(IMAGE_LOAD_CONFIG_DIRECTORY64_V7); 3534 const size_t cbExpectV6 = !pModPe->f64Bit 3535 ? sizeof(IMAGE_LOAD_CONFIG_DIRECTORY32_V6) 3536 : sizeof(IMAGE_LOAD_CONFIG_DIRECTORY64_V6); 3531 3537 const size_t cbExpectV5 = !pModPe->f64Bit 3532 3538 ? sizeof(IMAGE_LOAD_CONFIG_DIRECTORY32_V5) … … 3544 3550 ? sizeof(IMAGE_LOAD_CONFIG_DIRECTORY32_V1) 3545 3551 : sizeof(IMAGE_LOAD_CONFIG_DIRECTORY64_V2) /*No V1*/; 3552 const size_t cbNewHack = cbExpectV5; /* Playing safe here since there might've been revisions between V5 and V6 we don't know about . */ 3553 const size_t cbMaxKnown = cbExpectV7; 3546 3554 3547 3555 bool fNewerStructureHack = false; 3548 if ( Dir.Size != cbExpectV5 3556 if ( Dir.Size != cbExpectV7 3557 && Dir.Size != cbExpectV6 3558 && Dir.Size != cbExpectV5 3549 3559 && Dir.Size != cbExpectV4 3550 3560 && Dir.Size != cbExpectV3 … … 3552 3562 && Dir.Size != cbExpectV1) 3553 3563 { 3554 fNewerStructureHack = Dir.Size > cb ExpectV5/* These structure changes are slowly getting to us! More futher down. */3564 fNewerStructureHack = Dir.Size > cbNewHack /* These structure changes are slowly getting to us! More futher down. */ 3555 3565 && Dir.Size <= sizeof(u); 3556 Log(("rtldrPEOpen: %s: load cfg dir: unexpected dir size of %u bytes, expected %zu, %zu, %zu, %zu, or %zu.%s\n",3557 pszLogName, Dir.Size, cbExpectV 5, cbExpectV4, cbExpectV3, cbExpectV2, cbExpectV1,3566 Log(("rtldrPEOpen: %s: load cfg dir: unexpected dir size of %u bytes, expected %zu, %zu, %zu, %zu, %zu, %zu, or %zu.%s\n", 3567 pszLogName, Dir.Size, cbExpectV7, cbExpectV6, cbExpectV5, cbExpectV4, cbExpectV3, cbExpectV2, cbExpectV1, 3558 3568 fNewerStructureHack ? " Will try ignore extra bytes if all zero." : "")); 3559 3569 if (!fNewerStructureHack) 3560 3570 return RTErrInfoSetF(pErrInfo, VERR_LDRPE_LOAD_CONFIG_SIZE, 3561 "Unexpected load config dir size of %u bytes; supported sized: %zu, %zu, %zu, %zu, or %zu",3562 Dir.Size, cbExpectV 5, cbExpectV4, cbExpectV3, cbExpectV2, cbExpectV1);3571 "Unexpected load config dir size of %u bytes; supported sized: %zu, %zu, %zu, %zu, %zu, %zu, or %zu", 3572 Dir.Size, cbExpectV7, cbExpectV6, cbExpectV5, cbExpectV4, cbExpectV3, cbExpectV2, cbExpectV1); 3563 3573 } 3564 3574 … … 3576 3586 return rc; 3577 3587 if ( fNewerStructureHack 3578 && !ASMMemIsZero(&u.abZeros[cbExpectV5], Dir.Size - cbExpectV5)) 3588 && Dir.Size > cbMaxKnown 3589 && !ASMMemIsZero(&u.abZeros[cbMaxKnown], Dir.Size - cbMaxKnown)) 3579 3590 { 3580 3591 Log(("rtldrPEOpen: %s: load cfg dir: Unexpected bytes are non-zero (%u bytes of which %u expected to be zero): %.*Rhxs\n", 3581 pszLogName, Dir.Size, Dir.Size - cb ExpectV5, Dir.Size - cbExpectV5, &u.abZeros[cbExpectV5]));3592 pszLogName, Dir.Size, Dir.Size - cbMaxKnown, Dir.Size - cbMaxKnown, &u.abZeros[cbMaxKnown])); 3582 3593 return RTErrInfoSetF(pErrInfo, VERR_LDRPE_LOAD_CONFIG_SIZE, 3583 3594 "Grown load config (%u to %u bytes) includes non-zero bytes: %.*Rhxs", 3584 cb ExpectV5, Dir.Size, Dir.Size - cbExpectV5, &u.abZeros[cbExpectV5]);3595 cbMaxKnown, Dir.Size, Dir.Size - cbMaxKnown, &u.abZeros[cbMaxKnown]); 3585 3596 } 3586 3597 rtldrPEConvert32BitLoadConfigTo64Bit(&u.Cfg64); … … 3597 3608 /* Kludge #2: This happens a lot. Structure changes, but the linker doesn't get 3598 3609 updated and stores some old size in the directory. Use the header size. */ 3599 else if ( u.Cfg64.Size == cbExpectV5 3610 else if ( u.Cfg64.Size == cbExpectV7 3611 || u.Cfg64.Size == cbExpectV6 3612 || u.Cfg64.Size == cbExpectV5 3600 3613 || u.Cfg64.Size == cbExpectV4 3601 3614 || u.Cfg64.Size == cbExpectV3 3602 3615 || u.Cfg64.Size == cbExpectV2 3603 3616 || u.Cfg64.Size == cbExpectV1 3604 || (fNewerStructureHack = (u.Cfg64.Size > cb ExpectV5&& u.Cfg64.Size <= sizeof(u))) )3617 || (fNewerStructureHack = (u.Cfg64.Size > cbNewHack && u.Cfg64.Size <= sizeof(u))) ) 3605 3618 { 3606 3619 Log(("rtldrPEOpen: %s: load cfg dir: Header (%d) and directory (%d) size mismatch, applying the old linker kludge.\n", … … 3614 3627 return rc; 3615 3628 if ( fNewerStructureHack 3616 && !ASMMemIsZero(&u.abZeros[cbExpectV5], Dir.Size - cbExpectV5)) 3629 && Dir.Size > cbMaxKnown 3630 && !ASMMemIsZero(&u.abZeros[cbMaxKnown], Dir.Size - cbMaxKnown)) 3617 3631 { 3618 3632 Log(("rtldrPEOpen: %s: load cfg dir: Unknown bytes are non-zero (%u bytes of which %u expected to be zero): %.*Rhxs\n", 3619 pszLogName, Dir.Size, Dir.Size - cb ExpectV5, Dir.Size - cbExpectV5, &u.abZeros[cbExpectV5]));3633 pszLogName, Dir.Size, Dir.Size - cbMaxKnown, Dir.Size - cbMaxKnown, &u.abZeros[cbMaxKnown])); 3620 3634 return RTErrInfoSetF(pErrInfo, VERR_LDRPE_LOAD_CONFIG_SIZE, 3621 3635 "Grown load config (%u to %u bytes, dir %u) includes non-zero bytes: %.*Rhxs", 3622 cb ExpectV5, Dir.Size, uOrgDir, Dir.Size - cbExpectV5, &u.abZeros[cbExpectV5]);3636 cbMaxKnown, Dir.Size, uOrgDir, Dir.Size - cbMaxKnown, &u.abZeros[cbMaxKnown]); 3623 3637 } 3624 3638 rtldrPEConvert32BitLoadConfigTo64Bit(&u.Cfg64); … … 3629 3643 else 3630 3644 { 3631 Log(("rtldrPEOpen: %s: load cfg hdr: unexpected hdr size of %u bytes (dir %u), expected %zu, %zu, %zu, %zu, or %zu.\n",3632 pszLogName, u.Cfg64.Size, Dir.Size, cbExpectV 5, cbExpectV4, cbExpectV3, cbExpectV2, cbExpectV1));3645 Log(("rtldrPEOpen: %s: load cfg hdr: unexpected hdr size of %u bytes (dir %u), expected %zu, %zu, %zu, %zu, %zu, %zu, or %zu.\n", 3646 pszLogName, u.Cfg64.Size, Dir.Size, cbExpectV7, cbExpectV6, cbExpectV5, cbExpectV4, cbExpectV3, cbExpectV2, cbExpectV1)); 3633 3647 return RTErrInfoSetF(pErrInfo, VERR_LDRPE_LOAD_CONFIG_SIZE, 3634 "Unexpected load config header size of %u bytes (dir %u); supported sized: %zu, %zu, %zu, %zu, or %zu",3635 u.Cfg64.Size, Dir.Size, cbExpectV 5, cbExpectV4, cbExpectV3, cbExpectV2, cbExpectV1);3648 "Unexpected load config header size of %u bytes (dir %u); supported sized: %zu, %zu, %zu, %zu, %zu, %zu, or %zu", 3649 u.Cfg64.Size, Dir.Size, cbExpectV7, cbExpectV6, cbExpectV5, cbExpectV4, cbExpectV3, cbExpectV2, cbExpectV1); 3636 3650 } 3637 3651 } … … 3663 3677 * structure without messing up its natural alignment. */ 3664 3678 if ( ( u.Cfg64.GuardCFCCheckFunctionPointer 3665 || u.Cfg64. Reserved23679 || u.Cfg64.GuardCFDispatchFunctionPointer 3666 3680 || u.Cfg64.GuardCFFunctionTable 3667 3681 || u.Cfg64.GuardCFFunctionCount … … 3674 3688 { 3675 3689 Log(("rtldrPEOpen: %s: load cfg dir: Guard stuff: %RX64,%RX64,%RX64,%RX64,%RX32,%RX64,%RX64,%RX64,%RX64!\n", 3676 pszLogName, u.Cfg64.GuardCFCCheckFunctionPointer, u.Cfg64. Reserved2,3690 pszLogName, u.Cfg64.GuardCFCCheckFunctionPointer, u.Cfg64.GuardCFDispatchFunctionPointer, 3677 3691 u.Cfg64.GuardCFFunctionTable, u.Cfg64.GuardCFFunctionCount, u.Cfg64.GuardFlags, 3678 3692 u.Cfg64.GuardAddressTakenIatEntryTable, u.Cfg64.GuardAddressTakenIatEntryCount, … … 3680 3694 return RTErrInfoSetF(pErrInfo, VERR_LDRPE_GUARD_CF_STUFF, 3681 3695 "Guard bits in load config: %RX64,%RX64,%RX64,%RX64,%RX32,%RX64,%RX64,%RX64,%RX64!", 3682 u.Cfg64.GuardCFCCheckFunctionPointer, u.Cfg64. Reserved2,3696 u.Cfg64.GuardCFCCheckFunctionPointer, u.Cfg64.GuardCFDispatchFunctionPointer, 3683 3697 u.Cfg64.GuardCFFunctionTable, u.Cfg64.GuardCFFunctionCount, u.Cfg64.GuardFlags, 3684 3698 u.Cfg64.GuardAddressTakenIatEntryTable, u.Cfg64.GuardAddressTakenIatEntryCount,
Note:
See TracChangeset
for help on using the changeset viewer.