blob: f0877330aecfd415f69a2c6563ea2e5d23645148 [file] [log] [blame]
Thomas Chou8cbb0dd2010-04-21 08:40:59 +08001/*
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_base;
32 .text :
33 {
34 arch/nios2/cpu/start.o (.text)
35 *(.text)
36 *(.text.*)
37 *(.gnu.linkonce.t*)
38 *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.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 */
49 __u_boot_cmd_start = .;
50 .u_boot_cmd :
51 {
52 *(.u_boot_cmd)
53 }
54 . = ALIGN(4);
55 __u_boot_cmd_end = .;
56
Marek Vasut55675142012-10-12 10:27:03 +000057 . = ALIGN(4);
58 .u_boot_list : {
59 #include <u-boot.lst>
60 }
61
Thomas Chou8cbb0dd2010-04-21 08:40:59 +080062 /* INIT DATA sections - "Small" data (see the gcc -G option)
63 * is always gp-relative. Here we make all init data sections
64 * adjacent to simplify the startup code -- and provide
65 * the global pointer for gp-relative access.
66 */
67 _data = .;
68 .data :
69 {
70 *(.data)
71 *(.data.*)
72 *(.gnu.linkonce.d*)
73 }
74
75 . = ALIGN(16);
76 _gp = .; /* Global pointer addr */
77 PROVIDE (gp = .);
78
79 .sdata :
80 {
81 *(.sdata)
82 *(.sdata.*)
83 *(.gnu.linkonce.s.*)
84 }
85 . = ALIGN(4);
86
87 _edata = .;
88 PROVIDE (edata = .);
89
90 /* UNINIT DATA - Small uninitialized data is first so it's
91 * adjacent to sdata and can be referenced via gp. The normal
92 * bss follows. We keep it adjacent to simplify init code.
93 */
94 __bss_start = .;
95 .sbss (NOLOAD) :
96 {
97 *(.sbss)
98 *(.sbss.*)
99 *(.gnu.linkonce.sb.*)
100 *(.scommon)
101 }
102 . = ALIGN(4);
103 .bss (NOLOAD) :
104 {
105 *(.bss)
106 *(.bss.*)
107 *(.dynbss)
108 *(COMMON)
109 *(.scommon)
110 }
111 . = ALIGN(4);
Po-Yu Chuang44c6e652011-03-01 22:59:59 +0000112 __bss_end__ = .;
Thomas Chou8cbb0dd2010-04-21 08:40:59 +0800113 PROVIDE (end = .);
114
115 /* DEBUG -- symbol table, string table, etc. etc.
116 */
117 .stab 0 : { *(.stab) }
118 .stabstr 0 : { *(.stabstr) }
119 .stab.excl 0 : { *(.stab.excl) }
120 .stab.exclstr 0 : { *(.stab.exclstr) }
121 .stab.index 0 : { *(.stab.index) }
122 .stab.indexstr 0 : { *(.stab.indexstr) }
123 .comment 0 : { *(.comment) }
124 .debug 0 : { *(.debug) }
125 .line 0 : { *(.line) }
126 .debug_srcinfo 0 : { *(.debug_srcinfo) }
127 .debug_sfnames 0 : { *(.debug_sfnames) }
128 .debug_aranges 0 : { *(.debug_aranges) }
129 .debug_pubnames 0 : { *(.debug_pubnames) }
130 .debug_info 0 : { *(.debug_info) }
131 .debug_abbrev 0 : { *(.debug_abbrev) }
132 .debug_line 0 : { *(.debug_line) }
133 .debug_frame 0 : { *(.debug_frame) }
134 .debug_str 0 : { *(.debug_str) }
135 .debug_loc 0 : { *(.debug_loc) }
136 .debug_macinfo 0 : { *(.debug_macinfo) }
137 .debug_weaknames 0 : { *(.debug_weaknames) }
138 .debug_funcnames 0 : { *(.debug_funcnames) }
139 .debug_typenames 0 : { *(.debug_typenames) }
140 .debug_varnames 0 : { *(.debug_varnames) }
141}