Messages in this thread | | | From | Keith Owens <> | Subject | Re: Cleanup of module code | Date | Wed, 15 Mar 2000 12:52:23 +1100 |
| |
On Tue, 14 Mar 2000 17:34:32 -0800 (PST), Linus Torvalds <torvalds@transmeta.com> wrote: >On Wed, 15 Mar 2000, Keith Owens wrote: >> On Tue, 14 Mar 2000 09:38:27 -0800 (PST), >> Linus Torvalds <torvalds@transmeta.com> wrote: >> >What I'd really like to see: >> > - get rid of __NO_VERSION__ entirely >> >> Then every module object contains >> >> const char __module_kernel_version[] __attribute__((section(".modinfo"))) = >> "kernel_version=" UTS_RELEASE; > >Did you read my message? > >Read the last five or so lines, where I suggest that the kernel version >stuff is done by "module_version()" along with the "module_init()" etc >macros. And modules that are not stand-alone would not DO this.
Of course I read it, but I don't think you read all of mine. Using either of __NO_VERSION__ or module_version() embeds knowledge about how the object will be linked into the source code. If we ever want the option of compiling everything as a module and using an intelligent linker to construct the kernel from assorted objects (Genesis?) then that embedded knowledge has to go. Every module must be compiled with __module_kernel_version and the linker must decide how to handle the symbols.
Changing __module_kernel_version to static also allows insmod to cross check all the versions in the final object against the kernel, not just the version of only one of the component objects.
- 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/
| |