thanks for the reply,
i am struggling to use this wrapper in to my program.
Let me show a simple example which i am trying here.
I do have one code test.c as follows
and another testm.c as follows
test = __wrap_malloc(10);
trying to link them with the following command
ld -o test testm.o test.o --wrap malloc
it gives me following error
ld: warning: cannot find entry symbol _start; defaulting to 0000000008048094
testm.o: In function `__wrap_malloc':
testm.c:(.text+0x1a): undefined reference to `malloc'
test.o: In function `main':
test.c:(.text+0x32): undefined reference to `memcpy'
test.c:(.text+0x47): undefined reference to `printf'
test.c:(.text+0x53): undefined reference to `free'
can you please let me know where am i going wrong here ..?