lkml.org 
[lkml]   [1999]   [Dec]   [1]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateWed, 1 Dec 1999 09:25:14 -0500 (EST)
From"Richard B. Johnson" <>
SubjectRe: determining load address of module
On Wed, 1 Dec 1999, Raju K V wrote:

> hi,
> 
> How do I determine the loaded address of a module at runtime? ie, I want to
> query this from the init_module() of the  module.
> 
> Thanks in advance,
> Raju


How about:
	printk("Your module function address = %p\n", .....);
Or, define an ioctl() to return the address of any of your module
functions like open(), read(), write(), close(), etc. This is the
kernel address, based upon the kernel code-segment, i.e., what
you see in System.map.

There isn't an address of 'module' because the functions within the
module are put in whatever order your source-code was written.

Compile your module with the -S option and look at the way it's
layed out.


Cheers,
Dick Johnson

Penguin : Linux version 2.3.13 on an i686 machine (400.59 BogoMips).
Warning : It's hard to remain at the trailing edge of technology.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:55    [from the cache]
©2003-2008