This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: binutils status ?
- From: Laurent Pinchart <laurent dot pinchart at skynet dot be>
- To: "Ralf Habacker" <Ralf dot Habacker at freenet dot de>, "Cygwin-Apps" <cygwin-apps at cygwin dot com>, "Binutils" <binutils at sources dot redhat dot com>
- Cc: "Nick Clifton" <nickc at cambridge dot redhat dot com>
- Date: Thu, 23 May 2002 22:34:33 +0200
- Subject: Re: binutils status ?
- References: <006a01c20294$4bbc1d30$905f07d5@BRAMSCHE>
> I have a question, which can perhaps answer anyone:
>
> Does symbols, for which this patch is, are located in the text segment ?
>
> The reason for this questioin is, because for auto-imported symbols the
> first_thunk entry of the IMAGE_IMPORT_DESCRIPTOR points directly into the
> text segment to a pointer and not(!) to an
> IMAGE_IMPORT_BY_NAME structure, which lets the following codefragement
> crashes.
>
> peXXigen.c::pe_print_idata()
> <snip>
> --- get IMAGE_IMPORT_BY_NAME structure values ----
> ordinal = bfd_get_16 (abfd, data + iat_member - adj);
> member_name = (char *) data + iat_member - adj + 2;
> fprintf (file, "\t%04lx\t %4d %s\n",
> (unsigned long) iat_member,
> ordinal,
> member_name);
> }
>
> Or does anyone another idea how to solve this ?
I unfortunately don't have much information about the PE format. The patch I
submitted a few weeks ago was written to fix a segfault which occured when I
tried to use objdump with a .sys file. All I know is that the first thunk,
which was supposed to be present in a given section, was located in another
section.
Sorry not to be more helpful.
Laurent Pinchart