Discussion:
EXPORT_SYMBOL question
(too old to reply)
Sam Ravnborg
2005-03-28 11:20:19 UTC
Permalink
Hi,
I have 2 modules. The first one uses EXPORT_SYMBOL to make some function
available to other modules. These prototypes for these functions were
also put in a header file. Now the second module uses the functions the
functions defined in the first module by and includes the afore
mentioned header file. However when i'm compiling the module, I get a
symbol underfined warning. When I load the module it works as expected.
Is there any way to get rid of these warnings.
Another problem I'm having is that when I load the second module I get
`no version for "rbnode_initialize" found: kernel tainted.'
(rbnode_initialize is one of the functions exported by the first
module). Both MODULE_LICENSE("GPL"); and MODULE_VERSION are declared in
the two modules. Is there anything I'm missing?
You need to compile both modules at the same time.
Do something like this for your two modules foo and bar:

modules/Makefile
obj-y := foo/ bar/
modules/foo/ <= Your foo module
modules/bar/ <= Your bar module

Then when building the modules stay in modules/ and
execute:
make -C <path-to-kernel-src> M=`pwd`

And to install modules:
make -C <path-to-kernel-src> M=`pwd` modules_install

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



-------------------------------------------------------------------------------
Achtung: diese Newsgruppe ist eine unidirektional gegatete Mailingliste.
Antworten nur per Mail an die im Reply-To-Header angegebene Adresse.
Fragen zum Gateway -> ***@inka.de.
-------------------------------------------------------------------------------
Josef E. Galea
2005-03-28 11:49:15 UTC
Permalink
Post by Sam Ravnborg
Hi,
I have 2 modules. The first one uses EXPORT_SYMBOL to make some function
available to other modules. These prototypes for these functions were
also put in a header file. Now the second module uses the functions the
functions defined in the first module by and includes the afore
mentioned header file. However when i'm compiling the module, I get a
symbol underfined warning. When I load the module it works as expected.
Is there any way to get rid of these warnings.
Another problem I'm having is that when I load the second module I get
`no version for "rbnode_initialize" found: kernel tainted.'
(rbnode_initialize is one of the functions exported by the first
module). Both MODULE_LICENSE("GPL"); and MODULE_VERSION are declared in
the two modules. Is there anything I'm missing?
You need to compile both modules at the same time.
modules/Makefile
obj-y := foo/ bar/
modules/foo/ <= Your foo module
modules/bar/ <= Your bar module
Then when building the modules stay in modules/ and
make -C <path-to-kernel-src> M=`pwd`
make -C <path-to-kernel-src> M=`pwd` modules_install
Sam
Thanks for your help. That solved both the warnings and the kernel
tainted message.

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



-------------------------------------------------------------------------------
Achtung: diese Newsgruppe ist eine unidirektional gegatete Mailingliste.
Antworten nur per Mail an die im Reply-To-Header angegebene Adresse.
Fragen zum Gateway -> ***@inka.de.
-------------------------------------------------------------------------------
Continue reading on narkive:
Loading...