> > When I try to do an integer division of an hrtime_t
> variable within the
> > kernel, I get the following error upon inserting the module:
> >
> > my_module.o: unresolved symbol __divdi3
> > make: *** [test] Error 1
> >
> > As best I can tell, __divdi3 is called by the compiler to
> do that division,
> > and is not available within the kernel (actually, it is
> available from the
> > NVdriver module for my nvidia graphics card, but that leads
> to other
> > problems).
>
>     I needed to do a 'short divide' (long long by long) in a
> module. The
> simplest way (for me) was to include
> /src/linux-2.2.13/arch/i386/math-emu/div_small.S
> in my module. It is part of the fpu emulation code.

Probably the easiest way is to link with libgcc.a (which is _NOT_ libc.a
and contains support functions for long long datatypes (like multiplication
and division)).

Regards,

        Tom.
--
 Thomas M. Galla                                    fax:+43 (1) 59983-18
 Dependable Computer Systems                      voice:+43 (1) 59983-15
 Stumpergasse 48/28+29, A-1060 Wien            mailto:[EMAIL PROTECTED]
-------------------------------------------------------------------------
  Prediction is very difficult, especially of the future.  [Niels Bohr]



-- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
--
For more information on Real-Time Linux see:
http://www.rtlinux.org/

Reply via email to