RE: question concerning modules

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Nils,

Its definitely possible
A module "a" is using some function written in "b" as well as vice versa but
not both at the same time.

Module "a" can use all the symbols ( functions as well as global variables )
exported by module "b"
provided we are going to insert module "b" before module "a"

You can export a symbol using EXPORT_SYMBOL directive.
You can also use EXPORT_SYMBOL_NOVERS to export the symbol without
versioning information.

In all newer kernels ( I guess after 2.4.10 ) no need to export the symbol
exclusively.
If u NOT define a particular function or global variable as static it will
be automatically exported.

Then all other modules can EXTERN the symbol and can use it. At runtime you
need to insert module "b" first
and then module "a" so that it will find all its required symbols.

HTS,
Aniruddha


-----Original Message-----
From: nils [mailto:nilsasb@web.de]
Sent: Monday, February 17, 2003 4:37 PM
To: kernelnewbies@nl.linux.org
Subject: question concerning modules


Hello,

I have a little question concerning modules:

In case I have the modules a and b.

Is it right, that it isn't possible to have references from a to b and from
b to a?

How can I achieve?
I want to call procedures from a in b, and also some from b in a?

Do I have to write it as one module, or is there a better way?

Thanks,
Nils

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux