1 /* SPDX-License-Identifier: GPL-2.0 */ !! 1 #include <asm/asm-offsets.h> 2 << 3 #include <asm/vmlinux.lds.h> << 4 #include <asm/page.h> 2 #include <asm/page.h> 5 #include <asm/memory.h> !! 3 #include <asm/thread_info.h> 6 !! 4 #include <asm-generic/vmlinux.lds.h> 7 OUTPUT_ARCH(csky) << 8 ENTRY(_start) << 9 5 10 #ifndef __cskyBE__ !! 6 #undef mips 11 jiffies = jiffies_64; !! 7 #define mips mips >> 8 OUTPUT_ARCH(mips) >> 9 ENTRY(kernel_entry) >> 10 PHDRS { >> 11 text PT_LOAD FLAGS(7); /* RWX */ >> 12 note PT_NOTE FLAGS(4); /* R__ */ >> 13 } >> 14 >> 15 #ifdef CONFIG_32BIT >> 16 #ifdef CONFIG_CPU_LITTLE_ENDIAN >> 17 jiffies = jiffies_64; >> 18 #else >> 19 jiffies = jiffies_64 + 4; >> 20 #endif 12 #else 21 #else 13 jiffies = jiffies_64 + 4; !! 22 jiffies = jiffies_64; 14 #endif 23 #endif 15 24 16 #define VBR_BASE \ << 17 . = ALIGN(1024); \ << 18 vec_base = .; \ << 19 . += 512; << 20 << 21 SECTIONS 25 SECTIONS 22 { 26 { 23 . = PAGE_OFFSET + PHYS_OFFSET_OFFSET; !! 27 #ifdef CONFIG_BOOT_ELF64 24 !! 28 /* Read-only sections, merged into text segment: */ 25 _start = .; !! 29 /* . = 0xc000000000000000; */ 26 HEAD_TEXT_SECTION !! 30 27 . = ALIGN(PAGE_SIZE); !! 31 /* This is the value for an Origin kernel, taken from an IRIX kernel. */ >> 32 /* . = 0xc00000000001c000; */ >> 33 >> 34 /* Set the vaddr for the text segment to a value >> 35 * >= 0xa800 0000 0001 9000 if no symmon is going to configured >> 36 * >= 0xa800 0000 0030 0000 otherwise >> 37 */ 28 38 29 .text : AT(ADDR(.text) - LOAD_OFFSET) !! 39 /* . = 0xa800000000300000; */ 30 _text = .; !! 40 . = 0xffffffff80300000; 31 _stext = .; !! 41 #endif 32 VBR_BASE !! 42 . = VMLINUX_LOAD_ADDRESS; 33 IRQENTRY_TEXT !! 43 /* read-only */ 34 SOFTIRQENTRY_TEXT !! 44 _text = .; /* Text and read-only data */ >> 45 .text : { 35 TEXT_TEXT 46 TEXT_TEXT 36 SCHED_TEXT 47 SCHED_TEXT 37 LOCK_TEXT 48 LOCK_TEXT 38 KPROBES_TEXT 49 KPROBES_TEXT >> 50 *(.text.*) 39 *(.fixup) 51 *(.fixup) 40 *(.gnu.warning) 52 *(.gnu.warning) 41 } = 0 !! 53 } :text = 0 42 _etext = .; !! 54 _etext = .; /* End of text section */ 43 55 44 /* __init_begin __init_end must be pag !! 56 EXCEPTION_TABLE(16) 45 . = ALIGN(PAGE_SIZE); << 46 __init_begin = .; << 47 INIT_TEXT_SECTION(PAGE_SIZE) << 48 INIT_DATA_SECTION(PAGE_SIZE) << 49 PERCPU_SECTION(L1_CACHE_BYTES) << 50 . = ALIGN(PAGE_SIZE); << 51 __init_end = .; << 52 57 53 _sdata = .; !! 58 /* Exception table for data bus errors */ 54 RO_DATA(PAGE_SIZE) !! 59 __dbe_table : { 55 RW_DATA(L1_CACHE_BYTES, PAGE_SIZE, THR !! 60 __start___dbe_table = .; 56 _edata = .; !! 61 *(__dbe_table) 57 !! 62 __stop___dbe_table = .; 58 #ifdef CONFIG_HAVE_TCM << 59 .tcm_start : { << 60 . = ALIGN(PAGE_SIZE); << 61 __tcm_start = .; << 62 } << 63 << 64 .text_data_tcm FIXADDR_TCM : AT(__tcm_ << 65 { << 66 . = ALIGN(4); << 67 __stcm_text_data = .; << 68 *(.tcm.text) << 69 *(.tcm.rodata) << 70 #ifndef CONFIG_HAVE_DTCM << 71 *(.tcm.data) << 72 #endif << 73 . = ALIGN(4); << 74 __etcm_text_data = .; << 75 } 63 } 76 64 77 . = ADDR(.tcm_start) + SIZEOF(.tcm_sta !! 65 NOTES :text :note >> 66 .dummy : { *(.dummy) } :text 78 67 79 #ifdef CONFIG_HAVE_DTCM !! 68 RODATA 80 #define ITCM_SIZE CONFIG_ITCM_NR << 81 69 82 .dtcm_start : { !! 70 /* writeable */ 83 __dtcm_start = .; !! 71 .data : { /* Data */ >> 72 . = . + DATAOFFSET; /* for CONFIG_MAPPED_KERNEL */ >> 73 >> 74 INIT_TASK_DATA(THREAD_SIZE) >> 75 NOSAVE_DATA >> 76 CACHELINE_ALIGNED_DATA(1 << CONFIG_MIPS_L1_CACHE_SHIFT) >> 77 DATA_DATA >> 78 CONSTRUCTORS 84 } 79 } 85 !! 80 _gp = . + 0x8000; 86 .data_tcm FIXADDR_TCM + ITCM_SIZE : AT !! 81 .lit8 : { 87 { !! 82 *(.lit8) 88 . = ALIGN(4); << 89 __stcm_data = .; << 90 *(.tcm.data) << 91 . = ALIGN(4); << 92 __etcm_data = .; << 93 } 83 } >> 84 .lit4 : { >> 85 *(.lit4) >> 86 } >> 87 /* We want the small data sections together, so single-instruction offsets >> 88 can access them all, and initialized data all before uninitialized, so >> 89 we can shorten the on-disk segment size. */ >> 90 .sdata : { >> 91 *(.sdata) >> 92 } >> 93 _edata = .; /* End of data section */ 94 94 95 . = ADDR(.dtcm_start) + SIZEOF(.data_t !! 95 /* will be freed after init */ >> 96 . = ALIGN(PAGE_SIZE); /* Init code and data */ >> 97 __init_begin = .; >> 98 INIT_TEXT_SECTION(PAGE_SIZE) >> 99 INIT_DATA_SECTION(16) 96 100 97 .tcm_end : AT(ADDR(.dtcm_start) + SIZE !! 101 /* .exit.text is discarded at runtime, not link time, to deal with 98 #else !! 102 * references from .rodata 99 .tcm_end : AT(ADDR(.tcm_start) + SIZEO !! 103 */ 100 #endif !! 104 .exit.text : { 101 . = ALIGN(PAGE_SIZE); !! 105 EXIT_TEXT 102 __tcm_end = .; !! 106 } >> 107 .exit.data : { >> 108 EXIT_DATA 103 } 109 } 104 #endif << 105 110 106 EXCEPTION_TABLE(L1_CACHE_BYTES) !! 111 PERCPU(PAGE_SIZE) 107 BSS_SECTION(L1_CACHE_BYTES, PAGE_SIZE, !! 112 . = ALIGN(PAGE_SIZE); >> 113 __init_end = .; >> 114 /* freed after init ends here */ >> 115 >> 116 BSS_SECTION(0, 0, 0) >> 117 108 _end = . ; 118 _end = . ; 109 119 >> 120 /* These mark the ABI of the kernel for debuggers. */ >> 121 .mdebug.abi32 : { >> 122 KEEP(*(.mdebug.abi32)) >> 123 } >> 124 .mdebug.abi64 : { >> 125 KEEP(*(.mdebug.abi64)) >> 126 } >> 127 >> 128 /* This is the MIPS specific mdebug section. */ >> 129 .mdebug : { >> 130 *(.mdebug) >> 131 } >> 132 110 STABS_DEBUG 133 STABS_DEBUG 111 DWARF_DEBUG 134 DWARF_DEBUG 112 ELF_DETAILS << 113 135 >> 136 /* These must appear regardless of . */ >> 137 .gptab.sdata : { >> 138 *(.gptab.data) >> 139 *(.gptab.sdata) >> 140 } >> 141 .gptab.sbss : { >> 142 *(.gptab.bss) >> 143 *(.gptab.sbss) >> 144 } >> 145 >> 146 /* Sections to be discarded */ 114 DISCARDS 147 DISCARDS >> 148 /DISCARD/ : { >> 149 /* ABI crap starts here */ >> 150 *(.MIPS.options) >> 151 *(.options) >> 152 *(.pdr) >> 153 *(.reginfo) >> 154 } 115 } 155 }
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.