X-Git-Url: http://ftp.safe.ca/?a=blobdiff_plain;f=arch%2Fblackfin%2Fkernel%2Fvmlinux.lds.S;h=10e12539000ebad641207ee49daf7e9ad5b8cad3;hb=96f1050d3df105c9ae6c6ac224f370199ea82fcd;hp=d062597e6217faf7dff3b7e42e542bbd3929a299;hpb=1375204611f417541e55ee09e248acdbbb94356d;p=safe%2Fjmp%2Flinux-2.6 diff --git a/arch/blackfin/kernel/vmlinux.lds.S b/arch/blackfin/kernel/vmlinux.lds.S index d062597..10e1253 100644 --- a/arch/blackfin/kernel/vmlinux.lds.S +++ b/arch/blackfin/kernel/vmlinux.lds.S @@ -1,30 +1,7 @@ /* - * File: arch/blackfin/kernel/vmlinux.lds.S - * Based on: none - original work - * Author: + * Copyright 2004-2009 Analog Devices Inc. * - * Created: Tue Sep 21 2004 - * Description: Master linker script for blackfin architecture - * - * Modified: - * Copyright 2004-2007 Analog Devices Inc. - * - * Bugs: Enter bugs at http://blackfin.uclinux.org/ - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, see the file COPYING, or write - * to the Free Software Foundation, Inc., - * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * Licensed under the GPL-2 or later */ #define VMLINUX_SYMBOL(_sym_) _##_sym_ @@ -50,8 +27,11 @@ SECTIONS _text = .; __stext = .; TEXT_TEXT +#ifndef CONFIG_SCHEDULE_L1 SCHED_TEXT +#endif LOCK_TEXT + IRQENTRY_TEXT KPROBES_TEXT *(.text.*) *(.fixup) @@ -68,6 +48,8 @@ SECTIONS __etext = .; } + NOTES + /* Just in case the first read only is a 32-bit access */ RO_DATA(4) @@ -91,8 +73,7 @@ SECTIONS { __sdata = .; /* This gets done first, so the glob doesn't suck it in */ - . = ALIGN(32); - *(.data.cacheline_aligned) + CACHELINE_ALIGNED_DATA(32) #if !L1_DATA_A_LENGTH . = ALIGN(32); @@ -102,22 +83,16 @@ SECTIONS #if !L1_DATA_B_LENGTH *(.l1.data.B) #endif -#ifndef L2_LENGTH +#if !L2_LENGTH . = ALIGN(32); *(.data_l2.cacheline_aligned) *(.l2.data) #endif DATA_DATA - *(.data.*) CONSTRUCTORS - /* make sure the init_task is aligned to the - * kernel thread size so we can locate the kernel - * stack properly and quickly. - */ - . = ALIGN(THREAD_SIZE); - *(.init_task.data) + INIT_TASK_DATA(THREAD_SIZE) __edata = .; } @@ -130,56 +105,38 @@ SECTIONS . = ALIGN(PAGE_SIZE); ___init_begin = .; - .init.text : - { - . = ALIGN(PAGE_SIZE); - __sinittext = .; - INIT_TEXT - __einittext = .; - } - .init.data : - { - . = ALIGN(16); - INIT_DATA - } - .init.setup : - { - . = ALIGN(16); - ___setup_start = .; - *(.init.setup) - ___setup_end = .; - } - .initcall.init : - { - ___initcall_start = .; - INITCALLS - ___initcall_end = .; - } - .con_initcall.init : + INIT_TEXT_SECTION(PAGE_SIZE) + . = ALIGN(16); + INIT_DATA_SECTION(16) + PERCPU(4) + + /* we have to discard exit text and such at runtime, not link time, to + * handle embedded cross-section references (alt instructions, bug + * table, eh_frame, etc...) + */ + .exit.text : { - ___con_initcall_start = .; - *(.con_initcall.init) - ___con_initcall_end = .; + EXIT_TEXT } - SECURITY_INIT - .init.ramfs : + .exit.data : { - . = ALIGN(4); - ___initramfs_start = .; - *(.init.ramfs) - ___initramfs_end = .; + EXIT_DATA } __l1_lma_start = .; - .text_l1 L1_CODE_START : AT(LOADADDR(.init.ramfs) + SIZEOF(.init.ramfs)) + .text_l1 L1_CODE_START : AT(LOADADDR(.exit.data) + SIZEOF(.exit.data)) { . = ALIGN(4); __stext_l1 = .; *(.l1.text) +#ifdef CONFIG_SCHEDULE_L1 + SCHED_TEXT +#endif . = ALIGN(4); __etext_l1 = .; } + ASSERT (SIZEOF(.text_l1) <= L1_CODE_LENGTH, "L1 text overflow!") .data_l1 L1_DATA_A_START : AT(LOADADDR(.text_l1) + SIZEOF(.text_l1)) { @@ -197,6 +154,7 @@ SECTIONS . = ALIGN(4); __ebss_l1 = .; } + ASSERT (SIZEOF(.data_l1) <= L1_DATA_A_LENGTH, "L1 data A overflow!") .data_b_l1 L1_DATA_B_START : AT(LOADADDR(.data_l1) + SIZEOF(.data_l1)) { @@ -211,21 +169,21 @@ SECTIONS . = ALIGN(4); __ebss_b_l1 = .; } + ASSERT (SIZEOF(.data_b_l1) <= L1_DATA_B_LENGTH, "L1 data B overflow!") -#ifdef L2_LENGTH - __l2_lma_start = .; + __l2_lma_start = LOADADDR(.data_b_l1) + SIZEOF(.data_b_l1); .text_data_l2 L2_START : AT(LOADADDR(.data_b_l1) + SIZEOF(.data_b_l1)) { . = ALIGN(4); __stext_l2 = .; - *(.l1.text) + *(.l2.text) . = ALIGN(4); __etext_l2 = .; . = ALIGN(4); __sdata_l2 = .; - *(.l1.data) + *(.l2.data) __edata_l2 = .; . = ALIGN(32); @@ -233,16 +191,16 @@ SECTIONS . = ALIGN(4); __sbss_l2 = .; - *(.l1.bss) + *(.l2.bss) . = ALIGN(4); __ebss_l2 = .; } -#endif + ASSERT (SIZEOF(.text_data_l2) <= L2_LENGTH, "L2 overflow!") /* Force trailing alignment of our init section so that when we * free our init memory, we don't leave behind a partial page. */ - . = LOADADDR(.data_b_l1) + SIZEOF(.data_b_l1); + . = LOADADDR(.text_data_l2) + SIZEOF(.text_data_l2); . = ALIGN(PAGE_SIZE); ___init_end = .; @@ -252,10 +210,5 @@ SECTIONS DWARF_DEBUG - /DISCARD/ : - { - EXIT_TEXT - EXIT_DATA - *(.exitcall.exit) - } + DISCARDS }