1/* SPDX-License-Identifier: GPL-2.0 */
2/* ld script to make m68k Linux kernel */
3
4#include <asm-generic/vmlinux.lds.h>
5#include <asm/page.h>
6#include <asm/thread_info.h>
7
8OUTPUT_FORMAT("elf32-m68k", "elf32-m68k", "elf32-m68k")
9OUTPUT_ARCH(m68k)
10ENTRY(_start)
11jiffies = jiffies_64 + 4;
12SECTIONS
13{
14  . = 0xE002000;
15  _text = .;			/* Text and read-only data */
16  .text : {
17	HEAD_TEXT
18	TEXT_TEXT
19	IRQENTRY_TEXT
20	SOFTIRQENTRY_TEXT
21	SCHED_TEXT
22	CPUIDLE_TEXT
23	LOCK_TEXT
24	*(.fixup)
25	*(.gnu.warning)
26	} :text = 0x4e75
27	RO_DATA(4096)
28
29  _etext = .;			/* End of text section */
30
31  EXCEPTION_TABLE(16) :data
32  _sdata = .;			/* Start of rw data section */
33  RW_DATA(16, PAGE_SIZE, THREAD_SIZE) :data
34  /* End of data goes *here* so that freeing init code works properly. */
35  _edata = .;
36  NOTES
37
38  /* will be freed after init */
39  . = ALIGN(PAGE_SIZE);	/* Init code and data */
40__init_begin = .;
41	INIT_TEXT_SECTION(PAGE_SIZE)
42	INIT_DATA_SECTION(16)
43	.m68k_fixup : {
44		__start_fixup = .;
45		*(.m68k_fixup)
46		__stop_fixup = .;
47	}
48	. = ALIGN(PAGE_SIZE);
49	__init_end = .;
50
51  BSS_SECTION(0, 0, 0)
52
53  _end = . ;
54
55  STABS_DEBUG
56
57  /* Sections to be discarded */
58  DISCARDS
59}
60