Ben Combee <[EMAIL PROTECTED]> wrote:
> 
> At 12:04 2003-3-10 -0700, you wrote:
>>I gave that a try but it didn't work. The linker complained about not 
>>being able to resolve the reference to the function from the jump table. I 
>>tried "static" on both the declaration and definition, and then on each 
>>separately, with the same result each time.
>>
>>I went back to the original GaussLib example (which I was able to build 
>>successfully) and added the following three lines of code to the 
>>GaussLibCreate function:
>>
>>         float a,b;
>>         a=2.0;
>>         b=3.0*a;
>>
>>This was enough to generate the "global data ignored" message from 
>>build-prc. If I comment out the third line, the message goes away. Why 
>>would this line cause global data to be created? Arghhhh. Is it a compiler 
>>or linker switch set wrong?
> 
> It is likely that the compiler is generating the 8-byte double values for 
> "3.0" in the data section, and the code to perform the call to the multiple 
> routine for the assignment of 'b' is referring to these global constants.

Same question came up on pilot.programmer.gcc.
As soon as you do some floating point operation the code pulls in the
simulated floating point condition code register (fpCCR). It is simulated
because the Palm's do not have real m68k floating point hardware.
The size of this fpCCR is 28 bytes. That is the datasegment size you get.
This is part of libgcc and you find the source in lb1sf68palmos.asm in the
gcc/gcc/config/m68k directory of the gcc source tree.
When you ignore the build-prc warning, the floating point operations will
happily overwrite your globals. Most likely the fpCCR will overlap the 
first 28 bytes of your globals.

So what needs to be done is to somehow get the fpCCR in the syslib 
globals. Right now I cannot tell you how to do that. Suggestions welcome 
...

Ton van Overbeek

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to