1/* MN10300 Main kernel linker script 2 * 3 * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved. 4 * Written by David Howells (dhowells@redhat.com) 5 * 6 * This program is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU General Public Licence 8 * as published by the Free Software Foundation; either version 9 * 2 of the Licence, or (at your option) any later version. 10 */ 11#define __VMLINUX_LDS__ 12#include <asm-generic/vmlinux.lds.h> 13#include <asm/thread_info.h> 14 15OUTPUT_FORMAT("elf32-am33lin", "elf32-am33lin", "elf32-am33lin") 16OUTPUT_ARCH(mn10300) 17ENTRY(_start) 18jiffies = jiffies_64; 19#ifndef CONFIG_MN10300_CURRENT_IN_E2 20current = __current; 21#endif 22SECTIONS 23{ 24 . = CONFIG_KERNEL_TEXT_ADDRESS; 25 /* read-only */ 26 _stext = .; 27 _text = .; /* Text and read-only data */ 28 .text : { 29 *( 30 .text.head 31 .text 32 ) 33 TEXT_TEXT 34 SCHED_TEXT 35 LOCK_TEXT 36 KPROBES_TEXT 37 *(.fixup) 38 *(.gnu.warning) 39 } = 0xcb 40 41 _etext = .; /* End of text section */ 42 43 . = ALIGN(16); /* Exception table */ 44 __start___ex_table = .; 45 __ex_table : { *(__ex_table) } 46 __stop___ex_table = .; 47 48 BUG_TABLE 49 50 RODATA 51 52 /* writeable */ 53 .data : { /* Data */ 54 DATA_DATA 55 CONSTRUCTORS 56 } 57 58 . = ALIGN(4096); 59 __nosave_begin = .; 60 .data_nosave : { *(.data.nosave) } 61 . = ALIGN(4096); 62 __nosave_end = .; 63 64 . = ALIGN(4096); 65 .data.page_aligned : { *(.data.idt) } 66 67 . = ALIGN(32); 68 .data.cacheline_aligned : { *(.data.cacheline_aligned) } 69 70 /* rarely changed data like cpu maps */ 71 . = ALIGN(32); 72 .data.read_mostly : AT(ADDR(.data.read_mostly)) { 73 *(.data.read_mostly) 74 _edata = .; /* End of data section */ 75 } 76 77 . = ALIGN(THREAD_SIZE); /* init_task */ 78 .data.init_task : { *(.data.init_task) } 79 80 /* might get freed after init */ 81 . = ALIGN(4096); 82 .smp_locks : AT(ADDR(.smp_locks) - LOAD_OFFSET) { 83 __smp_locks = .; 84 *(.smp_locks) 85 __smp_locks_end = .; 86 } 87 88 /* will be freed after init */ 89 . = ALIGN(4096); /* Init code and data */ 90 __init_begin = .; 91 .init.text : { 92 _sinittext = .; 93 *(.init.text) 94 _einittext = .; 95 } 96 .init.data : { *(.init.data) } 97 . = ALIGN(16); 98 __setup_start = .; 99 .setup.init : { KEEP(*(.init.setup)) } 100 __setup_end = .; 101 102 __initcall_start = .; 103 .initcall.init : { 104 INITCALLS 105 } 106 __initcall_end = .; 107 __con_initcall_start = .; 108 .con_initcall.init : { *(.con_initcall.init) } 109 __con_initcall_end = .; 110 111 SECURITY_INIT 112 . = ALIGN(4); 113 __alt_instructions = .; 114 .altinstructions : { *(.altinstructions) } 115 __alt_instructions_end = .; 116 .altinstr_replacement : { *(.altinstr_replacement) } 117 /* .exit.text is discard at runtime, not link time, to deal with references 118 from .altinstructions and .eh_frame */ 119 .exit.text : { *(.exit.text) } 120 .exit.data : { *(.exit.data) } 121 122#ifdef CONFIG_BLK_DEV_INITRD 123 . = ALIGN(4096); 124 __initramfs_start = .; 125 .init.ramfs : { *(.init.ramfs) } 126 __initramfs_end = .; 127#endif 128 129 . = ALIGN(32); 130 __per_cpu_start = .; 131 .data.percpu : { *(.data.percpu) } 132 __per_cpu_end = .; 133 . = ALIGN(4096); 134 __init_end = .; 135 /* freed after init ends here */ 136 137 __bss_start = .; /* BSS */ 138 .bss : { 139 *(.bss.page_aligned) 140 *(.bss) 141 } 142 . = ALIGN(4); 143 __bss_stop = .; 144 145 _end = . ; 146 147 /* This is where the kernel creates the early boot page tables */ 148 . = ALIGN(4096); 149 pg0 = .; 150 151 /* Sections to be discarded */ 152 /DISCARD/ : { 153 *(.exitcall.exit) 154 } 155 156 STABS_DEBUG 157 158 DWARF_DEBUG 159} 160

