Mingkai Hu | 0255cd7 | 2009-09-11 14:19:10 +0800 | [diff] [blame] | 1 | /* |
Prabhakar Kushwaha | a01db41 | 2012-02-29 18:00:23 +0000 | [diff] [blame] | 2 | * Copyright 2009-2012 Freescale Semiconductor, Inc. |
Mingkai Hu | 0255cd7 | 2009-09-11 14:19:10 +0800 | [diff] [blame] | 3 | * |
Wolfgang Denk | d79de1d | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 4 | * SPDX-License-Identifier: GPL-2.0+ |
Mingkai Hu | 0255cd7 | 2009-09-11 14:19:10 +0800 | [diff] [blame] | 5 | */ |
6 | |||||
Masahiro Yamada | cd1b58e | 2014-04-28 10:17:10 +0900 | [diff] [blame] | 7 | #include "config.h" |
Prabhakar Kushwaha | 120a1c3 | 2014-03-31 15:31:34 +0530 | [diff] [blame] | 8 | |
9 | #ifndef CONFIG_SYS_MONITOR_LEN | ||||
10 | #define CONFIG_SYS_MONITOR_LEN 0x80000 | ||||
11 | #endif | ||||
12 | |||||
Mingkai Hu | 0255cd7 | 2009-09-11 14:19:10 +0800 | [diff] [blame] | 13 | OUTPUT_ARCH(powerpc) |
14 | /* Do we need any of these for elf? | ||||
15 | __DYNAMIC = 0; */ | ||||
16 | PHDRS | ||||
17 | { | ||||
18 | text PT_LOAD; | ||||
19 | bss PT_LOAD; | ||||
20 | } | ||||
21 | |||||
22 | SECTIONS | ||||
23 | { | ||||
24 | /* Read-only sections, merged into text segment: */ | ||||
25 | . = + SIZEOF_HEADERS; | ||||
26 | .interp : { *(.interp) } | ||||
Mingkai Hu | 0255cd7 | 2009-09-11 14:19:10 +0800 | [diff] [blame] | 27 | .text : |
28 | { | ||||
Haiying Wang | 9ac755b | 2010-11-10 14:32:36 -0500 | [diff] [blame] | 29 | *(.text*) |
Mingkai Hu | 0255cd7 | 2009-09-11 14:19:10 +0800 | [diff] [blame] | 30 | } :text |
31 | _etext = .; | ||||
32 | PROVIDE (etext = .); | ||||
33 | .rodata : | ||||
34 | { | ||||
Mingkai Hu | 0255cd7 | 2009-09-11 14:19:10 +0800 | [diff] [blame] | 35 | *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) |
36 | } :text | ||||
Mingkai Hu | 0255cd7 | 2009-09-11 14:19:10 +0800 | [diff] [blame] | 37 | |
38 | /* Read-write section, merged into data segment: */ | ||||
39 | . = (. + 0x00FF) & 0xFFFFFF00; | ||||
40 | _erotext = .; | ||||
41 | PROVIDE (erotext = .); | ||||
42 | .reloc : | ||||
43 | { | ||||
Mingkai Hu | 0255cd7 | 2009-09-11 14:19:10 +0800 | [diff] [blame] | 44 | _GOT2_TABLE_ = .; |
Haiying Wang | 9ac755b | 2010-11-10 14:32:36 -0500 | [diff] [blame] | 45 | KEEP(*(.got2)) |
Scott Wood | 4ede022 | 2012-05-01 16:37:57 -0500 | [diff] [blame] | 46 | KEEP(*(.got)) |
Mingkai Hu | 0255cd7 | 2009-09-11 14:19:10 +0800 | [diff] [blame] | 47 | _FIXUP_TABLE_ = .; |
Haiying Wang | 9ac755b | 2010-11-10 14:32:36 -0500 | [diff] [blame] | 48 | KEEP(*(.fixup)) |
Mingkai Hu | 0255cd7 | 2009-09-11 14:19:10 +0800 | [diff] [blame] | 49 | } |
Scott Wood | 4ede022 | 2012-05-01 16:37:57 -0500 | [diff] [blame] | 50 | __got2_entries = ((_GLOBAL_OFFSET_TABLE_ - _GOT2_TABLE_) >> 2) - 1; |
Mingkai Hu | 0255cd7 | 2009-09-11 14:19:10 +0800 | [diff] [blame] | 51 | __fixup_entries = (. - _FIXUP_TABLE_) >> 2; |
52 | |||||
53 | .data : | ||||
54 | { | ||||
Haiying Wang | 9ac755b | 2010-11-10 14:32:36 -0500 | [diff] [blame] | 55 | *(.data*) |
56 | *(.sdata*) | ||||
Mingkai Hu | 0255cd7 | 2009-09-11 14:19:10 +0800 | [diff] [blame] | 57 | } |
58 | _edata = .; | ||||
59 | PROVIDE (edata = .); | ||||
60 | |||||
61 | . = .; | ||||
Mingkai Hu | 0255cd7 | 2009-09-11 14:19:10 +0800 | [diff] [blame] | 62 | |
Marek Vasut | 607092a | 2012-10-12 10:27:03 +0000 | [diff] [blame] | 63 | .u_boot_list : { |
Albert ARIBAUD | c24895e | 2013-02-25 00:59:00 +0000 | [diff] [blame] | 64 | KEEP(*(SORT(.u_boot_list*))); |
Marek Vasut | 607092a | 2012-10-12 10:27:03 +0000 | [diff] [blame] | 65 | } |
66 | |||||
Mingkai Hu | 0255cd7 | 2009-09-11 14:19:10 +0800 | [diff] [blame] | 67 | . = .; |
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 Kushwaha | a01db41 | 2012-02-29 18:00:23 +0000 | [diff] [blame] | 81 | KEEP(arch/powerpc/cpu/mpc85xx/start.o (.bootpg)) |
Mingkai Hu | 0255cd7 | 2009-09-11 14:19:10 +0800 | [diff] [blame] | 82 | } :text = 0xffff |
83 | |||||
Prabhakar Kushwaha | 120a1c3 | 2014-03-31 15:31:34 +0530 | [diff] [blame] | 84 | . = ADDR(.text) + CONFIG_SYS_MONITOR_LEN; |
Mingkai Hu | 0255cd7 | 2009-09-11 14:19:10 +0800 | [diff] [blame] | 85 | |
86 | __bss_start = .; | ||||
87 | .bss (NOLOAD) : | ||||
88 | { | ||||
Haiying Wang | 9ac755b | 2010-11-10 14:32:36 -0500 | [diff] [blame] | 89 | *(.sbss*) |
90 | *(.bss*) | ||||
Mingkai Hu | 0255cd7 | 2009-09-11 14:19:10 +0800 | [diff] [blame] | 91 | *(COMMON) |
92 | } :bss | ||||
93 | |||||
94 | . = ALIGN(4); | ||||
Simon Glass | ed70c8f | 2013-03-14 06:54:53 +0000 | [diff] [blame] | 95 | __bss_end = . ; |
Mingkai Hu | 0255cd7 | 2009-09-11 14:19:10 +0800 | [diff] [blame] | 96 | PROVIDE (end = .); |
97 | } |