This is the mail archive of the crossgcc@cygnus.com mailing list for the crossgcc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: *** Floating Point Unavailable ***


Hi,
see some comments below.

Kris.

At 06:45 PM 99.06.28 +0200, you wrote:
>Hi,
>
> I'm building a cross-compiler for powerpc-motorola-eabi.  When I execute
my program the following exception occurs: *** Floating Point Unavailable ***.
>
>I think I can solve this problem by setting a bit in the MSR[FP] register.
The most common place to do this seems to me the crt0 startup file. I'm
using STARTUP(crt0.o); in my linkerfile. Doing this, ld returns the
following error "multiple STARTUP 
>files". Maybe someone can answer this questions:
>
>1) Is writing a bit to the MSR[FP] register the solution to this problem
or should I tackle this problem in another way?

*** You do use a PowerPC CPU with Floating Point support?
    Except for the MSR[FP] bit, the FPSCR register should probably be set.
    I haven't used the FP stuff myself, but "The Programming Environments
    for 32-bit Microprocessors", MPCFPE32b/AD, 1/97 by Motorola says
    it all...

>
>2) Where can I find the file that gcc uses as default startup-file?

*** According to GNU ld documentation, the sequence of selecting the start
    or entry point (finally specified in the ELF file) is as follows: (I
    prefer to place a global label "start" before the first instruction in the
    system reset exception.)

ENTRY is only one of several ways of choosing the entry point. You may
indicate it in any of the following ways (shown in descending order
of priority: methods higher in the list override methods lower down). 

- the `-e' entry command-line option; 
- the ENTRY(symbol) command in a linker control script; 
- the value of the symbol start, if present; 
- the address of the first byte of the .text section, if present; 
- The address 0. 

>
>3) How can I disable this default startup file?

*** Maybe not the correct answer:  Make sure you don't link it in (e.g.
    don't refer to it). See also 2)

>
>4) Should I use the sim-crt0.c startup-file that comes with gcc or the
crt0.S file that comes with newlib?

*** You should probably start with crt0.s, and you may want to modify it
    somewhat for your target.

>
>Kind regards,
>
>Erik van Hoek
>_______________________________________________
>New CrossGCC FAQ: http://www.objsw.com/CrossGCC
>_______________________________________________
>To remove yourself from the crossgcc list, send
>mail to crossgcc-request@cygnus.com with the
>text 'unsubscribe' (without the quotes) in the
>body of the message.
>
>
_______________________________________________
New CrossGCC FAQ: http://www.objsw.com/CrossGCC
_______________________________________________
To remove yourself from the crossgcc list, send
mail to crossgcc-request@cygnus.com with the
text 'unsubscribe' (without the quotes) in the
body of the message.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]