svn commit: r333784 - head/sys/conf

Mateusz Guzik mjg at FreeBSD.org
Fri May 18 07:31:27 UTC 2018


Author: mjg
Date: Fri May 18 07:31:26 2018
New Revision: 333784
URL: https://svnweb.freebsd.org/changeset/base/333784

Log:
  amd64: tweak the read_frequently section
  
  1. align to 128 bytes to avoid possible waste from the preceeding section
  2. sort entries by alignment SORT_BY_ALIGNMENT, plugging the holes (most
  entries are one byte in size, but they got interleaved with bigger ones)
  
  Interestingly I was looking for a feature of the sort earlier and failed
  to find it. It turns out the script was already utilizing sorting in other
  places, so shame on me.
  
  Thanks for Travis Geiselbrecht for pointing me at the feature.

Modified:
  head/sys/conf/ldscript.amd64

Modified: head/sys/conf/ldscript.amd64
==============================================================================
--- head/sys/conf/ldscript.amd64	Fri May 18 06:10:16 2018	(r333783)
+++ head/sys/conf/ldscript.amd64	Fri May 18 07:31:26 2018	(r333784)
@@ -146,10 +146,10 @@ SECTIONS
   .got            : { *(.got) }
   . = DATA_SEGMENT_RELRO_END (24, .);
   .got.plt        : { *(.got.plt) }
-  . = ALIGN(64);
+  . = ALIGN(128);
   .data.read_frequently :
   {
-    *(.data.read_frequently)
+    *(SORT_BY_ALIGNMENT(.data.read_frequently))
   }
   .data.read_mostly :
   {


More information about the svn-src-all mailing list