[ale] Driver question
Mike Panetta
ahuitzot at mindspring.com
Wed Sep 4 21:24:24 EDT 2002
Um... There is a div64.h file in the asm-i386 dir.... Take a look at
that and see if it works before doing anything else...
BTW, you may want to go to your favorite linux-kernel mailing list
archive (mine is marc.theaimsgroup.com) and do a search for long
division or somthing, as I think it was a year or 2 ago that a long
hashed out discusion on just this subject was held on the list.
Mike
On Wed, 2002-09-04 at 17:39, Joe Steele wrote:
> One piece of info you don't mention is the type of arguments you are
> trying to divide. However, the fact that the code needs to call
> __udivdi3 must mean you are working with arguments of type unsigned
> long long (64 bit unsigned ints).
>
> Normally, gcc should handle this without complaining, but your
> subject line suggests that this is kernel related, which means that
> the usual libraries are not available for linking. Oddly, the kernel
> does contain code for __udivdi3, but apparently for only a few
> architectures such as ia64 and sparc (not i386).
>
> If there's a way of writing your code without using 64 bit ints, that
> would probably be best. Short of that, you could attempt to
> statically link your code against libgcc. On a redhat box, it can be
> found in /usr/lib/gcc-lib/i386-redhat-linux/<gcc-version>/libgcc.a.
>
> Other options are to extract the __udivdi3 source code from gcc and
> either incorporate it into your code or into your kernel, depending
> on which way makes more sense.
>
> --Joe
>
>
>
> -----Original Message-----
> From: cfowler [SMTP:cfowler at outpostsentinel.com]
> Sent: Wednesday, September 04, 2002 1:46 PM
> To: Stephan Uphoff
> Cc: ale at ale.org
> Subject: Re: [ale] Driver question
>
> Can you tell me the best way to do division?
>
>
> A = b / c;
>
> I get the following unresolved symbol:
>
> /sbin/rocket.o: unresolved symbol __udivdi3
>
>
>
> ---
> This message has been sent through the ALE general discussion list.
> See http://www.ale.org/mailing-lists.shtml for more info. Problems should be
> sent to listmaster at ale dot org.
>
---
This message has been sent through the ALE general discussion list.
See http://www.ale.org/mailing-lists.shtml for more info. Problems should be
sent to listmaster at ale dot org.
More information about the Ale
mailing list