blob: 49f716c0a1df977d5981c6b80dc4e126c282cb83 [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
Yoshinori Sato8dbdef22015-05-08 23:23:18 +09002#include <asm-generic/vmlinux.lds.h>
3#include <asm/page.h>
Yoshinori Sato75078de2015-05-31 23:28:17 +09004#include <asm/thread_info.h>
Yoshinori Sato8dbdef22015-05-08 23:23:18 +09005
6#define ROMTOP 0x000000
7#define RAMTOP 0x400000
8
9jiffies = jiffies_64 + 4;
10
11ENTRY(_start)
12
13SECTIONS
14{
15#if defined(CONFIG_ROMKERNEL)
16 . = ROMTOP;
17 .vectors :
18 {
19 _vector = . ;
20 *(.vector*)
21 }
22#else
23 . = RAMTOP;
24 _ramstart = .;
25 . = . + CONFIG_OFFSET;
26#endif
27 _text = .;
28 HEAD_TEXT_SECTION
29 .text : {
30 _stext = . ;
31 TEXT_TEXT
32 SCHED_TEXT
Chris Metcalf6727ad92016-10-07 17:02:55 -070033 CPUIDLE_TEXT
Yoshinori Sato8dbdef22015-05-08 23:23:18 +090034 LOCK_TEXT
35#if defined(CONFIG_ROMKERNEL)
36 *(.int_redirect)
37#endif
38 _etext = . ;
39 }
40 EXCEPTION_TABLE(16)
41 NOTES
42 RO_DATA_SECTION(4)
43 ROMEND = .;
44#if defined(CONFIG_ROMKERNEL)
45 . = RAMTOP;
46 _ramstart = .;
47#define ADDR(x) ROMEND
Yoshinori Sato8dbdef22015-05-08 23:23:18 +090048#endif
49 _sdata = . ;
50 __data_start = . ;
Yoshinori Sato75078de2015-05-31 23:28:17 +090051 RW_DATA_SECTION(0, PAGE_SIZE, THREAD_SIZE)
Yoshinori Sato8dbdef22015-05-08 23:23:18 +090052#if defined(CONFIG_ROMKERNEL)
53#undef ADDR
54#endif
55 . = ALIGN(0x4) ;
56 __init_begin = .;
57 INIT_TEXT_SECTION(4)
58 INIT_DATA_SECTION(4)
Yoshinori Sato8dbdef22015-05-08 23:23:18 +090059 __init_end = .;
60 _edata = . ;
61 _begin_data = LOADADDR(.data);
62 _sbss =.;
63 BSS_SECTION(0, 0 ,0)
64 _ebss =.;
65 _ramend = .;
66 _end = .;
67 DISCARDS
68}