1/*        $NetBSD: kern.ldscript,v 1.2 2018/08/17 20:16:07 reinoud Exp $        */
2
3#include "assym.h"
4
5__PAGE_SIZE = 0x1000 ;
6
7ENTRY(_start)
8SECTIONS
9{
10          /* Read-only sections, merged into text segment: */
11          .text :
12          {
13                    . = ALIGN(__PAGE_SIZE);
14                    *(.text.user)
15                    . = ALIGN(__PAGE_SIZE);
16                    *(.text)
17                    *(.text.*)
18                    *(.stub)
19                    . = ALIGN(__PAGE_SIZE);
20          } =0xCC
21
22          _etext = . ;
23          PROVIDE (etext = .) ;
24
25          . = ALIGN(__PAGE_SIZE);
26          .rodata :
27          {
28                    *(.rodata)
29                    *(.rodata.*)
30          }
31
32          /*
33           * Adjust the address for the data segment.  We want to adjust up to
34           * the same address within the page on the next page up.
35           */
36          . = ALIGN(__PAGE_SIZE);
37          __data_start = . ;
38          .data :
39          {
40                    *(.data)
41          }
42
43          . = ALIGN(COHERENCY_UNIT);
44          .data.cacheline_aligned :
45          {
46                    *(.data.cacheline_aligned)
47          }
48          . = ALIGN(COHERENCY_UNIT);
49          .data.read_mostly :
50          {
51                    *(.data.read_mostly)
52          }
53          . = ALIGN(COHERENCY_UNIT);
54
55          _edata = . ;
56          PROVIDE (edata = .) ;
57          __bss_start = . ;
58          .bss :
59          {
60                    *(.bss)
61                    *(.bss.*)
62                    *(COMMON)
63          }
64
65          . = ALIGN(__PAGE_SIZE);
66          _end = . ;
67          PROVIDE (end = .) ;
68
69          /*
70           * .note.netbsd.ident :
71           * {
72           *        KEEP(*(.note.netbsd.ident));
73           * }
74           */
75}
76
77