IBM Purify and Relocs

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

IBM Purify and Relocs

Adam J Richardson

Hi list,

I'm using IBM's Purify (trial version) to detect memory-related bugs in
my code. I'm exercising a DLL through a test console app. The
executables are named test.dll and test.exe.

Purify marks test.exe as "No Relocs", which seems to be some sort of
problem, so I'm adding the options -Wl,-q and -Wl,-r to my IDE's
linker options.

I've checked the new test.exe in a hex editor and it begins "4C 01 D3
04" instead of the usual "4D 5A" ("MZ"). The extra options cause a
file to be generated which is not executable. Is this a MinGW bug or
intentional behaviour?

Thanks,
Fatman

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
MinGW-users mailing list
[hidden email]

You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Reply | Threaded
Open this post in threaded view
|

Re: IBM Purify and Relocs

Yongwei Wu
2008/11/5  <[hidden email]>:

>
> Hi list,
>
> I'm using IBM's Purify (trial version) to detect memory-related bugs in
> my code. I'm exercising a DLL through a test console app. The
> executables are named test.dll and test.exe.
>
> Purify marks test.exe as "No Relocs", which seems to be some sort of
> problem, so I'm adding the options -Wl,-q and -Wl,-r to my IDE's
> linker options.

I am not sure about the options, but why do you think "No Relocs" is a
problem?  Relocation information is generally stripped from all .EXE
files, whether with MinGW or MSVC.

> I've checked the new test.exe in a hex editor and it begins "4C 01 D3
> 04" instead of the usual "4D 5A" ("MZ"). The extra options cause a
> file to be generated which is not executable. Is this a MinGW bug or
> intentional behaviour?

--
Wu Yongwei
URL: http://wyw.dcweb.cn/

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
MinGW-users mailing list
[hidden email]

You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Reply | Threaded
Open this post in threaded view
|

Re: IBM Purify and Relocs

Adam J Richardson

On 5/11/2008, "Yongwei Wu" <[hidden email]> wrote:

>> Purify marks test.exe as "No Relocs", which seems to be some sort of
>> problem, so I'm adding the options -Wl,-q and -Wl,-r to my IDE's
>> linker options.
>
>I am not sure about the options, but why do you think "No Relocs" is a
>problem?  Relocation information is generally stripped from all .EXE
>files, whether with MinGW or MSVC.

It's just the impression I get from Googling around the subject: Purify
needs reloc data in the executables it tests. I think it's because
Purify takes a copy of the exe and inserts all sorts of breakpoints and
watches into it before running it. If it doesn't have the reloc data,
it doesn't know where to put the breakpoints. Or something.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
MinGW-users mailing list
[hidden email]

You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users