Module Name:    src
Committed By:   uebayasi
Date:           Fri Aug 21 03:42:29 UTC 2015

Modified Files:
        src/sys/arch/cats/conf: ldscript.elf

Log Message:
Simplify this by deciding load address at one place.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/cats/conf/ldscript.elf

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/cats/conf/ldscript.elf
diff -u src/sys/arch/cats/conf/ldscript.elf:1.4 src/sys/arch/cats/conf/ldscript.elf:1.5
--- src/sys/arch/cats/conf/ldscript.elf:1.4	Thu Aug 20 07:00:48 2015
+++ src/sys/arch/cats/conf/ldscript.elf	Fri Aug 21 03:42:29 2015
@@ -1,28 +1,24 @@
-/*	$NetBSD: ldscript.elf,v 1.4 2015/08/20 07:00:48 uebayasi Exp $	*/
+/*	$NetBSD: ldscript.elf,v 1.5 2015/08/21 03:42:29 uebayasi Exp $	*/
 
 OUTPUT_ARCH(arm)
 ENTRY(KERNEL_BASE_phys)
 SECTIONS
 {
-  KERNEL_BASE_phys = 0xF0000000;
-  KERNEL_BASE_virt = 0xF0000000;
-
   /* Kernel start: */
-  .start (KERNEL_BASE_phys) :
+  .start :
   {
     *(.start)
-  } =0
+  }
 
   /* Read-only sections, merged into text segment: */
-  .text (KERNEL_BASE_virt + SIZEOF(.start)) :
-  AT (LOADADDR(.start) + SIZEOF(.start))
+  .text :
   {
     *(.text)
     *(.text.*)
     *(.stub)
     *(.glue_7t) *(.glue_7)
     *(.rodata) *(.rodata.*)
-  } =0
+  }
   PROVIDE (__etext = .);
   PROVIDE (_etext = .);
   PROVIDE (etext = .);
@@ -30,14 +26,12 @@ SECTIONS
      boundary.  */
   . = ALIGN(0x8000);
   .data    :
-  AT (LOADADDR(.text) + (ADDR(.data) - ADDR(.text)))
   {
     __data_start = . ;
     *(.data)
     *(.data.*)
   }
   .sdata     :
-  AT (LOADADDR(.data) + (ADDR(.sdata) - ADDR(.data)))
   {
     *(.sdata)
     *(.sdata.*)
@@ -73,3 +67,19 @@ SECTIONS
   _bss_end__ = . ; __bss_end__ = . ; __end__ = . ;
   PROVIDE (end = .);
 }
+SECTIONS
+{
+  KERNEL_BASE_phys = 0xF0000000;
+  KERNEL_BASE_virt = 0xF0000000;
+
+  .start (KERNEL_BASE_phys) :
+  {
+    *(.start)
+  } =0
+
+  .text (KERNEL_BASE_virt + SIZEOF(.start)) :
+  AT (LOADADDR(.start) + SIZEOF(.start))
+  {
+    *(.text)
+  } =0
+}

Reply via email to