|
From: Michaël K. <mic...@li...> - 2013-11-24 22:29:28
|
Hello, One of my fellow students and me wanted to use valgrind/cachegrind for some research. For our research, we wanted to modifythe indirect branch prediction technique that was used in cachegrind (cg_branchpred.c). After modifying some of the code , we weren't able to include the math.h library for example. We've tried modifying the Makefile in every single way (-lm flag) to try and solve this issue, but we simply don't find a solution. Is it possible to help us and tell us what to do? Yours sincerely Michael |
> One of my fellow students and me wanted to use valgrind/cachegrind for some research. For our research, we wanted to modify
> the indirect branch prediction technique that was used in cachegrind (cg_branchpred.c). After modifying some of the code , we weren't able to include the math.h library for example. We've tried modifying the Makefile in every single way (-lm flag) to try and solve this issue, but we simply don't
> find a solution.
Please state the version of valgrind/cachegrind and the processor architecture
(x86_64, etc.) that you are using.
How do you know that there was a problem? Please display the error messages
or describe the symptoms. Please display the linking command that was used.
In any case, using a shared library (libm.so) won't work.
Did you try naming the archive library (libm.a) explicitly?
gcc ... *.o /lib64/libm.a ...
--
|
|
From: Philippe W. <phi...@sk...> - 2013-11-25 18:00:18
|
On Sun, 2013-11-24 at 23:16 +0100, Michaël Kint wrote: > Hello, > > > One of my fellow students and me wanted to use valgrind/cachegrind for > some research. For our research, we wanted to modify > the indirect branch prediction technique that was used in cachegrind > (cg_branchpred.c). After modifying some of the code , we weren't able > to include the math.h library for example. We've tried modifying the > Makefile in every single way (-lm flag) to try and solve this issue, > but we simply don't find a solution. > > > Is it possible to help us and tell us what to do? Linking libraries in Valgrind tools creates a lot of problems, and so it not (supposed) to be done. This is the reason why many "standard" lib functions are re-implemented in various files. See e.g. the various coregrind/m_libc*.c files. I guess protections have been implemented in the build system so as to avoid having such linking be done. You might try to bypass it, but will probably later on encounter nasty problems if you succeed to bypass the build system protections. Philippe |