From c689311bd9b48f72c5a39d2d4c00af33bea2528e Mon Sep 17 00:00:00 2001 From: DJ Delorie Date: Fri, 30 Jun 2000 21:54:03 +0000 Subject: * 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 --- bfd/peicode.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'bfd/peicode.h') diff --git a/bfd/peicode.h b/bfd/peicode.h index 8f64453a3f4..9071c72b29e 100644 --- a/bfd/peicode.h +++ b/bfd/peicode.h @@ -220,8 +220,13 @@ 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 -- cgit v1.2.3