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