From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Thu, 19 Sep 2013 17:16:29 -0400 Subject: [U-Boot] [PATCH] arm: prevent using movt/movw address loads In-Reply-To: <1377345338-9695-1-git-send-email-jeroen@myspectrum.nl> References: <1377345338-9695-1-git-send-email-jeroen@myspectrum.nl> Message-ID: <20130919211629.GC5273@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Sat, Aug 24, 2013 at 01:55:38PM +0200, Jeroen Hofstee wrote: > The movt/movw instruction can be used to hardcode an > memory location in the instruction itself. The linker > starts complaining about this if the compiler decides > to do so: "relocation R_ARM_MOVW_ABS_NC against `a local > symbol' can not be used" and it is not support by U-boot > as well. Prevent their use by requiring word relocations. > This allows u-boot to be build at other optimalization > levels then -Os. > > Signed-off-by: Jeroen Hofstee > Cc: TigerLiu at viatech.com.cn > Cc: Albert ARIBAUD > --- > arch/arm/config.mk | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) Is this also something we need for llvm? I am hesitant here because as Wolfgang points out, -O0 is usually the wrong way to debug a problem and I'll add we're well into the age where debuggers work just fine with optimized code. If there's some -O2 enabled gcc flag we want because of a measurable performance win, we should add it specifically to -Os. -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: