Daniel Hellstrom | 6940383 | 2008-03-26 23:34:47 +0100 | [diff] [blame] | 1 | /* Linker script for Gaisler Research AB's Template design |
| 2 | * for Altera NIOS Development board Stratix II Edition, EP2S60 FPGA. |
| 3 | * |
| 4 | * (C) Copyright 2008 |
| 5 | * Daniel Hellstrom, Gaisler Research, daniel@gaisler.com. |
| 6 | * |
| 7 | * See file CREDITS for list of people who contributed to this |
| 8 | * project. |
| 9 | * |
| 10 | * This program is free software; you can redistribute it and/or |
| 11 | * modify it under the terms of the GNU General Public License as |
| 12 | * published by the Free Software Foundation; either version 2 of |
| 13 | * the License, or (at your option) any later version. |
| 14 | * |
| 15 | * This program is distributed in the hope that it will be useful, |
| 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 18 | * GNU General Public License for more details. |
| 19 | * |
| 20 | * You should have received a copy of the GNU General Public License |
| 21 | * along with this program; if not, write to the Free Software |
| 22 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
| 23 | * MA 02111-1307 USA |
| 24 | * |
| 25 | */ |
| 26 | |
| 27 | OUTPUT_FORMAT("elf32-sparc", "elf32-sparc", "elf32-sparc") |
| 28 | OUTPUT_ARCH(sparc) |
| 29 | ENTRY(_start) |
| 30 | SECTIONS |
| 31 | { |
| 32 | |
| 33 | /* Read-only sections, merged into text segment: */ |
| 34 | . = + SIZEOF_HEADERS; |
| 35 | .interp : { *(.interp) } |
| 36 | .hash : { *(.hash) } |
| 37 | .dynsym : { *(.dynsym) } |
| 38 | .dynstr : { *(.dynstr) } |
| 39 | .rel.text : { *(.rel.text) } |
| 40 | .rela.text : { *(.rela.text) } |
| 41 | .rel.data : { *(.rel.data) } |
| 42 | .rela.data : { *(.rela.data) } |
| 43 | .rel.rodata : { *(.rel.rodata) } |
| 44 | .rela.rodata : { *(.rela.rodata) } |
| 45 | .rel.got : { *(.rel.got) } |
| 46 | .rela.got : { *(.rela.got) } |
| 47 | .rel.ctors : { *(.rel.ctors) } |
| 48 | .rela.ctors : { *(.rela.ctors) } |
| 49 | .rel.dtors : { *(.rel.dtors) } |
| 50 | .rela.dtors : { *(.rela.dtors) } |
| 51 | .rel.bss : { *(.rel.bss) } |
| 52 | .rela.bss : { *(.rela.bss) } |
| 53 | .rel.plt : { *(.rel.plt) } |
| 54 | .rela.plt : { *(.rela.plt) } |
| 55 | .init : { *(.init) } |
| 56 | .plt : { *(.plt) } |
| 57 | |
| 58 | .text : { |
| 59 | _load_addr = .; |
| 60 | _text = .; |
| 61 | |
| 62 | *(.start) |
Peter Tyser | 1e9c265 | 2010-04-12 22:28:18 -0500 | [diff] [blame] | 63 | arch/sparc/cpu/leon3/start.o (.text) |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 64 | /* 8k is the same as the PROM offset from end of main memory, (CONFIG_SYS_PROM_SIZE) */ |
Daniel Hellstrom | 6940383 | 2008-03-26 23:34:47 +0100 | [diff] [blame] | 65 | . = ALIGN(8192); |
| 66 | /* PROM CODE, Will be relocated to the end of memory, |
| 67 | * no global data accesses please. |
| 68 | */ |
| 69 | __prom_start = .; |
| 70 | *(.prom.pgt) |
| 71 | *(.prom.data) |
| 72 | *(.prom.text) |
| 73 | . = ALIGN(16); |
| 74 | __prom_end = .; |
| 75 | *(.text) |
| 76 | *(.fixup) |
| 77 | *(.gnu.warning) |
| 78 | /* *(.got1)*/ |
| 79 | . = ALIGN(16); |
Daniel Hellstrom | 6940383 | 2008-03-26 23:34:47 +0100 | [diff] [blame] | 80 | *(.eh_frame) |
Trent Piepho | f62fb99 | 2009-02-18 15:22:05 -0800 | [diff] [blame] | 81 | *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) |
Daniel Hellstrom | 6940383 | 2008-03-26 23:34:47 +0100 | [diff] [blame] | 82 | } |
| 83 | . = ALIGN(4); |
| 84 | _etext = .; |
| 85 | |
| 86 | /* CMD Table */ |
| 87 | |
| 88 | __u_boot_cmd_start = .; |
| 89 | .u_boot_cmd : { *(.u_boot_cmd) } |
| 90 | . = ALIGN(4); |
| 91 | __u_boot_cmd_end = .; |
| 92 | |
| 93 | .data : |
| 94 | { |
| 95 | *(.data) |
| 96 | *(.data1) |
| 97 | *(.data.rel) |
| 98 | *(.data.rel.*) |
| 99 | *(.sdata) |
| 100 | *(.sdata2) |
| 101 | *(.dynamic) |
| 102 | CONSTRUCTORS |
| 103 | } |
| 104 | _edata = .; |
| 105 | PROVIDE (edata = .); |
| 106 | |
| 107 | . = ALIGN(4); |
| 108 | __got_start = .; |
| 109 | .got : { |
| 110 | *(.got) |
| 111 | /* *(.data.rel) |
| 112 | *(.data.rel.local)*/ |
| 113 | . = ALIGN(16); |
| 114 | } |
| 115 | __got_end = .; |
| 116 | |
| 117 | /* .data.rel : { } */ |
| 118 | |
| 119 | . = ALIGN(4096); |
| 120 | __init_begin = .; |
| 121 | .text.init : { *(.text.init) } |
| 122 | .data.init : { *(.data.init) } |
| 123 | . = ALIGN(4096); |
| 124 | __init_end = .; |
| 125 | |
| 126 | __bss_start = .; |
| 127 | .bss : |
| 128 | { |
| 129 | *(.sbss) *(.scommon) |
| 130 | *(.dynbss) |
| 131 | *(.bss) |
| 132 | *(COMMON) |
| 133 | . = ALIGN(16); /* to speed clearing of bss up */ |
| 134 | } |
| 135 | __bss_end = . ; |
Po-Yu Chuang | 44c6e65 | 2011-03-01 22:59:59 +0000 | [diff] [blame] | 136 | __bss_end__ = . ; |
Daniel Hellstrom | 6940383 | 2008-03-26 23:34:47 +0100 | [diff] [blame] | 137 | PROVIDE (end = .); |
| 138 | |
| 139 | /* Relocated into main memory */ |
| 140 | |
| 141 | /* Start of main memory */ |
| 142 | /*. = 0x40000000;*/ |
| 143 | |
| 144 | .stack (NOLOAD) : { *(.stack) } |
| 145 | |
| 146 | /* PROM CODE */ |
| 147 | |
| 148 | /* global data in RAM passed to kernel after booting */ |
| 149 | |
| 150 | .stab 0 : { *(.stab) } |
| 151 | .stabstr 0 : { *(.stabstr) } |
| 152 | .stab.excl 0 : { *(.stab.excl) } |
| 153 | .stab.exclstr 0 : { *(.stab.exclstr) } |
| 154 | .stab.index 0 : { *(.stab.index) } |
| 155 | .stab.indexstr 0 : { *(.stab.indexstr) } |
| 156 | .comment 0 : { *(.comment) } |
| 157 | |
| 158 | } |