2005-04-17 05:20:36 +07:00
|
|
|
/*
|
|
|
|
* vmlinux.lds.S -- master linker script for m68knommu arch
|
|
|
|
*
|
2012-01-05 12:51:13 +07:00
|
|
|
* (C) Copyright 2002-2012, Greg Ungerer <gerg@snapgear.com>
|
2005-04-17 05:20:36 +07:00
|
|
|
*
|
2011-03-31 08:57:33 +07:00
|
|
|
* This linker script is equipped to build either ROM loaded or RAM
|
2006-06-28 13:44:14 +07:00
|
|
|
* run kernels.
|
2005-04-17 05:20:36 +07:00
|
|
|
*/
|
|
|
|
|
|
|
|
#if defined(CONFIG_RAMKERNEL)
|
2012-01-05 12:51:13 +07:00
|
|
|
#define KTEXT_ADDR CONFIG_KERNELBASE
|
2005-04-17 05:20:36 +07:00
|
|
|
#endif
|
2012-01-05 12:51:13 +07:00
|
|
|
#if defined(CONFIG_ROMKERNEL)
|
|
|
|
#define KTEXT_ADDR CONFIG_ROMSTART
|
|
|
|
#define KDATA_ADDR CONFIG_KERNELBASE
|
|
|
|
#define LOAD_OFFSET KDATA_ADDR + (ADDR(.text) + SIZEOF(.text))
|
2005-04-17 05:20:36 +07:00
|
|
|
#endif
|
|
|
|
|
2012-01-05 12:51:13 +07:00
|
|
|
#include <asm/page.h>
|
|
|
|
#include <asm/thread_info.h>
|
|
|
|
#include <asm-generic/vmlinux.lds.h>
|
2005-04-17 05:20:36 +07:00
|
|
|
|
|
|
|
OUTPUT_ARCH(m68k)
|
|
|
|
ENTRY(_start)
|
|
|
|
|
|
|
|
jiffies = jiffies_64 + 4;
|
|
|
|
|
|
|
|
SECTIONS {
|
|
|
|
|
2012-01-05 12:51:13 +07:00
|
|
|
#ifdef CONFIG_ROMVEC
|
|
|
|
. = CONFIG_ROMVEC;
|
2005-04-17 05:20:36 +07:00
|
|
|
.romvec : {
|
2012-01-05 12:51:13 +07:00
|
|
|
__rom_start = .;
|
2005-04-17 05:20:36 +07:00
|
|
|
_romvec = .;
|
2012-01-05 12:51:13 +07:00
|
|
|
*(.romvec)
|
2010-02-20 07:03:54 +07:00
|
|
|
*(.data..initvect)
|
2012-01-05 12:51:13 +07:00
|
|
|
}
|
2005-04-17 05:20:36 +07:00
|
|
|
#endif
|
|
|
|
|
2012-01-05 12:51:13 +07:00
|
|
|
. = KTEXT_ADDR;
|
|
|
|
|
|
|
|
_text = .;
|
|
|
|
_stext = .;
|
2005-04-17 05:20:36 +07:00
|
|
|
.text : {
|
2008-07-11 12:29:36 +07:00
|
|
|
HEAD_TEXT
|
2007-05-13 05:31:33 +07:00
|
|
|
TEXT_TEXT
|
2005-04-17 05:20:36 +07:00
|
|
|
SCHED_TEXT
|
2016-10-08 07:02:55 +07:00
|
|
|
CPUIDLE_TEXT
|
2008-05-01 09:16:46 +07:00
|
|
|
LOCK_TEXT
|
2011-10-19 10:50:35 +07:00
|
|
|
*(.fixup)
|
2012-01-05 12:51:13 +07:00
|
|
|
. = ALIGN(16);
|
|
|
|
}
|
|
|
|
_etext = .;
|
|
|
|
|
|
|
|
#ifdef KDATA_ADDR
|
|
|
|
. = KDATA_ADDR;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
_sdata = .;
|
|
|
|
RO_DATA_SECTION(PAGE_SIZE)
|
|
|
|
RW_DATA_SECTION(16, PAGE_SIZE, THREAD_SIZE)
|
|
|
|
_edata = .;
|
2005-04-17 05:20:36 +07:00
|
|
|
|
2012-01-05 12:51:13 +07:00
|
|
|
EXCEPTION_TABLE(16)
|
|
|
|
NOTES
|
2005-04-17 05:20:36 +07:00
|
|
|
|
2012-01-05 12:51:13 +07:00
|
|
|
. = ALIGN(PAGE_SIZE);
|
|
|
|
__init_begin = .;
|
|
|
|
INIT_TEXT_SECTION(PAGE_SIZE)
|
|
|
|
INIT_DATA_SECTION(16)
|
|
|
|
PERCPU_SECTION(16)
|
2011-10-19 10:50:35 +07:00
|
|
|
.m68k_fixup : {
|
|
|
|
__start_fixup = .;
|
|
|
|
*(.m68k_fixup)
|
|
|
|
__stop_fixup = .;
|
2012-01-05 12:51:13 +07:00
|
|
|
}
|
2009-10-19 00:23:55 +07:00
|
|
|
.init.data : {
|
2009-10-19 00:23:49 +07:00
|
|
|
. = ALIGN(PAGE_SIZE);
|
2005-04-17 05:20:36 +07:00
|
|
|
__init_end = .;
|
2012-01-05 12:51:13 +07:00
|
|
|
}
|
|
|
|
|
|
|
|
BSS_SECTION(0, 0, 0)
|
|
|
|
|
|
|
|
_end = .;
|
|
|
|
|
|
|
|
STABS_DEBUG
|
|
|
|
.comment 0 : { *(.comment) }
|
2005-04-17 05:20:36 +07:00
|
|
|
|
2012-01-05 12:51:13 +07:00
|
|
|
/* Sections to be discarded */
|
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 09:27:40 +07:00
|
|
|
DISCARDS
|
2005-04-17 05:20:36 +07:00
|
|
|
}
|
|
|
|
|