blob: 0399f93e6ef04aade2fa91a7379cb13a0c5e5689 [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 *
Wolfgang Denkd79de1d2013-07-08 09:37:19 +02004 * SPDX-License-Identifier: GPL-2.0+
Mingkai Hu0255cd72009-09-11 14:19:10 +08005 */
6
Masahiro Yamadacd1b58e2014-04-28 10:17:10 +09007#include "config.h"
Prabhakar Kushwaha120a1c32014-03-31 15:31:34 +05308
9#ifndef CONFIG_SYS_MONITOR_LEN
10#define CONFIG_SYS_MONITOR_LEN 0x80000
11#endif
12
Mingkai Hu0255cd72009-09-11 14:19:10 +080013OUTPUT_ARCH(powerpc)
14/* Do we need any of these for elf?
15 __DYNAMIC = 0; */
16PHDRS
17{
18 text PT_LOAD;
19 bss PT_LOAD;
20}
21
22SECTIONS
23{
24 /* Read-only sections, merged into text segment: */
25 . = + SIZEOF_HEADERS;
26 .interp : { *(.interp) }
Mingkai Hu0255cd72009-09-11 14:19:10 +080027 .text :
28 {
Haiying Wang9ac755b2010-11-10 14:32:36 -050029 *(.text*)
Mingkai Hu0255cd72009-09-11 14:19:10 +080030 } :text
31 _etext = .;
32 PROVIDE (etext = .);
33 .rodata :
34 {
Mingkai Hu0255cd72009-09-11 14:19:10 +080035 *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
36 } :text
Mingkai Hu0255cd72009-09-11 14:19:10 +080037
38 /* Read-write section, merged into data segment: */
39 . = (. + 0x00FF) & 0xFFFFFF00;
40 _erotext = .;
41 PROVIDE (erotext = .);
42 .reloc :
43 {
Mingkai Hu0255cd72009-09-11 14:19:10 +080044 _GOT2_TABLE_ = .;
Haiying Wang9ac755b2010-11-10 14:32:36 -050045 KEEP(*(.got2))
Scott Wood4ede0222012-05-01 16:37:57 -050046 KEEP(*(.got))
Mingkai Hu0255cd72009-09-11 14:19:10 +080047 _FIXUP_TABLE_ = .;
Haiying Wang9ac755b2010-11-10 14:32:36 -050048 KEEP(*(.fixup))
Mingkai Hu0255cd72009-09-11 14:19:10 +080049 }
Scott Wood4ede0222012-05-01 16:37:57 -050050 __got2_entries = ((_GLOBAL_OFFSET_TABLE_ - _GOT2_TABLE_) >> 2) - 1;
Mingkai Hu0255cd72009-09-11 14:19:10 +080051 __fixup_entries = (. - _FIXUP_TABLE_) >> 2;
52
53 .data :
54 {
Haiying Wang9ac755b2010-11-10 14:32:36 -050055 *(.data*)
56 *(.sdata*)
Mingkai Hu0255cd72009-09-11 14:19:10 +080057 }
58 _edata = .;
59 PROVIDE (edata = .);
60
61 . = .;
Mingkai Hu0255cd72009-09-11 14:19:10 +080062
Marek Vasut607092a2012-10-12 10:27:03 +000063 .u_boot_list : {
Albert ARIBAUDc24895e2013-02-25 00:59:00 +000064 KEEP(*(SORT(.u_boot_list*)));
Marek Vasut607092a2012-10-12 10:27:03 +000065 }
66
Mingkai Hu0255cd72009-09-11 14:19:10 +080067 . = .;
68 __start___ex_table = .;
69 __ex_table : { *(__ex_table) }
70 __stop___ex_table = .;
71
72 . = ALIGN(256);
73 __init_begin = .;
74 .text.init : { *(.text.init) }
75 .data.init : { *(.data.init) }
76 . = ALIGN(256);
77 __init_end = .;
78
79 .bootpg ADDR(.text) - 0x1000 :
80 {
Prabhakar Kushwahaa01db412012-02-29 18:00:23 +000081 KEEP(arch/powerpc/cpu/mpc85xx/start.o (.bootpg))
Mingkai Hu0255cd72009-09-11 14:19:10 +080082 } :text = 0xffff
83
Prabhakar Kushwaha120a1c32014-03-31 15:31:34 +053084 . = ADDR(.text) + CONFIG_SYS_MONITOR_LEN;
Mingkai Hu0255cd72009-09-11 14:19:10 +080085
86 __bss_start = .;
87 .bss (NOLOAD) :
88 {
Haiying Wang9ac755b2010-11-10 14:32:36 -050089 *(.sbss*)
90 *(.bss*)
Mingkai Hu0255cd72009-09-11 14:19:10 +080091 *(COMMON)
92 } :bss
93
94 . = ALIGN(4);
Simon Glassed70c8f2013-03-14 06:54:53 +000095 __bss_end = . ;
Mingkai Hu0255cd72009-09-11 14:19:10 +080096 PROVIDE (end = .);
97}