blob: ed1d9eda319083f4ceca0aed8c53bc18fe8fe6ef [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07002/* ld script to make m68k Linux kernel */
3
4#include <asm-generic/vmlinux.lds.h>
Cyrill Gorcunov97d26e72008-07-17 21:16:11 +02005#include <asm/page.h>
Tim Abbott7c5fd562009-09-27 13:57:55 -04006#include <asm/thread_info.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -07007
8OUTPUT_FORMAT("elf32-m68k", "elf32-m68k", "elf32-m68k")
9OUTPUT_ARCH(m68k)
10ENTRY(_start)
11jiffies = jiffies_64 + 4;
12SECTIONS
13{
14 . = 0x1000;
15 _text = .; /* Text and read-only data */
16 .text : {
Tim Abbott6f335ca2009-04-25 22:11:03 -040017 HEAD_TEXT
Sam Ravnborg76647092007-05-13 00:31:33 +020018 TEXT_TEXT
Greg Ungerer969de092017-11-14 11:50:07 +100019 IRQENTRY_TEXT
20 SOFTIRQENTRY_TEXT
Linus Torvalds1da177e2005-04-16 15:20:36 -070021 SCHED_TEXT
Chris Metcalf6727ad92016-10-07 17:02:55 -070022 CPUIDLE_TEXT
Al Viro198a4102006-01-12 01:06:11 -080023 LOCK_TEXT
Linus Torvalds1da177e2005-04-16 15:20:36 -070024 *(.fixup)
25 *(.gnu.warning)
26 } :text = 0x4e75
27
Roman Zippelfe6d9da2007-08-22 14:01:33 -070028 _etext = .; /* End of text section */
29
Tim Abbott7c5fd562009-09-27 13:57:55 -040030 EXCEPTION_TABLE(16)
Linus Torvalds1da177e2005-04-16 15:20:36 -070031
Steven Rostedta2d063a2011-05-19 21:34:58 -040032 _sdata = .; /* Start of data section */
33
Kees Cookde715662019-11-11 09:22:00 -080034 RO_DATA(4096)
Linus Torvalds1da177e2005-04-16 15:20:36 -070035
Kees Cookc9174042019-10-29 14:13:35 -070036 RW_DATA(16, PAGE_SIZE, THREAD_SIZE)
Linus Torvalds1da177e2005-04-16 15:20:36 -070037
Tim Abbott7c5fd562009-09-27 13:57:55 -040038 BSS_SECTION(0, 0, 0)
Linus Torvalds1da177e2005-04-16 15:20:36 -070039
40 _edata = .; /* End of data section */
41
42 /* will be freed after init */
Cyrill Gorcunov97d26e72008-07-17 21:16:11 +020043 . = ALIGN(PAGE_SIZE); /* Init code and data */
Linus Torvalds1da177e2005-04-16 15:20:36 -070044 __init_begin = .;
Tim Abbott7c5fd562009-09-27 13:57:55 -040045 INIT_TEXT_SECTION(PAGE_SIZE) :data
46 INIT_DATA_SECTION(16)
Roman Zippelfbe9c962007-05-31 00:40:50 -070047 .m68k_fixup : {
48 __start_fixup = .;
49 *(.m68k_fixup)
50 __stop_fixup = .;
51 }
Tim Abbott7c5fd562009-09-27 13:57:55 -040052 .init_end : {
53 /* This ALIGN be in a section so that _end is at the end of the
54 load segment. */
55 . = ALIGN(PAGE_SIZE);
56 __init_end = .;
57 }
Linus Torvalds1da177e2005-04-16 15:20:36 -070058
59 _end = . ;
60
Tim Abbott7c5fd562009-09-27 13:57:55 -040061 STABS_DEBUG
Youling Tang428ec5f2020-11-20 14:08:14 +080062 ELF_DETAILS
Tejun Heo023bf6f2009-07-09 11:27:40 +090063
64 /* Sections to be discarded */
65 DISCARDS
Linus Torvalds1da177e2005-04-16 15:20:36 -070066}