|
|
Log in / Subscribe / Register

Driver porting: compiling external modules

Driver porting: compiling external modules

Posted Feb 13, 2004 14:25 UTC (Fri) by grisu1976 (guest, #19435)
Parent article: Driver porting: compiling external modules

What about compiling a module that is composed of multiple files? Especially if you use global variables across all files using the extern storage specifiers referencing the global variable definition in one file? I do this and getting a "is COMMON symbol" warning for that variable and at module loading (the .ko file) a "Invalid module format" error. If i use the static storage specifier in all files (for the source definition and the extern references), module loading works fine, but the nm command shows that there are as many symbols as files...

Is there a compiler parameter to achieve global variables across multiple files of a module? It's strange, because in kernel 2.4 my module worked properly


to post comments


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds