This is the mail archive of the
mailing list for the binutils project.
Re: bfd_check_format() returns 0
- From: Vincent Torri <vincent dot torri at gmail dot com>
- To: binutils at sourceware dot org
- Date: Tue, 26 Mar 2013 15:26:11 +0100
- Subject: Re: bfd_check_format() returns 0
- References: <CAMq1adr8HQ53w_FTEupfwmxPg6JNTe7vmsJHMgD2PuRjxChviQ at mail dot gmail dot com> <CAMq1adrtvXcXsPa04LWSohgXPnTLMCL8M02CrDudFu--7DUTEQ at mail dot gmail dot com>
forget it : i needed to compile binutils with 64 bits mode enabled...
sorry for the noise
On Tue, Mar 26, 2013 at 12:43 PM, Vincent Torri <firstname.lastname@example.org> wrote:
> hmm, i just displayed the error message :
> error : File format not recognized
> $ file /local/bin/examine_test.exe
> /local/bin/examine_test.exe: PE32+ executable for MS Windows (console)
> Mono/.Net assembly
> is there a problem with files generated by mingw-w64 64 bits ?
> Vincent Torri
> On Tue, Mar 26, 2013 at 12:36 PM, Vincent Torri <email@example.com> wrote:
>> i'm trying to play agin with my little Windows pet project (a mem leak
>> checker) called 'examine. It uses DLL injection to inject my
>> overloading allocation functions. The name of the test_program is
>> examine_test.exe. I call examine like that :
>> examine /path/to/examine_test.exe
>> I'm on Windows 7 64 bits. I've compiled binutils and my project with
>> mingw-w64, targetting 64 bits (using MSYS).
>> What I want to achieve is getting the lines where, e.g., malloc is
>> called in the binary i want to check (examine_test.exe).
>> I have that code :
>> sw->fd = bfd_openr(filename, NULL); // filename is the full path
>> name of examine_test.exe
>> res = bfd_check_format(sw->fd, bfd_object);
>> res is equal to 0.
>> I know that, on win XP 32 bits, with an older binutils, this function
>> didn't return 0.
>> Did I do something wrong ?
>> Thank you
>> Vincent Torri