diff options
-rw-r--r-- | Mono.Cecil.PE/ImageWriter.cs | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/Mono.Cecil.PE/ImageWriter.cs b/Mono.Cecil.PE/ImageWriter.cs index e85bcf6..3fc689d 100644 --- a/Mono.Cecil.PE/ImageWriter.cs +++ b/Mono.Cecil.PE/ImageWriter.cs @@ -197,7 +197,7 @@ namespace Mono.Cecil.PE { void WritePEFileHeader () { WriteUInt32 (0x00004550); // Magic - WriteUInt16 (GetMachine ()); // Machine + WriteUInt16 ((ushort) module.Architecture); // Machine WriteUInt16 (sections); // NumberOfSections WriteUInt32 (metadata.timestamp); WriteUInt32 (0); // PointerToSymbolTable @@ -211,22 +211,6 @@ namespace Mono.Cecil.PE { WriteUInt16 (characteristics); // Characteristics } - ushort GetMachine () - { - switch (module.Architecture) { - case TargetArchitecture.I386: - return 0x014c; - case TargetArchitecture.AMD64: - return 0x8664; - case TargetArchitecture.IA64: - return 0x0200; - case TargetArchitecture.ARMv7: - return 0x01c4; - } - - throw new NotSupportedException (); - } - Section LastSection () { if (reloc != null) |