2005-04-17 06:20:36 +08:00
|
|
|
#define VMLINUX_SYMBOL(_sym_) _##_sym_
|
|
|
|
#include <asm-generic/vmlinux.lds.h>
|
2009-09-24 22:36:21 +08:00
|
|
|
#include <asm/page.h>
|
2005-04-17 06:20:36 +08:00
|
|
|
|
|
|
|
/* 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 :
|
|
|
|
{
|
2006-12-07 09:14:04 +08:00
|
|
|
_text = .;
|
2005-04-17 06:20:36 +08:00
|
|
|
#if defined(CONFIG_ROMKERNEL)
|
|
|
|
*(.int_redirect)
|
|
|
|
#endif
|
|
|
|
__stext = . ;
|
2007-05-13 06:31:33 +08:00
|
|
|
TEXT_TEXT
|
2005-04-17 06:20:36 +08:00
|
|
|
SCHED_TEXT
|
|
|
|
LOCK_TEXT
|
|
|
|
__etext = . ;
|
|
|
|
}
|
2009-09-24 22:36:21 +08:00
|
|
|
EXCEPTION_TABLE(16)
|
2005-04-17 06:20:36 +08:00
|
|
|
|
|
|
|
RODATA
|
|
|
|
#if defined(CONFIG_ROMKERNEL)
|
|
|
|
SECURITY_INIT
|
|
|
|
#endif
|
|
|
|
ROEND = .;
|
|
|
|
#if defined(CONFIG_ROMKERNEL)
|
|
|
|
. = RAMTOP;
|
|
|
|
.data : AT(ROEND)
|
|
|
|
#else
|
|
|
|
.data :
|
|
|
|
#endif
|
|
|
|
{
|
|
|
|
__sdata = . ;
|
|
|
|
___data_start = . ;
|
|
|
|
|
2009-09-24 22:36:21 +08:00
|
|
|
INIT_TASK_DATA(0x2000)
|
2005-04-17 06:20:36 +08:00
|
|
|
. = ALIGN(0x4) ;
|
2007-05-17 19:38:44 +08:00
|
|
|
DATA_DATA
|
2005-04-17 06:20:36 +08:00
|
|
|
. = ALIGN(0x4) ;
|
|
|
|
*(.data.*)
|
|
|
|
|
|
|
|
. = ALIGN(0x4) ;
|
|
|
|
___init_begin = .;
|
|
|
|
__sinittext = .;
|
2008-01-20 21:15:03 +08:00
|
|
|
INIT_TEXT
|
2005-04-17 06:20:36 +08:00
|
|
|
__einittext = .;
|
2008-01-20 21:15:03 +08:00
|
|
|
INIT_DATA
|
2005-04-17 06:20:36 +08:00
|
|
|
. = ALIGN(0x4) ;
|
2009-09-24 22:36:21 +08:00
|
|
|
INIT_SETUP(0x4)
|
2005-04-17 06:20:36 +08:00
|
|
|
___setup_start = .;
|
|
|
|
*(.init.setup)
|
|
|
|
. = ALIGN(0x4) ;
|
|
|
|
___setup_end = .;
|
2009-09-24 22:36:21 +08:00
|
|
|
INIT_CALLS
|
|
|
|
CON_INITCALL
|
2008-01-20 21:15:03 +08:00
|
|
|
EXIT_TEXT
|
|
|
|
EXIT_DATA
|
2009-09-24 22:36:21 +08:00
|
|
|
INIT_RAM_FS
|
2005-04-17 06:20:36 +08:00
|
|
|
. = 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 = .;
|
|
|
|
}
|
|
|
|
.romfs :
|
|
|
|
{
|
|
|
|
*(.romfs*)
|
|
|
|
}
|
|
|
|
. = RAMTOP+RAMSIZE;
|
|
|
|
.dummy :
|
|
|
|
{
|
|
|
|
COMMAND_START = . - 0x200 ;
|
|
|
|
__ramend = . ;
|
|
|
|
}
|
linker script: unify usage of discard definition
Discarded sections in different archs share some commonality but have
considerable differences. This led to linker script for each arch
implementing its own /DISCARD/ definition, which makes maintaining
tedious and adding new entries error-prone.
This patch makes all linker scripts to move discard definitions to the
end of the linker script and use the common DISCARDS macro. As ld
uses the first matching section definition, archs can include default
discarded sections by including them earlier in the linker script.
ia64 is notable because it first throws away some ia64 specific
subsections and then include the rest of the sections into the final
image, so those sections must be discarded before the inclusion.
defconfig compile tested for x86, x86-64, powerpc, powerpc64, ia64,
alpha, sparc, sparc64 and s390. Michal Simek tested microblaze.
Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Paul Mundt <lethal@linux-sh.org>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Tested-by: Michal Simek <monstr@monstr.eu>
Cc: linux-arch@vger.kernel.org
Cc: Michal Simek <monstr@monstr.eu>
Cc: microblaze-uclinux@itee.uq.edu.au
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Tony Luck <tony.luck@intel.com>
2009-07-09 10:27:40 +08:00
|
|
|
|
|
|
|
DISCARDS
|
2005-04-17 06:20:36 +08:00
|
|
|
}
|