blob: d3b7c31ae95657023d10aa5b6215716e5ab3fe75 [file] [log] [blame]
wdenk5c952cf2004-10-10 21:27:30 +00001/*
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
25OUTPUT_FORMAT("elf32-littlenios2")
26OUTPUT_ARCH(nios2)
27ENTRY(_start)
28
29SECTIONS
30{
31 .text :
32 {
33 cpu/nios2/start.o (.text)
34 *(.text)
35 *(.text.*)
36 *(.gnu.linkonce.t*)
37 *(.rodata)
38 *(.rodata.*)
39 *(.gnu.linkonce.r*)
40 }
41 . = ALIGN (4);
42 _etext = .;
43 PROVIDE (etext = .);
44
45 /* CMD TABLE - sandwich this in between text and data so
46 * the initialization code relocates the command table as
47 * well -- admittedly, this is just pure laziness ;-)
48 */
Wolfgang Denk807d5d72005-08-31 12:28:00 +020049 . = .;
wdenk5c952cf2004-10-10 21:27:30 +000050 __u_boot_cmd_start = .;
51 .u_boot_cmd :
52 {
53 *(.u_boot_cmd)
54 }
55 . = ALIGN(4);
56 __u_boot_cmd_end = .;
57
58 /* INIT DATA sections - "Small" data (see the gcc -G option)
59 * is always gp-relative. Here we make all init data sections
60 * adjacent to simplify the startup code -- and provide
61 * the global pointer for gp-relative access.
62 */
63 _data = .;
64 .data :
65 {
66 *(.data)
67 *(.data.*)
68 *(.gnu.linkonce.d*)
69 }
70
71 . = ALIGN(16);
72 _gp = .; /* Global pointer addr */
73 PROVIDE (gp = .);
74
75 .sdata :
76 {
77 *(.sdata)
78 *(.sdata.*)
79 *(.gnu.linkonce.s.*)
80 }
81 . = ALIGN(4);
82
83 _edata = .;
84 PROVIDE (edata = .);
85
86 /* UNINIT DATA - Small uninitialized data is first so it's
87 * adjacent to sdata and can be referenced via gp. The normal
88 * bss follows. We keep it adjacent to simplify init code.
89 */
90 __bss_start = .;
Wolfgang Denk64134f02008-01-12 20:31:39 +010091 .sbss (NOLOAD) :
wdenk5c952cf2004-10-10 21:27:30 +000092 {
93 *(.sbss)
94 *(.sbss.*)
95 *(.gnu.linkonce.sb.*)
96 *(.scommon)
97 }
98 . = ALIGN(4);
Wolfgang Denk64134f02008-01-12 20:31:39 +010099 .bss (NOLOAD) :
wdenk5c952cf2004-10-10 21:27:30 +0000100 {
101 *(.bss)
102 *(.bss.*)
103 *(.dynbss)
104 *(COMMON)
105 *(.scommon)
106 }
107 . = ALIGN(4);
108 _end = .;
109 PROVIDE (end = .);
110
111 /* DEBUG -- symbol table, string table, etc. etc.
112 */
113 .stab 0 : { *(.stab) }
114 .stabstr 0 : { *(.stabstr) }
115 .stab.excl 0 : { *(.stab.excl) }
116 .stab.exclstr 0 : { *(.stab.exclstr) }
117 .stab.index 0 : { *(.stab.index) }
118 .stab.indexstr 0 : { *(.stab.indexstr) }
119 .comment 0 : { *(.comment) }
120 .debug 0 : { *(.debug) }
121 .line 0 : { *(.line) }
122 .debug_srcinfo 0 : { *(.debug_srcinfo) }
123 .debug_sfnames 0 : { *(.debug_sfnames) }
124 .debug_aranges 0 : { *(.debug_aranges) }
125 .debug_pubnames 0 : { *(.debug_pubnames) }
126 .debug_info 0 : { *(.debug_info) }
127 .debug_abbrev 0 : { *(.debug_abbrev) }
128 .debug_line 0 : { *(.debug_line) }
129 .debug_frame 0 : { *(.debug_frame) }
130 .debug_str 0 : { *(.debug_str) }
131 .debug_loc 0 : { *(.debug_loc) }
132 .debug_macinfo 0 : { *(.debug_macinfo) }
133 .debug_weaknames 0 : { *(.debug_weaknames) }
134 .debug_funcnames 0 : { *(.debug_funcnames) }
135 .debug_typenames 0 : { *(.debug_typenames) }
136 .debug_varnames 0 : { *(.debug_varnames) }
137}