Re: OFFTOPIC: binary modules, bad idea!

Stephen Williams (
Fri, 19 Dec 1997 17:05:03 -0800

/* resident.c */
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

"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."