Yoshinori Sato | 8dbdef2 | 2015-05-08 23:23:18 +0900 | [diff] [blame] | 1 | #include <asm-generic/vmlinux.lds.h> |
| 2 | #include <asm/page.h> |
Yoshinori Sato | 75078de | 2015-05-31 23:28:17 +0900 | [diff] [blame^] | 3 | #include <asm/thread_info.h> |
Yoshinori Sato | 8dbdef2 | 2015-05-08 23:23:18 +0900 | [diff] [blame] | 4 | |
| 5 | #define ROMTOP 0x000000 |
| 6 | #define RAMTOP 0x400000 |
| 7 | |
| 8 | jiffies = jiffies_64 + 4; |
| 9 | |
| 10 | ENTRY(_start) |
| 11 | |
| 12 | SECTIONS |
| 13 | { |
| 14 | #if defined(CONFIG_ROMKERNEL) |
| 15 | . = ROMTOP; |
| 16 | .vectors : |
| 17 | { |
| 18 | _vector = . ; |
| 19 | *(.vector*) |
| 20 | } |
| 21 | #else |
| 22 | . = RAMTOP; |
| 23 | _ramstart = .; |
| 24 | . = . + CONFIG_OFFSET; |
| 25 | #endif |
| 26 | _text = .; |
| 27 | HEAD_TEXT_SECTION |
| 28 | .text : { |
| 29 | _stext = . ; |
| 30 | TEXT_TEXT |
| 31 | SCHED_TEXT |
| 32 | LOCK_TEXT |
| 33 | #if defined(CONFIG_ROMKERNEL) |
| 34 | *(.int_redirect) |
| 35 | #endif |
| 36 | _etext = . ; |
| 37 | } |
| 38 | EXCEPTION_TABLE(16) |
| 39 | NOTES |
| 40 | RO_DATA_SECTION(4) |
| 41 | ROMEND = .; |
| 42 | #if defined(CONFIG_ROMKERNEL) |
| 43 | . = RAMTOP; |
| 44 | _ramstart = .; |
| 45 | #define ADDR(x) ROMEND |
Yoshinori Sato | 8dbdef2 | 2015-05-08 23:23:18 +0900 | [diff] [blame] | 46 | #endif |
| 47 | _sdata = . ; |
| 48 | __data_start = . ; |
Yoshinori Sato | 75078de | 2015-05-31 23:28:17 +0900 | [diff] [blame^] | 49 | RW_DATA_SECTION(0, PAGE_SIZE, THREAD_SIZE) |
Yoshinori Sato | 8dbdef2 | 2015-05-08 23:23:18 +0900 | [diff] [blame] | 50 | #if defined(CONFIG_ROMKERNEL) |
| 51 | #undef ADDR |
| 52 | #endif |
| 53 | . = ALIGN(0x4) ; |
| 54 | __init_begin = .; |
| 55 | INIT_TEXT_SECTION(4) |
| 56 | INIT_DATA_SECTION(4) |
| 57 | SECURITY_INIT |
| 58 | __init_end = .; |
| 59 | _edata = . ; |
| 60 | _begin_data = LOADADDR(.data); |
| 61 | _sbss =.; |
| 62 | BSS_SECTION(0, 0 ,0) |
| 63 | _ebss =.; |
| 64 | _ramend = .; |
| 65 | _end = .; |
| 66 | DISCARDS |
| 67 | } |