Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch KNF the Xen ld scripts on x86.



details:   https://anonhg.NetBSD.org/src/rev/aa25d9b4ede0
branches:  trunk
changeset: 815335:aa25d9b4ede0
user:      maxv <maxv%NetBSD.org@localhost>
date:      Thu May 12 06:57:55 2016 +0000

description:
KNF the Xen ld scripts on x86.

diffstat:

 sys/arch/amd64/conf/kern.ldscript.Xen |  112 +++++++++++++++++--------------
 sys/arch/i386/conf/kern.ldscript.Xen  |  120 ++++++++++++++++++---------------
 2 files changed, 124 insertions(+), 108 deletions(-)

diffs (262 lines):

diff -r 0e86119e9be2 -r aa25d9b4ede0 sys/arch/amd64/conf/kern.ldscript.Xen
--- a/sys/arch/amd64/conf/kern.ldscript.Xen     Thu May 12 06:45:16 2016 +0000
+++ b/sys/arch/amd64/conf/kern.ldscript.Xen     Thu May 12 06:57:55 2016 +0000
@@ -1,63 +1,71 @@
-/*     $NetBSD: kern.ldscript.Xen,v 1.10 2015/08/25 08:07:24 uebayasi Exp $    */
+/*     $NetBSD: kern.ldscript.Xen,v 1.11 2016/05/12 06:57:55 maxv Exp $        */
 
 #include "assym.h"
 
+__PAGE_SIZE = 0x1000 ;
+
 ENTRY(_start)
 SECTIONS
 {
-  /* Read-only sections, merged into text segment: */
-  .text :
-  {
-    *(.text)
-    *(.text.*)
-    *(.stub)
-    *(.rodata)
-  }
-  _etext = . ;
-  PROVIDE (etext = .) ;
+       /* Read-only sections, merged into text segment: */
+       .text :
+       {
+               *(.text)
+               *(.text.*)
+               *(.stub)
+               *(.rodata)
+       }
+       _etext = . ;
+       PROVIDE (etext = .) ;
+
+       /*
+        * Adjust the address for the data segment.  We want to adjust up to
+        * the same address within the page on the next page up.
+        */
+       . = ALIGN(0x100000) + (. & (0x100000 - 1));
+
+       __data_start = . ;
+       .data :
+       {
+               *(.data)
+       }
 
-  /* Adjust the address for the data segment.  We want to adjust up to
-     the same address within the page on the next page up.  */
-  . = ALIGN(0x100000) + (. & (0x100000 - 1));
-  __data_start = . ;
-  .data :
-  {
-    *(.data)
-  }
-  . = ALIGN(COHERENCY_UNIT);
-  .data.cacheline_aligned :
-  {
-    *(.data.cacheline_aligned)
-  }
-  . = ALIGN(COHERENCY_UNIT);
-  .data.read_mostly :
-  {
-    *(.data.read_mostly)
-  }
-  . = ALIGN(COHERENCY_UNIT);
-  _edata = . ;
-  PROVIDE (edata = .) ;
-  __bss_start = . ;
-  .bss :
-  {
-    *(.bss)
-    *(.bss.*)
-    *(COMMON)
-    . = ALIGN(64 / 8);
-  }
-  . = ALIGN(64 / 8);
-  _end = . ;
-  PROVIDE (end = .) ;
-  .note.netbsd.ident :
-  {
-    KEEP(*(.note.netbsd.ident));
-  }
+       . = ALIGN(COHERENCY_UNIT);
+       .data.cacheline_aligned :
+       {
+               *(.data.cacheline_aligned)
+       }
+       . = ALIGN(COHERENCY_UNIT);
+       .data.read_mostly :
+       {
+               *(.data.read_mostly)
+       }
+       . = ALIGN(COHERENCY_UNIT);
+
+       _edata = . ;
+       PROVIDE (edata = .) ;
+       __bss_start = . ;
+       .bss :
+       {
+               *(.bss)
+               *(.bss.*)
+               *(COMMON)
+               . = ALIGN(64 / 8);
+       }
+       . = ALIGN(64 / 8);
+       _end = . ;
+       PROVIDE (end = .) ;
+       .note.netbsd.ident :
+       {
+               KEEP(*(.note.netbsd.ident));
+       }
 }
