[PATCH] Add PE32Header and rename PEHeader -> PE64Header.

Rui Ueyama ruiu at google.com
Wed May 29 13:58:37 PDT 2013


Looks like there's no code using PEHeader so this renaming should be safe.

http://llvm-reviews.chandlerc.com/D889

Files:
  include/llvm/Support/COFF.h

Index: include/llvm/Support/COFF.h
===================================================================
--- include/llvm/Support/COFF.h
+++ include/llvm/Support/COFF.h
@@ -447,7 +447,42 @@
     uint32_t AddressOfNewExeHeader;
   };
 
-  struct PEHeader {
+  struct PE32Header {
+    uint32_t Signature;
+    header COFFHeader;
+    uint16_t Magic;
+    uint8_t  MajorLinkerVersion;
+    uint8_t  MinorLinkerVersion;
+    uint32_t SizeOfCode;
+    uint32_t SizeOfInitializedData;
+    uint32_t SizeOfUninitializedData;
+    uint32_t AddressOfEntryPoint; // RVA
+    uint32_t BaseOfCode; // RVA
+    uint32_t BaseOfData; // RVA
+    uint32_t ImageBase;
+    uint32_t SectionAlignment;
+    uint32_t FileAlignment;
+    uint16_t MajorOperatingSystemVersion;
+    uint16_t MinorOperatingSystemVersion;
+    uint16_t MajorImageVersion;
+    uint16_t MinorImageVersion;
+    uint16_t MajorSubsystemVersion;
+    uint16_t MinorSubsystemVersion;
+    uint32_t Win32VersionValue;
+    uint32_t SizeOfImage;
+    uint32_t SizeOfHeaders;
+    uint32_t CheckSum;
+    uint16_t Subsystem;
+    uint16_t DLLCharacteristics;
+    uint32_t SizeOfStackReserve;
+    uint32_t SizeOfStackCommit;
+    uint32_t SizeOfHeapReserve;
+    uint32_t SizeOfHeapCommit;
+    uint32_t LoaderFlags;
+    uint32_t NumberOfRvaAndSize;
+  };
+
+  struct PE64Header {
     uint32_t Signature;
     header COFFHeader;
     uint16_t Magic;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D889.1.patch
Type: text/x-patch
Size: 1403 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130529/4d6e28a1/attachment.bin>


More information about the llvm-commits mailing list