blob: dadfc7dee50d8a9b0bc1564aa9e8d5f3b88e14f6 [file] [log] [blame]
Lunsheng Wangb0e32942005-07-29 10:20:29 -05001/*
2 * (C) Copyright 2002,2003, Motorola,Inc.
3 *
4 * See file CREDITS for list of people who contributed to this
5 * project.
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License as
9 * published by the Free Software Foundation; either version 2 of
10 * the License, or (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
20 * MA 02111-1307 USA
21 */
22
23/* Assumes that the size of u-boot is less than 512K and the
24 * start address is aligned on a 512K block.
25 * Boot page and reset vector is put at that end of the 512K block. */
26
27OUTPUT_ARCH(powerpc)
Lunsheng Wangb0e32942005-07-29 10:20:29 -050028/* Do we need any of these for elf?
29 __DYNAMIC = 0; */
30SECTIONS
31{
32 /* Read-only sections, merged into text segment: */
33 .interp : { *(.interp) }
34 .hash : { *(.hash) }
35 .dynsym : { *(.dynsym) }
36 .dynstr : { *(.dynstr) }
37 .rel.text : { *(.rel.text) }
Wolfgang Denk53677ef2008-05-20 16:00:29 +020038 .rela.text : { *(.rela.text) }
Lunsheng Wangb0e32942005-07-29 10:20:29 -050039 .rel.data : { *(.rel.data) }
Wolfgang Denk53677ef2008-05-20 16:00:29 +020040 .rela.data : { *(.rela.data) }
41 .rel.rodata : { *(.rel.rodata) }
42 .rela.rodata : { *(.rela.rodata) }
Lunsheng Wangb0e32942005-07-29 10:20:29 -050043 .rel.got : { *(.rel.got) }
44 .rela.got : { *(.rela.got) }
45 .rel.ctors : { *(.rel.ctors) }
46 .rela.ctors : { *(.rela.ctors) }
47 .rel.dtors : { *(.rel.dtors) }
48 .rela.dtors : { *(.rela.dtors) }
49 .rel.bss : { *(.rel.bss) }
50 .rela.bss : { *(.rela.bss) }
51 .rel.plt : { *(.rel.plt) }
52 .rela.plt : { *(.rela.plt) }
53 .init : { *(.init) }
54 .plt : { *(.plt) }
55 .text :
56 {
57 cpu/mpc85xx/start.o (.text)
Lunsheng Wangb0e32942005-07-29 10:20:29 -050058 cpu/mpc85xx/traps.o (.text)
59 cpu/mpc85xx/interrupts.o (.text)
60 cpu/mpc85xx/cpu_init.o (.text)
61 cpu/mpc85xx/cpu.o (.text)
62 cpu/mpc85xx/speed.o (.text)
63 cpu/mpc85xx/pci.o (.text)
64 common/dlmalloc.o (.text)
65 lib_generic/crc32.o (.text)
66 lib_ppc/extable.o (.text)
67 lib_generic/zlib.o (.text)
68 *(.text)
69 *(.fixup)
70 *(.got1)
71 }
72 _etext = .;
73 PROVIDE (etext = .);
74 .rodata :
75 {
76 *(.rodata)
77 *(.rodata1)
78 *(.rodata.str1.4)
Wolfgang Denk74812662005-12-12 16:06:05 +010079 *(.eh_frame)
Lunsheng Wangb0e32942005-07-29 10:20:29 -050080 }
81 .fini : { *(.fini) } =0
82 .ctors : { *(.ctors) }
83 .dtors : { *(.dtors) }
84
85 /* Read-write section, merged into data segment: */
86 . = (. + 0x00FF) & 0xFFFFFF00;
87 _erotext = .;
88 PROVIDE (erotext = .);
89 .reloc :
90 {
91 *(.got)
92 _GOT2_TABLE_ = .;
93 *(.got2)
94 _FIXUP_TABLE_ = .;
95 *(.fixup)
96 }
97 __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >> 2;
98 __fixup_entries = (. - _FIXUP_TABLE_) >> 2;
99
100 .data :
101 {
102 *(.data)
103 *(.data1)
104 *(.sdata)
105 *(.sdata2)
106 *(.dynamic)
107 CONSTRUCTORS
108 }
109 _edata = .;
110 PROVIDE (edata = .);
111
Wolfgang Denk807d5d72005-08-31 12:28:00 +0200112 . = .;
Lunsheng Wangb0e32942005-07-29 10:20:29 -0500113 __u_boot_cmd_start = .;
114 .u_boot_cmd : { *(.u_boot_cmd) }
115 __u_boot_cmd_end = .;
116
Wolfgang Denk807d5d72005-08-31 12:28:00 +0200117 . = .;
Lunsheng Wangb0e32942005-07-29 10:20:29 -0500118 __start___ex_table = .;
119 __ex_table : { *(__ex_table) }
120 __stop___ex_table = .;
121
122 . = ALIGN(256);
123 __init_begin = .;
124 .text.init : { *(.text.init) }
125 .data.init : { *(.data.init) }
126 . = ALIGN(256);
127 __init_end = .;
128
129 __bss_start = .;
Wolfgang Denk64134f02008-01-12 20:31:39 +0100130 .bss (NOLOAD) :
Lunsheng Wangb0e32942005-07-29 10:20:29 -0500131 {
132 *(.sbss) *(.scommon)
133 *(.dynbss)
134 *(.bss)
135 *(COMMON)
136 }
137 _end = . ;
138 PROVIDE (end = .);
139
140 . = (. & 0xFFF80000) + 0x0007F000;
141 .bootpg :
142 {
143 cpu/mpc85xx/start.o (.bootpg)
Lunsheng Wangb0e32942005-07-29 10:20:29 -0500144 } = 0xffff
145
146 . = (. & 0xFFF80000) + 0x0007FFFC;
147 .resetvec :
148 {
149 *(.resetvec)
150 } = 0xffff
151
152}