Bug in pe_print_idata

Ralf Habacker Ralf.Habacker@freenet.de
Sat May 11 09:17:00 GMT 2002


> > 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.
>

An additional example for this is the auto-import stuff.
IMAGE_IMPORT_DESCRIPTORS with auto-imported data points to an IAT entry in the
text segment. This let objdump crash, which I have fixed in
http://sources.redhat.com/ml/binutils/2002-04/msg00415.html. I think Laurent
have fixed this bug in a general way, because I have only avoided the segfault
in this specific case.

> Is there a simple way to reproduce this problem ?

For Auto-import build a dll with data variables, create an app which reference
to this data and do a objdump -x client.exe let objdump crashes.

> 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.

See the appended testcase.

Perhaps this helps.

Ralf

-------------- next part --------------
A non-text attachment was scrubbed...
Name: package.tar.bz2
Type: application/octet-stream
Size: 1263 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20020511/25c6ccb3/attachment.obj>


More information about the Binutils mailing list