Exporting symbols between modules
Hi all,
I'm new in this list and I have some problems exporting symbols in a module to see them in other module.
In the module I want to export the symbol I do:
tList list;EXPORT_SYMBOL(list);
I compile it and install without any problem.
And in the module I want to use them I declare list with "extern" prototype:
extern tList list;
When I compile the module It says me that list is undefined, and I don't know what I am doing wrong.
Does anybody know what is happening?
Maybe a makefile example would be appreciated...
Thanks in advance.
Regards,
Sergio
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
hello
Quoted 9 lines · On Wed, 24 Aug 2005 09:28:08 +0200 Sergio Paracuellos…
Hi all,
I'm new in this list and I have some problems exporting symbols in a module to see them in other module.
In the module I want to export the symbol I do:
tList list;
EXPORT_SYMBOL(list);
ok... you've better to use the EXPORT_SYMBOL_NOVERS macro to export the symbol whiteout the versioning information... don't forget to define EXPORT_SYMTAB before include module.h...
you can add a -DEXPORT_SYMTAB in your Makefile or a #define EXPORT_SYMTAB before
#include <linux/module.h> in your source file...
Quoted 10 lines
I compile it and install without any problem.
And in the module I want to use them I declare list with "extern" prototype:
extern tList list;
When I compile the module It says me that list is undefined, and I don't know what I am doing wrong.
a compilation error or a loading error ?
are you sure to have well defined the type tList in your "client" module ? may be a shareed header between your modules is missing :)
regards
simon
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
Quoted 12 lines · simon guinot
hello
Quoted 7 lines · On Wed, 24 Aug 2005 09:28:08 +0200 Sergio Paracuellos…
Hi all,
I'm new in this list and I have some problems exporting symbols in a module to see them in other module.
In the module I want to export the symbol I do:
Quoted 7 lines
Quoted 2 lines
tList list;
EXPORT_SYMBOL(list);ok... you've better to use the
EXPORT_SYMBOL_NOVERSmacro to export the symbol whiteout the versioning information... don't forget to defineEXPORT_SYMTABbefore includemodule.h...
you can add a -DEXPORT_SYMTAB in yourMakefileor a #defineEXPORT_SYMTABbefore
#include <linux/module.h> in your source file...
Thanks, I solve it because it was a Makefile problem.
I was trying to compile two modules with different Makefiles. When I do only one Makefile with
obj-m += module1
obj-m += module2
the problem dissapears.
Thanks to all.
Regards,
Sergio
Quoted 16 lines
Quoted 11 lines
I compile it and install without any problem.
And in the module I want to use them I declare list with "extern" prototype:
extern tList list;
When I compile the module It says me that list is undefined, and I don't know what I am doing wrong.
a compilation error or a loading error ?
are you sure to have well defined the type tList in your "client" module ? may be a shareed header between your modules is missing :)
Quoted 8 lines
regards
simon
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs