Re: [U-Boot-Users] Non-static global variables cause relocation to fail

2008-06-22 Thread Jerry Van Baren
Timur Tabi wrote: > Jerry Van Baren wrote: [snip] >> I'm guessing from the name "eeprom" that you have a non-zero initializer >> on it??? > > No, no initializer. > >> Does it make a difference if it is uninitialized, initialized >> to {0}, or initialized to non-zero values? > > I don't kno

Re: [U-Boot-Users] Non-static global variables cause relocation to fail

2008-06-22 Thread Wolfgang Denk
In message <[EMAIL PROTECTED]> you wrote: > > I did notice this code in fsl_i2c.c: > > #ifdef CFG_SPD_BUS_NUM > static unsigned int i2c_bus_num __attribute__ ((section ("data"))) = > CFG_SPD_BUS_NUM; > #else > static unsigned int i2c_bus_num __attribute__ ((section ("data"))) = 0; > #endif > > I

Re: [U-Boot-Users] Non-static global variables cause relocation to fail

2008-06-20 Thread Timur Tabi
Jerry Van Baren wrote: > That isn't a variable, that is the first line of a struct declaration. I didn't include this part (although since the code compiles, it should be obvious that it exists): } e; So I'm defining a global variable called 'e'. Perhaps the short name is part of the problem.

Re: [U-Boot-Users] Non-static global variables cause relocation to fail

2008-06-19 Thread Jerry Van Baren
Timur Tabi wrote: > Wolfgang Denk wrote: > >> You don't seriously expect any real help given such a vague >> description? It would be somewhat helpful if you said exactly which >> changes cause the code to work or fail... > > I did say that. Simply making the global variable not stat

Re: [U-Boot-Users] Non-static global variables cause relocation to fail

2008-06-19 Thread Wolfgang Denk
In message <[EMAIL PROTECTED]> you wrote: > > Sorry, I was under the assumption that the problem is not unique to the actual > variable in question. That is, making any global variable non-static risks > having relocation fail. Hm...as you will notice, there are many global vaiables being use

Re: [U-Boot-Users] Non-static global variables cause relocation to fail

2008-06-19 Thread Timur Tabi
Wolfgang Denk wrote: > In message <[EMAIL PROTECTED]> you wrote: >> I did say that. Simply making the global variable not static caused it to >> fail. > > Ummm... I guess there must be more than one variable in U-Boot, as > there are several source files and several board configurations. Sorry,

Re: [U-Boot-Users] Non-static global variables cause relocation to fail

2008-06-19 Thread Wolfgang Denk
In message <[EMAIL PROTECTED]> you wrote: > > I did say that. Simply making the global variable not static caused it to > fail. Ummm... I guess there must be more than one variable in U-Boot, as there are several source files and several board configurations. Also, there are several tool chain

Re: [U-Boot-Users] Non-static global variables cause relocation to fail

2008-06-19 Thread Timur Tabi
Wolfgang Denk wrote: > You don't seriously expect any real help given such a vague > description? It would be somewhat helpful if you said exactly which > changes cause the code to work or fail... I did say that. Simply making the global variable not static caused it to fail. Works:

Re: [U-Boot-Users] Non-static global variables cause relocation to fail

2008-06-19 Thread Wolfgang Denk
In message <[EMAIL PROTECTED]> you wrote: > I tried to find documentation on this, but couldn't. > > I've discovered, on PowerPC 85xx systems at least, that the mere presence of a > non-static global variable, even if it isn't used by any code, will cause > relocation to fail. Exactly how it fail

[U-Boot-Users] Non-static global variables cause relocation to fail

2008-06-19 Thread Timur Tabi
I tried to find documentation on this, but couldn't. I've discovered, on PowerPC 85xx systems at least, that the mere presence of a non-static global variable, even if it isn't used by any code, will cause relocation to fail. Exactly how it fails, I can't say, but U-Boot does hang. If I make the