linux/arch/m68knommu/kernel/vmlinux.lds.S
Tejun Heo 405d967dc7 linker script: throw away .discard section
x86 throws away .discard section but no other archs do.  Also,
.discard is not thrown away while linking modules.  Make every arch
and module linking throw it away.  This will be used to define dummy
variables for percpu declarations and definitions.

This patch is based on Ivan Kokshaysky's alpha percpu patch.

[ Impact: always throw away everything in .discard ]

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Haavard Skinnemoen <hskinnemoen@atmel.com>
Cc: Bryan Wu <cooloney@kernel.org>
Cc: Mikael Starvik <starvik@axis.com>
Cc: Jesper Nilsson <jesper.nilsson@axis.com>
Cc: David Howells <dhowells@redhat.com>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Hirokazu Takata <takata@linux-m32r.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Michal Simek <monstr@monstr.eu>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Kyle McMartin <kyle@mcmartin.ca>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: David S. Miller <davem@davemloft.net>
Cc: Jeff Dike <jdike@addtoit.com>
Cc: Chris Zankel <chris@zankel.net>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Ingo Molnar <mingo@elte.hu>
2009-06-24 15:13:38 +09:00

205 lines
4 KiB
ArmAsm

/*
* vmlinux.lds.S -- master linker script for m68knommu arch
*
* (C) Copyright 2002-2006, Greg Ungerer <gerg@snapgear.com>
*
* This linker script is equiped to build either ROM loaded or RAM
* run kernels.
*/
#include <asm-generic/vmlinux.lds.h>
#if defined(CONFIG_RAMKERNEL)
#define RAM_START CONFIG_KERNELBASE
#define RAM_LENGTH (CONFIG_RAMBASE + CONFIG_RAMSIZE - CONFIG_KERNELBASE)
#define TEXT ram
#define DATA ram
#define INIT ram
#define BSS ram
#endif
#if defined(CONFIG_ROMKERNEL) || defined(CONFIG_HIMEMKERNEL)
#define RAM_START CONFIG_RAMBASE
#define RAM_LENGTH CONFIG_RAMSIZE
#define ROMVEC_START CONFIG_ROMVEC
#define ROMVEC_LENGTH CONFIG_ROMVECSIZE
#define ROM_START CONFIG_ROMSTART
#define ROM_LENGTH CONFIG_ROMSIZE
#define TEXT rom
#define DATA ram
#define INIT ram
#define BSS ram
#endif
#ifndef DATA_ADDR
#define DATA_ADDR
#endif
OUTPUT_ARCH(m68k)
ENTRY(_start)
MEMORY {
ram : ORIGIN = RAM_START, LENGTH = RAM_LENGTH
#ifdef ROM_START
romvec : ORIGIN = ROMVEC_START, LENGTH = ROMVEC_LENGTH
rom : ORIGIN = ROM_START, LENGTH = ROM_LENGTH
#endif
}
jiffies = jiffies_64 + 4;
SECTIONS {
#ifdef ROMVEC_START
. = ROMVEC_START ;
.romvec : {
__rom_start = . ;
_romvec = .;
*(.data.initvect)
} > romvec
#endif
.text : {
_text = .;
_stext = . ;
HEAD_TEXT
TEXT_TEXT
SCHED_TEXT
LOCK_TEXT
*(.text.lock)
. = ALIGN(16); /* Exception table */
__start___ex_table = .;
*(__ex_table)
__stop___ex_table = .;
*(.rodata) *(.rodata.*)
*(__vermagic) /* Kernel version magic */
*(__markers_strings)
*(.rodata1)
*(.rodata.str1.1)
/* Kernel symbol table: Normal symbols */
. = ALIGN(4);
__start___ksymtab = .;
*(__ksymtab)
__stop___ksymtab = .;
/* Kernel symbol table: GPL-only symbols */
__start___ksymtab_gpl = .;
*(__ksymtab_gpl)
__stop___ksymtab_gpl = .;
/* Kernel symbol table: Normal unused symbols */
__start___ksymtab_unused = .;
*(__ksymtab_unused)
__stop___ksymtab_unused = .;
/* Kernel symbol table: GPL-only unused symbols */
__start___ksymtab_unused_gpl = .;
*(__ksymtab_unused_gpl)
__stop___ksymtab_unused_gpl = .;
/* Kernel symbol table: GPL-future symbols */
__start___ksymtab_gpl_future = .;
*(__ksymtab_gpl_future)
__stop___ksymtab_gpl_future = .;
/* Kernel symbol table: Normal symbols */
__start___kcrctab = .;
*(__kcrctab)
__stop___kcrctab = .;
/* Kernel symbol table: GPL-only symbols */
__start___kcrctab_gpl = .;
*(__kcrctab_gpl)
__stop___kcrctab_gpl = .;
/* Kernel symbol table: Normal unused symbols */
__start___kcrctab_unused = .;
*(__kcrctab_unused)
__stop___kcrctab_unused = .;
/* Kernel symbol table: GPL-only unused symbols */
__start___kcrctab_unused_gpl = .;
*(__kcrctab_unused_gpl)
__stop___kcrctab_unused_gpl = .;
/* Kernel symbol table: GPL-future symbols */
__start___kcrctab_gpl_future = .;
*(__kcrctab_gpl_future)
__stop___kcrctab_gpl_future = .;
/* Kernel symbol table: strings */
*(__ksymtab_strings)
/* Built-in module parameters */
. = ALIGN(4) ;
__start___param = .;
*(__param)
__stop___param = .;
. = ALIGN(4) ;
_etext = . ;
} > TEXT
.data DATA_ADDR : {
. = ALIGN(4);
_sdata = . ;
DATA_DATA
. = ALIGN(32);
*(.data.cacheline_aligned)
. = ALIGN(8192) ;
*(.data.init_task)
_edata = . ;
} > DATA
.init : {
. = ALIGN(4096);
__init_begin = .;
_sinittext = .;
INIT_TEXT
_einittext = .;
INIT_DATA
. = ALIGN(16);
__setup_start = .;
*(.init.setup)
__setup_end = .;
__initcall_start = .;
INITCALLS
__initcall_end = .;
__con_initcall_start = .;
*(.con_initcall.init)
__con_initcall_end = .;
__security_initcall_start = .;
*(.security_initcall.init)
__security_initcall_end = .;
#ifdef CONFIG_BLK_DEV_INITRD
. = ALIGN(4);
__initramfs_start = .;
*(.init.ramfs)
__initramfs_end = .;
#endif
. = ALIGN(4096);
__init_end = .;
} > INIT
/DISCARD/ : {
EXIT_TEXT
EXIT_DATA
*(.exitcall.exit)
*(.discard)
}
.bss : {
. = ALIGN(4);
_sbss = . ;
*(.bss)
*(COMMON)
. = ALIGN(4) ;
_ebss = . ;
_end = . ;
} > BSS
}