1 /* SPDX-License-Identifier: GPL-2.0-only */ << 2 /* << 3 * Linker script for Hexagon kernel << 4 * << 5 * Copyright (c) 2010-2014, The Linux Foundati << 6 */ << 7 << 8 #include <asm-generic/vmlinux.lds.h> 1 #include <asm-generic/vmlinux.lds.h> 9 #include <asm/asm-offsets.h> /* Most of th << 10 #include <asm/mem-layout.h> /* except for << 11 #include <asm/cache.h> /* and now we << 12 #include <asm/thread_info.h> /* and we nee << 13 << 14 OUTPUT_ARCH(hexagon) << 15 ENTRY(stext) << 16 << 17 jiffies = jiffies_64; << 18 << 19 /* << 20 See asm-generic/vmlinux.lds.h for expansion of << 21 See asm-generic/sections.h for seemingly requi << 22 */ << 23 << 24 #define PAGE_SIZE _PAGE_SIZE << 25 2 >> 3 #undef mips /* CPP really sucks for this job */ >> 4 #define mips mips >> 5 OUTPUT_ARCH(mips) >> 6 ENTRY(kernel_entry) >> 7 jiffies = JIFFIES; 26 SECTIONS 8 SECTIONS 27 { 9 { 28 . = PAGE_OFFSET; !! 10 #ifdef CONFIG_BOOT_ELF64 29 !! 11 /* Read-only sections, merged into text segment: */ 30 __init_begin = .; !! 12 /* . = 0xc000000000000000; */ 31 HEAD_TEXT_SECTION !! 13 32 INIT_TEXT_SECTION(PAGE_SIZE) !! 14 /* This is the value for an Origin kernel, taken from an IRIX kernel. */ 33 PERCPU_SECTION(L1_CACHE_BYTES) !! 15 /* . = 0xc00000000001c000; */ 34 __init_end = .; !! 16 35 !! 17 /* Set the vaddr for the text segment to a value 36 . = ALIGN(_PAGE_SIZE); !! 18 >= 0xa800 0000 0001 9000 if no symmon is going to configured 37 _stext = .; !! 19 >= 0xa800 0000 0030 0000 otherwise */ 38 .text : AT(ADDR(.text)) { !! 20 39 _text = .; !! 21 /* . = 0xa800000000300000; */ 40 TEXT_TEXT !! 22 /* . = 0xa800000000300000; */ 41 IRQENTRY_TEXT !! 23 . = 0xffffffff80300000; 42 SOFTIRQENTRY_TEXT !! 24 #endif 43 SCHED_TEXT !! 25 . = LOADADDR; 44 LOCK_TEXT !! 26 /* read-only */ 45 KPROBES_TEXT !! 27 _text = .; /* Text and read-only data */ 46 *(.fixup) !! 28 .text : { 47 } !! 29 *(.text) 48 _etext = .; !! 30 *(.fixup) 49 !! 31 *(.gnu.warning) 50 INIT_DATA_SECTION(PAGE_SIZE) !! 32 } =0 51 !! 33 52 _sdata = .; !! 34 _etext = .; /* End of text section */ 53 RW_DATA(32,PAGE_SIZE,_THREAD_S !! 35 54 RO_DATA(PAGE_SIZE) !! 36 . = ALIGN(16); /* Exception table */ 55 _edata = .; !! 37 __start___ex_table = .; 56 !! 38 __ex_table : { *(__ex_table) } 57 EXCEPTION_TABLE(16) !! 39 __stop___ex_table = .; 58 !! 40 59 BSS_SECTION(_PAGE_SIZE, _PAGE_SIZE, _P !! 41 __start___dbe_table = .; /* Exception table for data bus errors */ 60 !! 42 __dbe_table : { *(__dbe_table) } 61 _end = .; !! 43 __stop___dbe_table = .; 62 !! 44 63 STABS_DEBUG !! 45 RODATA 64 DWARF_DEBUG !! 46 65 ELF_DETAILS !! 47 . = ALIGN(64); 66 .hexagon.attributes 0 : { *(.hexagon.a !! 48 67 !! 49 /* writeable */ 68 DISCARDS !! 50 .data : { /* Data */ >> 51 *(.data) >> 52 >> 53 /* Align the initial ramdisk image (INITRD) on page boundaries. */ >> 54 . = ALIGN(4096); >> 55 __rd_start = .; >> 56 *(.initrd) >> 57 . = ALIGN(4096); >> 58 __rd_end = .; >> 59 >> 60 CONSTRUCTORS >> 61 } >> 62 _gp = . + 0x8000; >> 63 .lit8 : { *(.lit8) } >> 64 .lit4 : { *(.lit4) } >> 65 /* We want the small data sections together, so single-instruction offsets >> 66 can access them all, and initialized data all before uninitialized, so >> 67 we can shorten the on-disk segment size. */ >> 68 .sdata : { *(.sdata) } >> 69 >> 70 . = ALIGN(4096); >> 71 __nosave_begin = .; >> 72 .data_nosave : { *(.data.nosave) } >> 73 . = ALIGN(4096); >> 74 __nosave_end = .; >> 75 >> 76 . = ALIGN(4096); >> 77 .data.page_aligned : { *(.data.idt) } >> 78 >> 79 . = ALIGN(32); >> 80 .data.cacheline_aligned : { *(.data.cacheline_aligned) } >> 81 >> 82 _edata = .; /* End of data section */ >> 83 >> 84 #ifdef CONFIG_MIPS32 >> 85 . = ALIGN(8192); /* init_task */ >> 86 #endif >> 87 #ifdef CONFIG_MIPS64 >> 88 . = ALIGN(16384); /* init_task */ >> 89 #endif >> 90 . = . + MAPPED_OFFSET; /* for CONFIG_MAPPED_KERNEL */ >> 91 .data.init_task : { *(.data.init_task) } >> 92 >> 93 /* will be freed after init */ >> 94 . = ALIGN(4096); /* Init code and data */ >> 95 __init_begin = .; >> 96 /* /DISCARD/ doesn't work for .reginfo */ >> 97 .reginfo : { *(.reginfo) } >> 98 .init.text : { >> 99 _sinittext = .; >> 100 *(.init.text) >> 101 _einittext = .; >> 102 } >> 103 .init.data : { *(.init.data) } >> 104 . = ALIGN(16); >> 105 __setup_start = .; >> 106 .init.setup : { *(.init.setup) } >> 107 __setup_end = .; >> 108 __start___param = .; >> 109 __param : { *(__param) } >> 110 __stop___param = .; >> 111 __initcall_start = .; >> 112 .initcall.init : { >> 113 *(.initcall1.init) >> 114 *(.initcall2.init) >> 115 *(.initcall3.init) >> 116 *(.initcall4.init) >> 117 *(.initcall5.init) >> 118 *(.initcall6.init) >> 119 *(.initcall7.init) >> 120 } >> 121 __initcall_end = .; >> 122 __con_initcall_start = .; >> 123 .con_initcall.init : { *(.con_initcall.init) } >> 124 __con_initcall_end = .; >> 125 SECURITY_INIT >> 126 . = ALIGN(4096); >> 127 __initramfs_start = .; >> 128 .init.ramfs : { *(.init.ramfs) } >> 129 __initramfs_end = .; >> 130 . = ALIGN(32); >> 131 __per_cpu_start = .; >> 132 .data.percpu : { *(.data.percpu) } >> 133 __per_cpu_end = .; >> 134 . = ALIGN(4096); >> 135 __init_end = .; >> 136 /* freed after init ends here */ >> 137 >> 138 __bss_start = .; /* BSS */ >> 139 .sbss : { >> 140 *(.sbss) >> 141 *(.scommon) >> 142 } >> 143 .bss : { >> 144 *(.bss) >> 145 *(COMMON) >> 146 } >> 147 __bss_stop = .; >> 148 >> 149 _end = . ; >> 150 >> 151 /* Sections to be discarded */ >> 152 /DISCARD/ : { >> 153 *(.exit.text) >> 154 *(.exit.data) >> 155 *(.exitcall.exit) >> 156 } >> 157 >> 158 /* This is the MIPS specific mdebug section. */ >> 159 .mdebug : { *(.mdebug) } >> 160 /* These are needed for ELF backends which have not yet been >> 161 converted to the new style linker. */ >> 162 .stab 0 : { *(.stab) } >> 163 .stabstr 0 : { *(.stabstr) } >> 164 /* DWARF debug sections. >> 165 Symbols in the .debug DWARF section are relative to the beginning of the >> 166 section so we begin .debug at 0. It's not clear yet what needs to happen >> 167 for the others. */ >> 168 .debug 0 : { *(.debug) } >> 169 .debug_srcinfo 0 : { *(.debug_srcinfo) } >> 170 .debug_aranges 0 : { *(.debug_aranges) } >> 171 .debug_pubnames 0 : { *(.debug_pubnames) } >> 172 .debug_sfnames 0 : { *(.debug_sfnames) } >> 173 .line 0 : { *(.line) } >> 174 /* These must appear regardless of . */ >> 175 .gptab.sdata : { *(.gptab.data) *(.gptab.sdata) } >> 176 .gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) } >> 177 .comment : { *(.comment) } >> 178 .note : { *(.note) } 69 } 179 }
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.