+
 SECTIONS
 {
-  .text :
-  AT (ADDR(.text))
-  {
-    *(.text)
-  } =0
+       .text :
+       AT (ADDR(.text))
+       {
+               *(.text)
+       } = 0
 }
diff -r 0e86119e9be2 -r aa25d9b4ede0 sys/arch/i386/conf/kern.ldscript.Xen
--- a/sys/arch/i386/conf/kern.ldscript.Xen      Thu May 12 06:45:16 2016 +0000
+++ b/sys/arch/i386/conf/kern.ldscript.Xen      Thu May 12 06:57:55 2016 +0000
@@ -1,67 +1,75 @@
-/*     $NetBSD: kern.ldscript.Xen,v 1.10 2015/08/25 12:56:58 uebayasi Exp $    */
+/*     $NetBSD: kern.ldscript.Xen,v 1.11 2016/05/12 06:57:55 maxv Exp $        */
 
 #include "assym.h"
 
+__PAGE_SIZE = 0x1000 ;
+
 SECTIONS
 {
-  /* Read-only sections, merged into text segment: */
-  .text :
-  {
-    *(.text)
-    *(.text.*)
-    *(.stub)
-  }
-  _etext = . ;
-  PROVIDE (etext = .) ;
+       /* Read-only sections, merged into text segment: */
+       .text :
+       {
+               *(.text)
+               *(.text.*)
+               *(.stub)
+       }
+       _etext = . ;
+       PROVIDE (etext = .) ;
 
-  .rodata :
-  {
-    *(.rodata)
-    *(.rodata.*)
-  }
+       .rodata :
+       {
+               *(.rodata)
+               *(.rodata.*)
+       }
+
+       /*
+        * Adjust the address for the data segment.  We want to adjust up to
+        * the same address within the page on the next page up.
+        */
+       . = ALIGN(0x1000) + (. & (0x1000 - 1));
+
+       __data_start = . ;
+       .data :
+       {
+               *(.data)
+       }
 
-  /* Adjust the address for the data segment.  We want to adjust up to
-     the same address within the page on the next page up.  */
-  . = ALIGN(0x1000) + (. & (0x1000 - 1));
-  __data_start = . ;
-  .data :
-  {
-    *(.data)
-  }
-  . = ALIGN(COHERENCY_UNIT);
-  .data.cacheline_aligned :
-  {
-    *(.data.cacheline_aligned)
-  }
-  . = ALIGN(COHERENCY_UNIT);
-  .data.read_mostly :
-  {
-    *(.data.read_mostly)
-  }
-  . = ALIGN(COHERENCY_UNIT);
-  _edata = . ;
-  PROVIDE (edata = .) ;
-  __bss_start = . ;
-  .bss :
-  {
-    *(.bss)
-    *(.bss.*)
-    *(COMMON)
-    . = ALIGN(32 / 8);
-  }
-  . = ALIGN(32 / 8);
-  _end = . ;
-  PROVIDE (end = .) ;
-  .note.netbsd.ident :
-  {
-    KEEP(*(.note.netbsd.ident));
-  }
+       . = ALIGN(COHERENCY_UNIT);
+       .data.cacheline_aligned :
+       {
+               *(.data.cacheline_aligned)
+       }
+       . = ALIGN(COHERENCY_UNIT);
+       .data.read_mostly :
+       {
+               *(.data.read_mostly)
+       }
+       . = ALIGN(COHERENCY_UNIT);
+       _edata = . ;
+
+       PROVIDE (edata = .) ;
+       __bss_start = . ;
+       .bss :
+       {
+               *(.bss)
+               *(.bss.*)
+               *(COMMON)
+               . = ALIGN(32 / 8);
+       }
+       . = ALIGN(32 / 8);
+       _end = . ;
+       PROVIDE (end = .) ;
+       .note.netbsd.ident :
+       {
+               KEEP(*(.note.netbsd.ident));
+       }
 }
+
 SECTIONS
 {
-  .text :
-  AT (ADDR(.text))
-  {
-    *(.text)
-  } =0
+       .text :
+       AT (ADDR(.text))
+       {
+               *(.text)
+       } = 0
 }



Home | Main Index | Thread Index | Old Index