lkml.org 
[lkml]   [1997]   [Dec]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 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"

\
 
 \ /
  Last update: 2005-03-22 13:40    [W:0.046 / U:1.876 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site