[U-Boot] [PATCH] ARMv7: Fix linker errors across toolchain versions

Wolfgang Denk wd at denx.de
Wed Dec 1 21:08:57 CET 2010


Dear "Premi, Sanjeev",

In message <B85A65D85D7EB246BE421B3FB0FBB5930247AFDACE at 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 at denx.de
Harrison's Postulate:
	For every action, there is an equal and opposite criticism.


More information about the U-Boot mailing list