svn commit: r295421 - head/sys/boot
Andrew Turner
andrew at FreeBSD.org
Tue Feb 9 00:15:43 UTC 2016
Author: andrew
Date: Tue Feb 9 00:15:41 2016
New Revision: 295421
URL: https://svnweb.freebsd.org/changeset/base/295421
Log:
Stop clang from generating movt/movw sequences. These don't get relocated
so will access data from an unrelocated address. This is only needed for
self relocating code on ARMv7, however this is true for both ubldr and
loader.efi, the only two loaders we support on ARMv7.
While here also force the fpu to be none as is done in libstand.
Sponsored by: ABT Systems Ltd
Modified:
head/sys/boot/Makefile.inc
Modified: head/sys/boot/Makefile.inc
==============================================================================
--- head/sys/boot/Makefile.inc Tue Feb 9 00:01:43 2016 (r295420)
+++ head/sys/boot/Makefile.inc Tue Feb 9 00:15:41 2016 (r295421)
@@ -1,3 +1,11 @@
# $FreeBSD$
SSP_CFLAGS=
+
+.if ${MACHINE_CPUARCH} == "arm"
+# Do not generate movt/movw, because the relocation fixup for them does not
+# translate to the -Bsymbolic -pie format required by self_reloc() in loader(8).
+# Also, the fpu is not available in a standalone environment.
+CFLAGS.clang+= -mllvm -arm-use-movt=0
+CFLAGS.clang+= -mfpu=none
+.endif
More information about the svn-src-head
mailing list