64-bit arithmetic inside kernel

Bill Woessner bill.woessner@natinst.com
Thu Jun 10 09:03:00 GMT 1999


Hi.  I'm trying to make a kernel module that uses 64-bit arithmetic and
I'm getting some unresolved symbol errors when I try to insert the
module.  The two functions causing it are mod equals (%=) and divide
equals (/=).  Honestly, it seems a little ridiculous that %= doesn't
work on 64-bit quantities when % does; especially considering that x %=
y is the same thing as x = x % y.
In any case, I have tracked down the necessary symbols and my real
question to you is: can I force egcs-1.1.2 to statically bring in the
code necessary for these functions from glibc so that I can put this
module in the kernel?  I assume it must be possible, but I can't for the
life of me figure out how.  Even better, it seems to me that these
functions could be accomplished with just a couple lines of inline
assembly.  Maybe egcs-1.1.2 could just implement the functions inline
and not have to call a library function.
Attached is a tar of a directory that pretty much demonstrates the
problem.  I hope you find everything you need there.  If not, please
feel free to email me and ask for more information.

Thanks in advance.

Sincerely,
-- 
Bill Woessner
National Instruments
Money is the world's curse.  May the Lord SMITE me with it!
longlong.tar



More information about the Gcc-bugs mailing list