1/* 2 * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com) 3 * 4 * This program is free software; you can redistribute it and/or modify 5 * it under the terms of the GNU General Public License version 2 as 6 * published by the Free Software Foundation. 7 */ 8 9#include <asm-generic/vmlinux.lds.h> 10#include <asm/cache.h> 11#include <asm/page.h> 12#include <asm/thread_info.h> 13#include <plat/memmap.h> 14 15OUTPUT_ARCH(arc) 16ENTRY(_stext) 17 18#ifdef CONFIG_CPU_BIG_ENDIAN 19jiffies = jiffies_64 + 4; 20#else 21jiffies = jiffies_64; 22#endif 23 24SECTIONS 25{ 26 . = CONFIG_LINUX_LINK_BASE; 27 28 _int_vec_base_lds = .; 29 .vector : { 30 *(.vector) 31 . = ALIGN(PAGE_SIZE); 32 } 33 34 /* 35 * The reason for having a seperate subsection .init.ramfs is to 36 * prevent objump from including it in kernel dumps 37 * 38 * Reason for having .init.ramfs above .init is to make sure that the 39 * binary blob is tucked away to one side, reducing the displacement 40 * between .init.text and .text, avoiding any possible relocation 41 * errors because of calls from .init.text to .text 42 * Yes such calls do exist. e.g. 43 * decompress_inflate.c:gunzip( ) -> zlib_inflate_workspace( ) 44 */ 45 46 __init_begin = .; 47 48 .init.ramfs : { INIT_RAM_FS } 49 50 . = ALIGN(PAGE_SIZE); 51 _stext = .; 52 53 HEAD_TEXT_SECTION 54 INIT_TEXT_SECTION(L1_CACHE_BYTES) 55 56 /* INIT_DATA_SECTION open-coded: special INIT_RAM_FS handling */ 57 .init.data : { 58 INIT_DATA 59 INIT_SETUP(L1_CACHE_BYTES) 60 INIT_CALLS 61 CON_INITCALL 62 SECURITY_INITCALL 63 } 64 65 PERCPU_SECTION(L1_CACHE_BYTES) 66 67 /* 68 * .exit.text is discard at runtime, not link time, to deal with 69 * references from .debug_frame 70 * It will be init freed, being inside [__init_start : __init_end] 71 */ 72 .exit.text : { EXIT_TEXT } 73 .exit.data : { EXIT_DATA } 74 75 . = ALIGN(PAGE_SIZE); 76 __init_end = .; 77 78 .text : { 79 _text = .; 80 TEXT_TEXT 81 SCHED_TEXT 82 LOCK_TEXT 83 KPROBES_TEXT 84 *(.fixup) 85 *(.gnu.warning) 86 } 87 EXCEPTION_TABLE(L1_CACHE_BYTES) 88 _etext = .; 89 90 _sdata = .; 91 RO_DATA_SECTION(PAGE_SIZE) 92 93 /* 94 * 1. this is .data essentially 95 * 2. THREAD_SIZE for init.task, must be kernel-stk sz aligned 96 */ 97 RW_DATA_SECTION(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE) 98 99 _edata = .; 100 101 BSS_SECTION(0, 0, 0) 102 103 NOTES 104 105 . = ALIGN(PAGE_SIZE); 106 _end = . ; 107 108 STABS_DEBUG 109 DWARF_DEBUG 110 DISCARDS 111 112 .arcextmap 0 : { 113 *(.gnu.linkonce.arcextmap.*) 114 *(.arcextmap.*) 115 } 116} 117