mips cross, initializing global variables

Per Fransson dat98pfr@ludat.lth.se
Wed May 30 07:37:00 GMT 2001


I've managed to compile a cross compiler that generates mips code on a
RedHat x86 system. I use obj-copy to convert the code to S3 format and can
then run it on a mips based evaluation board.

My problem is this:

The global variables (or whatever it's called in C - I mean those declared 
outside of a function) can not be initialized when they are declared. I
have to initialize them explicitly in assignstatements later on.

Do you have any idea why this is?

It's not the end of the world if I can't solve this problem (since I can
always start the program by initializing all the global variables), but it
is kind of a nuisance.

I'd greatly appreciate some help.

Thank U.

/Per Fransson




More information about the Gcc-help mailing list