[U-Boot] use of global static variables?
Wolfgang Denk
wd at denx.de
Fri May 21 16:25:13 CEST 2010
Dear Peter Tyser,
In message <1274450989.18152.273.camel at petert> you wrote:
>
> > With the relocation changes are global statics variables ok if we know code is called after relocation?
>
> Yes, they should work as expected after relocation.
>
> Prior to relocation you should be able to read the values of the global
> statics if they are initialized to a non-zero value, but not modify
> them.
Correct. And in some places we enable these even for zero valued
variables by using the old trick of writing
int foo __attribute__ ((section(".data"))) = 0;
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The speed of time is one second per second.
More information about the U-Boot
mailing list