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