This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: bfd_check_format() returns 0


forget it : i needed to compile binutils with 64 bits mode enabled...

sorry for the noise

Vincent Torri

On Tue, Mar 26, 2013 at 12:43 PM, Vincent Torri <vincent.torri@gmail.com> wrote:
> hmm, i just displayed the error message :
>
> error : File format not recognized
>
> But
>
> $ 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 <vincent.torri@gmail.com> wrote:
>> Hello,
>>
>> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]