1/*        $NetBSD: kern.ldscript.Xen,v 1.17 2022/01/24 00:15:09 maya Exp $      */
2
3#include "assym.h"
4
5__PAGE_SIZE = 0x1000 ;
6
7SECTIONS
8{
9          .text : AT (ADDR(.text))
10          {
11                    *(.text)
12                    *(.text.*)
13                    *(.stub)
14                    . = ALIGN(__PAGE_SIZE);
15          } :main =0xCC
16          _etext = . ;
17          PROVIDE (etext = .) ;
18
19          . = ALIGN(__PAGE_SIZE);
20
21          __rodata_start = . ;
22
23          .rodata.hotpatch :
24          {
25                    __rodata_hotpatch_start = . ;
26                    *(.rodata.hotpatch)
27                    __rodata_hotpatch_end = . ;
28          }
29
30          .rodata :
31          {
32                    *(.rodata)
33                    *(.rodata.*)
34          }
35
36          . = ALIGN(__PAGE_SIZE);
37
38          __data_start = . ;
39          .data :
40          {
41                    *(.data)
42          }
43
44          . = ALIGN(COHERENCY_UNIT);
45          .data.cacheline_aligned :
46          {
47                    *(.data.cacheline_aligned)
48          }
49          . = ALIGN(COHERENCY_UNIT);
50          .data.read_mostly :
51          {
52                    *(.data.read_mostly)
53          }
54          . = ALIGN(COHERENCY_UNIT);
55
56          _edata = . ;
57          PROVIDE (edata = .) ;
58          __bss_start = . ;
59          .bss :
60          {
61                    *(.bss)
62                    *(.bss.*)
63                    *(COMMON)
64                    . = ALIGN(__PAGE_SIZE);
65          }
66
67          . = ALIGN(__PAGE_SIZE);
68
69          /* End of the kernel image */
70          __kernel_end = . ;
71
72          _end = . ;
73          PROVIDE (end = .) ;
74          .note.netbsd.ident :
75          {
76                    KEEP(*(.note.netbsd.ident));
77          }
78          .note.Xen :
79          {
80                    KEEP(*(.note.Xen));
81          } :notes
82}
83
84PHDRS
85{
86          main PT_LOAD;
87          notes PT_NOTE;
88}
89