Greg Kroah-Hartman | b244131 | 2017-11-01 15:07:57 +0100 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
Yoshinori Sato | 8dbdef2 | 2015-05-08 23:23:18 +0900 | [diff] [blame] | 2 | #include <asm-generic/vmlinux.lds.h> |
| 3 | #include <asm/page.h> |
Yoshinori Sato | 75078de | 2015-05-31 23:28:17 +0900 | [diff] [blame] | 4 | #include <asm/thread_info.h> |
Yoshinori Sato | 8dbdef2 | 2015-05-08 23:23:18 +0900 | [diff] [blame] | 5 | |
| 6 | #define ROMTOP 0x000000 |
| 7 | #define RAMTOP 0x400000 |
| 8 | |
| 9 | jiffies = jiffies_64 + 4; |
| 10 | |
| 11 | ENTRY(_start) |
| 12 | |
| 13 | SECTIONS |
| 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 Metcalf | 6727ad9 | 2016-10-07 17:02:55 -0700 | [diff] [blame] | 33 | CPUIDLE_TEXT |
Yoshinori Sato | 8dbdef2 | 2015-05-08 23:23:18 +0900 | [diff] [blame] | 34 | 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 Sato | 8dbdef2 | 2015-05-08 23:23:18 +0900 | [diff] [blame] | 48 | #endif |
| 49 | _sdata = . ; |
| 50 | __data_start = . ; |
Yoshinori Sato | 75078de | 2015-05-31 23:28:17 +0900 | [diff] [blame] | 51 | RW_DATA_SECTION(0, PAGE_SIZE, THREAD_SIZE) |
Yoshinori Sato | 8dbdef2 | 2015-05-08 23:23:18 +0900 | [diff] [blame] | 52 | #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 Sato | 8dbdef2 | 2015-05-08 23:23:18 +0900 | [diff] [blame] | 59 | __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 | } |