Welcome to Soft32 Linux Forums!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

C/C++: Determine [My] Module's Load Address

 
   Soft32 Home -> Linux -> Genreal Discussions RSS
Next:  [gentoo-user] ps shows pegasus process running - ..  
Author Message
Jeffrey Walton

External


Since: Apr 29, 2009
Posts: 2



(Msg. 1) Posted: Sat Nov 07, 2009 4:34 am
Post subject: C/C++: Determine [My] Module's Load Address
Archived from groups: comp>os>linux>misc (more info?)

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
Back to top
Login to vote
Display posts from previous:   
Related Topics:
acl and linux - hi, i have to work with acl and linux; how is the best file system to do it ? (i have heard reiserfs but i don't know....

Microsoft/LINUX debate. - Why does people brother having this Microsoft/LINUX mud-slinging thing? I am new to LINUX but installed REDHAT 8..

Multiple CD volume backup solution - Hi all I'm looking for a backup package that will allow me to span multiple CDs and also allow for individual CD..

virus scanner - Hi All was wondering if i can get some idea of what people are useing for virus scanners on Redhat 8. Its sendmail tha...

trailing slash in web urls - ya this may be a lame question but i have just setup apache 2.0.46 and when i connect to http://domain it gets the..

Need advice on linux distro - I Installed Debian Linux on a spare computer 2 months ago, and that was the first time I used linux. I've been using i...
       Soft32 Home -> Linux -> Genreal Discussions All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Categories:
 Windows
  Linux
 Mac
 PDA


[ Contact us | Terms of Service/Privacy Policy ]