From: Rui Ueyama Date: Fri, 24 Jan 2014 20:54:10 +0000 (+0000) Subject: Support/COFF: Fix PEHeader struct, and define PE32Header as its alias. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=0078935812a53b12d257b94343ea20e78e6c9130;p=oota-llvm.git Support/COFF: Fix PEHeader struct, and define PE32Header as its alias. This change does not affect anything because everybody seems to be using Object/COFF.h instead. But the definition is not for PE32 but for PE32+, so fix it anyway. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200038 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/Support/COFF.h b/include/llvm/Support/COFF.h index d9529dcc38b..a6f319fb7d4 100644 --- a/include/llvm/Support/COFF.h +++ b/include/llvm/Support/COFF.h @@ -450,7 +450,7 @@ namespace COFF { uint32_t AddressOfNewExeHeader; }; - struct PEHeader { + struct PE32Header { enum { PE32 = 0x10b, PE32_PLUS = 0x20b @@ -465,7 +465,7 @@ namespace COFF { uint32_t AddressOfEntryPoint; // RVA uint32_t BaseOfCode; // RVA uint32_t BaseOfData; // RVA - uint64_t ImageBase; + uint32_t ImageBase; uint32_t SectionAlignment; uint32_t FileAlignment; uint16_t MajorOperatingSystemVersion; @@ -480,14 +480,16 @@ namespace COFF { uint32_t CheckSum; uint16_t Subsystem; uint16_t DLLCharacteristics; - uint64_t SizeOfStackReserve; - uint64_t SizeOfStackCommit; - uint64_t SizeOfHeapReserve; - uint64_t SizeOfHeapCommit; + uint32_t SizeOfStackReserve; + uint32_t SizeOfStackCommit; + uint32_t SizeOfHeapReserve; + uint32_t SizeOfHeapCommit; uint32_t LoaderFlags; uint32_t NumberOfRvaAndSize; }; + typedef PE32Header PEHeader; + struct DataDirectory { uint32_t RelativeVirtualAddress; uint32_t Size;