xref: /netbsd-src/sys/arch/alpha/conf/kern.ldscript (revision af8fe535835bd0b3a7b9ddfb83c70d33cdfda402)
1/*	$NetBSD: kern.ldscript,v 1.1 2021/05/05 01:35:35 thorpej Exp $	*/
2
3/*
4 * Linker script for the NetBSD/alpha kernel.
5 *
6 * This largely behaves the same as the standard elf64-alpha linker
7 * script for "ld -N"; the kernel is loaded into K0SEG, so there is
8 * no reason to page-align the .data segment.
9 */
10
11#include "assym.h"	/* for COHERENCY_UNIT */
12
13OUTPUT_FORMAT("elf64-alpha", "elf64-alpha",
14	      "elf64-alpha")
15OUTPUT_ARCH(alpha)
16SECTIONS
17{
18	.text	:
19	{
20		*(.text)
21		*(.text.*)
22		*(.stub)
23	} =0x47ff041f
24	_etext = . ;
25	PROVIDE (etext = .);
26
27	.rodata	:
28	{
29		*(.rodata .rodata.*)
30	}
31
32	.data	:
33	{
34		*(.data)
35
36		. = ALIGN(COHERENCY_UNIT);
37		*(.data.cacheline_aligned)
38
39		. = ALIGN(COHERENCY_UNIT);
40		*(.data.read_mostly)
41
42		. = ALIGN(COHERENCY_UNIT);
43		*(.data.*)
44	}
45
46	/*
47	 * Small-data located along side GOT and small-bss for
48	 * GP-relative addressing.
49	 */
50
51	.got	:
52	{
53		*(.got)
54	}
55
56	.sdata	:
57	{
58		*(.sdata .sdata.*)
59	}
60	_edata = . ;
61	PROVIDE (edata = .) ;
62
63	. = .;
64	__bss_start = .;
65	.sbss	:
66	{
67		*(.sbss .sbss.*)
68		*(.scommon)
69	}
70
71	.bss	:
72	{
73		*(.bss .bss.*)
74		*(COMMON)
75	}
76
77	/* End of the kernel image */
78	__kernel_end = . ;
79	_end = . ;
80	PROVIDE (end = .) ;
81
82	.note.netbsd.ident :
83	{
84		KEEP(*(.note.netbsd.ident));
85	}
86}
87