blob: 65106f5e1f008fb91d6ac70c30b2ae061f8a85ab [file] [log] [blame]
Mingkai Hu0255cd72009-09-11 14:19:10 +08001/*
Prabhakar Kushwahaa01db412012-02-29 18:00:23 +00002 * Copyright 2009-2012 Freescale Semiconductor, Inc.
Mingkai Hu0255cd72009-09-11 14:19:10 +08003 *
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
23OUTPUT_ARCH(powerpc)
24/* Do we need any of these for elf?
25 __DYNAMIC = 0; */
26PHDRS
27{
28 text PT_LOAD;
29 bss PT_LOAD;
30}
31
32SECTIONS
33{
34 /* Read-only sections, merged into text segment: */
35 . = + SIZEOF_HEADERS;
36 .interp : { *(.interp) }
Mingkai Hu0255cd72009-09-11 14:19:10 +080037 .text :
38 {
Haiying Wang9ac755b2010-11-10 14:32:36 -050039 *(.text*)
Mingkai Hu0255cd72009-09-11 14:19:10 +080040 } :text
41 _etext = .;
42 PROVIDE (etext = .);
43 .rodata :
44 {
Mingkai Hu0255cd72009-09-11 14:19:10 +080045 *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
46 } :text
Mingkai Hu0255cd72009-09-11 14:19:10 +080047
48 /* Read-write section, merged into data segment: */
49 . = (. + 0x00FF) & 0xFFFFFF00;
50 _erotext = .;
51 PROVIDE (erotext = .);
52 .reloc :
53 {
Mingkai Hu0255cd72009-09-11 14:19:10 +080054 _GOT2_TABLE_ = .;
Haiying Wang9ac755b2010-11-10 14:32:36 -050055 KEEP(*(.got2))
Scott Wood4ede0222012-05-01 16:37:57 -050056 KEEP(*(.got))
57 PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4);
Mingkai Hu0255cd72009-09-11 14:19:10 +080058 _FIXUP_TABLE_ = .;
Haiying Wang9ac755b2010-11-10 14:32:36 -050059 KEEP(*(.fixup))
Mingkai Hu0255cd72009-09-11 14:19:10 +080060 }
Scott Wood4ede0222012-05-01 16:37:57 -050061 __got2_entries = ((_GLOBAL_OFFSET_TABLE_ - _GOT2_TABLE_) >> 2) - 1;
Mingkai Hu0255cd72009-09-11 14:19:10 +080062 __fixup_entries = (. - _FIXUP_TABLE_) >> 2;
63
64 .data :
65 {
Haiying Wang9ac755b2010-11-10 14:32:36 -050066 *(.data*)
67 *(.sdata*)
Mingkai Hu0255cd72009-09-11 14:19:10 +080068 }
69 _edata = .;
70 PROVIDE (edata = .);
71
72 . = .;
Mingkai Hu0255cd72009-09-11 14:19:10 +080073
Marek Vasut607092a2012-10-12 10:27:03 +000074 .u_boot_list : {
Albert ARIBAUDc24895e2013-02-25 00:59:00 +000075 KEEP(*(SORT(.u_boot_list*)));
Marek Vasut607092a2012-10-12 10:27:03 +000076 }
77
Mingkai Hu0255cd72009-09-11 14:19:10 +080078 . = .;
79 __start___ex_table = .;
80 __ex_table : { *(__ex_table) }
81 __stop___ex_table = .;
82
83 . = ALIGN(256);
84 __init_begin = .;
85 .text.init : { *(.text.init) }
86 .data.init : { *(.data.init) }
87 . = ALIGN(256);
88 __init_end = .;
89
90 .bootpg ADDR(.text) - 0x1000 :
91 {
Prabhakar Kushwahaa01db412012-02-29 18:00:23 +000092 KEEP(arch/powerpc/cpu/mpc85xx/start.o (.bootpg))
Mingkai Hu0255cd72009-09-11 14:19:10 +080093 } :text = 0xffff
94
95 . = ADDR(.text) + 0x80000;
96
97 __bss_start = .;
98 .bss (NOLOAD) :
99 {
Haiying Wang9ac755b2010-11-10 14:32:36 -0500100 *(.sbss*)
101 *(.bss*)
Mingkai Hu0255cd72009-09-11 14:19:10 +0800102 *(COMMON)
103 } :bss
104
105 . = ALIGN(4);
Simon Glassed70c8f2013-03-14 06:54:53 +0000106 __bss_end = . ;
Mingkai Hu0255cd72009-09-11 14:19:10 +0800107 PROVIDE (end = .);
108}