[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-libc-dev] Idea: fplib crash problem

From: Dmitry K.
Subject: Re: [avr-libc-dev] Idea: fplib crash problem
Date: Fri, 18 Nov 2005 08:13:43 +1000
User-agent: KMail/1.5

On Thursday 17 November 2005 15:38, Peeter Vois wrote:
> Hi,
> I do not remeber the bug id, but there is lots of them and I know
> something must be about the nan + const problems, that the avr device
> will crash/reboot if it performs this operation. It has seen for large
> projects ( I have seen it too and I think that I still can reproduce it
> ).

I remember a bug #7667: float exception leaves R1 undefined.
It was fixed at the end of 2004 year.
Test case for it:

   extern double tan (double);   /* no math.h, to exclude const attr. */
   int main ()
       unsigned char r1;
       union {
           unsigned long lo;
           double fl;
       } x;
       x.lo = 0x7f800000;
       asm ("mov %0,r1" : "=r"(r1));
       return r1;

> I looked into linker scripts and saw that there is a line that closest
> matches with section .text.fplib, and it is .text.*. I think we should
> make extra notification of .text.fplib so that fplib will not be mixed
> with .text.something if there will be any such sections.

If I correctly understand, splitting of library is impossible
at *usual* linking.  That is, if You have point libm only once,
all modules from libm are placed together.  As libgcc has modules
with the same names, it is important to point libm before libgcc.
In case of 'avr-g++' it is needed to point manualy, whith
'-nodefaultlibs' option.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]