How to get address of vmas of dynamic libs (not using /proc)
Hello world!
I would like to obtain the address of the dynamic linker during runtime. I could use the /proc/<pid>/maps together with a regex. For example:
b7f89000-b7fa3000 r-xp 00000000 08:04 4554816 /lib/ld-2.7.so
I am want address b7f89000.
But I would like to find a better solution, I looked at dlopen etc. but could not figure it out. Is it possible with dlopen/dlsym ?
I tried to get a pointer to the task_struct structure to iterate over all vmas but I did not find a way to do this either.
Thank you for any help!
|