1 /* SPDX-License-Identifier: GPL-2.0 */ !! 1 /* ld script to make UltraLinux kernel */ 2 #include <linux/sizes.h> << 3 #include <asm/asm-offsets.h> << 4 #include <asm/thread_info.h> << 5 #include <asm/orc_lookup.h> << 6 << 7 #define PAGE_SIZE _PAGE_SIZE << 8 #define RO_EXCEPTION_TABLE_ALIGN 4 << 9 #define PHYSADDR_MASK 0xffff << 10 << 11 /* << 12 * Put .bss..swapper_pg_dir as the first thing << 13 * ensure that it has .bss alignment (64K). << 14 */ << 15 #define BSS_FIRST_SECTIONS *(.bss..swapper_pg_ << 16 2 17 #include <asm-generic/vmlinux.lds.h> 3 #include <asm-generic/vmlinux.lds.h> 18 #include "image-vars.h" << 19 4 20 /* !! 5 OUTPUT_FORMAT("elf64-sparc", "elf64-sparc", "elf64-sparc") 21 * Max avaliable Page Size is 64K, so we set S !! 6 OUTPUT_ARCH(sparc:v9a) 22 * field of EFI application to 64K. !! 7 ENTRY(_start) 23 */ << 24 PECOFF_FILE_ALIGN = 0x200; << 25 PECOFF_SEGMENT_ALIGN = 0x10000; << 26 << 27 OUTPUT_ARCH(loongarch) << 28 ENTRY(kernel_entry) << 29 PHDRS { << 30 text PT_LOAD FLAGS(7); /* RWX */ << 31 note PT_NOTE FLAGS(4); /* R__ */ << 32 } << 33 << 34 jiffies = jiffies_64; << 35 8 >> 9 jiffies = jiffies_64; 36 SECTIONS 10 SECTIONS 37 { 11 { 38 . = VMLINUX_LOAD_ADDRESS; !! 12 swapper_pmd_dir = 0x0000000000402000; 39 !! 13 empty_pg_dir = 0x0000000000403000; 40 _text = .; !! 14 . = 0x4000; 41 HEAD_TEXT_SECTION !! 15 .text 0x0000000000404000 : 42 !! 16 { 43 . = ALIGN(PECOFF_SEGMENT_ALIGN); !! 17 *(.text) 44 _stext = .; !! 18 *(.gnu.warning) 45 .text : { !! 19 } =0 46 TEXT_TEXT !! 20 _etext = .; 47 SCHED_TEXT !! 21 PROVIDE (etext = .); 48 LOCK_TEXT !! 22 49 KPROBES_TEXT !! 23 RODATA 50 IRQENTRY_TEXT !! 24 51 SOFTIRQENTRY_TEXT !! 25 .data : 52 *(.fixup) !! 26 { 53 *(.gnu.warning) !! 27 *(.data) 54 } :text = 0 !! 28 CONSTRUCTORS 55 . = ALIGN(PECOFF_SEGMENT_ALIGN); !! 29 } 56 _etext = .; !! 30 .data1 : { *(.data1) } 57 !! 31 . = ALIGN(64); 58 . = ALIGN(PECOFF_SEGMENT_ALIGN); !! 32 .data.cacheline_aligned : { *(.data.cacheline_aligned) } 59 __init_begin = .; !! 33 _edata = .; 60 __inittext_begin = .; !! 34 PROVIDE (edata = .); 61 !! 35 .fixup : { *(.fixup) } 62 INIT_TEXT_SECTION(PAGE_SIZE) !! 36 63 .exit.text : { !! 37 . = ALIGN(16); 64 EXIT_TEXT !! 38 __start___ex_table = .; 65 } !! 39 __ex_table : { *(__ex_table) } 66 !! 40 __stop___ex_table = .; 67 . = ALIGN(PECOFF_SEGMENT_ALIGN); !! 41 68 __inittext_end = .; !! 42 . = ALIGN(8192); 69 !! 43 __init_begin = .; 70 __initdata_begin = .; !! 44 .init.text : { 71 !! 45 _sinittext = .; 72 /* !! 46 *(.init.text) 73 * struct alt_inst entries. From the h !! 47 _einittext = .; 74 * "Alternative instructions for diffe !! 48 } 75 * Think locking instructions on spinl !! 49 .init.data : { *(.init.data) } 76 */ !! 50 . = ALIGN(16); 77 . = ALIGN(4); !! 51 __setup_start = .; 78 .altinstructions : AT(ADDR(.altinstruc !! 52 .init.setup : { *(.init.setup) } 79 __alt_instructions = .; !! 53 __setup_end = .; 80 *(.altinstructions) !! 54 __start___param = .; 81 __alt_instructions_end = .; !! 55 __param : { *(__param) } 82 } !! 56 __stop___param = .; 83 !! 57 __initcall_start = .; 84 INIT_DATA_SECTION(16) !! 58 .initcall.init : { 85 .exit.data : { !! 59 *(.initcall1.init) 86 EXIT_DATA !! 60 *(.initcall2.init) 87 } !! 61 *(.initcall3.init) 88 !! 62 *(.initcall4.init) 89 #ifdef CONFIG_SMP !! 63 *(.initcall5.init) 90 PERCPU_SECTION(1 << CONFIG_L1_CACHE_SH !! 64 *(.initcall6.init) 91 #endif !! 65 *(.initcall7.init) 92 !! 66 } 93 .init.bss : { !! 67 __initcall_end = .; 94 *(.init.bss) !! 68 __con_initcall_start = .; 95 } !! 69 .con_initcall.init : { *(.con_initcall.init) } 96 . = ALIGN(PECOFF_SEGMENT_ALIGN); !! 70 __con_initcall_end = .; 97 __initdata_end = .; !! 71 SECURITY_INIT 98 !! 72 . = ALIGN(8192); 99 __init_end = .; !! 73 __initramfs_start = .; 100 !! 74 .init.ramfs : { *(.init.ramfs) } 101 _sdata = .; !! 75 __initramfs_end = .; 102 RO_DATA(4096) !! 76 . = ALIGN(32); 103 !! 77 __per_cpu_start = .; 104 .got : ALIGN(16) { *(.got) } !! 78 .data.percpu : { *(.data.percpu) } 105 .plt : ALIGN(16) { *(.plt) } !! 79 __per_cpu_end = .; 106 .got.plt : ALIGN(16) { *(.got.plt) } !! 80 . = ALIGN(8192); 107 !! 81 __init_end = .; 108 RW_DATA(1 << CONFIG_L1_CACHE_SHIFT, PA !! 82 __bss_start = .; 109 !! 83 .sbss : { *(.sbss) *(.scommon) } 110 .rela.dyn : ALIGN(8) { !! 84 .bss : 111 __rela_dyn_begin = .; !! 85 { 112 *(.rela.dyn) *(.rela*) !! 86 *(.dynbss) 113 __rela_dyn_end = .; !! 87 *(.bss) 114 } !! 88 *(COMMON) 115 !! 89 } 116 #ifdef CONFIG_RELR !! 90 _end = . ; 117 .relr.dyn : ALIGN(8) { !! 91 PROVIDE (end = .); 118 __relr_dyn_begin = .; !! 92 /* Stabs debugging sections. */ 119 *(.relr.dyn) !! 93 .stab 0 : { *(.stab) } 120 __relr_dyn_end = .; !! 94 .stabstr 0 : { *(.stabstr) } 121 } !! 95 .stab.excl 0 : { *(.stab.excl) } 122 #endif !! 96 .stab.exclstr 0 : { *(.stab.exclstr) } 123 !! 97 .stab.index 0 : { *(.stab.index) } 124 .data.rel : { *(.data.rel*) } !! 98 .stab.indexstr 0 : { *(.stab.indexstr) } 125 !! 99 .comment 0 : { *(.comment) } 126 #ifdef CONFIG_RELOCATABLE !! 100 .debug 0 : { *(.debug) } 127 . = ALIGN(8); !! 101 .debug_srcinfo 0 : { *(.debug_srcinfo) } 128 .la_abs : AT(ADDR(.la_abs) - LOAD_OFFS !! 102 .debug_aranges 0 : { *(.debug_aranges) } 129 __la_abs_begin = .; !! 103 .debug_pubnames 0 : { *(.debug_pubnames) } 130 *(.la_abs) !! 104 .debug_sfnames 0 : { *(.debug_sfnames) } 131 __la_abs_end = .; !! 105 .line 0 : { *(.line) } 132 } !! 106 /DISCARD/ : { *(.exit.text) *(.exit.data) *(.exitcall.exit) } 133 #endif << 134 << 135 ORC_UNWIND_TABLE << 136 << 137 .sdata : { << 138 *(.sdata) << 139 } << 140 .edata_padding : { BYTE(0); . = ALIGN( << 141 _edata = .; << 142 << 143 BSS_SECTION(0, SZ_64K, 8) << 144 . = ALIGN(PECOFF_SEGMENT_ALIGN); << 145 << 146 _end = .; << 147 << 148 STABS_DEBUG << 149 DWARF_DEBUG << 150 ELF_DETAILS << 151 << 152 #ifdef CONFIG_EFI_STUB << 153 /* header symbols */ << 154 _kernel_entry = ABSOLUTE(kernel_entry << 155 _kernel_asize = ABSOLUTE(_end - _text) << 156 _kernel_fsize = ABSOLUTE(_edata - _tex << 157 _kernel_vsize = ABSOLUTE(_end - __init << 158 _kernel_rsize = ABSOLUTE(_edata - __in << 159 #endif << 160 << 161 .gptab.sdata : { << 162 *(.gptab.data) << 163 *(.gptab.sdata) << 164 } << 165 .gptab.sbss : { << 166 *(.gptab.bss) << 167 *(.gptab.sbss) << 168 } << 169 << 170 DISCARDS << 171 /DISCARD/ : { << 172 *(.dynamic .dynsym .dynstr .ha << 173 *(.gnu.attributes) << 174 *(.options) << 175 *(.eh_frame) << 176 } << 177 } 107 }
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.