public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* binutils & Windows device drivers
@ 2002-03-26 23:54 Laurent Pinchart
  2002-04-09  2:46 ` Nick Clifton
  0 siblings, 1 reply; 6+ messages in thread
From: Laurent Pinchart @ 2002-03-26 23:54 UTC (permalink / raw)
  To: binutils

Hi,

Could anyone tell me if binutils supports the PE-386 format used by 
Windows device drivers (.sys) ?

I tried to use objdump to read section information and it segfaulted 
when reading private headers (2.11.2) or just said that the file format 
was nor recognized (CVS from last night).

I'd like to use objdump to disassemble the driver. Is that possible ? 
Should I add support for that file format to binutils (if that's not too 
difficult) or use another disassembler ?

Thanks in advance for your help.

Laurent Pinchart

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: binutils & Windows device drivers
  2002-03-26 23:54 binutils & Windows device drivers Laurent Pinchart
@ 2002-04-09  2:46 ` Nick Clifton
  2002-04-09  2:55   ` Laurent Pinchart
  0 siblings, 1 reply; 6+ messages in thread
From: Nick Clifton @ 2002-04-09  2:46 UTC (permalink / raw)
  To: Laurent Pinchart; +Cc: binutils

Hi Laurent,

> Could anyone tell me if binutils supports the PE-386 format used by 
> Windows device drivers (.sys) ?

Sadly, it appears that this format is not supported.

In fact it is not clear of the specification for this format is in the
public domain.  If it is a proprietary specification belonging to
Microsoft, then it will not be possible to add code to binutils to
handle this format.

Cheers
        Nick

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: binutils & Windows device drivers
  2002-04-09  2:46 ` Nick Clifton
@ 2002-04-09  2:55   ` Laurent Pinchart
  2002-04-09  4:31     ` Nick Clifton
  0 siblings, 1 reply; 6+ messages in thread
From: Laurent Pinchart @ 2002-04-09  2:55 UTC (permalink / raw)
  To: Nick Clifton; +Cc: binutils

>
>
>>Could anyone tell me if binutils supports the PE-386 format used by 
>>Windows device drivers (.sys) ?
>>
>Sadly, it appears that this format is not supported.
>
Actually the .sys format seems to be a 'standard' PE-i386. The problem I 
experienced with the latest CVS binutils was that 
IMAGE_SCN_MEM_NOT_PAGED was not supported. I removed the check in bfd, 
and I got objdump to work properly (which was all I needed). Is there an 
easy way to add support for IMAGE_SCN_MEM_NOT_PAGED without too much 
changes in BFD ?

>In fact it is not clear of the specification for this format is in the
>public domain.  If it is a proprietary specification belonging to
>Microsoft, then it will not be possible to add code to binutils to
>handle this format.
>

Laurent Pinchart


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: binutils & Windows device drivers
  2002-04-09  2:55   ` Laurent Pinchart
@ 2002-04-09  4:31     ` Nick Clifton
  2002-04-09  5:13       ` Laurent Pinchart
  0 siblings, 1 reply; 6+ messages in thread
From: Nick Clifton @ 2002-04-09  4:31 UTC (permalink / raw)
  To: Laurent Pinchart; +Cc: binutils

Hi Laurent,

> >> Could anyone tell me if binutils supports the PE-386 format used by
> >> Windows device drivers (.sys) ?
> >>
> >Sadly, it appears that this format is not supported.
> >
> Actually the .sys format seems to be a 'standard' PE-i386. The
> problem I experienced with the latest CVS binutils was that
> IMAGE_SCN_MEM_NOT_PAGED was not supported. I removed the check in
> bfd, and I got objdump to work properly (which was all I needed). Is
> there an easy way to add support for IMAGE_SCN_MEM_NOT_PAGED without
> too much changes in BFD ?

Probably not.  BFD does not currently support the concept of a
non-paged section.  (It supports non-paged binary object files, where
all of the sections are not paged, but not on a per-section basis).

Such support could be added of course, but it would involve someone
doing the work.

If the only problem you had was bfd barfing on the
IMAGE_SCN_MEM_NOT_PAGED flag however, then it might well be possible
to add a switch to change the error message to a warning and allow the
dump to continue.

Cheers
        Nick

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: binutils & Windows device drivers
  2002-04-09  4:31     ` Nick Clifton
@ 2002-04-09  5:13       ` Laurent Pinchart
  2002-04-09  5:42         ` Eric Kohl
  0 siblings, 1 reply; 6+ messages in thread
From: Laurent Pinchart @ 2002-04-09  5:13 UTC (permalink / raw)
  To: binutils-return-16948-laurent.pinchart=capflow.com
  Cc: Laurent Pinchart, binutils

>
>
>>>>Could anyone tell me if binutils supports the PE-386 format used by
>>>>Windows device drivers (.sys) ?
>>>>
>>>Sadly, it appears that this format is not supported.
>>>
>>Actually the .sys format seems to be a 'standard' PE-i386. The
>>problem I experienced with the latest CVS binutils was that
>>IMAGE_SCN_MEM_NOT_PAGED was not supported. I removed the check in
>>bfd, and I got objdump to work properly (which was all I needed). Is
>>there an easy way to add support for IMAGE_SCN_MEM_NOT_PAGED without
>>too much changes in BFD ?
>>
>Probably not.  BFD does not currently support the concept of a
>non-paged section.  (It supports non-paged binary object files, where
>all of the sections are not paged, but not on a per-section basis).
>
>Such support could be added of course, but it would involve someone
>doing the work.
>
I unfortunately don't have enough skills to do the work. Would any other 
file format benefit of non-paged sections support ?

>If the only problem you had was bfd barfing on the
>IMAGE_SCN_MEM_NOT_PAGED flag however, then it might well be possible
>to add a switch to change the error message to a warning and allow the
>dump to continue.
>
I just removed the check before compiling libbfd and objdump works fine.

Do you know any other difference between 'standard' PE-i386 files and 
the '.sys' format ?

Laurent Pinchart


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: binutils & Windows device drivers
  2002-04-09  5:13       ` Laurent Pinchart
@ 2002-04-09  5:42         ` Eric Kohl
  0 siblings, 0 replies; 6+ messages in thread
From: Eric Kohl @ 2002-04-09  5:42 UTC (permalink / raw)
  To: Laurent Pinchart; +Cc: binutils

"Laurent Pinchart" <laurent.pinchart@capflow.com> wrote:

> Do you know any other difference between 'standard' PE-i386 files and
> the '.sys' format ?

The .sys files are standard PE-i386 files. The only additional requirement
is a valid pe-checksum which is provided by Casper Hornstrup's checksum
patch. The latest MinGW binutils release includes this patch.


Regards,

Eric Kohl


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2002-04-09 12:42 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-03-26 23:54 binutils & Windows device drivers Laurent Pinchart
2002-04-09  2:46 ` Nick Clifton
2002-04-09  2:55   ` Laurent Pinchart
2002-04-09  4:31     ` Nick Clifton
2002-04-09  5:13       ` Laurent Pinchart
2002-04-09  5:42         ` Eric Kohl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).