aboutsummaryrefslogtreecommitdiff
path: root/include/coff
diff options
context:
space:
mode:
authorDJ Delorie <dj@redhat.com>2000-06-30 21:54:03 +0000
committerDJ Delorie <dj@redhat.com>2000-06-30 21:54:03 +0000
commitc689311bd9b48f72c5a39d2d4c00af33bea2528e (patch)
tree16dd4b2eb79296da6b19f6b134e499f5ce7e799d /include/coff
parentc9e769c2b1db09afda65b8a6c4b5a869209e1a87 (diff)
downloadgdb-c689311bd9b48f72c5a39d2d4c00af33bea2528e.zip
gdb-c689311bd9b48f72c5a39d2d4c00af33bea2528e.tar.gz
gdb-c689311bd9b48f72c5a39d2d4c00af33bea2528e.tar.bz2
* peicode.h (coff_swap_filehdr_in): can't use e_magic because we
can't assume the PE header is at 0x80. * coff/pe.h: clarify a comment
Diffstat (limited to 'include/coff')
-rw-r--r--include/coff/pe.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/include/coff/pe.h b/include/coff/pe.h
index e65562e..9b7f1f2 100644
--- a/include/coff/pe.h
+++ b/include/coff/pe.h
@@ -110,7 +110,7 @@
struct external_PEI_filehdr
{
- /* DOS header fields */
+ /* DOS header fields - always at offset zero in the EXE file */
char e_magic[2]; /* Magic number, 0x5a4d */
char e_cblp[2]; /* Bytes on last page of file, 0x90 */
char e_cp[2]; /* Pages in file, 0x3 */
@@ -129,8 +129,12 @@ struct external_PEI_filehdr
char e_oemid[2]; /* OEM identifier (for e_oeminfo), 0x0 */
char e_oeminfo[2]; /* OEM information; e_oemid specific, 0x0 */
char e_res2[10][2]; /* Reserved words, all 0x0 */
- char e_lfanew[4]; /* File address of new exe header, 0x80 */
+ char e_lfanew[4]; /* File address of new exe header, usually 0x80 */
char dos_message[16][4]; /* other stuff, always follow DOS header */
+
+ /* Note: additional bytes may be inserted before the signature. Use
+ the e_lfanew field to find the actual location of the NT signature */
+
char nt_signature[4]; /* required NT signature, 0x4550 */
/* From standard header */