blob: 6db6da19aa34e28c391fa89ad2fac42c105fb247 [file] [log] [blame]
Tom Rini83d290c2018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Mingkai Hu7da53352009-09-11 14:19:10 +08002/*
Prabhakar Kushwaha5113ee72012-02-29 18:00:23 +00003 * Copyright 2009-2012 Freescale Semiconductor, Inc.
Mingkai Hu7da53352009-09-11 14:19:10 +08004 */
5
Masahiro Yamada6f2ed0e2014-04-28 10:17:10 +09006#include "config.h"
Prabhakar Kushwaha0938b602014-03-31 15:31:34 +05307
8#ifndef CONFIG_SYS_MONITOR_LEN
9#define CONFIG_SYS_MONITOR_LEN 0x80000
10#endif
11
Mingkai Hu7da53352009-09-11 14:19:10 +080012OUTPUT_ARCH(powerpc)
13/* Do we need any of these for elf?
14 __DYNAMIC = 0; */
15PHDRS
16{
17 text PT_LOAD;
18 bss PT_LOAD;
19}
20
21SECTIONS
22{
23 /* Read-only sections, merged into text segment: */
24 . = + SIZEOF_HEADERS;
25 .interp : { *(.interp) }
Mingkai Hu7da53352009-09-11 14:19:10 +080026 .text :
27 {
Haiying Wang36ae6a82010-11-10 14:32:36 -050028 *(.text*)
Mingkai Hu7da53352009-09-11 14:19:10 +080029 } :text
30 _etext = .;
31 PROVIDE (etext = .);
32 .rodata :
33 {
Mingkai Hu7da53352009-09-11 14:19:10 +080034 *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
35 } :text
Mingkai Hu7da53352009-09-11 14:19:10 +080036
37 /* Read-write section, merged into data segment: */
38 . = (. + 0x00FF) & 0xFFFFFF00;
39 _erotext = .;
40 PROVIDE (erotext = .);
41 .reloc :
42 {
Mingkai Hu7da53352009-09-11 14:19:10 +080043 _GOT2_TABLE_ = .;
Haiying Wang36ae6a82010-11-10 14:32:36 -050044 KEEP(*(.got2))
Scott Woodd2a97da2012-05-01 16:37:57 -050045 KEEP(*(.got))
Mingkai Hu7da53352009-09-11 14:19:10 +080046 _FIXUP_TABLE_ = .;
Haiying Wang36ae6a82010-11-10 14:32:36 -050047 KEEP(*(.fixup))
Mingkai Hu7da53352009-09-11 14:19:10 +080048 }
Scott Woodd2a97da2012-05-01 16:37:57 -050049 __got2_entries = ((_GLOBAL_OFFSET_TABLE_ - _GOT2_TABLE_) >> 2) - 1;
Mingkai Hu7da53352009-09-11 14:19:10 +080050 __fixup_entries = (. - _FIXUP_TABLE_) >> 2;
51
52 .data :
53 {
Haiying Wang36ae6a82010-11-10 14:32:36 -050054 *(.data*)
55 *(.sdata*)
Mingkai Hu7da53352009-09-11 14:19:10 +080056 }
57 _edata = .;
58 PROVIDE (edata = .);
59
60 . = .;
Mingkai Hu7da53352009-09-11 14:19:10 +080061
Marek Vasut55675142012-10-12 10:27:03 +000062 .u_boot_list : {
Albert ARIBAUDef123c52013-02-25 00:59:00 +000063 KEEP(*(SORT(.u_boot_list*)));
Marek Vasut55675142012-10-12 10:27:03 +000064 }
65
Mingkai Hu7da53352009-09-11 14:19:10 +080066 . = .;
67 __start___ex_table = .;
68 __ex_table : { *(__ex_table) }
69 __stop___ex_table = .;
70
71 . = ALIGN(256);
72 __init_begin = .;
73 .text.init : { *(.text.init) }
74 .data.init : { *(.data.init) }
75 . = ALIGN(256);
76 __init_end = .;
77
78 .bootpg ADDR(.text) - 0x1000 :
79 {
Prabhakar Kushwaha5113ee72012-02-29 18:00:23 +000080 KEEP(arch/powerpc/cpu/mpc85xx/start.o (.bootpg))
Mingkai Hu7da53352009-09-11 14:19:10 +080081 } :text = 0xffff
82
Prabhakar Kushwaha0938b602014-03-31 15:31:34 +053083 . = ADDR(.text) + CONFIG_SYS_MONITOR_LEN;
Mingkai Hu7da53352009-09-11 14:19:10 +080084
85 __bss_start = .;
86 .bss (NOLOAD) :
87 {
Haiying Wang36ae6a82010-11-10 14:32:36 -050088 *(.sbss*)
89 *(.bss*)
Mingkai Hu7da53352009-09-11 14:19:10 +080090 *(COMMON)
91 } :bss
92
93 . = ALIGN(4);
Simon Glass3929fb02013-03-14 06:54:53 +000094 __bss_end = . ;
Mingkai Hu7da53352009-09-11 14:19:10 +080095 PROVIDE (end = .);
96}