blob: 074791376a923515ad0457780453d032ed60f5ac [file] [log] [blame]
Lunsheng Wang61e61952005-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 Wang61e61952005-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 Denka1be4762008-05-20 16:00:29 +020038 .rela.text : { *(.rela.text) }
Lunsheng Wang61e61952005-07-29 10:20:29 -050039 .rel.data : { *(.rel.data) }
Wolfgang Denka1be4762008-05-20 16:00:29 +020040 .rela.data : { *(.rela.data) }
41 .rel.rodata : { *(.rel.rodata) }
42 .rela.rodata : { *(.rela.rodata) }
Lunsheng Wang61e61952005-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 Wang61e61952005-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 {
Wolfgang Denkaaa7c002005-12-12 16:06:05 +010076 *(.eh_frame)
Trent Piepho4438e5e2009-02-18 15:22:05 -080077 *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
Lunsheng Wang61e61952005-07-29 10:20:29 -050078 }
79 .fini : { *(.fini) } =0
80 .ctors : { *(.ctors) }
81 .dtors : { *(.dtors) }
82
83 /* Read-write section, merged into data segment: */
84 . = (. + 0x00FF) & 0xFFFFFF00;
85 _erotext = .;
86 PROVIDE (erotext = .);
87 .reloc :
88 {
89 *(.got)
90 _GOT2_TABLE_ = .;
91 *(.got2)
92 _FIXUP_TABLE_ = .;
93 *(.fixup)
94 }
95 __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >> 2;
96 __fixup_entries = (. - _FIXUP_TABLE_) >> 2;
97
98 .data :
99 {
100 *(.data)
101 *(.data1)
102 *(.sdata)
103 *(.sdata2)
104 *(.dynamic)
105 CONSTRUCTORS
106 }
107 _edata = .;
108 PROVIDE (edata = .);
109
Wolfgang Denk5dd2c652005-08-31 12:28:00 +0200110 . = .;
Lunsheng Wang61e61952005-07-29 10:20:29 -0500111 __u_boot_cmd_start = .;
112 .u_boot_cmd : { *(.u_boot_cmd) }
113 __u_boot_cmd_end = .;
114
Wolfgang Denk5dd2c652005-08-31 12:28:00 +0200115 . = .;
Lunsheng Wang61e61952005-07-29 10:20:29 -0500116 __start___ex_table = .;
117 __ex_table : { *(__ex_table) }
118 __stop___ex_table = .;
119
120 . = ALIGN(256);
121 __init_begin = .;
122 .text.init : { *(.text.init) }
123 .data.init : { *(.data.init) }
124 . = ALIGN(256);
125 __init_end = .;
126
127 __bss_start = .;
Wolfgang Denk828a9782008-01-12 20:31:39 +0100128 .bss (NOLOAD) :
Lunsheng Wang61e61952005-07-29 10:20:29 -0500129 {
130 *(.sbss) *(.scommon)
131 *(.dynbss)
132 *(.bss)
133 *(COMMON)
Selvamuthukumard2454ba2008-10-16 22:54:03 +0530134 . = ALIGN(4);
Lunsheng Wang61e61952005-07-29 10:20:29 -0500135 }
136 _end = . ;
137 PROVIDE (end = .);
138
139 . = (. & 0xFFF80000) + 0x0007F000;
140 .bootpg :
141 {
142 cpu/mpc85xx/start.o (.bootpg)
Lunsheng Wang61e61952005-07-29 10:20:29 -0500143 } = 0xffff
144
145 . = (. & 0xFFF80000) + 0x0007FFFC;
146 .resetvec :
147 {
148 *(.resetvec)
149 } = 0xffff
150
151}