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