xref: /openbmc/linux/arch/alpha/kernel/vmlinux.lds.S (revision 791d3ef2)
1/* SPDX-License-Identifier: GPL-2.0 */
2#include <asm-generic/vmlinux.lds.h>
3#include <asm/thread_info.h>
4#include <asm/cache.h>
5#include <asm/page.h>
6#include <asm/setup.h>
7
8OUTPUT_FORMAT("elf64-alpha")
9OUTPUT_ARCH(alpha)
10ENTRY(__start)
11PHDRS { kernel PT_LOAD; note PT_NOTE; }
12jiffies = jiffies_64;
13SECTIONS
14{
15#ifdef CONFIG_ALPHA_LEGACY_START_ADDRESS
16	. = 0xfffffc0000310000;
17#else
18	. = 0xfffffc0001010000;
19#endif
20
21	_text = .;	/* Text and read-only data */
22	.text : {
23		HEAD_TEXT
24		TEXT_TEXT
25		SCHED_TEXT
26		CPUIDLE_TEXT
27		LOCK_TEXT
28		*(.fixup)
29		*(.gnu.warning)
30	} :kernel
31	swapper_pg_dir = SWAPPER_PGD;
32	_etext = .;	/* End of text section */
33
34	NOTES :kernel :note
35	.dummy : {
36		*(.dummy)
37	} :kernel
38
39	RODATA
40	EXCEPTION_TABLE(16)
41
42	/* Will be freed after init */
43	__init_begin = ALIGN(PAGE_SIZE);
44	INIT_TEXT_SECTION(PAGE_SIZE)
45	INIT_DATA_SECTION(16)
46	PERCPU_SECTION(L1_CACHE_BYTES)
47	/* Align to THREAD_SIZE rather than PAGE_SIZE here so any padding page
48	   needed for the THREAD_SIZE aligned init_task gets freed after init */
49	. = ALIGN(THREAD_SIZE);
50	__init_end = .;
51	/* Freed after init ends here */
52
53	_sdata = .;	/* Start of rw data section */
54	_data = .;
55	RW_DATA_SECTION(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE)
56
57	.got : {
58		*(.got)
59	}
60	.sdata : {
61		*(.sdata)
62	}
63	_edata = .;	/* End of data section */
64
65	BSS_SECTION(0, 0, 0)
66	_end = .;
67
68	.mdebug 0 : {
69		*(.mdebug)
70	}
71	.note 0 : {
72		*(.note)
73	}
74
75	STABS_DEBUG
76	DWARF_DEBUG
77
78	DISCARDS
79}
80