blob: 8632097b6133feaddb96433bd616e60157431293 [file] [log] [blame]
Aubrey Li26bf7de2007-03-19 01:24:52 +08001/*
2 * U-boot - u-boot.lds.S
3 *
4 * Copyright (c) 2005-2007 Analog Device Inc.
5 *
6 * (C) Copyright 2000-2004
7 * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
8 *
9 * See file CREDITS for list of people who contributed to this
10 * project.
11 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License as
14 * published by the Free Software Foundation; either version 2 of
15 * the License, or (at your option) any later version.
16 *
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
25 * MA 02111-1307 USA
26 */
27
28#include <config.h>
29
30OUTPUT_ARCH(bfin)
31SEARCH_DIR(/lib); SEARCH_DIR(/usr/lib); SEARCH_DIR(/usr/local/lib);
32/* Do we need any of these for elf?
33 __DYNAMIC = 0; */
34MEMORY
35 {
Wolfgang Denk1636d1c2007-06-22 23:59:00 +020036 ram : ORIGIN = (CFG_MONITOR_BASE), LENGTH = (256 * 1024)
Aubrey Li26bf7de2007-03-19 01:24:52 +080037 l1_code : ORIGIN = 0xFFA00000, LENGTH = 0xC000
38 l1_data : ORIGIN = 0xFF900000, LENGTH = 0x4000
39 }
40
41SECTIONS
42{
43 /* Read-only sections, merged into text segment: */
44 . = + SIZEOF_HEADERS; /*0x1000;*/
45 .interp : { *(.interp) }
46 .hash : { *(.hash) }
47 .dynsym : { *(.dynsym) }
48 .dynstr : { *(.dynstr) }
49 .rel.text : { *(.rel.text) }
Wolfgang Denk1636d1c2007-06-22 23:59:00 +020050 .rela.text : { *(.rela.text) }
Aubrey Li26bf7de2007-03-19 01:24:52 +080051 .rel.data : { *(.rel.data) }
Wolfgang Denk1636d1c2007-06-22 23:59:00 +020052 .rela.data : { *(.rela.data) }
53 .rel.rodata : { *(.rel.rodata) }
54 .rela.rodata : { *(.rela.rodata) }
Aubrey Li26bf7de2007-03-19 01:24:52 +080055 .rel.got : { *(.rel.got) }
56 .rela.got : { *(.rela.got) }
57 .rel.ctors : { *(.rel.ctors) }
58 .rela.ctors : { *(.rela.ctors) }
59 .rel.dtors : { *(.rel.dtors) }
60 .rela.dtors : { *(.rela.dtors) }
61 .rel.bss : { *(.rel.bss) }
62 .rela.bss : { *(.rela.bss) }
63 .rel.plt : { *(.rel.plt) }
64 .rela.plt : { *(.rela.plt) }
65 .init : { *(.init) }
66 .plt : { *(.plt) }
67 . = CFG_MONITOR_BASE;
68 .text :
69 {
70 /* WARNING - the following is hand-optimized to fit within */
Wolfgang Denk1636d1c2007-06-22 23:59:00 +020071 /* the sector before the environment sector. If it throws */
Aubrey Li26bf7de2007-03-19 01:24:52 +080072 /* an error during compilation remove an object here to get */
73 /* it linked after the configuration sector. */
74
75 cpu/bf537/start.o (.text)
76 cpu/bf537/start1.o (.text)
77 cpu/bf537/traps.o (.text)
78 cpu/bf537/interrupt.o (.text)
79 cpu/bf537/serial.o (.text)
80 common/dlmalloc.o (.text)
81/* lib_blackfin/bf533_string.o (.text) */
82/* lib_generic/vsprintf.o (.text) */
83 lib_generic/crc32.o (.text)
84/* lib_generic/zlib.o (.text) */
85/* board/bf537-stamp/bf537-stamp.o (.text) */
86
87 . = DEFINED(env_offset) ? env_offset : .;
88 common/environment.o (.text)
89
90 *(EXCLUDE_FILE (board/bf537-stamp/post-memory.o) .text)
91 *(.fixup)
92 *(.got1)
93 } > ram
94 _etext = .;
95 PROVIDE (etext = .);
96 .text_l1 :
97 {
98 . = ALIGN(4) ;
99 _text_l1 = .;
100 PROVIDE (text_l1 = .);
101 board/bf537-stamp/post-memory.o (.text)
102 . = ALIGN(4) ;
103 _etext_l1 = .;
104 PROVIDE (etext_l1 = .);
105 } > l1_code AT > ram
106
107 .rodata :
108 {
109 . = ALIGN(4);
110 *(EXCLUDE_FILE (board/bf537-stamp/post-memory.o) .rodata)
111 *(EXCLUDE_FILE (board/bf537-stamp/post-memory.o) .rodata1)
112 *(EXCLUDE_FILE (board/bf537-stamp/post-memory.o) .rodata.str1.4)
113 *(.eh_frame)
114 . = ALIGN(4);
115 } > ram
116
117 . = ALIGN(4);
118 _erodata = .;
119 PROVIDE (erodata = .);
120 .rodata_l1 :
121 {
122 . = ALIGN(4) ;
123 _rodata_l1 = .;
124 PROVIDE (rodata_l1 = .);
125 board/bf537-stamp/post-memory.o (.rodata)
126 board/bf537-stamp/post-memory.o (.rodata1)
127 board/bf537-stamp/post-memory.o (.rodata.str1.4)
128 . = ALIGN(4) ;
129 _erodata_l1 = .;
130 PROVIDE(erodata_l1 = .);
131 } > l1_data AT > ram
132
133 .fini : { *(.fini) } =0
134 .ctors : { *(.ctors) }
135 .dtors : { *(.dtors) }
136
137 /* Read-write section, merged into data segment: */
138 . = (. + 0x00FF) & 0xFFFFFF00;
139 _erotext = .;
140 PROVIDE (erotext = .);
141 .reloc :
142 {
143 *(.got)
144 _GOT2_TABLE_ = .;
145 *(.got2)
146 _FIXUP_TABLE_ = .;
147 *(.fixup)
148 }
149 __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >>2;
150 __fixup_entries = (. - _FIXUP_TABLE_)>>2;
151
152 .data :
153 {
154 *(.data)
155 *(.data1)
156 *(.sdata)
157 *(.sdata2)
158 *(.dynamic)
159 CONSTRUCTORS
160 } > ram
161 _edata = .;
162 PROVIDE (edata = .);
163
164 ___u_boot_cmd_start = .;
165 .u_boot_cmd : { *(.u_boot_cmd) } > ram
166 ___u_boot_cmd_end = .;
167
168
169 __start___ex_table = .;
170 __ex_table : { *(__ex_table) }
171 __stop___ex_table = .;
172
173 . = ALIGN(256);
174 __init_begin = .;
175 .text.init : { *(.text.init) }
176 .data.init : { *(.data.init) }
177 . = ALIGN(256);
178 __init_end = .;
179
180 .bss :
181 {
182 __bss_start = .;
183 *(.sbss) *(.scommon)
184 *(.dynbss)
185 *(.bss)
186 *(COMMON)
187 } > ram
188 _end = . ;
189 PROVIDE (end = .);
190}