1 /* SPDX-License-Identifier: GPL-2.0 */ !! 1 #include <asm-generic/vmlinux.lds.h> 2 /* << 3 * ld script to make SuperH Linux kernel << 4 * Written by Niibe Yutaka and Paul Mundt << 5 */ << 6 OUTPUT_ARCH(sh) << 7 #define RUNTIME_DISCARD_EXIT << 8 #include <asm/thread_info.h> << 9 #include <asm/cache.h> << 10 #include <asm/vmlinux.lds.h> << 11 << 12 #ifdef CONFIG_PMB << 13 #define MEMORY_OFFSET 0 << 14 #else << 15 #define MEMORY_OFFSET __MEMORY_START << 16 #endif << 17 2 18 ENTRY(_start) !! 3 OUTPUT_ARCH(powerpc) >> 4 jiffies = jiffies_64 + 4; 19 SECTIONS 5 SECTIONS 20 { 6 { 21 . = PAGE_OFFSET + MEMORY_OFFSET + PHYS !! 7 /* Read-only sections, merged into text segment: */ 22 !! 8 . = + SIZEOF_HEADERS; 23 _text = .; /* Text and re !! 9 .interp : { *(.interp) } 24 !! 10 .hash : { *(.hash) } 25 .empty_zero_page : AT(ADDR(.empty_zero !! 11 .dynsym : { *(.dynsym) } 26 *(.empty_zero_page) !! 12 .dynstr : { *(.dynstr) } 27 } = 0 !! 13 .rel.text : { *(.rel.text) } 28 !! 14 .rela.text : { *(.rela.text) } 29 .text : AT(ADDR(.text)) { !! 15 .rel.data : { *(.rel.data) } 30 HEAD_TEXT !! 16 .rela.data : { *(.rela.data) } 31 TEXT_TEXT !! 17 .rel.rodata : { *(.rel.rodata) } 32 SCHED_TEXT !! 18 .rela.rodata : { *(.rela.rodata) } 33 LOCK_TEXT !! 19 .rel.got : { *(.rel.got) } 34 KPROBES_TEXT !! 20 .rela.got : { *(.rela.got) } 35 IRQENTRY_TEXT !! 21 .rel.ctors : { *(.rel.ctors) } 36 SOFTIRQENTRY_TEXT !! 22 .rela.ctors : { *(.rela.ctors) } 37 *(.fixup) !! 23 .rel.dtors : { *(.rel.dtors) } 38 *(.gnu.warning) !! 24 .rela.dtors : { *(.rela.dtors) } 39 _etext = .; /* End !! 25 .rel.bss : { *(.rel.bss) } 40 } = 0x0009 !! 26 .rela.bss : { *(.rela.bss) } 41 !! 27 .rel.plt : { *(.rel.plt) } 42 EXCEPTION_TABLE(16) !! 28 .rela.plt : { *(.rela.plt) } 43 !! 29 /* .init : { *(.init) } =0*/ 44 _sdata = .; !! 30 .plt : { *(.plt) } 45 RO_DATA(PAGE_SIZE) !! 31 .text : 46 RW_DATA(L1_CACHE_BYTES, PAGE_SIZE, THR !! 32 { 47 _edata = .; !! 33 *(.text) 48 !! 34 *(.fixup) 49 DWARF_EH_FRAME !! 35 *(.got1) 50 !! 36 __got2_start = .; 51 . = ALIGN(PAGE_SIZE); /* Ini !! 37 *(.got2) 52 __init_begin = .; !! 38 __got2_end = .; 53 INIT_TEXT_SECTION(PAGE_SIZE) !! 39 } 54 INIT_DATA_SECTION(16) !! 40 _etext = .; 55 !! 41 PROVIDE (etext = .); 56 . = ALIGN(4); !! 42 57 .machvec.init : AT(ADDR(.machvec.init) !! 43 RODATA 58 __machvec_start = .; !! 44 .fini : { *(.fini) } =0 59 *(.machvec.init) !! 45 .ctors : { *(.ctors) } 60 __machvec_end = .; !! 46 .dtors : { *(.dtors) } >> 47 >> 48 .fixup : { *(.fixup) } >> 49 >> 50 __ex_table : { >> 51 __start___ex_table = .; >> 52 *(__ex_table) >> 53 __stop___ex_table = .; 61 } 54 } 62 55 63 PERCPU_SECTION(L1_CACHE_BYTES) !! 56 __bug_table : { 64 !! 57 __start___bug_table = .; 65 /* !! 58 *(__bug_table) 66 * .exit.text is discarded at runtime, !! 59 __stop___bug_table = .; 67 * references from __bug_table !! 60 } 68 */ << 69 .exit.text : AT(ADDR(.exit.text)) { EX << 70 .exit.data : AT(ADDR(.exit.data)) { EX << 71 << 72 . = ALIGN(PAGE_SIZE); << 73 __init_end = .; << 74 BSS_SECTION(0, PAGE_SIZE, 4) << 75 _end = . ; << 76 << 77 STABS_DEBUG << 78 DWARF_DEBUG << 79 ELF_DETAILS << 80 61 81 DISCARDS !! 62 /* Read-write section, merged into data segment: */ >> 63 . = ALIGN(4096); >> 64 .data : >> 65 { >> 66 *(.data) >> 67 *(.data1) >> 68 *(.sdata) >> 69 *(.sdata2) >> 70 *(.got.plt) *(.got) >> 71 *(.dynamic) >> 72 CONSTRUCTORS >> 73 } >> 74 >> 75 . = ALIGN(32); >> 76 .data.cacheline_aligned : { *(.data.cacheline_aligned) } >> 77 >> 78 _edata = .; >> 79 PROVIDE (edata = .); >> 80 >> 81 . = ALIGN(8192); >> 82 .data.init_task : { *(.data.init_task) } >> 83 >> 84 . = ALIGN(4096); >> 85 __init_begin = .; >> 86 .init.text : { >> 87 _sinittext = .; >> 88 *(.init.text) >> 89 _einittext = .; >> 90 } >> 91 .init.data : { >> 92 *(.init.data); >> 93 __vtop_table_begin = .; >> 94 *(.vtop_fixup); >> 95 __vtop_table_end = .; >> 96 __ptov_table_begin = .; >> 97 *(.ptov_fixup); >> 98 __ptov_table_end = .; >> 99 } >> 100 . = ALIGN(16); >> 101 __setup_start = .; >> 102 .init.setup : { *(.init.setup) } >> 103 __setup_end = .; >> 104 __start___param = .; >> 105 __param : { *(__param) } >> 106 __stop___param = .; >> 107 __initcall_start = .; >> 108 .initcall.init : { >> 109 *(.initcall1.init) >> 110 *(.initcall2.init) >> 111 *(.initcall3.init) >> 112 *(.initcall4.init) >> 113 *(.initcall5.init) >> 114 *(.initcall6.init) >> 115 *(.initcall7.init) >> 116 } >> 117 __initcall_end = .; >> 118 >> 119 __con_initcall_start = .; >> 120 .con_initcall.init : { *(.con_initcall.init) } >> 121 __con_initcall_end = .; >> 122 >> 123 SECURITY_INIT >> 124 >> 125 __start___ftr_fixup = .; >> 126 __ftr_fixup : { *(__ftr_fixup) } >> 127 __stop___ftr_fixup = .; >> 128 >> 129 . = ALIGN(32); >> 130 __per_cpu_start = .; >> 131 .data.percpu : { *(.data.percpu) } >> 132 __per_cpu_end = .; >> 133 >> 134 . = ALIGN(4096); >> 135 __initramfs_start = .; >> 136 .init.ramfs : { *(.init.ramfs) } >> 137 __initramfs_end = .; >> 138 >> 139 . = ALIGN(4096); >> 140 __init_end = .; >> 141 >> 142 . = ALIGN(4096); >> 143 __pmac_begin = .; >> 144 .pmac.text : { *(.pmac.text) } >> 145 .pmac.data : { *(.pmac.data) } >> 146 . = ALIGN(4096); >> 147 __pmac_end = .; >> 148 >> 149 . = ALIGN(4096); >> 150 __prep_begin = .; >> 151 .prep.text : { *(.prep.text) } >> 152 .prep.data : { *(.prep.data) } >> 153 . = ALIGN(4096); >> 154 __prep_end = .; >> 155 >> 156 . = ALIGN(4096); >> 157 __chrp_begin = .; >> 158 .chrp.text : { *(.chrp.text) } >> 159 .chrp.data : { *(.chrp.data) } >> 160 . = ALIGN(4096); >> 161 __chrp_end = .; >> 162 >> 163 . = ALIGN(4096); >> 164 __openfirmware_begin = .; >> 165 .openfirmware.text : { *(.openfirmware.text) } >> 166 .openfirmware.data : { *(.openfirmware.data) } >> 167 . = ALIGN(4096); >> 168 __openfirmware_end = .; >> 169 >> 170 __bss_start = .; >> 171 .bss : >> 172 { >> 173 *(.sbss) *(.scommon) >> 174 *(.dynbss) >> 175 *(.bss) >> 176 *(COMMON) >> 177 } >> 178 __bss_stop = .; >> 179 >> 180 _end = . ; >> 181 PROVIDE (end = .); >> 182 >> 183 /* Sections to be discarded. */ >> 184 /DISCARD/ : { >> 185 *(.exitcall.exit) >> 186 } 82 } 187 }
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.