blob: 0fdb166ed5828af3522a2fcc65ef6adb919fce91 [file] [log] [blame]
Stefan Roeseb79316f2005-08-15 12:31:23 +02001/*
2 * (C) Copyright 2005
3 * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
4 * Travis B. Sawyer, Sandburst Corporation, tsawyer@sandburst.com
5 *
6 * See file CREDITS for list of people who contributed to this
7 * project.
8 *
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License as
11 * published by the Free Software Foundation; either version 2 of
12 * the License, or (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
22 * MA 02111-1307 USA
23 */
24
25OUTPUT_ARCH(powerpc)
26SEARCH_DIR(/lib); SEARCH_DIR(/usr/lib); SEARCH_DIR(/usr/local/lib); SEARCH_DIR(/usr/local/powerpc-any-elf/lib);
27/* Do we need any of these for elf?
28 __DYNAMIC = 0; */
29SECTIONS
30{
31 .resetvec 0xFFFFFFFC :
32 {
33 *(.resetvec)
34 } = 0xffff
35
36 .bootpg 0xFFFFF000 :
37 {
38 cpu/ppc4xx/start.o (.bootpg)
39 } = 0xffff
40
41 /* Read-only sections, merged into text segment: */
42 . = + SIZEOF_HEADERS;
43 .interp : { *(.interp) }
44 .hash : { *(.hash) }
45 .dynsym : { *(.dynsym) }
46 .dynstr : { *(.dynstr) }
47 .rel.text : { *(.rel.text) }
48 .rela.text : { *(.rela.text) }
49 .rel.data : { *(.rel.data) }
50 .rela.data : { *(.rela.data) }
51 .rel.rodata : { *(.rel.rodata) }
52 .rela.rodata : { *(.rela.rodata) }
53 .rel.got : { *(.rel.got) }
54 .rela.got : { *(.rela.got) }
55 .rel.ctors : { *(.rel.ctors) }
56 .rela.ctors : { *(.rela.ctors) }
57 .rel.dtors : { *(.rel.dtors) }
58 .rela.dtors : { *(.rela.dtors) }
59 .rel.bss : { *(.rel.bss) }
60 .rela.bss : { *(.rela.bss) }
61 .rel.plt : { *(.rel.plt) }
62 .rela.plt : { *(.rela.plt) }
63 .init : { *(.init) }
64 .plt : { *(.plt) }
65 .text :
66 {
67 /* WARNING - the following is hand-optimized to fit within */
68 /* the sector layout of our flash chips! XXX FIXME XXX */
69
70 cpu/ppc4xx/start.o (.text)
71 board/sandburst/metrobox/init.o (.text)
72 cpu/ppc4xx/kgdb.o (.text)
73 cpu/ppc4xx/traps.o (.text)
74 cpu/ppc4xx/interrupts.o (.text)
75 cpu/ppc4xx/serial.o (.text)
76 cpu/ppc4xx/cpu_init.o (.text)
77 cpu/ppc4xx/speed.o (.text)
78 cpu/ppc4xx/440gx_enet.o (.text)
79 common/dlmalloc.o (.text)
80 lib_generic/crc32.o (.text)
81 lib_ppc/extable.o (.text)
82 lib_generic/zlib.o (.text)
83
84/* . = env_offset;*/
85/* common/environment.o(.text)*/
86
87 *(.text)
88 *(.fixup)
89 *(.got1)
90 }
91 _etext = .;
92 PROVIDE (etext = .);
93 .rodata :
94 {
95 *(.rodata)
96 *(.rodata1)
97 *(.rodata.str1.4)
98 }
99 .fini : { *(.fini) } =0
100 .ctors : { *(.ctors) }
101 .dtors : { *(.dtors) }
102
103 /* Read-write section, merged into data segment: */
104 . = (. + 0x00FF) & 0xFFFFFF00;
105 _erotext = .;
106 PROVIDE (erotext = .);
107 .reloc :
108 {
109 *(.got)
110 _GOT2_TABLE_ = .;
111 *(.got2)
112 _FIXUP_TABLE_ = .;
113 *(.fixup)
114 }
115 __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >>2;
116 __fixup_entries = (. - _FIXUP_TABLE_)>>2;
117
118 .data :
119 {
120 *(.data)
121 *(.data1)
122 *(.sdata)
123 *(.sdata2)
124 *(.dynamic)
125 CONSTRUCTORS
126 }
127 _edata = .;
128 PROVIDE (edata = .);
129
130 __u_boot_cmd_start = .;
131 .u_boot_cmd : { *(.u_boot_cmd) }
132 __u_boot_cmd_end = .;
133
134
135 __start___ex_table = .;
136 __ex_table : { *(__ex_table) }
137 __stop___ex_table = .;
138
139 . = ALIGN(256);
140 __init_begin = .;
141 .text.init : { *(.text.init) }
142 .data.init : { *(.data.init) }
143 . = ALIGN(256);
144 __init_end = .;
145
146 __bss_start = .;
147 .bss :
148 {
149 *(.sbss) *(.scommon)
150 *(.dynbss)
151 *(.bss)
152 *(COMMON)
153 }
154 _end = . ;
155 PROVIDE (end = .);
156}