Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* ld script to make FRV Linux kernel |
| 2 | * Written by Martin Mares <mj@atrey.karlin.mff.cuni.cz>; |
| 3 | */ |
| 4 | OUTPUT_FORMAT("elf32-frv", "elf32-frv", "elf32-frv") |
| 5 | OUTPUT_ARCH(frv) |
| 6 | ENTRY(_start) |
| 7 | |
| 8 | #include <asm-generic/vmlinux.lds.h> |
| 9 | #include <asm/processor.h> |
| 10 | #include <asm/page.h> |
| 11 | #include <asm/cache.h> |
| 12 | #include <asm/thread_info.h> |
| 13 | |
| 14 | jiffies = jiffies_64 + 4; |
| 15 | |
David Howells | 7038220 | 2008-02-04 22:29:53 -0800 | [diff] [blame] | 16 | __page_offset = CONFIG_PAGE_OFFSET; /* start of area covered by struct pages */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 17 | __kernel_image_start = __page_offset; /* address at which kernel image resides */ |
| 18 | |
| 19 | SECTIONS |
| 20 | { |
| 21 | . = __kernel_image_start; |
| 22 | |
| 23 | /* discardable initialisation code and data */ |
| 24 | . = ALIGN(PAGE_SIZE); /* Init code and data */ |
| 25 | __init_begin = .; |
| 26 | |
| 27 | _sinittext = .; |
| 28 | .init.text : { |
| 29 | *(.text.head) |
| 30 | #ifndef CONFIG_DEBUG_INFO |
Sam Ravnborg | 01ba2bd | 2008-01-20 14:15:03 +0100 | [diff] [blame] | 31 | INIT_TEXT |
| 32 | EXIT_TEXT |
| 33 | EXIT_DATA |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 34 | *(.exitcall.exit) |
| 35 | #endif |
| 36 | } |
| 37 | _einittext = .; |
Sam Ravnborg | 01ba2bd | 2008-01-20 14:15:03 +0100 | [diff] [blame] | 38 | .init.data : { INIT_DATA } |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 39 | |
| 40 | . = ALIGN(8); |
| 41 | __setup_start = .; |
| 42 | .setup.init : { KEEP(*(.init.setup)) } |
| 43 | __setup_end = .; |
| 44 | |
| 45 | __initcall_start = .; |
| 46 | .initcall.init : { |
Andrew Morton | 61ce1ef | 2006-10-27 11:41:44 -0700 | [diff] [blame] | 47 | INITCALLS |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 48 | } |
| 49 | __initcall_end = .; |
| 50 | __con_initcall_start = .; |
| 51 | .con_initcall.init : { *(.con_initcall.init) } |
| 52 | __con_initcall_end = .; |
| 53 | SECURITY_INIT |
| 54 | . = ALIGN(4); |
| 55 | __alt_instructions = .; |
| 56 | .altinstructions : { *(.altinstructions) } |
| 57 | __alt_instructions_end = .; |
| 58 | .altinstr_replacement : { *(.altinstr_replacement) } |
| 59 | |
Fenghua Yu | 5fb7dc3 | 2007-07-19 01:48:12 -0700 | [diff] [blame] | 60 | PERCPU(4096) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 61 | |
Jean-Paul Saman | 67d3822 | 2007-02-10 01:44:44 -0800 | [diff] [blame] | 62 | #ifdef CONFIG_BLK_DEV_INITRD |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 63 | . = ALIGN(4096); |
| 64 | __initramfs_start = .; |
| 65 | .init.ramfs : { *(.init.ramfs) } |
| 66 | __initramfs_end = .; |
Jean-Paul Saman | 67d3822 | 2007-02-10 01:44:44 -0800 | [diff] [blame] | 67 | #endif |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 68 | |
| 69 | . = ALIGN(THREAD_SIZE); |
| 70 | __init_end = .; |
| 71 | |
| 72 | /* put sections together that have massive alignment issues */ |
| 73 | . = ALIGN(THREAD_SIZE); |
| 74 | .data.init_task : { |
| 75 | /* init task record & stack */ |
| 76 | *(.data.init_task) |
| 77 | } |
| 78 | |
David Howells | 3c83567 | 2007-11-28 16:22:05 -0800 | [diff] [blame] | 79 | . = ALIGN(L1_CACHE_BYTES); |
| 80 | .data.cacheline_aligned : { *(.data.cacheline_aligned) } |
| 81 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 82 | .trap : { |
| 83 | /* trap table management - read entry-table.S before modifying */ |
| 84 | . = ALIGN(8192); |
| 85 | __trap_tables = .; |
| 86 | *(.trap.user) |
| 87 | *(.trap.kernel) |
| 88 | . = ALIGN(4096); |
| 89 | *(.trap.break) |
| 90 | } |
| 91 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 92 | /* Text and read-only data */ |
| 93 | . = ALIGN(4); |
| 94 | _text = .; |
| 95 | _stext = .; |
| 96 | .text : { |
David Howells | 3c83567 | 2007-11-28 16:22:05 -0800 | [diff] [blame] | 97 | *(.text.start) |
| 98 | *(.text.entry) |
| 99 | *(.text.break) |
| 100 | *(.text.tlbmiss) |
Sam Ravnborg | 7664709 | 2007-05-13 00:31:33 +0200 | [diff] [blame] | 101 | TEXT_TEXT |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 102 | SCHED_TEXT |
David Howells | 41be6ae | 2006-01-08 01:01:25 -0800 | [diff] [blame] | 103 | LOCK_TEXT |
David Howells | 3c83567 | 2007-11-28 16:22:05 -0800 | [diff] [blame] | 104 | #ifdef CONFIG_DEBUG_INFO |
Sam Ravnborg | 01ba2bd | 2008-01-20 14:15:03 +0100 | [diff] [blame] | 105 | INIT_TEXT |
| 106 | EXIT_TEXT |
David Howells | d897d2b | 2008-02-13 16:10:08 +0000 | [diff] [blame] | 107 | *(.exitcall.exit) |
David Howells | 3c83567 | 2007-11-28 16:22:05 -0800 | [diff] [blame] | 108 | #endif |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 109 | *(.fixup) |
| 110 | *(.gnu.warning) |
| 111 | *(.exitcall.exit) |
| 112 | } = 0x9090 |
| 113 | |
| 114 | _etext = .; /* End of text section */ |
| 115 | |
| 116 | RODATA |
| 117 | |
| 118 | .rodata : { |
| 119 | *(.trap.vector) |
| 120 | |
| 121 | /* this clause must not be modified - the ordering and adjacency are imperative */ |
| 122 | __trap_fixup_tables = .; |
| 123 | *(.trap.fixup.user .trap.fixup.kernel) |
| 124 | |
| 125 | } |
| 126 | |
| 127 | . = ALIGN(8); /* Exception table */ |
| 128 | __start___ex_table = .; |
| 129 | __ex_table : { KEEP(*(__ex_table)) } |
| 130 | __stop___ex_table = .; |
| 131 | |
| 132 | _sdata = .; |
| 133 | .data : { /* Data */ |
Sam Ravnborg | ca96725 | 2007-05-17 13:38:44 +0200 | [diff] [blame] | 134 | DATA_DATA |
| 135 | *(.data.*) |
Sam Ravnborg | 01ba2bd | 2008-01-20 14:15:03 +0100 | [diff] [blame] | 136 | EXIT_DATA |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 137 | CONSTRUCTORS |
| 138 | } |
| 139 | |
| 140 | _edata = .; /* End of data section */ |
| 141 | |
| 142 | /* GP section */ |
| 143 | . = ALIGN(L1_CACHE_BYTES); |
| 144 | _gp = . + 2048; |
| 145 | PROVIDE (gp = _gp); |
| 146 | |
| 147 | .sdata : { *(.sdata .sdata.*) } |
| 148 | |
| 149 | /* BSS */ |
| 150 | . = ALIGN(L1_CACHE_BYTES); |
| 151 | __bss_start = .; |
| 152 | |
| 153 | .sbss : { *(.sbss .sbss.*) } |
| 154 | .bss : { *(.bss .bss.*) } |
| 155 | .bss.stack : { *(.bss) } |
| 156 | |
| 157 | __bss_stop = .; |
| 158 | _end = . ; |
| 159 | . = ALIGN(PAGE_SIZE); |
| 160 | __kernel_image_end = .; |
| 161 | |
| 162 | /* Stabs debugging sections. */ |
| 163 | .stab 0 : { *(.stab) } |
| 164 | .stabstr 0 : { *(.stabstr) } |
| 165 | .stab.excl 0 : { *(.stab.excl) } |
| 166 | .stab.exclstr 0 : { *(.stab.exclstr) } |
| 167 | .stab.index 0 : { *(.stab.index) } |
| 168 | .stab.indexstr 0 : { *(.stab.indexstr) } |
| 169 | |
| 170 | .debug_line 0 : { *(.debug_line) } |
| 171 | .debug_info 0 : { *(.debug_info) } |
| 172 | .debug_abbrev 0 : { *(.debug_abbrev) } |
| 173 | .debug_aranges 0 : { *(.debug_aranges) } |
| 174 | .debug_frame 0 : { *(.debug_frame) } |
| 175 | .debug_pubnames 0 : { *(.debug_pubnames) } |
| 176 | .debug_str 0 : { *(.debug_str) } |
| 177 | .debug_ranges 0 : { *(.debug_ranges) } |
| 178 | |
| 179 | .comment 0 : { *(.comment) } |
| 180 | } |
| 181 | |
| 182 | __kernel_image_size_no_bss = __bss_start - __kernel_image_start; |