1/* 2 * vmlinux.lds.S -- master linker script for m68knommu arch 3 * 4 * (C) Copyright 2002-2006, Greg Ungerer <gerg@snapgear.com> 5 * 6 * This linker script is equiped to build either ROM loaded or RAM 7 * run kernels. 8 */ 9 10#include <asm-generic/vmlinux.lds.h> 11 12#if defined(CONFIG_RAMKERNEL) 13#define RAM_START CONFIG_KERNELBASE 14#define RAM_LENGTH (CONFIG_RAMBASE + CONFIG_RAMSIZE - CONFIG_KERNELBASE) 15#define TEXT ram 16#define DATA ram 17#define INIT ram 18#define BSS ram 19#endif 20#if defined(CONFIG_ROMKERNEL) || defined(CONFIG_HIMEMKERNEL) 21#define RAM_START CONFIG_RAMBASE 22#define RAM_LENGTH CONFIG_RAMSIZE 23#define ROMVEC_START CONFIG_ROMVEC 24#define ROMVEC_LENGTH CONFIG_ROMVECSIZE 25#define ROM_START CONFIG_ROMSTART 26#define ROM_LENGTH CONFIG_ROMSIZE 27#define TEXT rom 28#define DATA ram 29#define INIT ram 30#define BSS ram 31#endif 32 33#ifndef DATA_ADDR 34#define DATA_ADDR 35#endif 36 37 38OUTPUT_ARCH(m68k) 39ENTRY(_start) 40 41MEMORY { 42 ram : ORIGIN = RAM_START, LENGTH = RAM_LENGTH 43#ifdef ROM_START 44 romvec : ORIGIN = ROMVEC_START, LENGTH = ROMVEC_LENGTH 45 rom : ORIGIN = ROM_START, LENGTH = ROM_LENGTH 46#endif 47} 48 49jiffies = jiffies_64 + 4; 50 51SECTIONS { 52 53#ifdef ROMVEC_START 54 . = ROMVEC_START ; 55 .romvec : { 56 __rom_start = . ; 57 _romvec = .; 58 *(.data.initvect) 59 } > romvec 60#endif 61 62 .text : { 63 _text = .; 64 _stext = . ; 65 HEAD_TEXT 66 TEXT_TEXT 67 SCHED_TEXT 68 LOCK_TEXT 69 *(.text.lock) 70 71 . = ALIGN(16); /* Exception table */ 72 __start___ex_table = .; 73 *(__ex_table) 74 __stop___ex_table = .; 75 76 *(.rodata) *(.rodata.*) 77 *(__vermagic) /* Kernel version magic */ 78 *(__markers_strings) 79 *(.rodata1) 80 *(.rodata.str1.1) 81 82 /* Kernel symbol table: Normal symbols */ 83 . = ALIGN(4); 84 __start___ksymtab = .; 85 *(__ksymtab) 86 __stop___ksymtab = .; 87 88 /* Kernel symbol table: GPL-only symbols */ 89 __start___ksymtab_gpl = .; 90 *(__ksymtab_gpl) 91 __stop___ksymtab_gpl = .; 92 93 /* Kernel symbol table: Normal unused symbols */ 94 __start___ksymtab_unused = .; 95 *(__ksymtab_unused) 96 __stop___ksymtab_unused = .; 97 98 /* Kernel symbol table: GPL-only unused symbols */ 99 __start___ksymtab_unused_gpl = .; 100 *(__ksymtab_unused_gpl) 101 __stop___ksymtab_unused_gpl = .; 102 103 /* Kernel symbol table: GPL-future symbols */ 104 __start___ksymtab_gpl_future = .; 105 *(__ksymtab_gpl_future) 106 __stop___ksymtab_gpl_future = .; 107 108 /* Kernel symbol table: Normal symbols */ 109 __start___kcrctab = .; 110 *(__kcrctab) 111 __stop___kcrctab = .; 112 113 /* Kernel symbol table: GPL-only symbols */ 114 __start___kcrctab_gpl = .; 115 *(__kcrctab_gpl) 116 __stop___kcrctab_gpl = .; 117 118 /* Kernel symbol table: Normal unused symbols */ 119 __start___kcrctab_unused = .; 120 *(__kcrctab_unused) 121 __stop___kcrctab_unused = .; 122 123 /* Kernel symbol table: GPL-only unused symbols */ 124 __start___kcrctab_unused_gpl = .; 125 *(__kcrctab_unused_gpl) 126 __stop___kcrctab_unused_gpl = .; 127 128 /* Kernel symbol table: GPL-future symbols */ 129 __start___kcrctab_gpl_future = .; 130 *(__kcrctab_gpl_future) 131 __stop___kcrctab_gpl_future = .; 132 133 /* Kernel symbol table: strings */ 134 *(__ksymtab_strings) 135 136 /* Built-in module parameters */ 137 . = ALIGN(4) ; 138 __start___param = .; 139 *(__param) 140 __stop___param = .; 141 142 . = ALIGN(4) ; 143 _etext = . ; 144 } > TEXT 145 146 .data DATA_ADDR : { 147 . = ALIGN(4); 148 _sdata = . ; 149 DATA_DATA 150 . = ALIGN(32); 151 *(.data.cacheline_aligned) 152 . = ALIGN(8192) ; 153 *(.data.init_task) 154 _edata = . ; 155 } > DATA 156 157 .init : { 158 . = ALIGN(4096); 159 __init_begin = .; 160 _sinittext = .; 161 INIT_TEXT 162 _einittext = .; 163 INIT_DATA 164 . = ALIGN(16); 165 __setup_start = .; 166 *(.init.setup) 167 __setup_end = .; 168 __initcall_start = .; 169 INITCALLS 170 __initcall_end = .; 171 __con_initcall_start = .; 172 *(.con_initcall.init) 173 __con_initcall_end = .; 174 __security_initcall_start = .; 175 *(.security_initcall.init) 176 __security_initcall_end = .; 177#ifdef CONFIG_BLK_DEV_INITRD 178 . = ALIGN(4); 179 __initramfs_start = .; 180 *(.init.ramfs) 181 __initramfs_end = .; 182#endif 183 . = ALIGN(4096); 184 __init_end = .; 185 } > INIT 186 187 .bss : { 188 . = ALIGN(4); 189 _sbss = . ; 190 *(.bss) 191 *(COMMON) 192 . = ALIGN(4) ; 193 _ebss = . ; 194 _end = . ; 195 } > BSS 196 197 DISCARDS 198} 199 200