1/* 2 * vmlinux.lds.S -- master linker script for m68knommu arch 3 * 4 * (C) Copyright 2002-2012, Greg Ungerer <gerg@snapgear.com> 5 * 6 * This linker script is equipped to build either ROM loaded or RAM 7 * run kernels. 8 */ 9 10#if defined(CONFIG_RAMKERNEL) 11#define KTEXT_ADDR CONFIG_KERNELBASE 12#endif 13#if defined(CONFIG_ROMKERNEL) 14#define KTEXT_ADDR CONFIG_ROMSTART 15#define KDATA_ADDR CONFIG_KERNELBASE 16#define LOAD_OFFSET KDATA_ADDR + (ADDR(.text) + SIZEOF(.text)) 17#endif 18 19#include <asm/page.h> 20#include <asm/thread_info.h> 21#include <asm-generic/vmlinux.lds.h> 22 23OUTPUT_ARCH(m68k) 24ENTRY(_start) 25 26jiffies = jiffies_64 + 4; 27 28SECTIONS { 29 30#ifdef CONFIG_ROMVEC 31 . = CONFIG_ROMVEC; 32 .romvec : { 33 __rom_start = .; 34 _romvec = .; 35 *(.romvec) 36 *(.data..initvect) 37 } 38#endif 39 40 . = KTEXT_ADDR; 41 42 _text = .; 43 _stext = .; 44 .text : { 45 HEAD_TEXT 46 TEXT_TEXT 47 SCHED_TEXT 48 LOCK_TEXT 49 *(.fixup) 50 . = ALIGN(16); 51 } 52 _etext = .; 53 54#ifdef KDATA_ADDR 55 . = KDATA_ADDR; 56#endif 57 58 _sdata = .; 59 RO_DATA_SECTION(PAGE_SIZE) 60 RW_DATA_SECTION(16, PAGE_SIZE, THREAD_SIZE) 61 _edata = .; 62 63 EXCEPTION_TABLE(16) 64 NOTES 65 66 . = ALIGN(PAGE_SIZE); 67 __init_begin = .; 68 INIT_TEXT_SECTION(PAGE_SIZE) 69 INIT_DATA_SECTION(16) 70 PERCPU_SECTION(16) 71 .m68k_fixup : { 72 __start_fixup = .; 73 *(.m68k_fixup) 74 __stop_fixup = .; 75 } 76 .init.data : { 77 . = ALIGN(PAGE_SIZE); 78 __init_end = .; 79 } 80 81 BSS_SECTION(0, 0, 0) 82 83 _end = .; 84 85 STABS_DEBUG 86 .comment 0 : { *(.comment) } 87 88 /* Sections to be discarded */ 89 DISCARDS 90} 91 92