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 | |||||
7 | OUTPUT_ARCH(powerpc) | ||||
8 | /* Do we need any of these for elf? | ||||
9 | __DYNAMIC = 0; */ | ||||
10 | PHDRS | ||||
11 | { | ||||
12 | text PT_LOAD; | ||||
13 | bss PT_LOAD; | ||||
14 | } | ||||
15 | |||||
16 | SECTIONS | ||||
17 | { | ||||
18 | /* Read-only sections, merged into text segment: */ | ||||
19 | . = + SIZEOF_HEADERS; | ||||
20 | .interp : { *(.interp) } | ||||
Mingkai Hu | 0255cd7 | 2009-09-11 14:19:10 +0800 | [diff] [blame] | 21 | .text : |
22 | { | ||||
Haiying Wang | 9ac755b | 2010-11-10 14:32:36 -0500 | [diff] [blame] | 23 | *(.text*) |
Mingkai Hu | 0255cd7 | 2009-09-11 14:19:10 +0800 | [diff] [blame] | 24 | } :text |
25 | _etext = .; | ||||
26 | PROVIDE (etext = .); | ||||
27 | .rodata : | ||||
28 | { | ||||
Mingkai Hu | 0255cd7 | 2009-09-11 14:19:10 +0800 | [diff] [blame] | 29 | *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) |
30 | } :text | ||||
Mingkai Hu | 0255cd7 | 2009-09-11 14:19:10 +0800 | [diff] [blame] | 31 | |
32 | /* Read-write section, merged into data segment: */ | ||||
33 | . = (. + 0x00FF) & 0xFFFFFF00; | ||||
34 | _erotext = .; | ||||
35 | PROVIDE (erotext = .); | ||||
36 | .reloc : | ||||
37 | { | ||||
Mingkai Hu | 0255cd7 | 2009-09-11 14:19:10 +0800 | [diff] [blame] | 38 | _GOT2_TABLE_ = .; |
Haiying Wang | 9ac755b | 2010-11-10 14:32:36 -0500 | [diff] [blame] | 39 | KEEP(*(.got2)) |
Scott Wood | 4ede022 | 2012-05-01 16:37:57 -0500 | [diff] [blame] | 40 | KEEP(*(.got)) |
41 | PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4); | ||||
Mingkai Hu | 0255cd7 | 2009-09-11 14:19:10 +0800 | [diff] [blame] | 42 | _FIXUP_TABLE_ = .; |
Haiying Wang | 9ac755b | 2010-11-10 14:32:36 -0500 | [diff] [blame] | 43 | KEEP(*(.fixup)) |
Mingkai Hu | 0255cd7 | 2009-09-11 14:19:10 +0800 | [diff] [blame] | 44 | } |
Scott Wood | 4ede022 | 2012-05-01 16:37:57 -0500 | [diff] [blame] | 45 | __got2_entries = ((_GLOBAL_OFFSET_TABLE_ - _GOT2_TABLE_) >> 2) - 1; |
Mingkai Hu | 0255cd7 | 2009-09-11 14:19:10 +0800 | [diff] [blame] | 46 | __fixup_entries = (. - _FIXUP_TABLE_) >> 2; |
47 | |||||
48 | .data : | ||||
49 | { | ||||
Haiying Wang | 9ac755b | 2010-11-10 14:32:36 -0500 | [diff] [blame] | 50 | *(.data*) |
51 | *(.sdata*) | ||||
Mingkai Hu | 0255cd7 | 2009-09-11 14:19:10 +0800 | [diff] [blame] | 52 | } |
53 | _edata = .; | ||||
54 | PROVIDE (edata = .); | ||||
55 | |||||
56 | . = .; | ||||
Mingkai Hu | 0255cd7 | 2009-09-11 14:19:10 +0800 | [diff] [blame] | 57 | |
Marek Vasut | 607092a | 2012-10-12 10:27:03 +0000 | [diff] [blame] | 58 | .u_boot_list : { |
Albert ARIBAUD | c24895e | 2013-02-25 00:59:00 +0000 | [diff] [blame] | 59 | KEEP(*(SORT(.u_boot_list*))); |
Marek Vasut | 607092a | 2012-10-12 10:27:03 +0000 | [diff] [blame] | 60 | } |
61 | |||||
Mingkai Hu | 0255cd7 | 2009-09-11 14:19:10 +0800 | [diff] [blame] | 62 | . = .; |
63 | __start___ex_table = .; | ||||
64 | __ex_table : { *(__ex_table) } | ||||
65 | __stop___ex_table = .; | ||||
66 | |||||
67 | . = ALIGN(256); | ||||
68 | __init_begin = .; | ||||
69 | .text.init : { *(.text.init) } | ||||
70 | .data.init : { *(.data.init) } | ||||
71 | . = ALIGN(256); | ||||
72 | __init_end = .; | ||||
73 | |||||
74 | .bootpg ADDR(.text) - 0x1000 : | ||||
75 | { | ||||
Prabhakar Kushwaha | a01db41 | 2012-02-29 18:00:23 +0000 | [diff] [blame] | 76 | KEEP(arch/powerpc/cpu/mpc85xx/start.o (.bootpg)) |
Mingkai Hu | 0255cd7 | 2009-09-11 14:19:10 +0800 | [diff] [blame] | 77 | } :text = 0xffff |
78 | |||||
79 | . = ADDR(.text) + 0x80000; | ||||
80 | |||||
81 | __bss_start = .; | ||||
82 | .bss (NOLOAD) : | ||||
83 | { | ||||
Haiying Wang | 9ac755b | 2010-11-10 14:32:36 -0500 | [diff] [blame] | 84 | *(.sbss*) |
85 | *(.bss*) | ||||
Mingkai Hu | 0255cd7 | 2009-09-11 14:19:10 +0800 | [diff] [blame] | 86 | *(COMMON) |
87 | } :bss | ||||
88 | |||||
89 | . = ALIGN(4); | ||||
Simon Glass | ed70c8f | 2013-03-14 06:54:53 +0000 | [diff] [blame] | 90 | __bss_end = . ; |
Mingkai Hu | 0255cd7 | 2009-09-11 14:19:10 +0800 | [diff] [blame] | 91 | PROVIDE (end = .); |
92 | } |