[U-Boot-Users] static variables in u-boot.

Grant Likely grant.likely at secretlab.ca
Sat Apr 14 05:53:18 CEST 2007


On 4/13/07, Leonid <Leonid at a-k-a.net> wrote:
> Hi:
>
> Because u-boot reallocates itself, static/global variables cannot be
> freely used there - if something is initialized using pointers on such
> variables, they actually points to wrong addresses (may be on flash)
> after reallocation.
>
> What is simplest way to fix this problem - surely many people have
> bumped into that?

I've got a fix in the works for this.  It's based on the work done by
Txema Lopez.  The problem is related to the linker script and the
options used to get a relocatableff target.

See Txema's patch here:

http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/26372

I'm busy at the moment getting some kernel stuff sorted out.  I should
be back on the u-boot side of things by early next week.

Cheers,
g.

-- 
Grant Likely, B.Sc. P.Eng.
Secret Lab Technologies Ltd.
grant.likely at secretlab.ca
(403) 399-0195




More information about the U-Boot mailing list