1// SPDX-License-Identifier: GPL-2.0 2// Copyright (C) 2005-2017 Andes Technology Corporation 3 4#include <asm/page.h> 5#include <asm/thread_info.h> 6#include <asm/cache.h> 7#include <asm/memory.h> 8 9#define LOAD_OFFSET (PAGE_OFFSET - PHYS_OFFSET) 10#include <asm-generic/vmlinux.lds.h> 11 12OUTPUT_ARCH(nds32) 13ENTRY(_stext_lma) 14jiffies = jiffies_64; 15 16#if defined(CONFIG_GCOV_KERNEL) 17#define NDS32_EXIT_KEEP(x) x 18#else 19#define NDS32_EXIT_KEEP(x) 20#endif 21 22SECTIONS 23{ 24 _stext_lma = TEXTADDR - LOAD_OFFSET; 25 . = TEXTADDR; 26 __init_begin = .; 27 HEAD_TEXT_SECTION 28 .exit.text : { 29 NDS32_EXIT_KEEP(EXIT_TEXT) 30 } 31 INIT_TEXT_SECTION(PAGE_SIZE) 32 INIT_DATA_SECTION(16) 33 .exit.data : { 34 NDS32_EXIT_KEEP(EXIT_DATA) 35 } 36 PERCPU_SECTION(L1_CACHE_BYTES) 37 __init_end = .; 38 39 . = ALIGN(PAGE_SIZE); 40 _stext = .; 41 /* Real text segment */ 42 .text : AT(ADDR(.text) - LOAD_OFFSET) { 43 _text = .; /* Text and read-only data */ 44 TEXT_TEXT 45 SCHED_TEXT 46 CPUIDLE_TEXT 47 LOCK_TEXT 48 KPROBES_TEXT 49 IRQENTRY_TEXT 50 SOFTIRQENTRY_TEXT 51 *(.fixup) 52 } 53 54 _etext = .; /* End of text and rodata section */ 55 56 _sdata = .; 57 RO_DATA(PAGE_SIZE) 58 RW_DATA(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE) 59 _edata = .; 60 61 EXCEPTION_TABLE(16) 62 BSS_SECTION(4, 4, 4) 63 _end = .; 64 65 STABS_DEBUG 66 DWARF_DEBUG 67 ELF_DETAILS 68 69 DISCARDS 70} 71