aboutsummaryrefslogtreecommitdiff
path: root/bfd/coff-ia64.c
diff options
context:
space:
mode:
authorZebediah Figura <z.figura12@gmail.com>2018-02-12 13:12:45 +0000
committerNick Clifton <nickc@redhat.com>2018-02-12 13:15:56 +0000
commit830db0485e19000985ccfdbacda4d4d5d62583bb (patch)
treedada7466cb61a68114ec1819770b9e58fe86000d /bfd/coff-ia64.c
parent7e784da5439adaffebd2041c4abbb8a9c1e396dd (diff)
downloadgdb-830db0485e19000985ccfdbacda4d4d5d62583bb.zip
gdb-830db0485e19000985ccfdbacda4d4d5d62583bb.tar.gz
gdb-830db0485e19000985ccfdbacda4d4d5d62583bb.tar.bz2
Add support for reading msdos MZ executables.
See email thread starting here: https://www.sourceware.org/ml/binutils/2018-01/msg00001.html include * coff/msdos.h: New header. * coff/pe.h: Move common defines to msdos.h. * coff/powerpc.h: Likewise. bfd * i386msdos.c (msdos_mkobject); New function. (msdos_object_p): New function. (i386_msdos_vec): Use msdos_object_p as the check_format function. * peicode.h: Rename external_PEI_DOS_hdr, DOSMAGIC, and NT_SIGNATURE to external_DOS_hdr, IMAGE_DOS_SIGNATURE, and IMAGE_NT_SIGNATURE. * peXXigen.c: Likewise. * coff-ia64.c: Likewise.
Diffstat (limited to 'bfd/coff-ia64.c')
-rw-r--r--bfd/coff-ia64.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/bfd/coff-ia64.c b/bfd/coff-ia64.c
index 56100dd..270c959 100644
--- a/bfd/coff-ia64.c
+++ b/bfd/coff-ia64.c
@@ -72,7 +72,7 @@ ia64coff_object_p (bfd *abfd)
{
#ifdef COFF_IMAGE_WITH_PE
{
- struct external_PEI_DOS_hdr dos_hdr;
+ struct external_DOS_hdr dos_hdr;
struct external_PEI_IMAGE_hdr image_hdr;
file_ptr offset;
@@ -87,7 +87,7 @@ ia64coff_object_p (bfd *abfd)
/* There are really two magic numbers involved; the magic number
that says this is a NT executable (PEI) and the magic number
- that determines the architecture. The former is DOSMAGIC,
+ that determines the architecture. The former is IMAGE_DOS_SIGNATURE,
stored in the e_magic field. The latter is stored in the
f_magic field. If the NT magic number isn't valid, the
architecture magic number could be mimicked by some other
@@ -95,7 +95,7 @@ ia64coff_object_p (bfd *abfd)
this routine can only be called 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 (H_GET_16 (abfd, dos_hdr.e_magic) != DOSMAGIC)
+ if (H_GET_16 (abfd, dos_hdr.e_magic) != IMAGE_DOS_SIGNATURE)
{
bfd_set_error (bfd_error_wrong_format);
return NULL;