blob: 9742e0297c06779b6265ee2e114e933c0f204047 [file] [log] [blame]
Wolfgang Denk97caf672006-03-12 02:12:27 +01001/*
Aubrey.Li9da597f2007-03-09 13:38:44 +08002 * U-boot - u-boot.lds.S
Wolfgang Denk97caf672006-03-12 02:12:27 +01003 *
Aubrey.Li9da597f2007-03-09 13:38:44 +08004 * Copyright (c) 2005-2007 Analog Device Inc.
Wolfgang Denk97caf672006-03-12 02:12:27 +01005 *
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
Aubrey.Li9da597f2007-03-09 13:38:44 +080028#include <config.h>
29
Wolfgang Denk97caf672006-03-12 02:12:27 +010030OUTPUT_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; */
34SECTIONS
35{
36 /* Read-only sections, merged into text segment: */
37 . = + SIZEOF_HEADERS;
38 .interp : { *(.interp) }
39 .hash : { *(.hash) }
40 .dynsym : { *(.dynsym) }
41 .dynstr : { *(.dynstr) }
42 .rel.text : { *(.rel.text) }
43 .rela.text : { *(.rela.text) }
44 .rel.data : { *(.rel.data) }
45 .rela.data : { *(.rela.data) }
46 .rel.rodata : { *(.rel.rodata) }
47 .rela.rodata : { *(.rela.rodata) }
48 .rel.got : { *(.rel.got) }
49 .rela.got : { *(.rela.got) }
50 .rel.ctors : { *(.rel.ctors) }
51 .rela.ctors : { *(.rela.ctors) }
52 .rel.dtors : { *(.rel.dtors) }
53 .rela.dtors : { *(.rela.dtors) }
54 .rel.bss : { *(.rel.bss) }
55 .rela.bss : { *(.rela.bss) }
56 .rel.plt : { *(.rel.plt) }
57 .rela.plt : { *(.rela.plt) }
58 .init : { *(.init) }
59 .plt : { *(.plt) }
Aubrey.Li9da597f2007-03-09 13:38:44 +080060 . = CFG_MONITOR_BASE;
Wolfgang Denk97caf672006-03-12 02:12:27 +010061 .text :
62 {
63 /* WARNING - the following is hand-optimized to fit within */
64 /* the sector before the environment sector. If it throws */
65 /* an error during compilation remove an object here to get */
66 /* it linked after the configuration sector. */
67
68 cpu/bf533/start.o (.text)
69 cpu/bf533/start1.o (.text)
70 cpu/bf533/traps.o (.text)
71 cpu/bf533/interrupt.o (.text)
72 cpu/bf533/serial.o (.text)
73 common/dlmalloc.o (.text)
Aubrey.Li9da597f2007-03-09 13:38:44 +080074/* lib_blackfin/bf533_string.o (.text) */
75/* lib_generic/vsprintf.o (.text) */
Wolfgang Denk97caf672006-03-12 02:12:27 +010076 lib_generic/crc32.o (.text)
77 lib_generic/zlib.o (.text)
Aubrey.Li9da597f2007-03-09 13:38:44 +080078 board/bf533-ezkit/bf533-ezkit.o (.text)
Wolfgang Denk97caf672006-03-12 02:12:27 +010079
80 . = DEFINED(env_offset) ? env_offset : .;
81 common/environment.o (.text)
82
83 *(.text)
84 *(.fixup)
85 *(.got1)
86 }
87 _etext = .;
88 PROVIDE (etext = .);
89 .rodata :
90 {
91 *(.rodata)
92 *(.rodata1)
93 *(.rodata.str1.4)
94 }
95 .fini : { *(.fini) } =0
96 .ctors : { *(.ctors) }
97 .dtors : { *(.dtors) }
98
99 /* Read-write section, merged into data segment: */
100 . = (. + 0x00FF) & 0xFFFFFF00;
101 _erotext = .;
102 PROVIDE (erotext = .);
103 .reloc :
104 {
105 *(.got)
106 _GOT2_TABLE_ = .;
107 *(.got2)
108 _FIXUP_TABLE_ = .;
109 *(.fixup)
110 }
111 __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >>2;
112 __fixup_entries = (. - _FIXUP_TABLE_)>>2;
113
114 .data :
115 {
116 *(.data)
117 *(.data1)
118 *(.sdata)
119 *(.sdata2)
120 *(.dynamic)
121 CONSTRUCTORS
122 }
123 _edata = .;
124 PROVIDE (edata = .);
125
Aubrey.Li9da597f2007-03-09 13:38:44 +0800126 ___u_boot_cmd_start = .;
Wolfgang Denk97caf672006-03-12 02:12:27 +0100127 .u_boot_cmd : { *(.u_boot_cmd) }
Aubrey.Li9da597f2007-03-09 13:38:44 +0800128 ___u_boot_cmd_end = .;
Wolfgang Denk97caf672006-03-12 02:12:27 +0100129
130
131 __start___ex_table = .;
132 __ex_table : { *(__ex_table) }
133 __stop___ex_table = .;
134
135 . = ALIGN(256);
136 __init_begin = .;
137 .text.init : { *(.text.init) }
138 .data.init : { *(.data.init) }
139 . = ALIGN(256);
140 __init_end = .;
141
142 __bss_start = .;
143 .bss :
144 {
145 *(.sbss) *(.scommon)
146 *(.dynbss)
147 *(.bss)
148 *(COMMON)
149 }
150 _end = . ;
151 PROVIDE (end = .);
152}