lkml.org 
[lkml]   [1997]   [Dec]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: OFFTOPIC: binary modules, bad idea!
Date
From
    /* resident.c */
EXPORT_SYMBOL( foo );
extern void foo( char * );

/* module.c */
extern int foo( int );

How 'bout if after linking the dwarf information is twisted into something
that can be used to compare symbol types? I don't know enough about dwarf,
but seems like something can be done. Perhaps one can post-process the
dwarf information into something small and efficient.

Compiling a module would use only the information available from the
dwarf symbols in the module, and a similar transformation is made.

Finally, insmod can compare the crunched information from the kernel with
the crunched information from the module, and reject it if they fail to match.
This way, in theory, one can detect type mismatches of most any form without
paying any attention to the version numbers.

gcc goes through all kinds of hoops to decorate the types, it seems plausible
to leverage that information. Or am I missing something?

--
Steve Williams
steve@icarus.com
steve@picturel.com

"The woods are lovely, dark and deep. But I have promises to keep,
And lines to code before I sleep, And lines to code before I sleep."



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