Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 6 Mar 2018 14:18:45 +0000 (UTC)
From:      "Jonathan T. Looney" <jtl@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r330538 - head/sys/conf
Message-ID:  <201803061418.w26EIjZB016089@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jtl
Date: Tue Mar  6 14:18:45 2018
New Revision: 330538
URL: https://svnweb.freebsd.org/changeset/base/330538

Log:
  Nudge lld to break the kernel read-only and read-write sections into
  separate 2M pages.  The binutils default for max-page-size and
  common-page-size used to produce this result.  By setting these
  values, we can nudge lld to also separate these sections into separate
  2M pages.
  
  Reviewed by:	jhb, kib
  Discussed with:	emaste
  Sponsored by:	Netflix
  Differential Revision:	D14282

Modified:
  head/sys/conf/kern.pre.mk

Modified: head/sys/conf/kern.pre.mk
==============================================================================
--- head/sys/conf/kern.pre.mk	Tue Mar  6 12:58:00 2018	(r330537)
+++ head/sys/conf/kern.pre.mk	Tue Mar  6 14:18:45 2018	(r330538)
@@ -120,6 +120,10 @@ CFLAGS+=	${CONF_CFLAGS}
 LDFLAGS+=	-Wl,--build-id=sha1
 .endif
 
+.if ${MACHINE_CPUARCH} == "amd64"
+LDFLAGS+=	-Wl,-z max-page-size=2097152 -Wl,-z common-page-size=4096
+.endif
+
 NORMAL_C= ${CC} -c ${CFLAGS} ${WERROR} ${PROF} ${.IMPSRC}
 NORMAL_S= ${CC:N${CCACHE_BIN}} -c ${ASM_CFLAGS} ${WERROR} ${.IMPSRC}
 PROFILE_C= ${CC} -c ${CFLAGS} ${WERROR} ${.IMPSRC}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201803061418.w26EIjZB016089>