[ale] Driver question

Joe Steele joe at madewell.com
Wed Sep 4 20:39:22 EDT 2002


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.






More information about the Ale mailing list