Date: Tue, 9 Feb 2016 00:15:41 +0000 (UTC) From: Andrew Turner <andrew@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295421 - head/sys/boot Message-ID: <201602090015.u190FfnN092632@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201602090015.u190FfnN092632>