Module Name: src Committed By: uebayasi Date: Fri Aug 21 03:36:32 UTC 2015
Modified Files: src/sys/arch/zaurus/conf: ldscript.zaurus Log Message: Simplify this by deciding load address at one place. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/arch/zaurus/conf/ldscript.zaurus 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/zaurus/conf/ldscript.zaurus diff -u src/sys/arch/zaurus/conf/ldscript.zaurus:1.7 src/sys/arch/zaurus/conf/ldscript.zaurus:1.8 --- src/sys/arch/zaurus/conf/ldscript.zaurus:1.7 Thu Aug 20 07:00:49 2015 +++ src/sys/arch/zaurus/conf/ldscript.zaurus Fri Aug 21 03:36:32 2015 @@ -1,28 +1,24 @@ -/* $NetBSD: ldscript.zaurus,v 1.7 2015/08/20 07:00:49 uebayasi Exp $ */ +/* $NetBSD: ldscript.zaurus,v 1.8 2015/08/21 03:36:32 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 @@ 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.*) @@ -87,3 +81,19 @@ SECTIONS *(.rela.eh_frame) } } +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 +}