This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
mips cross, initializing global variables
- To: gcc-help at gcc dot gnu dot org
- Subject: mips cross, initializing global variables
- From: Per Fransson <dat98pfr at ludat dot lth dot se>
- Date: Wed, 30 May 2001 16:35:26 +0200 (MET DST)
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