diff options
author | Rui Ueyama <ruiu@google.com> | 2013-06-11 21:39:48 +0000 |
---|---|---|
committer | Rui Ueyama <ruiu@google.com> | 2013-06-11 21:39:48 +0000 |
commit | 1a4f2a33fbd94c840d620ff572dd25540c650f70 (patch) | |
tree | 87bfe28c17bf72ae6d2bccd2542964747384de22 /include/llvm/Support/COFF.h | |
parent | f3e397eb17327423b3f8fff5eac8547c85efddb1 (diff) | |
download | llvm-1a4f2a33fbd94c840d620ff572dd25540c650f70.tar.gz llvm-1a4f2a33fbd94c840d620ff572dd25540c650f70.tar.bz2 llvm-1a4f2a33fbd94c840d620ff572dd25540c650f70.tar.xz |
[PECOFF] Remove COFF header from PE header for simplicity.
COFF header is always present both in executable and in object file. PE header
is present only in executable. So the natural way to handle PE/COFF file is
treating COFF is mandatory header and PE is optional. Current data structre
does not allow it, because PE header includes COFF header. Removing COFF
header will simplify the code to handle PE/COFF files.
Reviewers: Bigcheese
CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D952
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183788 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Support/COFF.h')
-rw-r--r-- | include/llvm/Support/COFF.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/llvm/Support/COFF.h b/include/llvm/Support/COFF.h index 823b43ad93..d348b76a44 100644 --- a/include/llvm/Support/COFF.h +++ b/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; |