Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/amd64/conf Simplify these by relocating only .text.



details:   https://anonhg.NetBSD.org/src/rev/aa080548ecd4
branches:  trunk
changeset: 340009:aa080548ecd4
user:      uebayasi <uebayasi%NetBSD.org@localhost>
date:      Thu Aug 20 08:53:31 2015 +0000

description:
Simplify these by relocating only .text.

diffstat:

 sys/arch/amd64/conf/kern.ldscript.2MB |  18 ++++++++++--------
 sys/arch/amd64/conf/kern.ldscript.Xen |  17 ++++++++++-------
 2 files changed, 20 insertions(+), 15 deletions(-)

diffs (132 lines):

diff -r cbefc4192967 -r aa080548ecd4 sys/arch/amd64/conf/kern.ldscript.2MB
--- a/sys/arch/amd64/conf/kern.ldscript.2MB     Thu Aug 20 08:51:01 2015 +0000
+++ b/sys/arch/amd64/conf/kern.ldscript.2MB     Thu Aug 20 08:53:31 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern.ldscript.2MB,v 1.7 2015/08/20 07:00:48 uebayasi Exp $     */
+/*     $NetBSD: kern.ldscript.2MB,v 1.8 2015/08/20 08:53:31 uebayasi Exp $     */
 
 OUTPUT_FORMAT("elf64-x86-64", "elf64-x86-64",
              "elf64-x86-64")
@@ -8,17 +8,15 @@
 {
   /* Read-only sections, merged into text segment: */
   .text :
-  AT (ADDR(.text))
   {
     *(.text)
     *(.text.*)
     *(.stub)
-  } =0
+  }
   _etext = . ;
   PROVIDE (etext = .) ;
 
   .rodata :
-  AT (LOADADDR(.text) + (ADDR(.rodata) - ADDR(.text)))
   {
     *(.rodata)
     *(.rodata.*)
@@ -30,19 +28,16 @@
   . = ALIGN(0x200000);
   __data_start = . ;
   .data :
-  AT (LOADADDR(.text) + (ADDR(.data) - ADDR(.text)))
   {
     *(.data)
   }
   . = ALIGN(64);       /* COHERENCY_UNIT */
   .data.cacheline_aligned :
-  AT (LOADADDR(.text) + (ADDR(.data.cacheline_aligned) - ADDR(.text)))
   {
     *(.data.cacheline_aligned)
   }
   . = ALIGN(64);       /* COHERENCY_UNIT */
   .data.read_mostly :
-  AT (LOADADDR(.text) + (ADDR(.data.read_mostly) - ADDR(.text)))
   {
     *(.data.read_mostly)
   }
@@ -51,7 +46,6 @@
   PROVIDE (edata = .) ;
   __bss_start = . ;
   .bss :
-  AT (LOADADDR(.text) + (ADDR(.bss) - ADDR(.text)))
   {
     *(.bss)
     *(.bss.*)
@@ -66,3 +60,11 @@
     KEEP(*(.note.netbsd.ident));
   }
 }
+SECTIONS
+{
+  .text :
+  AT (ADDR(.text))
+  {
+    *(.text)
+  } =0
+}
diff -r cbefc4192967 -r aa080548ecd4 sys/arch/amd64/conf/kern.ldscript.Xen
--- a/sys/arch/amd64/conf/kern.ldscript.Xen     Thu Aug 20 08:51:01 2015 +0000
+++ b/sys/arch/amd64/conf/kern.ldscript.Xen     Thu Aug 20 08:53:31 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern.ldscript.Xen,v 1.6 2015/08/20 07:00:48 uebayasi Exp $     */
+/*     $NetBSD: kern.ldscript.Xen,v 1.7 2015/08/20 08:53:31 uebayasi Exp $     */
 
 OUTPUT_FORMAT("elf64-x86-64", "elf64-x86-64",
              "elf64-x86-64")
@@ -8,13 +8,12 @@
 {
   /* Read-only sections, merged into text segment: */
   .text :
-  AT (ADDR(.text))
   {
     *(.text)
     *(.text.*)
     *(.stub)
     *(.rodata)
-  } =0
+  }
   _etext = . ;
   PROVIDE (etext = .) ;
 
@@ -23,19 +22,16 @@
   . = ALIGN(0x100000) + (. & (0x100000 - 1));
   __data_start = . ;
   .data :
-  AT (LOADADDR(.text) + (ADDR(.data) - ADDR(.text)))
   {
     *(.data)
   }
   . = ALIGN(64);       /* COHERENCY_UNIT */
   .data.cacheline_aligned :
-  AT (LOADADDR(.text) + (ADDR(.data.cacheline_aligned) - ADDR(.text)))
   {
     *(.data.cacheline_aligned)
   }
   . = ALIGN(64);       /* COHERENCY_UNIT */
   .data.read_mostly :
-  AT (LOADADDR(.text) + (ADDR(.data.read_mostly) - ADDR(.text)))
   {
     *(.data.read_mostly)
   }
@@ -44,7 +40,6 @@
   PROVIDE (edata = .) ;
   __bss_start = . ;
   .bss :
-  AT (LOADADDR(.text) + (ADDR(.bss) - ADDR(.text)))
   {
     *(.bss)
     *(.bss.*)
@@ -59,3 +54,11 @@
     KEEP(*(.note.netbsd.ident));
   }
 }
+SECTIONS
+{
+  .text :
+  AT (ADDR(.text))
+  {
+    *(.text)
+  } =0
+}



Home | Main Index | Thread Index | Old Index