Greg Kroah-Hartman | b244131 | 2017-11-01 15:07:57 +0100 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2 | /* ld script to make m68k Linux kernel */ |
3 | |||||
4 | #include <asm-generic/vmlinux.lds.h> | ||||
Cyrill Gorcunov | 97d26e7 | 2008-07-17 21:16:11 +0200 | [diff] [blame] | 5 | #include <asm/page.h> |
Tim Abbott | 7c5fd56 | 2009-09-27 13:57:55 -0400 | [diff] [blame] | 6 | #include <asm/thread_info.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 7 | |
8 | OUTPUT_FORMAT("elf32-m68k", "elf32-m68k", "elf32-m68k") | ||||
9 | OUTPUT_ARCH(m68k) | ||||
10 | ENTRY(_start) | ||||
11 | jiffies = jiffies_64 + 4; | ||||
12 | SECTIONS | ||||
13 | { | ||||
14 | . = 0x1000; | ||||
15 | _text = .; /* Text and read-only data */ | ||||
16 | .text : { | ||||
Tim Abbott | 6f335ca | 2009-04-25 22:11:03 -0400 | [diff] [blame] | 17 | HEAD_TEXT |
Sam Ravnborg | 7664709 | 2007-05-13 00:31:33 +0200 | [diff] [blame] | 18 | TEXT_TEXT |
Greg Ungerer | 969de09 | 2017-11-14 11:50:07 +1000 | [diff] [blame] | 19 | IRQENTRY_TEXT |
20 | SOFTIRQENTRY_TEXT | ||||
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 21 | SCHED_TEXT |
Chris Metcalf | 6727ad9 | 2016-10-07 17:02:55 -0700 | [diff] [blame] | 22 | CPUIDLE_TEXT |
Al Viro | 198a410 | 2006-01-12 01:06:11 -0800 | [diff] [blame] | 23 | LOCK_TEXT |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 24 | *(.fixup) |
25 | *(.gnu.warning) | ||||
26 | } :text = 0x4e75 | ||||
27 | |||||
Roman Zippel | fe6d9da | 2007-08-22 14:01:33 -0700 | [diff] [blame] | 28 | _etext = .; /* End of text section */ |
29 | |||||
Tim Abbott | 7c5fd56 | 2009-09-27 13:57:55 -0400 | [diff] [blame] | 30 | EXCEPTION_TABLE(16) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 31 | |
Steven Rostedt | a2d063a | 2011-05-19 21:34:58 -0400 | [diff] [blame] | 32 | _sdata = .; /* Start of data section */ |
33 | |||||
Kees Cook | de71566 | 2019-11-11 09:22:00 -0800 | [diff] [blame] | 34 | RO_DATA(4096) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 35 | |
Kees Cook | c917404 | 2019-10-29 14:13:35 -0700 | [diff] [blame] | 36 | RW_DATA(16, PAGE_SIZE, THREAD_SIZE) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 37 | |
Tim Abbott | 7c5fd56 | 2009-09-27 13:57:55 -0400 | [diff] [blame] | 38 | BSS_SECTION(0, 0, 0) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 39 | |
40 | _edata = .; /* End of data section */ | ||||
41 | |||||
42 | /* will be freed after init */ | ||||
Cyrill Gorcunov | 97d26e7 | 2008-07-17 21:16:11 +0200 | [diff] [blame] | 43 | . = ALIGN(PAGE_SIZE); /* Init code and data */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 44 | __init_begin = .; |
Tim Abbott | 7c5fd56 | 2009-09-27 13:57:55 -0400 | [diff] [blame] | 45 | INIT_TEXT_SECTION(PAGE_SIZE) :data |
46 | INIT_DATA_SECTION(16) | ||||
Roman Zippel | fbe9c96 | 2007-05-31 00:40:50 -0700 | [diff] [blame] | 47 | .m68k_fixup : { |
48 | __start_fixup = .; | ||||
49 | *(.m68k_fixup) | ||||
50 | __stop_fixup = .; | ||||
51 | } | ||||
Tim Abbott | 7c5fd56 | 2009-09-27 13:57:55 -0400 | [diff] [blame] | 52 | .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 Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 58 | |
59 | _end = . ; | ||||
60 | |||||
Tim Abbott | 7c5fd56 | 2009-09-27 13:57:55 -0400 | [diff] [blame] | 61 | STABS_DEBUG |
Youling Tang | 428ec5f | 2020-11-20 14:08:14 +0800 | [diff] [blame] | 62 | ELF_DETAILS |
Tejun Heo | 023bf6f | 2009-07-09 11:27:40 +0900 | [diff] [blame] | 63 | |
64 | /* Sections to be discarded */ | ||||
65 | DISCARDS | ||||
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 66 | } |