summaryrefslogtreecommitdiff
path: root/sys/arch/arm/conf
diff options
context:
space:
mode:
authorDale Rahn <drahn@cvs.openbsd.org>2004-12-30 23:50:08 +0000
committerDale Rahn <drahn@cvs.openbsd.org>2004-12-30 23:50:08 +0000
commit3e2923d918820b57513c2f1a63841ef8a23bbd26 (patch)
treea17ba84997c10b54a3e4c6f3d97dcefb2b83d7b8 /sys/arch/arm/conf
parent5964e793205ec0e85b0e4a9fdf19a469788eb6f4 (diff)
xscale bits, taken from NetBSD with modifications as appropriate for OpenBSD.
Diffstat (limited to 'sys/arch/arm/conf')
-rw-r--r--sys/arch/arm/conf/ldscript.head25
-rw-r--r--sys/arch/arm/conf/ldscript.tail52
2 files changed, 77 insertions, 0 deletions
diff --git a/sys/arch/arm/conf/ldscript.head b/sys/arch/arm/conf/ldscript.head
new file mode 100644
index 00000000000..58e099f1d5d
--- /dev/null
+++ b/sys/arch/arm/conf/ldscript.head
@@ -0,0 +1,25 @@
+/* $NetBSD: ldscript.evbarm,v 1.2 2003/03/05 23:54:22 thorpej 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)
+ } =0
+
+ /* Read-only sections, merged into text segment: */
+ .text (KERNEL_BASE_virt + SIZEOF(.start)) :
+ AT (LOADADDR(.start) + SIZEOF(.start))
+ {
+ *(.text)
+ *(.text.*)
+ *(.stub)
+ *(.glue_7t) *(.glue_7)
+ *(.rodata) *(.rodata.*)
diff --git a/sys/arch/arm/conf/ldscript.tail b/sys/arch/arm/conf/ldscript.tail
new file mode 100644
index 00000000000..b6af89f2632
--- /dev/null
+++ b/sys/arch/arm/conf/ldscript.tail
@@ -0,0 +1,52 @@
+ } =0
+ PROVIDE (__etext = .);
+ PROVIDE (_etext = .);
+ PROVIDE (etext = .);
+ /* Adjust the address for the data segment to start on the next page
+ 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.*)
+ }
+ _edata = .;
+ PROVIDE (edata = .);
+ __bss_start = .;
+ __bss_start__ = .;
+ .sbss :
+ {
+ PROVIDE (__sbss_start = .);
+ PROVIDE (___sbss_start = .);
+ *(.dynsbss)
+ *(.sbss)
+ *(.sbss.*)
+ *(.scommon)
+ PROVIDE (__sbss_end = .);
+ PROVIDE (___sbss_end = .);
+ }
+ .bss :
+ {
+ *(.dynbss)
+ *(.bss)
+ *(.bss.*)
+ *(COMMON)
+ /* Align here to ensure that the .bss section occupies space up to
+ _end. Align after .bss to ensure correct alignment even if the
+ .bss section disappears because there are no input sections. */
+ . = ALIGN(32 / 8);
+ }
+ . = ALIGN(32 / 8);
+ _end = .;
+ _bss_end__ = . ; __bss_end__ = . ; __end__ = . ;
+ PROVIDE (end = .);
+}
+