blob: c4b5ceceab52f6a4cea05221cd0f06cb30de79bc [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#include <asm-generic/vmlinux.lds.h>
Sam Ravnborgde078ef2009-09-25 19:53:43 +02003#include <asm/thread_info.h>
Tejun Heo0f06c062011-01-25 14:27:38 +01004#include <asm/cache.h>
Sam Ravnborgb2b5d372007-10-16 01:26:35 -07005#include <asm/page.h>
David Howellsec221202012-03-28 18:11:12 +01006#include <asm/setup.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -07007
8OUTPUT_FORMAT("elf64-alpha")
9OUTPUT_ARCH(alpha)
10ENTRY(__start)
Roland McGrathcaf45dd2007-07-19 01:48:37 -070011PHDRS { kernel PT_LOAD; note PT_NOTE; }
Linus Torvalds1da177e2005-04-16 15:20:36 -070012jiffies = jiffies_64;
13SECTIONS
14{
15#ifdef CONFIG_ALPHA_LEGACY_START_ADDRESS
Sam Ravnborgb2b5d372007-10-16 01:26:35 -070016 . = 0xfffffc0000310000;
Linus Torvalds1da177e2005-04-16 15:20:36 -070017#else
Sam Ravnborgb2b5d372007-10-16 01:26:35 -070018 . = 0xfffffc0001010000;
Linus Torvalds1da177e2005-04-16 15:20:36 -070019#endif
20
Sam Ravnborgb2b5d372007-10-16 01:26:35 -070021 _text = .; /* Text and read-only data */
22 .text : {
Tim Abbott92ca5232009-04-25 22:10:58 -040023 HEAD_TEXT
Sam Ravnborgb2b5d372007-10-16 01:26:35 -070024 TEXT_TEXT
25 SCHED_TEXT
Chris Metcalf6727ad92016-10-07 17:02:55 -070026 CPUIDLE_TEXT
Sam Ravnborgb2b5d372007-10-16 01:26:35 -070027 LOCK_TEXT
28 *(.fixup)
29 *(.gnu.warning)
30 } :kernel
David Howellsec221202012-03-28 18:11:12 +010031 swapper_pg_dir = SWAPPER_PGD;
Sam Ravnborgb2b5d372007-10-16 01:26:35 -070032 _etext = .; /* End of text section */
Linus Torvalds1da177e2005-04-16 15:20:36 -070033
Bastian Blank51597ac2008-07-04 10:00:00 -070034 NOTES :kernel :note
35 .dummy : {
36 *(.dummy)
37 } :kernel
38
39 RODATA
Geoffrey Thomas9d93f002009-09-24 10:36:26 -040040 EXCEPTION_TABLE(16)
Linus Torvalds1da177e2005-04-16 15:20:36 -070041
Sam Ravnborgb2b5d372007-10-16 01:26:35 -070042 /* Will be freed after init */
Geoffrey Thomas9d93f002009-09-24 10:36:26 -040043 __init_begin = ALIGN(PAGE_SIZE);
44 INIT_TEXT_SECTION(PAGE_SIZE)
45 INIT_DATA_SECTION(16)
Tejun Heo0415b00d12011-03-24 18:50:09 +010046 PERCPU_SECTION(L1_CACHE_BYTES)
Geoffrey Thomas9d93f002009-09-24 10:36:26 -040047 /* 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);
Sam Ravnborgb2b5d372007-10-16 01:26:35 -070050 __init_end = .;
51 /* Freed after init ends here */
Linus Torvalds1da177e2005-04-16 15:20:36 -070052
Steven Rostedta2d063a2011-05-19 21:34:58 -040053 _sdata = .; /* Start of rw data section */
Sam Ravnborgb2b5d372007-10-16 01:26:35 -070054 _data = .;
Tejun Heo0f06c062011-01-25 14:27:38 +010055 RW_DATA_SECTION(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE)
Linus Torvalds1da177e2005-04-16 15:20:36 -070056
Sam Ravnborgb2b5d372007-10-16 01:26:35 -070057 .got : {
58 *(.got)
59 }
60 .sdata : {
61 *(.sdata)
62 }
63 _edata = .; /* End of data section */
Linus Torvalds1da177e2005-04-16 15:20:36 -070064
Geoffrey Thomas9d93f002009-09-24 10:36:26 -040065 BSS_SECTION(0, 0, 0)
Sam Ravnborgb2b5d372007-10-16 01:26:35 -070066 _end = .;
Linus Torvalds1da177e2005-04-16 15:20:36 -070067
Sam Ravnborgb2b5d372007-10-16 01:26:35 -070068 .mdebug 0 : {
69 *(.mdebug)
70 }
71 .note 0 : {
72 *(.note)
73 }
Linus Torvalds1da177e2005-04-16 15:20:36 -070074
Sam Ravnborgb2b5d372007-10-16 01:26:35 -070075 STABS_DEBUG
76 DWARF_DEBUG
Tejun Heo023bf6f2009-07-09 11:27:40 +090077
78 DISCARDS
Linus Torvalds1da177e2005-04-16 15:20:36 -070079}