blob: 75b0285e4e51d47718e39e8b3445ac5ce6e2a082 [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 = .;
Jagdish Gediya4d3294b2018-09-03 21:35:05 +053077 _end = .;
Mingkai Hu7da53352009-09-11 14:19:10 +080078
79 .bootpg ADDR(.text) - 0x1000 :
80 {
Prabhakar Kushwaha5113ee72012-02-29 18:00:23 +000081 KEEP(arch/powerpc/cpu/mpc85xx/start.o (.bootpg))
Mingkai Hu7da53352009-09-11 14:19:10 +080082 } :text = 0xffff
83
Prabhakar Kushwaha0938b602014-03-31 15:31:34 +053084 . = ADDR(.text) + CONFIG_SYS_MONITOR_LEN;
Mingkai Hu7da53352009-09-11 14:19:10 +080085
86 __bss_start = .;
87 .bss (NOLOAD) :
88 {
Haiying Wang36ae6a82010-11-10 14:32:36 -050089 *(.sbss*)
90 *(.bss*)
Mingkai Hu7da53352009-09-11 14:19:10 +080091 *(COMMON)
92 } :bss
93
94 . = ALIGN(4);
Simon Glass3929fb02013-03-14 06:54:53 +000095 __bss_end = . ;
Mingkai Hu7da53352009-09-11 14:19:10 +080096 PROVIDE (end = .);
97}