Messages in this thread | | | Date | Fri, 7 May 2010 23:21:00 +0530 | Subject | Link time manipulation of kernel symbols like read/write | From | "Leonidas ." <> |
| |
Hi folks,
Is it possible to wrap module entry points like open/close during the module compilation? By wrapping, I mean interposing using linker --wrap option. This is very much possible in user space and is commonly used to interpose library functions.
E.g.
void * __wrap_malloc (int c) { printf ("malloc called with %ld\n", c); return __real_malloc (c); }
int main() { malloc(17); return 0; }
Above works expected, can we wrap kmalloc this way?
-Leo.
| |