Date: Tue, 18 Sep 2018 15:01:21 +0000 (UTC) From: Ed Maste <emaste@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338750 - head/sys/conf Message-ID: <201809181501.w8IF1LIc071748@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201809181501.w8IF1LIc071748>