[PATCH v2] [BFD] Add support for reading msdos (MZ) executables.

Nick Clifton nickc@redhat.com
Wed Jan 3 10:38:00 GMT 2018

Hi Zebediah,

  Looking good - thanks for the updates.  Please remember however that
  we cannot accept the patch until you have a copyright assignment in
  place.  I can provide you with the details of how to request one if
  you want.


> +static const bfd_target *
> +msdos_object_p (bfd *abfd)
> +{
> +  struct external_DOS_hdr hdr;
> +  bfd_byte buffer[2];
> +  asection *section;
> +  unsigned int size;
> +
> +  if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0
> +      || bfd_bread (&hdr, (bfd_size_type) sizeof (hdr), abfd) != sizeof(hdr))

  Isn't the external_DOS_hdr structure in this version of the patch larger 
  than the version that was in your original submission ?  (Because of the 
  inclusion of the dos_message field).  If so, does this mean that the code
  might reject valid MZ binaries because they are too small ?


More information about the Binutils mailing list