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> |
| 34 | |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 35 | OUTPUT_FORMAT("elf32-bfin") |
| 36 | ENTRY(__start) |
| 37 | _jiffies = _jiffies_64; |
| 38 | |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 39 | SECTIONS |
| 40 | { |
| 41 | . = CONFIG_BOOT_LOAD; |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 42 | .text : |
| 43 | { |
Mike Frysinger | de6a952 | 2007-06-11 17:27:05 +0800 | [diff] [blame^] | 44 | __text = .; |
| 45 | _text = .; |
| 46 | __stext = .; |
Sam Ravnborg | 7664709 | 2007-05-13 00:31:33 +0200 | [diff] [blame] | 47 | TEXT_TEXT |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 48 | SCHED_TEXT |
Mike Frysinger | de6a952 | 2007-06-11 17:27:05 +0800 | [diff] [blame^] | 49 | LOCK_TEXT |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 50 | *(.text.lock) |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 51 | *(.fixup) |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 52 | |
Mike Frysinger | de6a952 | 2007-06-11 17:27:05 +0800 | [diff] [blame^] | 53 | . = ALIGN(16); |
| 54 | ___start___ex_table = .; |
| 55 | *(__ex_table) |
| 56 | ___stop___ex_table = .; |
| 57 | |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 58 | . = ALIGN(4); |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 59 | __etext = .; |
Mike Frysinger | de6a952 | 2007-06-11 17:27:05 +0800 | [diff] [blame^] | 60 | } |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 61 | |
Mike Frysinger | de6a952 | 2007-06-11 17:27:05 +0800 | [diff] [blame^] | 62 | RODATA |
| 63 | |
| 64 | .data : |
| 65 | { |
| 66 | __sdata = .; |
| 67 | . = ALIGN(0x2000); |
| 68 | *(.data.init_task) |
| 69 | DATA_DATA |
| 70 | CONSTRUCTORS |
| 71 | |
| 72 | . = ALIGN(32); |
| 73 | *(.data.cacheline_aligned) |
| 74 | |
| 75 | . = ALIGN(0x2000); |
| 76 | __edata = .; |
| 77 | } |
| 78 | |
| 79 | ___init_begin = .; |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 80 | .init : |
| 81 | { |
| 82 | . = ALIGN(4096); |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 83 | __sinittext = .; |
| 84 | *(.init.text) |
| 85 | __einittext = .; |
| 86 | *(.init.data) |
| 87 | . = ALIGN(16); |
| 88 | ___setup_start = .; |
| 89 | *(.init.setup) |
| 90 | ___setup_end = .; |
| 91 | ___start___param = .; |
| 92 | *(__param) |
| 93 | ___stop___param = .; |
| 94 | ___initcall_start = .; |
| 95 | INITCALLS |
| 96 | ___initcall_end = .; |
| 97 | ___con_initcall_start = .; |
| 98 | *(.con_initcall.init) |
| 99 | ___con_initcall_end = .; |
| 100 | ___security_initcall_start = .; |
| 101 | *(.security_initcall.init) |
| 102 | ___security_initcall_end = .; |
| 103 | . = ALIGN(4); |
| 104 | ___initramfs_start = .; |
| 105 | *(.init.ramfs) |
| 106 | ___initramfs_end = .; |
| 107 | . = ALIGN(4); |
Mike Frysinger | de6a952 | 2007-06-11 17:27:05 +0800 | [diff] [blame^] | 108 | } |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 109 | |
Mike Frysinger | de6a952 | 2007-06-11 17:27:05 +0800 | [diff] [blame^] | 110 | __l1_lma_start = .; |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 111 | |
Mike Frysinger | de6a952 | 2007-06-11 17:27:05 +0800 | [diff] [blame^] | 112 | .text_l1 L1_CODE_START : AT(LOADADDR(.init) + SIZEOF(.init)) |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 113 | { |
| 114 | . = ALIGN(4); |
Mike Frysinger | de6a952 | 2007-06-11 17:27:05 +0800 | [diff] [blame^] | 115 | __stext_l1 = .; |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 116 | *(.l1.text) |
| 117 | |
| 118 | . = ALIGN(4); |
Mike Frysinger | de6a952 | 2007-06-11 17:27:05 +0800 | [diff] [blame^] | 119 | __etext_l1 = .; |
| 120 | } |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 121 | |
Mike Frysinger | de6a952 | 2007-06-11 17:27:05 +0800 | [diff] [blame^] | 122 | .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] | 123 | { |
| 124 | . = ALIGN(4); |
Mike Frysinger | de6a952 | 2007-06-11 17:27:05 +0800 | [diff] [blame^] | 125 | __sdata_l1 = .; |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 126 | *(.l1.data) |
Mike Frysinger | de6a952 | 2007-06-11 17:27:05 +0800 | [diff] [blame^] | 127 | __edata_l1 = .; |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 128 | |
| 129 | . = ALIGN(4); |
Mike Frysinger | de6a952 | 2007-06-11 17:27:05 +0800 | [diff] [blame^] | 130 | __sbss_l1 = .; |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 131 | *(.l1.bss) |
| 132 | |
| 133 | . = ALIGN(32); |
| 134 | *(.data_l1.cacheline_aligned) |
| 135 | |
| 136 | . = ALIGN(4); |
Mike Frysinger | de6a952 | 2007-06-11 17:27:05 +0800 | [diff] [blame^] | 137 | __ebss_l1 = .; |
| 138 | } |
| 139 | |
| 140 | .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] | 141 | { |
| 142 | . = ALIGN(4); |
| 143 | __sdata_b_l1 = .; |
| 144 | *(.l1.data.B) |
| 145 | __edata_b_l1 = .; |
| 146 | |
| 147 | . = ALIGN(4); |
| 148 | __sbss_b_l1 = .; |
| 149 | *(.l1.bss.B) |
| 150 | |
| 151 | . = ALIGN(4); |
| 152 | __ebss_b_l1 = .; |
Mike Frysinger | de6a952 | 2007-06-11 17:27:05 +0800 | [diff] [blame^] | 153 | } |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 154 | |
Mike Frysinger | de6a952 | 2007-06-11 17:27:05 +0800 | [diff] [blame^] | 155 | ___init_end = LOADADDR(.data_b_l1) + SIZEOF(.data_b_l1); |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 156 | |
Mike Frysinger | de6a952 | 2007-06-11 17:27:05 +0800 | [diff] [blame^] | 157 | .bss LOADADDR(.data_b_l1) + SIZEOF(.data_b_l1) : |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 158 | { |
| 159 | . = ALIGN(4); |
Mike Frysinger | de6a952 | 2007-06-11 17:27:05 +0800 | [diff] [blame^] | 160 | ___bss_start = .; |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 161 | *(.bss) |
| 162 | *(COMMON) |
| 163 | . = ALIGN(4); |
Mike Frysinger | de6a952 | 2007-06-11 17:27:05 +0800 | [diff] [blame^] | 164 | ___bss_stop = .; |
| 165 | __end = .; |
| 166 | } |
| 167 | |
| 168 | /DISCARD/ : |
| 169 | { |
| 170 | *(.exit.text) |
| 171 | *(.exit.data) |
| 172 | *(.exitcall.exit) |
| 173 | } |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 174 | } |