Module Name:    src
Committed By:   maxv
Date:           Mon Nov 13 20:01:48 UTC 2017

Modified Files:
        src/sys/arch/amd64/conf: kern.ldscript.kaslr

Log Message:
Use SUBALIGN, to force the alignment at the section level, and remove
the inter-section ALIGN which doesn't do anything since the physical
address of the section is chosen dynamically by the bootloader.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/amd64/conf/kern.ldscript.kaslr

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/amd64/conf/kern.ldscript.kaslr
diff -u src/sys/arch/amd64/conf/kern.ldscript.kaslr:1.1 src/sys/arch/amd64/conf/kern.ldscript.kaslr:1.2
--- src/sys/arch/amd64/conf/kern.ldscript.kaslr:1.1	Thu Nov  9 15:46:48 2017
+++ src/sys/arch/amd64/conf/kern.ldscript.kaslr	Mon Nov 13 20:01:48 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern.ldscript.kaslr,v 1.1 2017/11/09 15:46:48 maxv Exp $	*/
+/*	$NetBSD: kern.ldscript.kaslr,v 1.2 2017/11/13 20:01:48 maxv Exp $	*/
 
 #include "assym.h"
 
@@ -27,17 +27,16 @@ SECTIONS
 		*(.data)
 	}
 
-	. = ALIGN(COHERENCY_UNIT);
-	.data.cacheline_aligned :
+	.data.cacheline_aligned : SUBALIGN(COHERENCY_UNIT)
 	{
 		*(.data.cacheline_aligned)
+		. = ALIGN(COHERENCY_UNIT);
 	}
-	. = ALIGN(COHERENCY_UNIT);
-	.data.read_mostly :
+	.data.read_mostly : SUBALIGN(COHERENCY_UNIT)
 	{
 		*(.data.read_mostly)
+		. = ALIGN(COHERENCY_UNIT);
 	}
-	. = ALIGN(COHERENCY_UNIT);
 
 	_edata = . ;
 	PROVIDE (edata = .) ;
@@ -59,4 +58,3 @@ SECTIONS
 		KEEP(*(.note.netbsd.ident));
 	}
 }
-

Reply via email to