Messages in this thread | | | Date | Fri, 19 Dec 1997 13:41:08 -0600 | From | Michael Elizabeth Chastain <> | Subject | Re: OFFTOPIC: binary modules, bad idea! |
| |
Hello kernel hackers,
Stephen Williams writes:
> A C++ style name mangling scheme (type safe linkage) would be nifty, or > use debugger information to check for type similarity. Some form of > type-safe linkage is what is called for here, I believe.
That's what CONFIG_MOD_VERSIONS is supposed to do.
I think the existing implementation is a mess. 'genksyms' gets run on the source files that export symbols and generates .ver files containing lines such as '#define kmalloc kmalloc_1F43278'. These .ver files are fed to the compiler when compiling any module.
This implementation was developed before ELF, and I think we can do a lot better with ELF. We can use true separate compilation. When any file exports symbols, the symbol type information should be recorded, in a separate ELF section. When a module file imports symbols, the symbol type information should be recorded in a separate ELF section. Then sys_init_module and insmod could check type information.
Are people happy with the existing CONFIG_MOD_VERSIONS, or should I work on this when I get some time?
Michael Chastain <mailto:mec@shout.net> "love without fear"
| |