summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/include/llvm/Object/COFF.h8
-rw-r--r--llvm/include/llvm/Support/COFF.h5
2 files changed, 5 insertions, 8 deletions
diff --git a/llvm/include/llvm/Object/COFF.h b/llvm/include/llvm/Object/COFF.h
index 013b14e62fd..209aa76efde 100644
--- a/llvm/include/llvm/Object/COFF.h
+++ b/llvm/include/llvm/Object/COFF.h
@@ -57,10 +57,8 @@ struct coff_file_header {
support::ulittle16_t Characteristics;
};
-/// The 32-bit PE header that usually immediately follows the DOS header.
+/// The 32-bit PE header that follows the COFF header.
struct pe32_header {
- support::ulittle32_t Signature;
- coff_file_header COFFHeader;
support::ulittle16_t Magic;
uint8_t MajorLinkerVersion;
uint8_t MinorLinkerVersion;
@@ -93,10 +91,8 @@ struct pe32_header {
support::ulittle32_t NumberOfRvaAndSize;
};
-/// The 64-bit PE header that usually immediately follows the DOS header.
+/// The 64-bit PE header that follows the COFF header.
struct pe32plus_header {
- support::ulittle32_t Signature;
- coff_file_header COFFHeader;
support::ulittle16_t Magic;
uint8_t MajorLinkerVersion;
uint8_t MinorLinkerVersion;
diff --git a/llvm/include/llvm/Support/COFF.h b/llvm/include/llvm/Support/COFF.h
index 823b43ad938..d348b76a446 100644
--- a/llvm/include/llvm/Support/COFF.h
+++ b/llvm/include/llvm/Support/COFF.h
@@ -30,6 +30,9 @@
namespace llvm {
namespace COFF {
+ // The PE signature bytes that follows the DOS stub header.
+ static const char PEMagic[] = { 'P', 'E', '\0', '\0' };
+
// Sizes in bytes of various things in the COFF format.
enum {
HeaderSize = 20,
@@ -448,8 +451,6 @@ namespace COFF {
};
struct PEHeader {
- uint32_t Signature;
- header COFFHeader;
uint16_t Magic;
uint8_t MajorLinkerVersion;
uint8_t MinorLinkerVersion;
OpenPOWER on IntegriCloud