From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wolfgang Denk Date: Wed, 01 Dec 2010 21:08:57 +0100 Subject: [U-Boot] [PATCH] ARMv7: Fix linker errors across toolchain versions In-Reply-To: References: <1291216634-7510-1-git-send-email-premi@ti.com> <4CF68230.7060107@free.fr> <4CF68693.1050406@free.fr> Message-ID: <20101201200857.7C93D134FEF@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear "Premi, Sanjeev", In message 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.