svn commit: r338750 - head/sys/conf
Ed Maste
emaste at FreeBSD.org
Tue Sep 18 15:01:22 UTC 2018
Author: emaste
Date: Tue Sep 18 15:01:21 2018
New Revision: 338750
URL: https://svnweb.freebsd.org/changeset/base/338750
Log:
Require ifunc-capable linker for i386
The amd64 kernel started using ifunc for a variety of functions with
arch-specific implementations, and we would like to make use of the
same functionality on i386 and as much as possible avoid divergence
between i386 and amd64. In particular, future changes for security
improvements and mitigations may rely on ifunc support.
Approved by: re (kib)
Sponsored by: The FreeBSD Foundation
Modified:
head/sys/conf/kern.pre.mk
Modified: head/sys/conf/kern.pre.mk
==============================================================================
--- head/sys/conf/kern.pre.mk Tue Sep 18 10:53:07 2018 (r338749)
+++ head/sys/conf/kern.pre.mk Tue Sep 18 15:01:21 2018 (r338750)
@@ -121,10 +121,11 @@ CFLAGS+= ${CONF_CFLAGS}
LDFLAGS+= -Wl,--build-id=sha1
.endif
-.if ${MACHINE_CPUARCH} == "amd64"
-.if defined(LINKER_FEATURES) && ${LINKER_FEATURES:Mifunc} == ""
-.error amd64 kernel requires linker ifunc support
+.if (${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386") && \
+ defined(LINKER_FEATURES) && ${LINKER_FEATURES:Mifunc} == ""
+.error amd64/i386 kernel requires linker ifunc support
.endif
+.if ${MACHINE_CPUARCH} == "amd64"
LDFLAGS+= -Wl,-z max-page-size=2097152 -Wl,-z common-page-size=4096 -Wl,-z -Wl,ifunc-noplt
.endif
More information about the svn-src-all
mailing list