Hi All,
I'm working on a project with a FIPS requirement. I'm trying to
determine my module's load address at runtime (not an arbitrary
module). By 'module's load address', I mean byte[0] of the in-memory
image (ie, the first byte of the Elf32_Ehdr). I believe I want
information from the struct module in kernel/modules.c. I did find
sys_query_module, but it has been depricated.
Everything I've found on the web is kernel-centric [1,2], and Stevens
does not cover it in Advanced Unix Programming. In the Windows world,
I would use __ImageBase (fixed up by the link-loader) or
GetModuleHandle(...).
Can anyone point me to the proper syscall? (Or to a forum that fields
C/C++ and Linux API questions).
Thanks,
Jeff
[1] LKML: "Richard B. Johnson": Re: determining load address of module
[2] Linux-Kernel Archive: Re: determining load address of module