diff options
author | Zebediah Figura <z.figura12@gmail.com> | 2018-02-12 13:12:45 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2018-02-12 13:15:56 +0000 |
commit | 830db0485e19000985ccfdbacda4d4d5d62583bb (patch) | |
tree | dada7466cb61a68114ec1819770b9e58fe86000d /bfd/peXXigen.c | |
parent | 7e784da5439adaffebd2041c4abbb8a9c1e396dd (diff) | |
download | gdb-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/peXXigen.c')
-rw-r--r-- | bfd/peXXigen.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bfd/peXXigen.c b/bfd/peXXigen.c index 679dabf..6caca17 100644 --- a/bfd/peXXigen.c +++ b/bfd/peXXigen.c @@ -828,7 +828,7 @@ _bfd_XXi_only_swap_filehdr_out (bfd * abfd, void * in, void * out) if (pe_data (abfd)->dll) filehdr_in->f_flags |= F_DLL; - filehdr_in->pe.e_magic = DOSMAGIC; + filehdr_in->pe.e_magic = IMAGE_DOS_SIGNATURE; filehdr_in->pe.e_cblp = 0x90; filehdr_in->pe.e_cp = 0x3; filehdr_in->pe.e_crlc = 0x0; @@ -872,7 +872,7 @@ _bfd_XXi_only_swap_filehdr_out (bfd * abfd, void * in, void * out) filehdr_in->pe.dos_message[13] = 0x0a0d0d2e; filehdr_in->pe.dos_message[14] = 0x24; filehdr_in->pe.dos_message[15] = 0x0; - filehdr_in->pe.nt_signature = NT_SIGNATURE; + filehdr_in->pe.nt_signature = IMAGE_NT_SIGNATURE; H_PUT_16 (abfd, filehdr_in->f_magic, filehdr_out->f_magic); H_PUT_16 (abfd, filehdr_in->f_nscns, filehdr_out->f_nscns); |