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}
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to