1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 02:52:53 +02:00

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.

llvm-svn: 200038
This commit is contained in:
Rui Ueyama 2014-01-24 20:54:10 +00:00
parent f3ad4cb858
commit 4f80cb3b52

View File

@ -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;