summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRui Ueyama <ruiu@google.com>2014-01-24 20:54:10 +0000
committerRui Ueyama <ruiu@google.com>2014-01-24 20:54:10 +0000
commit0078935812a53b12d257b94343ea20e78e6c9130 (patch)
tree68240d26d7fdd5835d2ff413e98eb738e2d6f2c4 /include
parent82f50dc0c21b77048ee35a0f8d1658fb3c7b184c (diff)
downloadllvm-0078935812a53b12d257b94343ea20e78e6c9130.tar.gz
llvm-0078935812a53b12d257b94343ea20e78e6c9130.tar.bz2
llvm-0078935812a53b12d257b94343ea20e78e6c9130.tar.xz
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
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Support/COFF.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/include/llvm/Support/COFF.h b/include/llvm/Support/COFF.h
index d9529dcc38..a6f319fb7d 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;