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
37  /* will be freed after init */
38  . = ALIGN(PAGE_SIZE);	/* Init code and data */
39__init_begin = .;
40	INIT_TEXT_SECTION(PAGE_SIZE)
41	INIT_DATA_SECTION(16)
42	.m68k_fixup : {
43		__start_fixup = .;
44		*(.m68k_fixup)
45		__stop_fixup = .;
46	}
47	. = ALIGN(PAGE_SIZE);
48	__init_end = .;
49
50  BSS_SECTION(0, 0, 0)
51
52  _end = . ;
53
54  STABS_DEBUG
55  ELF_DETAILS
56
57  /* Sections to be discarded */
58  DISCARDS
59}
60