On Tue, 17 Sep 2002, Helge Bahmann wrote:
> Hello lists!
>
> I am currently working on a loadable X server module and would like to use
> long long arithmetics in quite some places. During testing I always got
> "An unresolved function was called!" messages which were quite
> inexplicable to me, until I tracked it down to the symbol "__divdi3",
> which gcc generates for my long long division (x86 architecture,
> gcc-2.95.4 on Debian Woody).
>
> Since the symbol is exported from libc just fine I wonder why the loader
> is unable to resolve it? Am I supposed to link in all of libgcc into the
> module? (would be tricky - I'm almost guaranteed to get conflicts due to
> symbols defined multiple times this way)
Library functions aren't available to kernel modules directly.
The ones that are allowed are wrapped, with declarations in files like
xc/programs/Xserver/hw/xfree86/os-support/xf86_ansic.h
and
xc/programs/Xserver/hw/xfree86/os-support/xf86_libc.h
and defined in
xc/programs/Xserver/hw/xfree86/os-support/shared/libc_wrapper.c
and friends.
I'm not sure that all supported compilers/platforms support long long
If you actually want a 64 bit type, I don't know whether it would
be more sensible to define INT64 for your platform in xc/include/Xmd.h ?
--
Dr. Andrew C. Aitchison Computer Officer, DPMMS, Cambridge
[EMAIL PROTECTED] http://www.dpmms.cam.ac.uk/~werdna
_______________________________________________
Xpert mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/xpert