Scott McNutt | 9cc8337 | 2006-06-08 13:37:39 -0400 | [diff] [blame] | 1 | /* |
| 2 | * (C) Copyright 2004, Psyent Corporation <www.psyent.com> |
| 3 | * Scott McNutt <smcnutt@psyent.com> |
| 4 | * |
| 5 | * See file CREDITS for list of people who contributed to this |
| 6 | * project. |
| 7 | * |
| 8 | * This program is free software; you can redistribute it and/or |
| 9 | * modify it under the terms of the GNU General Public License as |
| 10 | * published by the Free Software Foundation; either version 2 of |
| 11 | * the License, or (at your option) any later version. |
| 12 | * |
| 13 | * This program is distributed in the hope that it will be useful, |
| 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 16 | * GNU General Public License for more details. |
| 17 | * |
| 18 | * You should have received a copy of the GNU General Public License |
| 19 | * along with this program; if not, write to the Free Software |
| 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
| 21 | * MA 02111-1307 USA |
| 22 | */ |
| 23 | |
| 24 | |
| 25 | OUTPUT_FORMAT("elf32-littlenios2") |
| 26 | OUTPUT_ARCH(nios2) |
| 27 | ENTRY(_start) |
| 28 | |
| 29 | SECTIONS |
| 30 | { |
| 31 | .text : |
| 32 | { |
Scott McNutt | 254ab7b | 2010-04-16 16:12:39 -0400 | [diff] [blame] | 33 | arch/nios2/cpu/start.o (.text) |
Scott McNutt | 9cc8337 | 2006-06-08 13:37:39 -0400 | [diff] [blame] | 34 | *(.text) |
| 35 | *(.text.*) |
| 36 | *(.gnu.linkonce.t*) |
Trent Piepho | f62fb99 | 2009-02-18 15:22:05 -0800 | [diff] [blame] | 37 | *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) |
Scott McNutt | 9cc8337 | 2006-06-08 13:37:39 -0400 | [diff] [blame] | 38 | *(.gnu.linkonce.r*) |
| 39 | } |
| 40 | . = ALIGN (4); |
| 41 | _etext = .; |
| 42 | PROVIDE (etext = .); |
| 43 | |
| 44 | /* CMD TABLE - sandwich this in between text and data so |
| 45 | * the initialization code relocates the command table as |
| 46 | * well -- admittedly, this is just pure laziness ;-) |
| 47 | */ |
Scott McNutt | 9cc8337 | 2006-06-08 13:37:39 -0400 | [diff] [blame] | 48 | |
Marek Vasut | 5567514 | 2012-10-12 10:27:03 +0000 | [diff] [blame] | 49 | . = ALIGN(4); |
| 50 | .u_boot_list : { |
Albert ARIBAUD | ef123c5 | 2013-02-25 00:59:00 +0000 | [diff] [blame^] | 51 | KEEP(*(SORT(.u_boot_list*))); |
Marek Vasut | 5567514 | 2012-10-12 10:27:03 +0000 | [diff] [blame] | 52 | } |
| 53 | |
Scott McNutt | 9cc8337 | 2006-06-08 13:37:39 -0400 | [diff] [blame] | 54 | /* INIT DATA sections - "Small" data (see the gcc -G option) |
| 55 | * is always gp-relative. Here we make all init data sections |
| 56 | * adjacent to simplify the startup code -- and provide |
| 57 | * the global pointer for gp-relative access. |
| 58 | */ |
| 59 | _data = .; |
| 60 | .data : |
| 61 | { |
| 62 | *(.data) |
| 63 | *(.data.*) |
| 64 | *(.gnu.linkonce.d*) |
| 65 | } |
| 66 | |
| 67 | . = ALIGN(16); |
| 68 | _gp = .; /* Global pointer addr */ |
| 69 | PROVIDE (gp = .); |
| 70 | |
| 71 | .sdata : |
| 72 | { |
| 73 | *(.sdata) |
| 74 | *(.sdata.*) |
| 75 | *(.gnu.linkonce.s.*) |
| 76 | } |
| 77 | . = ALIGN(4); |
| 78 | |
| 79 | _edata = .; |
| 80 | PROVIDE (edata = .); |
| 81 | |
| 82 | /* UNINIT DATA - Small uninitialized data is first so it's |
| 83 | * adjacent to sdata and can be referenced via gp. The normal |
| 84 | * bss follows. We keep it adjacent to simplify init code. |
| 85 | */ |
| 86 | __bss_start = .; |
Wolfgang Denk | 64134f0 | 2008-01-12 20:31:39 +0100 | [diff] [blame] | 87 | .sbss (NOLOAD) : |
Scott McNutt | 9cc8337 | 2006-06-08 13:37:39 -0400 | [diff] [blame] | 88 | { |
| 89 | *(.sbss) |
| 90 | *(.sbss.*) |
| 91 | *(.gnu.linkonce.sb.*) |
| 92 | *(.scommon) |
| 93 | } |
| 94 | . = ALIGN(4); |
Wolfgang Denk | 64134f0 | 2008-01-12 20:31:39 +0100 | [diff] [blame] | 95 | .bss (NOLOAD) : |
Scott McNutt | 9cc8337 | 2006-06-08 13:37:39 -0400 | [diff] [blame] | 96 | { |
| 97 | *(.bss) |
| 98 | *(.bss.*) |
| 99 | *(.dynbss) |
| 100 | *(COMMON) |
| 101 | *(.scommon) |
| 102 | } |
| 103 | . = ALIGN(4); |
Po-Yu Chuang | 44c6e65 | 2011-03-01 22:59:59 +0000 | [diff] [blame] | 104 | __bss_end__ = .; |
Scott McNutt | 9cc8337 | 2006-06-08 13:37:39 -0400 | [diff] [blame] | 105 | PROVIDE (end = .); |
| 106 | |
| 107 | /* DEBUG -- symbol table, string table, etc. etc. |
| 108 | */ |
| 109 | .stab 0 : { *(.stab) } |
| 110 | .stabstr 0 : { *(.stabstr) } |
| 111 | .stab.excl 0 : { *(.stab.excl) } |
| 112 | .stab.exclstr 0 : { *(.stab.exclstr) } |
| 113 | .stab.index 0 : { *(.stab.index) } |
| 114 | .stab.indexstr 0 : { *(.stab.indexstr) } |
| 115 | .comment 0 : { *(.comment) } |
| 116 | .debug 0 : { *(.debug) } |
| 117 | .line 0 : { *(.line) } |
| 118 | .debug_srcinfo 0 : { *(.debug_srcinfo) } |
| 119 | .debug_sfnames 0 : { *(.debug_sfnames) } |
| 120 | .debug_aranges 0 : { *(.debug_aranges) } |
| 121 | .debug_pubnames 0 : { *(.debug_pubnames) } |
| 122 | .debug_info 0 : { *(.debug_info) } |
| 123 | .debug_abbrev 0 : { *(.debug_abbrev) } |
| 124 | .debug_line 0 : { *(.debug_line) } |
| 125 | .debug_frame 0 : { *(.debug_frame) } |
| 126 | .debug_str 0 : { *(.debug_str) } |
| 127 | .debug_loc 0 : { *(.debug_loc) } |
| 128 | .debug_macinfo 0 : { *(.debug_macinfo) } |
| 129 | .debug_weaknames 0 : { *(.debug_weaknames) } |
| 130 | .debug_funcnames 0 : { *(.debug_funcnames) } |
| 131 | .debug_typenames 0 : { *(.debug_typenames) } |
| 132 | .debug_varnames 0 : { *(.debug_varnames) } |
| 133 | } |