Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/evbarm/conf Simplify this by deciding load address ...



details:   https://anonhg.NetBSD.org/src/rev/63d59368ab5f
branches:  trunk
changeset: 340052:63d59368ab5f
user:      uebayasi <uebayasi%NetBSD.org@localhost>
date:      Fri Aug 21 04:27:54 2015 +0000

description:
Simplify this by deciding load address at one place.

diffstat:

 sys/arch/evbarm/conf/ldscript.evbarm |  34 +++++++++++++++++++++-------------
 1 files changed, 21 insertions(+), 13 deletions(-)

diffs (88 lines):

diff -r e84c22893add -r 63d59368ab5f sys/arch/evbarm/conf/ldscript.evbarm
--- a/sys/arch/evbarm/conf/ldscript.evbarm      Fri Aug 21 04:13:23 2015 +0000
+++ b/sys/arch/evbarm/conf/ldscript.evbarm      Fri Aug 21 04:27:54 2015 +0000
@@ -1,28 +1,24 @@
-/*     $NetBSD: ldscript.evbarm,v 1.9 2015/08/20 07:00:48 uebayasi Exp $       */
+/*     $NetBSD: ldscript.evbarm,v 1.10 2015/08/21 04:27:54 uebayasi Exp $      */
 
 OUTPUT_ARCH(arm)
 ENTRY(KERNEL_BASE_phys)
 SECTIONS
 {
-  KERNEL_BASE_phys = @KERNEL_BASE_PHYS@;
-  KERNEL_BASE_virt = @KERNEL_BASE_VIRT@;
-
   /* 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
+  }
   .ARM.extab   : { *(.ARM.extab* .gnu.linkonce.armextab.*) }
   PROVIDE (__exidx_start = .);
   .ARM.exidx   : { *(.ARM.exidx* .gnu.linkonce.armexidx.*) }
@@ -34,14 +30,12 @@
      boundary.  */
   . = ALIGN(0x10000);
   .data    :
-  AT (LOADADDR(.text) + (ADDR(.data) - ADDR(.text)))
   {
     __data_start = . ;
     *(.data)
     *(.data.*)
   }
   .sdata     :
-  AT (LOADADDR(.data) + (ADDR(.sdata) - ADDR(.data)))
   {
     *(.sdata)
     *(.sdata.*)
@@ -52,7 +46,6 @@
   __bss_start = .;
   __bss_start__ = .;
   .sbss      :
-  AT (LOADADDR(.sdata) + (ADDR(.sbss) - ADDR(.sdata)))
   {
     PROVIDE (__sbss_start = .);
     PROVIDE (___sbss_start = .);
@@ -64,7 +57,6 @@
     PROVIDE (___sbss_end = .);
   }
   .bss       :
-  AT (LOADADDR(.sbss) + (ADDR(.bss) - ADDR(.sbss)))
   {
     *(.dynbss)
     *(.bss)
@@ -80,3 +72,19 @@
   _bss_end__ = . ; __bss_end__ = . ; __end__ = . ;
   PROVIDE (end = .);
 }
+SECTIONS
+{
+  KERNEL_BASE_phys = @KERNEL_BASE_PHYS@;
+  KERNEL_BASE_virt = @KERNEL_BASE_VIRT@;
+
+  .start (KERNEL_BASE_phys) :
+  {
+    *(.start)
+  } =0
+
+  .text (KERNEL_BASE_virt + SIZEOF(.start)) :
+  AT (LOADADDR(.start) + SIZEOF(.start))
+  {
+    *(.text)
+  } =0
+}



Home | Main Index | Thread Index | Old Index