[U-Boot] [ELDK] global variables

Wolfgang Denk wd at denx.de
Tue Aug 23 19:42:17 CEST 2011


Dear Detlev Zundel,

In message <m2sjosp3w7.fsf at ohwell.denx.de> you wrote:
> 
> So currently as U-Boot is its own loader, we accept the fact that .bss
> will be cleared on relocation.  Actually I don't even know if it is
> correct at all to use .bss variables before then (if you look around,
> you'll find the "global_data" structure (include/asm/global-data.h) that
> we use in this early phase by keeping a reference to it in a register)

Accessing any data in BSS before relocation causes undefined
behaviour, because the BSS segment does not exist yet.

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
They weren't that important. They were merely at the top. The  people
who  really  run organizations are usually found several levels down,
where it's still possible to get things done.
                                      - Terry Pratchett, _Small Gods_


More information about the U-Boot mailing list