[U-Boot] [PATCH] arm: prevent using movt/movw address loads

Simon Glass sjg at chromium.org
Sat Sep 21 04:43:57 CEST 2013


On Sat, Aug 24, 2013 at 5:55 AM, Jeroen Hofstee <jeroen at myspectrum.nl>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 <jeroen at myspectrum.nl>
> Cc: TigerLiu at viatech.com.cn
> Cc: Albert ARIBAUD <albert.u.boot at aribaud.net>
>

This is useful I think. I'm not sure that -O0 works very well anymore (at
least I need to make a few tweaks to use it), but -O1 is useful in some
cases to provide better debugging.

Acked-by: Simon Glass <sjg at chromium.org>


More information about the U-Boot mailing list