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_FORMAT("elf32-microblaze", "elf32-microblaze", "elf32-microblaze") 12OUTPUT_ARCH(microblaze) 13ENTRY(_start) 14 15#include <asm-generic/vmlinux.lds.h> 16 17jiffies = jiffies_64 + 4; 18 19SECTIONS { 20 . = CONFIG_KERNEL_START; 21 .text : { 22 _text = . ; 23 _stext = . ; 24 *(.text .text.*) 25 *(.fixup) 26 EXIT_TEXT 27 EXIT_CALL 28 SCHED_TEXT 29 LOCK_TEXT 30 KPROBES_TEXT 31 . = ALIGN (4) ; 32 _etext = . ; 33 } 34 35 . = ALIGN (4) ; 36 _fdt_start = . ; /* place for fdt blob */ 37 . = . + 0x4000; 38 _fdt_end = . ; 39 40 . = ALIGN(16); 41 RODATA 42 . = ALIGN(16); 43 __ex_table : { 44 __start___ex_table = .; 45 *(__ex_table) 46 __stop___ex_table = .; 47 } 48 49 /* 50 * sdata2 section can go anywhere, but must be word aligned 51 * and SDA2_BASE must point to the middle of it 52 */ 53 .sdata2 : { 54 _ssrw = .; 55 . = ALIGN(4096); /* page aligned when MMU used - origin 0x8 */ 56 *(.sdata2) 57 . = ALIGN(8); 58 _essrw = .; 59 _ssrw_size = _essrw - _ssrw; 60 _KERNEL_SDA2_BASE_ = _ssrw + (_ssrw_size / 2); 61 } 62 63 _sdata = . ; 64 .data ALIGN (4096) : { /* page aligned when MMU used - origin 0x4 */ 65 DATA_DATA 66 CONSTRUCTORS 67 } 68 . = ALIGN(32); 69 .data.cacheline_aligned : { *(.data.cacheline_aligned) } 70 _edata = . ; 71 72 /* Reserve some low RAM for r0 based memory references */ 73 . = ALIGN(0x4) ; 74 r0_ram = . ; 75 . = . + 4096; /* a page should be enough */ 76 77 /* The initial task */ 78 . = ALIGN(8192); 79 .data.init_task : { *(.data.init_task) } 80 81 /* Under the microblaze ABI, .sdata and .sbss must be contiguous */ 82 . = ALIGN(8); 83 .sdata : { 84 _ssro = .; 85 *(.sdata) 86 } 87 88 .sbss : { 89 _ssbss = .; 90 *(.sbss) 91 _esbss = .; 92 _essro = .; 93 _ssro_size = _essro - _ssro ; 94 _KERNEL_SDA_BASE_ = _ssro + (_ssro_size / 2) ; 95 } 96 97 __init_begin = .; 98 99 . = ALIGN(4096); 100 .init.text : { 101 _sinittext = . ; 102 INIT_TEXT 103 _einittext = .; 104 } 105 106 .init.data : { 107 INIT_DATA 108 } 109 110 . = ALIGN(4); 111 .init.ivt : { 112 __ivt_start = .; 113 *(.init.ivt) 114 __ivt_end = .; 115 } 116 117 .init.setup : { 118 __setup_start = .; 119 *(.init.setup) 120 __setup_end = .; 121 } 122 123 .initcall.init : { 124 __initcall_start = .; 125 INITCALLS 126 __initcall_end = .; 127 } 128 129 .con_initcall.init : { 130 __con_initcall_start = .; 131 *(.con_initcall.init) 132 __con_initcall_end = .; 133 } 134 135 SECURITY_INIT 136 137 __init_end_before_initramfs = .; 138 139 .init.ramfs ALIGN(4096) : { 140 __initramfs_start = .; 141 *(.init.ramfs) 142 __initramfs_end = .; 143 . = ALIGN(4); 144 LONG(0); 145/* 146 * FIXME this can break initramfs for MMU. 147 * Pad init.ramfs up to page boundary, 148 * so that __init_end == __bss_start. This will make image.elf 149 * consistent with the image.bin 150 */ 151 /* . = ALIGN(4096); */ 152 } 153 __init_end = .; 154 155 .bss ALIGN (4096) : { /* page aligned when MMU used */ 156 __bss_start = . ; 157 *(.bss*) 158 *(COMMON) 159 . = ALIGN (4) ; 160 __bss_stop = . ; 161 _ebss = . ; 162 } 163 . = ALIGN(4096); 164 _end = .; 165 166 DISCARDS 167} 168