From owner-svn-src-head@freebsd.org Thu May 10 20:10:04 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E943AFD5642; Thu, 10 May 2018 20:10:03 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9D3FF730A5; Thu, 10 May 2018 20:10:03 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7E54125195; Thu, 10 May 2018 20:10:03 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4AKA3QY094770; Thu, 10 May 2018 20:10:03 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4AKA3Ww094768; Thu, 10 May 2018 20:10:03 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201805102010.w4AKA3Ww094768@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 10 May 2018 20:10:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333470 - in head: share/mk sys/conf X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: in head: share/mk sys/conf X-SVN-Commit-Revision: 333470 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 May 2018 20:10:04 -0000 Author: emaste Date: Thu May 10 20:10:02 2018 New Revision: 333470 URL: https://svnweb.freebsd.org/changeset/base/333470 Log: Error out on attempt to link amd64 kernel with old binutils linker As of r333461 we require ifunc support to link a working amd64 kernel. The default in-tree bootstrap linker is lld and it has the required support, as does any modern out-of-tree binutils linker. The in-tree GNU ld is from binutils 2.17.50 and it does not have ifunc support, so produce an error rather than a broken kernel. Reviewed by: kib Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D15378 Modified: head/share/mk/bsd.linker.mk head/sys/conf/kern.pre.mk Modified: head/share/mk/bsd.linker.mk ============================================================================== --- head/share/mk/bsd.linker.mk Thu May 10 19:13:00 2018 (r333469) +++ head/share/mk/bsd.linker.mk Thu May 10 20:10:02 2018 (r333470) @@ -71,6 +71,7 @@ ${X_}LINKER_VERSION!= echo "${_v:M[1-9].[0-9]*}" | \ ${X_}LINKER_FEATURES= .if ${${X_}LINKER_TYPE} != "bfd" || ${${X_}LINKER_VERSION} > 21750 ${X_}LINKER_FEATURES+= build-id +${X_}LINKER_FEATURES+= ifunc .endif .if ${${X_}LINKER_TYPE} != "lld" || ${${X_}LINKER_VERSION} >= 50000 ${X_}LINKER_FEATURES+= filter Modified: head/sys/conf/kern.pre.mk ============================================================================== --- head/sys/conf/kern.pre.mk Thu May 10 19:13:00 2018 (r333469) +++ head/sys/conf/kern.pre.mk Thu May 10 20:10:02 2018 (r333470) @@ -121,6 +121,9 @@ LDFLAGS+= -Wl,--build-id=sha1 .endif .if ${MACHINE_CPUARCH} == "amd64" +.if defined(LINKER_FEATURES) && ${LINKER_FEATURES:Mifunc} == "" +.error amd64 kernel requires linker ifunc support +.endif LDFLAGS+= -Wl,-z max-page-size=2097152 -Wl,-z common-page-size=4096 .endif