[U-Boot-Users] [PPC] PLEASE READ - was: [PATCH] Fix linker scripts: add NOLOAD atribute to .bss/.sbss sections

Wolfgang Denk wd at denx.de
Mon Feb 4 21:36:51 CET 2008


In message <47A76677.6080308 at freescale.com> you wrote:
> 
> > Except for the declaration of the variable itself, *nothing* changes.
> > What do you mean would become simpler?
> 
> A normal global variable is simpler than one that's tied to a specific register, 
> wouldn't you say?  I wasn't trying to be that insightful.

No, I wouldn't say that. To me a pointer that can live all the time in
a register is simpler than one that lives somewhere in a memory
location and has to be loaded for use - you can see this from the code
size as well.

Also, it's pretty convenient for debugging, for example when you need
to figure out where U-Boot was relocated to in RAM  -  just  add  the
offset  in struct global_data and you have the relocation offset, for
example.

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
It is impractical for  the  standard  to  attempt  to  constrain  the
behavior  of code that does not obey the constraints of the standard.
                                                          - Doug Gwyn




More information about the U-Boot mailing list