Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 1 | /* |
| 2 | * File: arch/blackfin/kernel/vmlinux.lds.S |
| 3 | * Based on: none - original work |
| 4 | * Author: |
| 5 | * |
| 6 | * Created: Tue Sep 21 2004 |
| 7 | * Description: Master linker script for blackfin architecture |
| 8 | * |
| 9 | * Modified: |
Mike Frysinger | de6a952 | 2007-06-11 17:27:05 +0800 | [diff] [blame] | 10 | * Copyright 2004-2007 Analog Devices Inc. |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 11 | * |
| 12 | * Bugs: Enter bugs at http://blackfin.uclinux.org/ |
| 13 | * |
| 14 | * This program is free software; you can redistribute it and/or modify |
| 15 | * it under the terms of the GNU General Public License as published by |
| 16 | * the Free Software Foundation; either version 2 of the License, or |
| 17 | * (at your option) any later version. |
| 18 | * |
| 19 | * This program is distributed in the hope that it will be useful, |
| 20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 22 | * GNU General Public License for more details. |
| 23 | * |
| 24 | * You should have received a copy of the GNU General Public License |
| 25 | * along with this program; if not, see the file COPYING, or write |
| 26 | * to the Free Software Foundation, Inc., |
| 27 | * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 28 | */ |
| 29 | |
| 30 | #define VMLINUX_SYMBOL(_sym_) _##_sym_ |
| 31 | |
| 32 | #include <asm-generic/vmlinux.lds.h> |
| 33 | #include <asm/mem_map.h> |
Mike Frysinger | 520473b | 2007-07-12 12:20:20 +0800 | [diff] [blame] | 34 | #include <asm/page.h> |
Bernd Schmidt | 0fa63ad | 2007-07-25 10:19:59 +0800 | [diff] [blame^] | 35 | #include <asm/thread_info.h> |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 36 | |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 37 | OUTPUT_FORMAT("elf32-bfin") |
| 38 | ENTRY(__start) |
| 39 | _jiffies = _jiffies_64; |
| 40 | |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 41 | SECTIONS |
| 42 | { |
| 43 | . = CONFIG_BOOT_LOAD; |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 44 | .text : |
| 45 | { |
Mike Frysinger | de6a952 | 2007-06-11 17:27:05 +0800 | [diff] [blame] | 46 | __text = .; |
| 47 | _text = .; |
| 48 | __stext = .; |
Sam Ravnborg | 7664709 | 2007-05-13 00:31:33 +0200 | [diff] [blame] | 49 | TEXT_TEXT |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 50 | SCHED_TEXT |
Mike Frysinger | de6a952 | 2007-06-11 17:27:05 +0800 | [diff] [blame] | 51 | LOCK_TEXT |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 52 | *(.text.lock) |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 53 | *(.fixup) |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 54 | |
Mike Frysinger | de6a952 | 2007-06-11 17:27:05 +0800 | [diff] [blame] | 55 | . = ALIGN(16); |
| 56 | ___start___ex_table = .; |
| 57 | *(__ex_table) |
| 58 | ___stop___ex_table = .; |
| 59 | |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 60 | . = ALIGN(4); |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 61 | __etext = .; |
Mike Frysinger | de6a952 | 2007-06-11 17:27:05 +0800 | [diff] [blame] | 62 | } |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 63 | |
Mike Frysinger | de6a952 | 2007-06-11 17:27:05 +0800 | [diff] [blame] | 64 | RODATA |
| 65 | |
| 66 | .data : |
| 67 | { |
Bernd Schmidt | 0fa63ad | 2007-07-25 10:19:59 +0800 | [diff] [blame^] | 68 | /* make sure the init_task is aligned to the |
| 69 | * kernel thread size so we can locate the kernel |
| 70 | * stack properly and quickly. |
| 71 | */ |
Mike Frysinger | de6a952 | 2007-06-11 17:27:05 +0800 | [diff] [blame] | 72 | __sdata = .; |
Bernd Schmidt | 0fa63ad | 2007-07-25 10:19:59 +0800 | [diff] [blame^] | 73 | . = ALIGN(THREAD_SIZE); |
Mike Frysinger | de6a952 | 2007-06-11 17:27:05 +0800 | [diff] [blame] | 74 | *(.data.init_task) |
| 75 | DATA_DATA |
| 76 | CONSTRUCTORS |
| 77 | |
| 78 | . = ALIGN(32); |
| 79 | *(.data.cacheline_aligned) |
| 80 | |
Bernd Schmidt | 0fa63ad | 2007-07-25 10:19:59 +0800 | [diff] [blame^] | 81 | . = ALIGN(THREAD_SIZE); |
Mike Frysinger | de6a952 | 2007-06-11 17:27:05 +0800 | [diff] [blame] | 82 | __edata = .; |
| 83 | } |
| 84 | |
| 85 | ___init_begin = .; |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 86 | .init : |
| 87 | { |
Bernd Schmidt | 0fa63ad | 2007-07-25 10:19:59 +0800 | [diff] [blame^] | 88 | . = ALIGN(PAGE_SIZE); |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 89 | __sinittext = .; |
| 90 | *(.init.text) |
| 91 | __einittext = .; |
| 92 | *(.init.data) |
| 93 | . = ALIGN(16); |
| 94 | ___setup_start = .; |
| 95 | *(.init.setup) |
| 96 | ___setup_end = .; |
| 97 | ___start___param = .; |
| 98 | *(__param) |
| 99 | ___stop___param = .; |
| 100 | ___initcall_start = .; |
| 101 | INITCALLS |
| 102 | ___initcall_end = .; |
| 103 | ___con_initcall_start = .; |
| 104 | *(.con_initcall.init) |
| 105 | ___con_initcall_end = .; |
| 106 | ___security_initcall_start = .; |
| 107 | *(.security_initcall.init) |
| 108 | ___security_initcall_end = .; |
| 109 | . = ALIGN(4); |
| 110 | ___initramfs_start = .; |
| 111 | *(.init.ramfs) |
| 112 | ___initramfs_end = .; |
| 113 | . = ALIGN(4); |
Mike Frysinger | de6a952 | 2007-06-11 17:27:05 +0800 | [diff] [blame] | 114 | } |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 115 | |
Mike Frysinger | de6a952 | 2007-06-11 17:27:05 +0800 | [diff] [blame] | 116 | __l1_lma_start = .; |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 117 | |
Mike Frysinger | de6a952 | 2007-06-11 17:27:05 +0800 | [diff] [blame] | 118 | .text_l1 L1_CODE_START : AT(LOADADDR(.init) + SIZEOF(.init)) |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 119 | { |
| 120 | . = ALIGN(4); |
Mike Frysinger | de6a952 | 2007-06-11 17:27:05 +0800 | [diff] [blame] | 121 | __stext_l1 = .; |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 122 | *(.l1.text) |
| 123 | |
| 124 | . = ALIGN(4); |
Mike Frysinger | de6a952 | 2007-06-11 17:27:05 +0800 | [diff] [blame] | 125 | __etext_l1 = .; |
| 126 | } |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 127 | |
Mike Frysinger | de6a952 | 2007-06-11 17:27:05 +0800 | [diff] [blame] | 128 | .data_l1 L1_DATA_A_START : AT(LOADADDR(.text_l1) + SIZEOF(.text_l1)) |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 129 | { |
| 130 | . = ALIGN(4); |
Mike Frysinger | de6a952 | 2007-06-11 17:27:05 +0800 | [diff] [blame] | 131 | __sdata_l1 = .; |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 132 | *(.l1.data) |
Mike Frysinger | de6a952 | 2007-06-11 17:27:05 +0800 | [diff] [blame] | 133 | __edata_l1 = .; |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 134 | |
| 135 | . = ALIGN(4); |
Mike Frysinger | de6a952 | 2007-06-11 17:27:05 +0800 | [diff] [blame] | 136 | __sbss_l1 = .; |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 137 | *(.l1.bss) |
| 138 | |
| 139 | . = ALIGN(32); |
| 140 | *(.data_l1.cacheline_aligned) |
| 141 | |
| 142 | . = ALIGN(4); |
Mike Frysinger | de6a952 | 2007-06-11 17:27:05 +0800 | [diff] [blame] | 143 | __ebss_l1 = .; |
| 144 | } |
| 145 | |
| 146 | .data_b_l1 L1_DATA_B_START : AT(LOADADDR(.data_l1) + SIZEOF(.data_l1)) |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 147 | { |
| 148 | . = ALIGN(4); |
| 149 | __sdata_b_l1 = .; |
| 150 | *(.l1.data.B) |
| 151 | __edata_b_l1 = .; |
| 152 | |
| 153 | . = ALIGN(4); |
| 154 | __sbss_b_l1 = .; |
| 155 | *(.l1.bss.B) |
| 156 | |
| 157 | . = ALIGN(4); |
| 158 | __ebss_b_l1 = .; |
Mike Frysinger | de6a952 | 2007-06-11 17:27:05 +0800 | [diff] [blame] | 159 | } |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 160 | |
Bernd Schmidt | 0fa63ad | 2007-07-25 10:19:59 +0800 | [diff] [blame^] | 161 | ___init_end = LOADADDR(.data_b_l1) + SIZEOF(.data_b_l1); |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 162 | |
Bernd Schmidt | 0fa63ad | 2007-07-25 10:19:59 +0800 | [diff] [blame^] | 163 | .bss LOADADDR(.data_b_l1) + SIZEOF(.data_b_l1) : |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 164 | { |
| 165 | . = ALIGN(4); |
Mike Frysinger | de6a952 | 2007-06-11 17:27:05 +0800 | [diff] [blame] | 166 | ___bss_start = .; |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 167 | *(.bss) |
| 168 | *(COMMON) |
| 169 | . = ALIGN(4); |
Mike Frysinger | de6a952 | 2007-06-11 17:27:05 +0800 | [diff] [blame] | 170 | ___bss_stop = .; |
| 171 | __end = .; |
| 172 | } |
| 173 | |
| 174 | /DISCARD/ : |
| 175 | { |
| 176 | *(.exit.text) |
| 177 | *(.exit.data) |
| 178 | *(.exitcall.exit) |
| 179 | } |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 180 | } |