| ... | @@ -175,6 +175,8 @@ pub const Subsystem = enum(u16) { | ... | @@ -175,6 +175,8 @@ pub const Subsystem = enum(u16) { |
| 175 | | 175 | |
| 176 | /// Windows boot application | 176 | /// Windows boot application |
| 177 | WINDOWS_BOOT_APPLICATION = 16, | 177 | WINDOWS_BOOT_APPLICATION = 16, |
| | 178 | |
| | 179 | _, |
| 178 | }; | 180 | }; |
| 179 | | 181 | |
| 180 | pub const OptionalHeader = extern struct { | 182 | pub const OptionalHeader = extern struct { |
| ... | @@ -300,6 +302,8 @@ pub const DirectoryEntry = enum(u16) { | ... | @@ -300,6 +302,8 @@ pub const DirectoryEntry = enum(u16) { |
| 300 | | 302 | |
| 301 | /// COM Runtime descriptor | 303 | /// COM Runtime descriptor |
| 302 | COM_DESCRIPTOR = 14, | 304 | COM_DESCRIPTOR = 14, |
| | 305 | |
| | 306 | _, |
| 303 | }; | 307 | }; |
| 304 | | 308 | |
| 305 | pub const ImageDataDirectory = extern struct { | 309 | pub const ImageDataDirectory = extern struct { |
| ... | @@ -383,6 +387,8 @@ pub const BaseRelocationType = enum(u4) { | ... | @@ -383,6 +387,8 @@ pub const BaseRelocationType = enum(u4) { |
| 383 | | 387 | |
| 384 | /// The base relocation applies the difference to the 64-bit field at offset. | 388 | /// The base relocation applies the difference to the 64-bit field at offset. |
| 385 | DIR64 = 10, | 389 | DIR64 = 10, |
| | 390 | |
| | 391 | _, |
| 386 | }; | 392 | }; |
| 387 | | 393 | |
| 388 | pub const DebugDirectoryEntry = extern struct { | 394 | pub const DebugDirectoryEntry = extern struct { |
| ... | @@ -414,6 +420,8 @@ pub const DebugType = enum(u32) { | ... | @@ -414,6 +420,8 @@ pub const DebugType = enum(u32) { |
| 414 | MPX = 15, | 420 | MPX = 15, |
| 415 | REPRO = 16, | 421 | REPRO = 16, |
| 416 | EX_DLLCHARACTERISTICS = 20, | 422 | EX_DLLCHARACTERISTICS = 20, |
| | 423 | |
| | 424 | _, |
| 417 | }; | 425 | }; |
| 418 | | 426 | |
| 419 | pub const ImportDirectoryEntry = extern struct { | 427 | pub const ImportDirectoryEntry = extern struct { |
| ... | @@ -736,6 +744,8 @@ pub const BaseType = enum(u8) { | ... | @@ -736,6 +744,8 @@ pub const BaseType = enum(u8) { |
| 736 | | 744 | |
| 737 | /// An unsigned 4-byte integer | 745 | /// An unsigned 4-byte integer |
| 738 | DWORD = 15, | 746 | DWORD = 15, |
| | 747 | |
| | 748 | _, |
| 739 | }; | 749 | }; |
| 740 | | 750 | |
| 741 | pub const ComplexType = enum(u8) { | 751 | pub const ComplexType = enum(u8) { |
| ... | @@ -750,6 +760,8 @@ pub const ComplexType = enum(u8) { | ... | @@ -750,6 +760,8 @@ pub const ComplexType = enum(u8) { |
| 750 | | 760 | |
| 751 | /// The symbol is an array of base type. | 761 | /// The symbol is an array of base type. |
| 752 | ARRAY = 48, | 762 | ARRAY = 48, |
| | 763 | |
| | 764 | _, |
| 753 | }; | 765 | }; |
| 754 | | 766 | |
| 755 | pub const StorageClass = enum(u8) { | 767 | pub const StorageClass = enum(u8) { |
| ... | @@ -843,6 +855,8 @@ pub const StorageClass = enum(u8) { | ... | @@ -843,6 +855,8 @@ pub const StorageClass = enum(u8) { |
| 843 | /// A CLR token symbol. The name is an ASCII string that consists of the hexadecimal value of the token. | 855 | /// A CLR token symbol. The name is an ASCII string that consists of the hexadecimal value of the token. |
| 844 | /// For more information, see CLR Token Definition (Object Only). | 856 | /// For more information, see CLR Token Definition (Object Only). |
| 845 | CLR_TOKEN = 107, | 857 | CLR_TOKEN = 107, |
| | 858 | |
| | 859 | _, |
| 846 | }; | 860 | }; |
| 847 | | 861 | |
| 848 | pub const FunctionDefinition = struct { | 862 | pub const FunctionDefinition = struct { |
| ... | @@ -915,6 +929,7 @@ pub const WeakExternalFlag = enum(u32) { | ... | @@ -915,6 +929,7 @@ pub const WeakExternalFlag = enum(u32) { |
| 915 | SEARCH_LIBRARY = 2, | 929 | SEARCH_LIBRARY = 2, |
| 916 | SEARCH_ALIAS = 3, | 930 | SEARCH_ALIAS = 3, |
| 917 | ANTI_DEPENDENCY = 4, | 931 | ANTI_DEPENDENCY = 4, |
| | 932 | _, |
| 918 | }; | 933 | }; |
| 919 | | 934 | |
| 920 | pub const ComdatSelection = enum(u8) { | 935 | pub const ComdatSelection = enum(u8) { |
| ... | @@ -947,6 +962,8 @@ pub const ComdatSelection = enum(u8) { | ... | @@ -947,6 +962,8 @@ pub const ComdatSelection = enum(u8) { |
| 947 | /// The linker chooses the largest definition from among all of the definitions for this symbol. | 962 | /// The linker chooses the largest definition from among all of the definitions for this symbol. |
| 948 | /// If multiple definitions have this size, the choice between them is arbitrary. | 963 | /// If multiple definitions have this size, the choice between them is arbitrary. |
| 949 | LARGEST = 6, | 964 | LARGEST = 6, |
| | 965 | |
| | 966 | _, |
| 950 | }; | 967 | }; |
| 951 | | 968 | |
| 952 | pub const DebugInfoDefinition = struct { | 969 | pub const DebugInfoDefinition = struct { |
| ... | @@ -1016,6 +1033,8 @@ pub const MachineType = enum(u16) { | ... | @@ -1016,6 +1033,8 @@ pub const MachineType = enum(u16) { |
| 1016 | /// MIPS little-endian WCE v2 | 1033 | /// MIPS little-endian WCE v2 |
| 1017 | WCEMIPSV2 = 0x169, | 1034 | WCEMIPSV2 = 0x169, |
| 1018 | | 1035 | |
| | 1036 | _, |
| | 1037 | |
| 1019 | pub fn fromTargetCpuArch(arch: std.Target.Cpu.Arch) MachineType { | 1038 | pub fn fromTargetCpuArch(arch: std.Target.Cpu.Arch) MachineType { |
| 1020 | return switch (arch) { | 1039 | return switch (arch) { |
| 1021 | .arm => .ARM, | 1040 | .arm => .ARM, |