Can someone help me to know how can i use dlopen to get handle of libc memory allocation functions? Especially, something like searching the libc path and then taking the handle. What modes should be used to invoke dlsym?
Idea is:
- Search libc path
- Invoke dlopen on it
- Use dlsym to access the memory functions (malloc, calloc etc) and
- use the functions
Please help me with a code snippet of the above 4 steps.
Here’s a code snippet, HTH