|
From: Luke D. <cod...@ho...> - 2003-07-24 02:18:19
|
----- Original Message ----- From: "David Eisner" <cr...@um...> To: <min...@li...> Sent: Thursday, July 24, 2003 5:56 AM Subject: Re: [Mingw-users] Memory Debugging Tools for MinGW [snip] > > A related question. I'm trying to see if I can get Purify for Windows > to instrument MinGW generated executables. > > If I build a simple console app with Visual Studio .NET (after > twiddling with some of the project settings to make Purify happy), I can > get purify to instrument it. One of the linker switches needed > is /fixed:no, which seems to add a ".reloc" section to the resulting > executable. > > If I build the same test app with gcc (MinGW version), purify complains: > "Warning: Code detected but missing .reloc section. Unable to instrument > module as requested. Module will be instrumented in Minimal mode." [snip] The MinGW linker generates a ".reloc" section if either you are building a DLL (-shared) or if your .exe has exported functions. Ideally I guess an equivalent option for "/fixed:no" should be added, but a workaround would be to add a dummy exported symbol somewhere in the source: int __declspec(dllexport) dummy; However, I believe this feature was added fairly recently so you might need to use the 2.14.90 snapshot of binutils. Luke |