|
From: Tom H. <th...@cy...> - 2003-03-27 14:33:11
|
In message <Pin...@gr...>
Nicholas Nethercote <nj...@ca...> 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.
Tom
--
Tom Hughes (th...@cy...)
Software Engineer, Cyberscience Corporation
http://www.cyberscience.com/
|