lkml.org 
[lkml]   [1999]   [Dec]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
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    [W:0.061 / U:0.352 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site