|
From: Nicholas N. <nj...@ca...> - 2003-03-27 15:04:17
|
On 27 Mar 2003, Tom Hughes wrote: > > but it wouldn't work for, say, memcpy(), because there is no > > __libc_memcpy() alternative name to call the original version (AFAIK). > > But you can effectively wrap memcpy() by instrumenting the function's > > entry, and it's what you have to do currently anyway. > > You can find it using dlsym though, either like this: > > dlsym(RTLD_NEXT, "memcpy") > > which requires you to define _GNU_SOURCE to get RTLD_NEXT, or by > doing a dlopen of libc.so and then using dlsym on that handle. Except Valgrind doesn't use glibc at all. Maybe such a search wouldn't be too hard to write from scratch, I don't know. N |