2005-04-17 02:20:36 +04:00
|
|
|
/* ld script to make FRV Linux kernel
|
|
|
|
* Written by Martin Mares <mj@atrey.karlin.mff.cuni.cz>;
|
|
|
|
*/
|
|
|
|
OUTPUT_FORMAT("elf32-frv", "elf32-frv", "elf32-frv")
|
|
|
|
OUTPUT_ARCH(frv)
|
|
|
|
ENTRY(_start)
|
|
|
|
|
|
|
|
#include <asm-generic/vmlinux.lds.h>
|
|
|
|
#include <asm/processor.h>
|
|
|
|
#include <asm/page.h>
|
|
|
|
#include <asm/cache.h>
|
|
|
|
#include <asm/thread_info.h>
|
|
|
|
|
|
|
|
jiffies = jiffies_64 + 4;
|
|
|
|
|
2008-02-05 09:29:53 +03:00
|
|
|
__page_offset = CONFIG_PAGE_OFFSET; /* start of area covered by struct pages */
|
2005-04-17 02:20:36 +04:00
|
|
|
__kernel_image_start = __page_offset; /* address at which kernel image resides */
|
|
|
|
|
|
|
|
SECTIONS
|
|
|
|
{
|
|
|
|
. = __kernel_image_start;
|
|
|
|
|
|
|
|
/* discardable initialisation code and data */
|
|
|
|
. = ALIGN(PAGE_SIZE); /* Init code and data */
|
|
|
|
__init_begin = .;
|
|
|
|
|
|
|
|
_sinittext = .;
|
|
|
|
.init.text : {
|
2009-04-26 06:10:59 +04:00
|
|
|
HEAD_TEXT
|
2005-04-17 02:20:36 +04:00
|
|
|
#ifndef CONFIG_DEBUG_INFO
|
2008-01-20 16:15:03 +03:00
|
|
|
INIT_TEXT
|
|
|
|
EXIT_TEXT
|
|
|
|
EXIT_DATA
|
2005-04-17 02:20:36 +04:00
|
|
|
*(.exitcall.exit)
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
_einittext = .;
|
|
|
|
|
2009-09-18 23:52:08 +04:00
|
|
|
INIT_DATA_SECTION(8)
|
2011-03-24 20:50:09 +03:00
|
|
|
PERCPU_SECTION(L1_CACHE_BYTES)
|
2005-04-17 02:20:36 +04:00
|
|
|
|
2009-09-18 23:52:08 +04:00
|
|
|
. = ALIGN(PAGE_SIZE);
|
2005-04-17 02:20:36 +04:00
|
|
|
__init_end = .;
|
|
|
|
|
|
|
|
.trap : {
|
|
|
|
/* trap table management - read entry-table.S before modifying */
|
|
|
|
. = ALIGN(8192);
|
|
|
|
__trap_tables = .;
|
|
|
|
*(.trap.user)
|
|
|
|
*(.trap.kernel)
|
|
|
|
. = ALIGN(4096);
|
|
|
|
*(.trap.break)
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Text and read-only data */
|
|
|
|
. = ALIGN(4);
|
|
|
|
_text = .;
|
|
|
|
_stext = .;
|
|
|
|
.text : {
|
2010-02-20 03:03:56 +03:00
|
|
|
*(.text..start)
|
|
|
|
*(.text..entry)
|
|
|
|
*(.text..break)
|
|
|
|
*(.text..tlbmiss)
|
2007-11-29 03:22:05 +03:00
|
|
|
TEXT_TEXT
|
|
|
|
SCHED_TEXT
|
2016-10-08 03:02:55 +03:00
|
|
|
CPUIDLE_TEXT
|
2007-11-29 03:22:05 +03:00
|
|
|
LOCK_TEXT
|
2005-04-17 02:20:36 +04:00
|
|
|
#ifdef CONFIG_DEBUG_INFO
|
2008-01-20 16:15:03 +03:00
|
|
|
INIT_TEXT
|
|
|
|
EXIT_TEXT
|
2008-02-13 19:10:08 +03:00
|
|
|
*(.exitcall.exit)
|
2007-11-29 03:22:05 +03:00
|
|
|
#endif
|
2005-04-17 02:20:36 +04:00
|
|
|
*(.fixup)
|
|
|
|
*(.gnu.warning)
|
|
|
|
*(.exitcall.exit)
|
|
|
|
} = 0x9090
|
|
|
|
|
|
|
|
_etext = .; /* End of text section */
|
|
|
|
|
|
|
|
RODATA
|
|
|
|
|
|
|
|
.rodata : {
|
|
|
|
*(.trap.vector)
|
|
|
|
|
|
|
|
/* this clause must not be modified - the ordering and adjacency are imperative */
|
|
|
|
__trap_fixup_tables = .;
|
|
|
|
*(.trap.fixup.user .trap.fixup.kernel)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2009-09-18 23:52:08 +04:00
|
|
|
EXCEPTION_TABLE(8)
|
2005-04-17 02:20:36 +04:00
|
|
|
|
|
|
|
_sdata = .;
|
|
|
|
.data : { /* Data */
|
2009-09-18 23:52:08 +04:00
|
|
|
INIT_TASK_DATA(THREAD_SIZE)
|
|
|
|
CACHELINE_ALIGNED_DATA(L1_CACHE_BYTES)
|
2007-05-17 15:38:44 +04:00
|
|
|
DATA_DATA
|
|
|
|
*(.data.*)
|
2008-01-20 16:15:03 +03:00
|
|
|
EXIT_DATA
|
2005-04-17 02:20:36 +04:00
|
|
|
CONSTRUCTORS
|
|
|
|
}
|
|
|
|
|
|
|
|
_edata = .; /* End of data section */
|
|
|
|
|
2017-03-30 18:49:27 +03:00
|
|
|
BUG_TABLE
|
|
|
|
|
2005-04-17 02:20:36 +04:00
|
|
|
/* GP section */
|
|
|
|
. = ALIGN(L1_CACHE_BYTES);
|
|
|
|
_gp = . + 2048;
|
|
|
|
PROVIDE (gp = _gp);
|
|
|
|
|
|
|
|
.sdata : { *(.sdata .sdata.*) }
|
|
|
|
|
|
|
|
/* BSS */
|
|
|
|
. = ALIGN(L1_CACHE_BYTES);
|
|
|
|
__bss_start = .;
|
|
|
|
|
|
|
|
.sbss : { *(.sbss .sbss.*) }
|
|
|
|
.bss : { *(.bss .bss.*) }
|
2010-02-20 03:03:39 +03:00
|
|
|
.bss..stack : { *(.bss) }
|
2005-04-17 02:20:36 +04:00
|
|
|
|
|
|
|
__bss_stop = .;
|
|
|
|
_end = . ;
|
|
|
|
. = ALIGN(PAGE_SIZE);
|
|
|
|
__kernel_image_end = .;
|
|
|
|
|
2009-09-18 23:52:08 +04:00
|
|
|
STABS_DEBUG
|
|
|
|
DWARF_DEBUG
|
2005-04-17 02:20:36 +04:00
|
|
|
|
|
|
|
.comment 0 : { *(.comment) }
|
2009-06-24 10:13:38 +04:00
|
|
|
|
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 06:27:40 +04:00
|
|
|
DISCARDS
|
2005-04-17 02:20:36 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
__kernel_image_size_no_bss = __bss_start - __kernel_image_start;
|