summaryrefslogtreecommitdiff
path: root/bfd/peicode.h
diff options
context:
space:
mode:
authorDJ Delorie <dj@delorie.com>2000-06-30 21:54:03 +0000
committerDJ Delorie <dj@delorie.com>2000-06-30 21:54:03 +0000
commitbc74177ca5679d034e0eccdbe10acc3ba855ba50 (patch)
tree01b309720fe3b39275ef13f34ca9f51f18e6cefd /bfd/peicode.h
parentf58b346f7c5bbc81cc657263153b9e8ff788c6cc (diff)
downloadbinutils-redhat-bc74177ca5679d034e0eccdbe10acc3ba855ba50.tar.gz
* 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 'bfd/peicode.h')
-rw-r--r--bfd/peicode.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/bfd/peicode.h b/bfd/peicode.h
index 8f64453a3f..9071c72b29 100644
--- a/bfd/peicode.h
+++ b/bfd/peicode.h
@@ -220,9 +220,14 @@ coff_swap_filehdr_in (abfd, src, dst)
correctly for a PEI file, check the e_magic number here, and, if
it doesn't match, clobber the f_magic number so that we don't get
a false match. */
+#if 0
+ /* We can't assume that the PE header is at offset 0x80. When it
+ isn't, the DOS header isn't read correctly, so we can't assume
+ e_magic is set even for valid PE files. */
if (bfd_h_get_16 (abfd, (bfd_byte *) filehdr_src->e_magic) != DOSMAGIC)
filehdr_dst->f_magic = -1;
#endif
+#endif
/* Other people's tools sometimes generate headers with an nsyms but
a zero symptr. */