
1 Dec
2010
1 Dec
'10
9:08 p.m.
Dear "Premi, Sanjeev",
In message B85A65D85D7EB246BE421B3FB0FBB5930247AFDACE@dbde02.ent.ti.com you wrote:
1) why the current metod produces different errors across different toolchain versions.
Different tool chains may prvide different quality of optimizations (and bugs), resulting in differnt variable locations. With one memory map you notice immediately if a value gets overwritten, with another you may not notice it.
2) How does presence of one variable alone breaks the build?
It changes the memory map, and thus the location which may get overwritten.
At least, compiler doesn't complain. Even moving it out
How should it? From the tool chain's point of view everything is fine. It's the programmer who did things that lead to trouble; we only get what we deserve.
of .bss by explicit initialization doesn't help.
How exactly did you initialize the variable? Like "int foo = 0;"? Note that this will still go to BSS.
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@denx.de
Harrison's Postulate:
For every action, there is an equal and opposite criticism.