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