This is a FAQ and there are many messages in the RTL archives about
this.
The compiler doesn't create in-line code for every possible
mathematical operation, preferring instead to call functions for some
things which would result in large amounts of code every time the
corresponding operations were used. Exactly which things they are
vary (to some extent) with the release of the compiler, but most
"integer" operations of this sort are connected with 64-bit
mathematics because the most common Linux platform -- the Intel 80x86
family -- doesn't have native 64-bit operations.
I don't know which operations resulted in the function calls you have,
but there are three possible (generic) solutions to the problem:
1. Remove the offending operations from the source (not your
first choice, I'm sure)
2. Include in the link the entire gcc library; it can be done,
but it's not wise
3. (Most recommended, at least by me) Extract from the gcc
library the routines you need to satisfy the unresolved symbols you
have (and, recursively, any that they require as well) and link these
few modules into your device driver/module.
On my (RedHat 6.2-derived) system, the library is located at
/usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/libgcc.a
The simple way to locate it is to do a search with find for the
file libgcc.a
find /usr/lib -name libgcc.a -print
Once you locate it, you can use ar to list the contents of the
library and to "extract" (really a copy-out, not a removal) single
modules from it. Then put these into your link
Norm
----- Original Message -----
From: Ken Emmons, Jr. <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, December 12, 2001 1:01 PM
Subject: [rtl] unresolved symbols when using uint64_t
> Hello,
>
> I was orignally using unsigned ints for ms timer values, but decided
to use 64 bit ints instead. I switched my typedef to uint64_t and
recompiled ... everything fine. When I did insmod, I got unresolved
symbol errors like so:
>
> __cmpdi2
> __fixunssfdi
>
>
> what could be the possible cause, and how would I go about tracking
these errors for future incidents??
>
> Thanks,
>
> ~Ken
>
> -- [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/
>
-- [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/