using ld -wrap function to instrument
Hi All,
I am trying the wrap feature for the first time. I followed the instruction as mentioned in this link http://sourceware.org/ml/binutils/2000-09/msg00083.html but I am getting an error saying "undefine reference to __wrap_malloc I followed all the steps, but the post was a decade old, I am sure something has changed? or am I missing something. Appreciate your time in help me out! |
Hey,
I checked this feature on my system, and it works perfectly. This is what I did: Code:
#include <stdio.h> Code:
[gcc wrap]$ gcc wrap.c -o wrap -Wl,-wrap,malloc * gcc 4.4.3 * binutils 2.20.0.20091101 Maybe, you could post your code ... - Andi - |
May be your code needs extern “C”
|
All times are GMT -5. The time now is 11:20 AM. |