blob: df3b0f9168b7615eab3515114bc83b20738af37f [file] [log] [blame]
Mingkai Hu7da53352009-09-11 14:19:10 +08001/*
Prabhakar Kushwaha5113ee72012-02-29 18:00:23 +00002 * Copyright 2009-2012 Freescale Semiconductor, Inc.
Mingkai Hu7da53352009-09-11 14:19:10 +08003 *
Wolfgang Denk1a459662013-07-08 09:37:19 +02004 * SPDX-License-Identifier: GPL-2.0+
Mingkai Hu7da53352009-09-11 14:19:10 +08005 */
6
7OUTPUT_ARCH(powerpc)
8/* Do we need any of these for elf?
9 __DYNAMIC = 0; */
10PHDRS
11{
12 text PT_LOAD;
13 bss PT_LOAD;
14}
15
16SECTIONS
17{
18 /* Read-only sections, merged into text segment: */
19 . = + SIZEOF_HEADERS;
20 .interp : { *(.interp) }
Mingkai Hu7da53352009-09-11 14:19:10 +080021 .text :
22 {
Haiying Wang36ae6a82010-11-10 14:32:36 -050023 *(.text*)
Mingkai Hu7da53352009-09-11 14:19:10 +080024 } :text
25 _etext = .;
26 PROVIDE (etext = .);
27 .rodata :
28 {
Mingkai Hu7da53352009-09-11 14:19:10 +080029 *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
30 } :text
Mingkai Hu7da53352009-09-11 14:19:10 +080031
32 /* Read-write section, merged into data segment: */
33 . = (. + 0x00FF) & 0xFFFFFF00;
34 _erotext = .;
35 PROVIDE (erotext = .);
36 .reloc :
37 {
Mingkai Hu7da53352009-09-11 14:19:10 +080038 _GOT2_TABLE_ = .;
Haiying Wang36ae6a82010-11-10 14:32:36 -050039 KEEP(*(.got2))
Scott Woodd2a97da2012-05-01 16:37:57 -050040 KEEP(*(.got))
41 PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4);
Mingkai Hu7da53352009-09-11 14:19:10 +080042 _FIXUP_TABLE_ = .;
Haiying Wang36ae6a82010-11-10 14:32:36 -050043 KEEP(*(.fixup))
Mingkai Hu7da53352009-09-11 14:19:10 +080044 }
Scott Woodd2a97da2012-05-01 16:37:57 -050045 __got2_entries = ((_GLOBAL_OFFSET_TABLE_ - _GOT2_TABLE_) >> 2) - 1;
Mingkai Hu7da53352009-09-11 14:19:10 +080046 __fixup_entries = (. - _FIXUP_TABLE_) >> 2;
47
48 .data :
49 {
Haiying Wang36ae6a82010-11-10 14:32:36 -050050 *(.data*)
51 *(.sdata*)
Mingkai Hu7da53352009-09-11 14:19:10 +080052 }
53 _edata = .;
54 PROVIDE (edata = .);
55
56 . = .;
Mingkai Hu7da53352009-09-11 14:19:10 +080057
Marek Vasut55675142012-10-12 10:27:03 +000058 .u_boot_list : {
Albert ARIBAUDef123c52013-02-25 00:59:00 +000059 KEEP(*(SORT(.u_boot_list*)));
Marek Vasut55675142012-10-12 10:27:03 +000060 }
61
Mingkai Hu7da53352009-09-11 14:19:10 +080062 . = .;
63 __start___ex_table = .;
64 __ex_table : { *(__ex_table) }
65 __stop___ex_table = .;
66
67 . = ALIGN(256);
68 __init_begin = .;
69 .text.init : { *(.text.init) }
70 .data.init : { *(.data.init) }
71 . = ALIGN(256);
72 __init_end = .;
73
74 .bootpg ADDR(.text) - 0x1000 :
75 {
Prabhakar Kushwaha5113ee72012-02-29 18:00:23 +000076 KEEP(arch/powerpc/cpu/mpc85xx/start.o (.bootpg))
Mingkai Hu7da53352009-09-11 14:19:10 +080077 } :text = 0xffff
78
79 . = ADDR(.text) + 0x80000;
80
81 __bss_start = .;
82 .bss (NOLOAD) :
83 {
Haiying Wang36ae6a82010-11-10 14:32:36 -050084 *(.sbss*)
85 *(.bss*)
Mingkai Hu7da53352009-09-11 14:19:10 +080086 *(COMMON)
87 } :bss
88
89 . = ALIGN(4);
Simon Glass3929fb02013-03-14 06:54:53 +000090 __bss_end = . ;
Mingkai Hu7da53352009-09-11 14:19:10 +080091 PROVIDE (end = .);
92}