Far be it for me to aid people in making binary only drivers, but one hack that
I did many years ago when I wrote the Data General C compiler was to make
external symbols into instruction patterns so that the library could be linked
with checking code that would not normally affect the speed of the unchecked
code. For example to check R1 it might lay do something like:
.long __checkr1a
.long __checkr1b
.long __checkr1c
If the checking code was linked in, __checkr1a might be a PUSH R1 instruction,
__checkr1b might be an appropriate call instruction, __checkr1c might be a POP
R1 instruction. If checking was not linked in, the __checkr1{a,b,c} would be
resolved to NOPs. You could potentially do the same thing for UP/SMP, though
the variable instruction sizes on the x86 will make it tricky :-)
-- Michael Meissner, Cygnus Solutions PMB 198, 174 Littleton Road #3, Westford, Massachusetts 01886 email: meissner@cygnus.com phone: 978-486-9304 fax: 978-692-4482- 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/