[uClinux-dev] floating point problem

Ramana Radhakrishnan ramana.radhakrishnan at codito.com
Wed Mar 26 05:00:16 EST 2003


hi,
I guess floating point support is not there in the arm hardware. so it 
might have to be emulated.so gcc would generate code to call a function 
that casts your single float to a single integer.This call would be 
automatically generated by gcc. So that is the reason for your error. To 
avoid this problem 2 options. either avoid using floating points in kernel 
modules. or
link the same against libgcc.a. This function would be defined there. 
regards
Ramana
-- 
God made machine language - The rest is the work of man
---------------------------------------------------------------------------- 
 --
Ramana Radhakrishnan Codito Technologies


On Wed, 26 Mar 2003 17:59:12 +0900, JinSoo Kim <people at micro-web.co.kr> 
wrote:

> Hi everybody,
>
> I have a floating point problem.
> My target system information is as follow.
>
> compiler: arm-elf-20011219 binary version
> kernel: uClinux 20020701 version
> cpu: samsung's s3c4510
>
> My problem is that when I load the device drvier module
> with 'insmod' command there occurs an error,
>
> "insmod: unresolved symbol __fixsfsi".
>
> The device driver module contains a test function, float_init_test.
> The function is a minimal function which makes the problem and
> I made it for the explanation.
>
> void float_init_test(void)
> {
> float a[3] = { 1.0, 2.0, 3.0 };
> int b[3];
> b[0] = (int) a[0];
> printk("%d\n", (int) b[0]);
> }
>
> The function is not called anywhere. It is just defined.
> If I remove the function definition the problem disapears.
> If I link the loadable module into the kernel statically in kernel 
> compile time,
> the problem disapears too.
>
> How can I overcome this problem?
> Any advice will be much helpful.
> Help me~~~
>
> Best Regards,
> JinSoo Kim
>
> ---------------------------------------
> Director & CTO
> MicroWeb Co., Ltd.
>
> TEL: 82-42-862-6212
> FAX: 82-42-862-6202
> E-mail: people at micro-web.co.kr
> homepage: http://www.micro-web.co.kr
> ---------------------------------------
>
>







More information about the uClinux-dev mailing list