Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* ld script to make M32R Linux kernel |
| 2 | */ |
| 3 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 4 | #include <asm-generic/vmlinux.lds.h> |
| 5 | #include <asm/addrspace.h> |
| 6 | #include <asm/page.h> |
Tim Abbott | 85233c43 | 2009-09-18 16:32:49 -0400 | [diff] [blame] | 7 | #include <asm/thread_info.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 8 | |
| 9 | OUTPUT_ARCH(m32r) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 10 | #if defined(__LITTLE_ENDIAN__) |
| 11 | jiffies = jiffies_64; |
| 12 | #else |
| 13 | jiffies = jiffies_64 + 4; |
| 14 | #endif |
Hirokazu Takata | 3d60f84 | 2007-02-10 01:43:39 -0800 | [diff] [blame] | 15 | |
| 16 | kernel_entry = boot - 0x80000000; |
| 17 | ENTRY(kernel_entry) |
| 18 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 19 | SECTIONS |
| 20 | { |
| 21 | . = CONFIG_MEMORY_START + __PAGE_OFFSET; |
| 22 | eit_vector = .; |
| 23 | |
| 24 | . = . + 0x1000; |
| 25 | .empty_zero_page : { *(.empty_zero_page) } = 0 |
| 26 | |
| 27 | /* read-only */ |
| 28 | _text = .; /* Text and read-only data */ |
| 29 | .boot : { *(.boot) } = 0 |
| 30 | .text : { |
Tim Abbott | 3496369 | 2009-04-25 22:11:02 -0400 | [diff] [blame] | 31 | HEAD_TEXT |
Sam Ravnborg | 7664709 | 2007-05-13 00:31:33 +0200 | [diff] [blame] | 32 | TEXT_TEXT |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 33 | SCHED_TEXT |
| 34 | LOCK_TEXT |
| 35 | *(.fixup) |
| 36 | *(.gnu.warning) |
| 37 | } = 0x9090 |
| 38 | #ifdef CONFIG_SMP |
| 39 | . = ALIGN(65536); |
| 40 | .eit_vector4 : { *(.eit_vector4) } |
| 41 | #endif |
| 42 | _etext = .; /* End of text section */ |
| 43 | |
Tim Abbott | 85233c43 | 2009-09-18 16:32:49 -0400 | [diff] [blame] | 44 | EXCEPTION_TABLE(16) |
Hirokazu Takata | e968b8d | 2009-10-05 00:10:55 +0900 | [diff] [blame] | 45 | NOTES |
| 46 | |
Steven Rostedt | a2d063a | 2011-05-19 21:34:58 -0400 | [diff] [blame] | 47 | _sdata = .; /* Start of data section */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 48 | RODATA |
Tim Abbott | 85233c43 | 2009-09-18 16:32:49 -0400 | [diff] [blame] | 49 | RW_DATA_SECTION(32, PAGE_SIZE, THREAD_SIZE) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 50 | _edata = .; /* End of data section */ |
| 51 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 52 | /* will be freed after init */ |
Tim Abbott | 85233c43 | 2009-09-18 16:32:49 -0400 | [diff] [blame] | 53 | . = ALIGN(PAGE_SIZE); /* Init code and data */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 54 | __init_begin = .; |
Tim Abbott | 85233c43 | 2009-09-18 16:32:49 -0400 | [diff] [blame] | 55 | INIT_TEXT_SECTION(PAGE_SIZE) |
| 56 | INIT_DATA_SECTION(16) |
Tejun Heo | 0415b00d1 | 2011-03-24 18:50:09 +0100 | [diff] [blame] | 57 | PERCPU_SECTION(32) |
Tim Abbott | 85233c43 | 2009-09-18 16:32:49 -0400 | [diff] [blame] | 58 | . = ALIGN(PAGE_SIZE); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 59 | __init_end = .; |
| 60 | /* freed after init ends here */ |
| 61 | |
Tim Abbott | 85233c43 | 2009-09-18 16:32:49 -0400 | [diff] [blame] | 62 | BSS_SECTION(0, 0, 4) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 63 | |
| 64 | _end = . ; |
| 65 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 66 | /* Stabs debugging sections. */ |
| 67 | .stab 0 : { *(.stab) } |
| 68 | .stabstr 0 : { *(.stabstr) } |
| 69 | .stab.excl 0 : { *(.stab.excl) } |
| 70 | .stab.exclstr 0 : { *(.stab.exclstr) } |
| 71 | .stab.index 0 : { *(.stab.index) } |
| 72 | .stab.indexstr 0 : { *(.stab.indexstr) } |
| 73 | .comment 0 : { *(.comment) } |
Tejun Heo | 023bf6f | 2009-07-09 11:27:40 +0900 | [diff] [blame] | 74 | |
| 75 | /* Sections to be discarded */ |
| 76 | DISCARDS |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 77 | } |