This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Bug in pe_print_idata
> > I found a bug in pe_print_idata. In some PE files (namely drivers)
> > the 'first thunk' is not located in the same section as the import
> > table itself. This leads to weird behaviours, and segfaults.
>
> Is there a simple way to reproduce this problem ? Ideally I would
> like a test that could be added to the test suite, but if this is not
> feasible then some instructions on how to reproduce the failure would
> be helpful.
I ran into the pronlem when trying to disassemble a WDM driver (.sys). You
should be able to reproduce the problem with any WDM driver.
I don't have any experience with the binutils test suite. I'll have a look at
it and see if I can write a test, unless the above information is enough.
> > I attached a patch to fix the problem to this mail. It would be nice
> > if someone with more binutils (especially bfd) knowledge than me
> > could have a look at it
>
> It looks reasonably OK to me, although I would suggest adding a
> comment to explain why the search for the section containing the first
> thunk is necessary.
Should I do it and resubmit the patch, or will you do it ?
> > sure that I forgot something) and apply it.
>
> Hmm, well normally we cannot accept submissions without a copyright
> assignment, but in this case, since the patch is a reasonably small
> bug fix I am prepared to accept it. But I will definitely want some
> way of testing it first.
Hmmm... what's a copyright assignment ? :-)
Laurent Pinchart