linux/arch/h8300/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

169 lines
2.7 KiB
ArmAsm

#define VMLINUX_SYMBOL(_sym_) _##_sym_
#include <asm-generic/vmlinux.lds.h>
/* target memory map */
#ifdef CONFIG_H8300H_GENERIC
#define ROMTOP 0x000000
#define ROMSIZE 0x400000
#define RAMTOP 0x400000
#define RAMSIZE 0x400000
#endif
#ifdef CONFIG_H8300H_AKI3068NET
#define ROMTOP 0x000000
#define ROMSIZE 0x080000
#define RAMTOP 0x400000
#define RAMSIZE 0x200000
#endif
#ifdef CONFIG_H8300H_H8MAX
#define ROMTOP 0x000000
#define ROMSIZE 0x080000
#define RAMTOP 0x400000
#define RAMSIZE 0x200000
#endif
#ifdef CONFIG_H8300H_SIM
#define ROMTOP 0x000000
#define ROMSIZE 0x400000
#define RAMTOP 0x400000
#define RAMSIZE 0x400000
#endif
#ifdef CONFIG_H8S_SIM
#define ROMTOP 0x000000
#define ROMSIZE 0x400000
#define RAMTOP 0x400000
#define RAMSIZE 0x800000
#endif
#ifdef CONFIG_H8S_EDOSK2674
#define ROMTOP 0x000000
#define ROMSIZE 0x400000
#define RAMTOP 0x400000
#define RAMSIZE 0x800000
#endif
#if defined(CONFIG_H8300H_SIM) || defined(CONFIG_H8S_SIM)
INPUT(romfs.o)
#endif
_jiffies = _jiffies_64 + 4;
ENTRY(__start)
SECTIONS
{
#if defined(CONFIG_ROMKERNEL)
. = ROMTOP;
.vectors :
{
__vector = . ;
*(.vectors*)
}
#else
. = RAMTOP;
.bootvec :
{
*(.bootvec)
}
#endif
.text :
{
_text = .;
#if defined(CONFIG_ROMKERNEL)
*(.int_redirect)
#endif
__stext = . ;
TEXT_TEXT
SCHED_TEXT
LOCK_TEXT
__etext = . ;
. = ALIGN(16); /* Exception table */
___start___ex_table = .;
*(__ex_table)
___stop___ex_table = .;
}
RODATA
#if defined(CONFIG_ROMKERNEL)
SECURITY_INIT
#endif
ROEND = .;
#if defined(CONFIG_ROMKERNEL)
. = RAMTOP;
.data : AT(ROEND)
#else
.data :
#endif
{
__sdata = . ;
___data_start = . ;
. = ALIGN(0x2000) ;
*(.data.init_task)
. = ALIGN(0x4) ;
DATA_DATA
. = ALIGN(0x4) ;
*(.data.*)
. = ALIGN(0x4) ;
___init_begin = .;
__sinittext = .;
INIT_TEXT
__einittext = .;
INIT_DATA
. = ALIGN(0x4) ;
___setup_start = .;
*(.init.setup)
. = ALIGN(0x4) ;
___setup_end = .;
___initcall_start = .;
INITCALLS
___initcall_end = .;
___con_initcall_start = .;
*(.con_initcall.init)
___con_initcall_end = .;
EXIT_TEXT
EXIT_DATA
#if defined(CONFIG_BLK_DEV_INITRD)
. = ALIGN(4);
___initramfs_start = .;
*(.init.ramfs)
___initramfs_end = .;
#endif
. = ALIGN(0x4) ;
___init_end = .;
__edata = . ;
}
#if defined(CONFIG_RAMKERNEL)
SECURITY_INIT
#endif
__begin_data = LOADADDR(.data);
.bss :
{
. = ALIGN(0x4) ;
__sbss = . ;
*(.bss*)
. = ALIGN(0x4) ;
*(COMMON)
. = ALIGN(0x4) ;
__ebss = . ;
__end = . ;
__ramstart = .;
}
/DISCARD/ : {
*(.exitcall.exit)
*(.discard)
}
.romfs :
{
*(.romfs*)
}
. = RAMTOP+RAMSIZE;
.dummy :
{
COMMAND_START = . - 0x200 ;
__ramend = . ;
}
}