2019-05-29 17:18:00 +03:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
2017-07-11 04:08:08 +03:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2012 Regents of the University of California
|
|
|
|
* Copyright (C) 2017 SiFive
|
|
|
|
*/
|
|
|
|
|
|
|
|
#define LOAD_OFFSET PAGE_OFFSET
|
|
|
|
#include <asm/vmlinux.lds.h>
|
|
|
|
#include <asm/page.h>
|
|
|
|
#include <asm/cache.h>
|
|
|
|
#include <asm/thread_info.h>
|
2020-03-09 19:55:40 +03:00
|
|
|
#include <asm/set_memory.h>
|
2017-07-11 04:08:08 +03:00
|
|
|
|
2020-03-18 04:11:39 +03:00
|
|
|
#include <linux/sizes.h>
|
2017-07-11 04:08:08 +03:00
|
|
|
OUTPUT_ARCH(riscv)
|
|
|
|
ENTRY(_start)
|
|
|
|
|
|
|
|
jiffies = jiffies_64;
|
|
|
|
|
|
|
|
SECTIONS
|
|
|
|
{
|
|
|
|
/* Beginning of code and text segment */
|
|
|
|
. = LOAD_OFFSET;
|
|
|
|
_start = .;
|
|
|
|
HEAD_TEXT_SECTION
|
2020-03-18 04:11:39 +03:00
|
|
|
. = ALIGN(PAGE_SIZE);
|
|
|
|
|
|
|
|
__init_begin = .;
|
2017-07-11 04:08:08 +03:00
|
|
|
INIT_TEXT_SECTION(PAGE_SIZE)
|
|
|
|
INIT_DATA_SECTION(16)
|
2020-03-16 03:47:38 +03:00
|
|
|
. = ALIGN(8);
|
|
|
|
__soc_early_init_table : {
|
|
|
|
__soc_early_init_table_start = .;
|
|
|
|
KEEP(*(__soc_early_init_table))
|
|
|
|
__soc_early_init_table_end = .;
|
|
|
|
}
|
2017-07-11 04:08:08 +03:00
|
|
|
/* we have to discard exit text and such at runtime, not link time */
|
|
|
|
.exit.text :
|
|
|
|
{
|
|
|
|
EXIT_TEXT
|
|
|
|
}
|
|
|
|
.exit.data :
|
|
|
|
{
|
|
|
|
EXIT_DATA
|
|
|
|
}
|
|
|
|
PERCPU_SECTION(L1_CACHE_BYTES)
|
|
|
|
__init_end = .;
|
|
|
|
|
2020-03-09 19:55:40 +03:00
|
|
|
. = ALIGN(SECTION_ALIGN);
|
2017-07-11 04:08:08 +03:00
|
|
|
.text : {
|
|
|
|
_text = .;
|
|
|
|
_stext = .;
|
|
|
|
TEXT_TEXT
|
|
|
|
SCHED_TEXT
|
|
|
|
CPUIDLE_TEXT
|
|
|
|
LOCK_TEXT
|
|
|
|
KPROBES_TEXT
|
|
|
|
ENTRY_TEXT
|
|
|
|
IRQENTRY_TEXT
|
2020-01-06 21:38:32 +03:00
|
|
|
SOFTIRQENTRY_TEXT
|
2017-07-11 04:08:08 +03:00
|
|
|
*(.fixup)
|
|
|
|
_etext = .;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Start of data section */
|
|
|
|
_sdata = .;
|
2020-03-09 19:55:40 +03:00
|
|
|
RO_DATA(SECTION_ALIGN)
|
2017-07-11 04:08:08 +03:00
|
|
|
.srodata : {
|
|
|
|
*(.srodata*)
|
|
|
|
}
|
|
|
|
|
2020-03-09 19:55:39 +03:00
|
|
|
EXCEPTION_TABLE(0x10)
|
|
|
|
|
2020-03-09 19:55:40 +03:00
|
|
|
. = ALIGN(SECTION_ALIGN);
|
2020-03-09 19:55:39 +03:00
|
|
|
_data = .;
|
|
|
|
|
2019-10-30 00:13:35 +03:00
|
|
|
RW_DATA(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE)
|
2017-07-11 04:08:08 +03:00
|
|
|
.sdata : {
|
|
|
|
__global_pointer$ = . + 0x800;
|
|
|
|
*(.sdata*)
|
|
|
|
/* End of data section */
|
|
|
|
_edata = .;
|
|
|
|
}
|
|
|
|
|
2019-02-08 20:11:08 +03:00
|
|
|
BSS_SECTION(PAGE_SIZE, PAGE_SIZE, 0)
|
|
|
|
|
2017-07-11 04:08:08 +03:00
|
|
|
.rel.dyn : {
|
|
|
|
*(.rel.dyn*)
|
|
|
|
}
|
|
|
|
|
|
|
|
_end = .;
|
|
|
|
|
|
|
|
STABS_DEBUG
|
|
|
|
DWARF_DEBUG
|
|
|
|
|
|
|
|
DISCARDS
|
|
|
|
}
|