blob: a3e5ea8e336ad9871a003c16f30b37deb7a0cb4b [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 *(.text)
34 *(.text.*)
35 *(.gnu.linkonce.t*)
Trent Piephof62fb992009-02-18 15:22:05 -080036 *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
wdenk5c952cf2004-10-10 21:27:30 +000037 *(.gnu.linkonce.r*)
38 }
39 . = ALIGN (4);
40 _etext = .;
41 PROVIDE (etext = .);
42
43 /* INIT DATA sections - "Small" data (see the gcc -G option)
44 * is always gp-relative. Here we make all init data sections
45 * adjacent to simplify the startup code -- and provide
46 * the global pointer for gp-relative access.
47 */
48 _data = .;
49 .data :
50 {
51 *(.data)
52 *(.data.*)
53 *(.gnu.linkonce.d*)
54 }
55
56 . = ALIGN(16);
57 _gp = .; /* Global pointer addr */
58 PROVIDE (gp = .);
59
60 .sdata :
61 {
62 *(.sdata)
63 *(.sdata.*)
64 *(.gnu.linkonce.s.*)
65 }
66 . = ALIGN(4);
67
68 _edata = .;
69 PROVIDE (edata = .);
70
71 /* UNINIT DATA - Small uninitialized data is first so it's
72 * adjacent to sdata and can be referenced via gp. The normal
73 * bss follows. We keep it adjacent to simplify init code.
74 */
75 __bss_start = .;
Wolfgang Denk64134f02008-01-12 20:31:39 +010076 .sbss (NOLOAD) :
wdenk5c952cf2004-10-10 21:27:30 +000077 {
78 *(.sbss)
79 *(.sbss.*)
80 *(.gnu.linkonce.sb.*)
81 *(.scommon)
82 }
83 . = ALIGN(4);
Wolfgang Denk64134f02008-01-12 20:31:39 +010084 .bss (NOLOAD) :
wdenk5c952cf2004-10-10 21:27:30 +000085 {
86 *(.bss)
87 *(.bss.*)
88 *(.dynbss)
89 *(COMMON)
90 *(.scommon)
91 }
92 . = ALIGN(4);
93 _end = .;
94 PROVIDE (end = .);
95
96 /* CMD TABLE - uboot command sections
97 */
Wolfgang Denk807d5d72005-08-31 12:28:00 +020098 . = .;
wdenk5c952cf2004-10-10 21:27:30 +000099 __uboot_cmd_start = .;
100 .u_boot_cmd :
101 {
102 *(.u_boot_cmd)
103 }
104 . = ALIGN(4);
105 __u_boot_cmd_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}