1/* 2 * Copyright (C) 2008-2009 Michal Simek <monstr@monstr.eu> 3 * Copyright (C) 2008-2009 PetaLogix 4 * Copyright (C) 2006 Atmark Techno, Inc. 5 * 6 * This file is subject to the terms and conditions of the GNU General Public 7 * License. See the file "COPYING" in the main directory of this archive 8 * for more details. 9 */ 10 11OUTPUT_ARCH(microblaze) 12ENTRY(microblaze_start) 13 14#include <asm/page.h> 15#include <asm-generic/vmlinux.lds.h> 16#include <asm/thread_info.h> 17 18#ifdef __MICROBLAZEEL__ 19jiffies = jiffies_64; 20#else 21jiffies = jiffies_64 + 4; 22#endif 23 24SECTIONS { 25 . = CONFIG_KERNEL_START; 26 microblaze_start = CONFIG_KERNEL_BASE_ADDR; 27 .text : AT(ADDR(.text) - LOAD_OFFSET) { 28 _text = . ; 29 _stext = . ; 30 HEAD_TEXT 31 TEXT_TEXT 32 *(.fixup) 33 EXIT_TEXT 34 EXIT_CALL 35 SCHED_TEXT 36 LOCK_TEXT 37 KPROBES_TEXT 38 IRQENTRY_TEXT 39 SOFTIRQENTRY_TEXT 40 . = ALIGN (4) ; 41 _etext = . ; 42 } 43 44 . = ALIGN (4) ; 45 __fdt_blob : AT(ADDR(__fdt_blob) - LOAD_OFFSET) { 46 _fdt_start = . ; /* place for fdt blob */ 47 *(__fdt_blob) ; /* Any link-placed DTB */ 48 . = _fdt_start + 0x8000; /* Pad up to 32kbyte */ 49 _fdt_end = . ; 50 } 51 52 . = ALIGN(16); 53 RODATA 54 EXCEPTION_TABLE(16) 55 NOTES 56 57 /* 58 * sdata2 section can go anywhere, but must be word aligned 59 * and SDA2_BASE must point to the middle of it 60 */ 61 .sdata2 : AT(ADDR(.sdata2) - LOAD_OFFSET) { 62 _ssrw = .; 63 . = ALIGN(PAGE_SIZE); /* page aligned when MMU used */ 64 *(.sdata2) 65 . = ALIGN(8); 66 _essrw = .; 67 _ssrw_size = _essrw - _ssrw; 68 _KERNEL_SDA2_BASE_ = _ssrw + (_ssrw_size / 2); 69 } 70 71 _sdata = . ; 72 RW_DATA_SECTION(32, PAGE_SIZE, THREAD_SIZE) 73 _edata = . ; 74 75 /* Under the microblaze ABI, .sdata and .sbss must be contiguous */ 76 . = ALIGN(8); 77 .sdata : AT(ADDR(.sdata) - LOAD_OFFSET) { 78 _ssro = .; 79 *(.sdata) 80 } 81 82 .sbss : AT(ADDR(.sbss) - LOAD_OFFSET) { 83 _ssbss = .; 84 *(.sbss) 85 _esbss = .; 86 _essro = .; 87 _ssro_size = _essro - _ssro ; 88 _KERNEL_SDA_BASE_ = _ssro + (_ssro_size / 2) ; 89 } 90 91 . = ALIGN(PAGE_SIZE); 92 __init_begin = .; 93 94 INIT_TEXT_SECTION(PAGE_SIZE) 95 96 .init.data : AT(ADDR(.init.data) - LOAD_OFFSET) { 97 INIT_DATA 98 } 99 100 . = ALIGN(4); 101 .init.ivt : AT(ADDR(.init.ivt) - LOAD_OFFSET) { 102 __ivt_start = .; 103 *(.init.ivt) 104 __ivt_end = .; 105 } 106 107 .init.setup : AT(ADDR(.init.setup) - LOAD_OFFSET) { 108 INIT_SETUP(0) 109 } 110 111 .initcall.init : AT(ADDR(.initcall.init) - LOAD_OFFSET ) { 112 INIT_CALLS 113 } 114 115 .con_initcall.init : AT(ADDR(.con_initcall.init) - LOAD_OFFSET) { 116 CON_INITCALL 117 } 118 119 SECURITY_INIT 120 121 __init_end_before_initramfs = .; 122 123 .init.ramfs : AT(ADDR(.init.ramfs) - LOAD_OFFSET) { 124 INIT_RAM_FS 125 } 126 127 __init_end = .; 128 129 .bss ALIGN (PAGE_SIZE) : AT(ADDR(.bss) - LOAD_OFFSET) { 130 /* page aligned when MMU used */ 131 __bss_start = . ; 132 *(.bss*) 133 *(COMMON) 134 . = ALIGN (4) ; 135 __bss_stop = . ; 136 } 137 . = ALIGN(PAGE_SIZE); 138 _end = .; 139 140 DISCARDS 141} 142