Linux Get Shared Object Library Base Address In Kernel

184 Views Asked by At

I want to get the base address of a .so file inside a usermode program. I want to be able to obtain that address by using my kernel module. In usermode I normally use grep [lib-name].so /proc/[pid]/maps | head -n 1 | cut -d "-" -f1.

I know that I can use kernel_read to directly read from files and I know that /proc is a pseudo filesystem that provides kernel data. So my question is, is there an easier way to get that address direclty from kernel or is there a better API that I can use to access /proc/[pid]/maps?

0

There are 0 best solutions below