blob: cf2e2b5581230fc2bbe4ae8bf0ef4a183503d712 [file] [log] [blame]
Matthias Fuchs72c5d522007-12-28 17:07:14 +01001/*
2 * (C) Copyright 2006
3 * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
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
24OUTPUT_ARCH(powerpc)
25SEARCH_DIR(/lib); SEARCH_DIR(/usr/lib); SEARCH_DIR(/usr/local/lib); SEARCH_DIR(/usr/local/powerpc-any-elf/lib);
26SECTIONS
27{
28 /* Read-only sections, merged into text segment: */
29 . = + SIZEOF_HEADERS;
30 .interp : { *(.interp) }
31 .hash : { *(.hash) }
32 .dynsym : { *(.dynsym) }
33 .dynstr : { *(.dynstr) }
34 .rel.text : { *(.rel.text) }
35 .rela.text : { *(.rela.text) }
36 .rel.data : { *(.rel.data) }
37 .rela.data : { *(.rela.data) }
38 .rel.rodata : { *(.rel.rodata) }
39 .rela.rodata : { *(.rela.rodata) }
40 .rel.got : { *(.rel.got) }
41 .rela.got : { *(.rela.got) }
42 .rel.ctors : { *(.rel.ctors) }
43 .rela.ctors : { *(.rela.ctors) }
44 .rel.dtors : { *(.rel.dtors) }
45 .rela.dtors : { *(.rela.dtors) }
46 .rel.bss : { *(.rel.bss) }
47 .rela.bss : { *(.rela.bss) }
48 .rel.plt : { *(.rel.plt) }
49 .rela.plt : { *(.rela.plt) }
50 .init : { *(.init) }
51 .plt : { *(.plt) }
52 .text :
53 {
54 /* WARNING - the following is hand-optimized to fit within */
55 /* the sector layout of our flash chips! XXX FIXME XXX */
56
57 cpu/ppc4xx/start.o (.text)
58
59 /* Align to next NAND block */
60 . = ALIGN(0x4000);
61 common/environment.o (.ppcenv)
62 /* Keep some space here for redundant env and potential bad env blocks */
63 . = ALIGN(0x10000);
64
65 *(.text)
66 *(.fixup)
67 *(.got1)
68 }
69 _etext = .;
70 PROVIDE (etext = .);
71 .rodata :
72 {
73 *(.rodata)
74 *(.rodata1)
75 *(.rodata.str1.4)
76 }
77 .fini : { *(.fini) } =0
78 .ctors : { *(.ctors) }
79 .dtors : { *(.dtors) }
80
81 /* Read-write section, merged into data segment: */
82 . = (. + 0x00FF) & 0xFFFFFF00;
83 _erotext = .;
84 PROVIDE (erotext = .);
85 .reloc :
86 {
87 *(.got)
88 _GOT2_TABLE_ = .;
89 *(.got2)
90 _FIXUP_TABLE_ = .;
91 *(.fixup)
92 }
93 __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >>2;
94 __fixup_entries = (. - _FIXUP_TABLE_)>>2;
95
96 .data :
97 {
98 *(.data)
99 *(.data1)
100 *(.sdata)
101 *(.sdata2)
102 *(.dynamic)
103 CONSTRUCTORS
104 }
105 _edata = .;
106 PROVIDE (edata = .);
107
108 . = .;
109 __u_boot_cmd_start = .;
110 .u_boot_cmd : { *(.u_boot_cmd) }
111 __u_boot_cmd_end = .;
112
113
114 . = .;
115 __start___ex_table = .;
116 __ex_table : { *(__ex_table) }
117 __stop___ex_table = .;
118
119 . = ALIGN(256);
120 __init_begin = .;
121 .text.init : { *(.text.init) }
122 .data.init : { *(.data.init) }
123 . = ALIGN(256);
124 __init_end = .;
125
126 __bss_start = .;
127 .bss :
128 {
129 *(.sbss) *(.scommon)
130 *(.dynbss)
131 *(.bss)
132 *(COMMON)
133 }
134
135 _end = . ;
136 PROVIDE (end = .);
137}