2019-06-04 16:11:33 +08:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
2013-01-18 17:42:20 +08:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com)
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <asm-generic/vmlinux.lds.h>
|
|
|
|
#include <asm/cache.h>
|
|
|
|
#include <asm/page.h>
|
|
|
|
#include <asm/thread_info.h>
|
|
|
|
|
|
|
|
OUTPUT_ARCH(arc)
|
2015-10-09 13:56:12 +08:00
|
|
|
ENTRY(res_service)
|
2013-01-18 17:42:20 +08:00
|
|
|
|
|
|
|
#ifdef CONFIG_CPU_BIG_ENDIAN
|
|
|
|
jiffies = jiffies_64 + 4;
|
|
|
|
#else
|
|
|
|
jiffies = jiffies_64;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
SECTIONS
|
|
|
|
{
|
2013-01-18 17:42:25 +08:00
|
|
|
/*
|
|
|
|
* ICCM starts at 0x8000_0000. So if kernel is relocated to some other
|
|
|
|
* address, make sure peripheral at 0x8z doesn't clash with ICCM
|
|
|
|
* Essentially vector is also in ICCM.
|
|
|
|
*/
|
|
|
|
|
2013-01-18 17:42:20 +08:00
|
|
|
. = CONFIG_LINUX_LINK_BASE;
|
|
|
|
|
|
|
|
_int_vec_base_lds = .;
|
|
|
|
.vector : {
|
|
|
|
*(.vector)
|
|
|
|
. = ALIGN(PAGE_SIZE);
|
|
|
|
}
|
|
|
|
|
2013-01-18 17:42:25 +08:00
|
|
|
#ifdef CONFIG_ARC_HAS_ICCM
|
|
|
|
.text.arcfp : {
|
|
|
|
*(.text.arcfp)
|
|
|
|
. = ALIGN(CONFIG_ARC_ICCM_SZ * 1024);
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2013-01-18 17:42:20 +08:00
|
|
|
/*
|
|
|
|
* The reason for having a seperate subsection .init.ramfs is to
|
|
|
|
* prevent objump from including it in kernel dumps
|
|
|
|
*
|
|
|
|
* Reason for having .init.ramfs above .init is to make sure that the
|
|
|
|
* binary blob is tucked away to one side, reducing the displacement
|
|
|
|
* between .init.text and .text, avoiding any possible relocation
|
|
|
|
* errors because of calls from .init.text to .text
|
|
|
|
* Yes such calls do exist. e.g.
|
|
|
|
* decompress_inflate.c:gunzip( ) -> zlib_inflate_workspace( )
|
|
|
|
*/
|
|
|
|
|
|
|
|
__init_begin = .;
|
|
|
|
|
|
|
|
.init.ramfs : { INIT_RAM_FS }
|
|
|
|
|
|
|
|
. = ALIGN(PAGE_SIZE);
|
|
|
|
|
|
|
|
HEAD_TEXT_SECTION
|
|
|
|
INIT_TEXT_SECTION(L1_CACHE_BYTES)
|
|
|
|
|
|
|
|
/* INIT_DATA_SECTION open-coded: special INIT_RAM_FS handling */
|
|
|
|
.init.data : {
|
|
|
|
INIT_DATA
|
|
|
|
INIT_SETUP(L1_CACHE_BYTES)
|
|
|
|
INIT_CALLS
|
|
|
|
CON_INITCALL
|
|
|
|
}
|
|
|
|
|
2013-01-18 17:42:26 +08:00
|
|
|
.init.arch.info : {
|
|
|
|
__arch_info_begin = .;
|
|
|
|
*(.arch.info.init)
|
|
|
|
__arch_info_end = .;
|
|
|
|
}
|
|
|
|
|
2013-01-18 17:42:20 +08:00
|
|
|
PERCPU_SECTION(L1_CACHE_BYTES)
|
|
|
|
|
|
|
|
. = ALIGN(PAGE_SIZE);
|
|
|
|
__init_end = .;
|
|
|
|
|
|
|
|
.text : {
|
|
|
|
_text = .;
|
2021-02-27 02:35:39 +08:00
|
|
|
_stext = .;
|
2013-01-18 17:42:20 +08:00
|
|
|
TEXT_TEXT
|
|
|
|
SCHED_TEXT
|
|
|
|
LOCK_TEXT
|
|
|
|
KPROBES_TEXT
|
2021-07-10 22:50:33 +08:00
|
|
|
IRQENTRY_TEXT
|
|
|
|
SOFTIRQENTRY_TEXT
|
2013-01-18 17:42:20 +08:00
|
|
|
*(.fixup)
|
|
|
|
*(.gnu.warning)
|
|
|
|
}
|
|
|
|
EXCEPTION_TABLE(L1_CACHE_BYTES)
|
|
|
|
_etext = .;
|
|
|
|
|
|
|
|
_sdata = .;
|
2019-10-30 05:13:34 +08:00
|
|
|
RO_DATA(PAGE_SIZE)
|
2013-01-18 17:42:20 +08:00
|
|
|
|
|
|
|
/*
|
|
|
|
* 1. this is .data essentially
|
|
|
|
* 2. THREAD_SIZE for init.task, must be kernel-stk sz aligned
|
|
|
|
*/
|
2019-10-30 05:13:35 +08:00
|
|
|
RW_DATA(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE)
|
2013-01-18 17:42:20 +08:00
|
|
|
|
|
|
|
_edata = .;
|
|
|
|
|
2014-04-17 19:43:26 +08:00
|
|
|
BSS_SECTION(4, 4, 4)
|
2013-01-18 17:42:20 +08:00
|
|
|
|
2013-01-22 19:33:19 +08:00
|
|
|
#ifdef CONFIG_ARC_DW2_UNWIND
|
|
|
|
. = ALIGN(PAGE_SIZE);
|
2013-06-24 23:52:06 +08:00
|
|
|
.eh_frame : {
|
2013-01-22 19:33:19 +08:00
|
|
|
__start_unwind = .;
|
2013-06-24 23:52:06 +08:00
|
|
|
*(.eh_frame)
|
2013-01-22 19:33:19 +08:00
|
|
|
__end_unwind = .;
|
|
|
|
}
|
|
|
|
#else
|
2013-06-24 23:52:06 +08:00
|
|
|
/DISCARD/ : { *(.eh_frame) }
|
2013-01-22 19:33:19 +08:00
|
|
|
#endif
|
|
|
|
|
2013-01-18 17:42:20 +08:00
|
|
|
. = ALIGN(PAGE_SIZE);
|
|
|
|
_end = . ;
|
|
|
|
|
|
|
|
STABS_DEBUG
|
2020-08-22 03:42:45 +08:00
|
|
|
ELF_DETAILS
|
2013-01-18 17:42:20 +08:00
|
|
|
DISCARDS
|
|
|
|
|
|
|
|
.arcextmap 0 : {
|
|
|
|
*(.gnu.linkonce.arcextmap.*)
|
|
|
|
*(.arcextmap.*)
|
|
|
|
}
|
2013-01-22 19:33:19 +08:00
|
|
|
|
2013-05-25 16:33:25 +08:00
|
|
|
#ifndef CONFIG_DEBUG_INFO
|
2013-06-24 23:52:06 +08:00
|
|
|
/DISCARD/ : { *(.debug_frame) }
|
2013-05-25 16:33:25 +08:00
|
|
|
/DISCARD/ : { *(.debug_aranges) }
|
|
|
|
/DISCARD/ : { *(.debug_pubnames) }
|
|
|
|
/DISCARD/ : { *(.debug_info) }
|
|
|
|
/DISCARD/ : { *(.debug_abbrev) }
|
|
|
|
/DISCARD/ : { *(.debug_line) }
|
|
|
|
/DISCARD/ : { *(.debug_str) }
|
|
|
|
/DISCARD/ : { *(.debug_loc) }
|
|
|
|
/DISCARD/ : { *(.debug_macinfo) }
|
|
|
|
/DISCARD/ : { *(.debug_ranges) }
|
|
|
|
#endif
|
2013-01-22 19:33:19 +08:00
|
|
|
|
2013-01-18 17:42:25 +08:00
|
|
|
#ifdef CONFIG_ARC_HAS_DCCM
|
|
|
|
. = CONFIG_ARC_DCCM_BASE;
|
|
|
|
__arc_dccm_base = .;
|
|
|
|
.data.arcfp : {
|
|
|
|
*(.data.arcfp)
|
|
|
|
}
|
|
|
|
. = ALIGN(CONFIG_ARC_DCCM_SZ * 1024);
|
|
|
|
#endif
|
2013-01-18 17:42:20 +08:00
|
|
|
}
|