From mboxrd@z Thu Jan 1 00:00:00 1970 From: Albert ARIBAUD Date: Fri, 5 Jul 2013 16:00:19 +0200 Subject: [U-Boot] compiled failed when turned off gcc optimazitionAT In-Reply-To: References: Message-ID: <20130705160019.38e0d48f@lilith> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi TigerLiu at viatech.com.cn, On Fri, 5 Jul 2013 18:31:50 +0800, wrote: > Hi, experts: > > Would any expert fix this question? > > It seems related MOVW instruction's usuage when turning off gcc > optimazition. > > > > If i just turned on "-O1" or "-O2", still failed to compile uboot code. I have seen the issue arise, and looked it up with the help of Jeroen Hofstee (Cc:). It is somehow related to the fact that on ARM, U-Boot (especially the DM) relies on ARM ELF relocation records all being of the R_ARM_RELATIVE type, while for -O{0,1,2} the compiler generates (some) MOVW-related relocation record types. I have local branches related to this. I need to go through them and will post them but not for 2013.07 as these are not fixes, and there is no bug per se since U-Boot is supposed to build with -Os, not -O{0,1,2}. > Best wishes, Amicalement, -- Albert.