blob: 5354172af0eb058bf5b307a6a63fe18c287c43d0 [file] [log] [blame]
Grant Likelyd181c9a2007-07-03 00:32:58 -06001/*
2 * (C) Copyright 2003-2004
3 * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
4 *
Wolfgang Denk1a459662013-07-08 09:37:19 +02005 * SPDX-License-Identifier: GPL-2.0+
Grant Likelyd181c9a2007-07-03 00:32:58 -06006 */
7
8OUTPUT_ARCH(powerpc)
Wolfgang Denk085ecde2010-11-23 13:20:22 +01009
Grant Likelyd181c9a2007-07-03 00:32:58 -060010SECTIONS
11{
12 /* Read-only sections, merged into text segment: */
Grant Likelyd181c9a2007-07-03 00:32:58 -060013 .text :
14 {
15 /* WARNING - the following is hand-optimized to fit within */
16 /* the sector layout of our flash chips! XXX FIXME XXX */
17
Wolfgang Denk085ecde2010-11-23 13:20:22 +010018 arch/powerpc/cpu/mpc5xxx/start.o (.text*)
19 arch/powerpc/cpu/mpc5xxx/traps.o (.text*)
Grant Likelyd181c9a2007-07-03 00:32:58 -060020
21 . = DEFINED(env_offset) ? env_offset : .;
Wolfgang Denk085ecde2010-11-23 13:20:22 +010022 common/env_embedded.o (.ppcenv*)
Grant Likelyd181c9a2007-07-03 00:32:58 -060023
Wolfgang Denk085ecde2010-11-23 13:20:22 +010024 *(.text*)
Grant Likelyd181c9a2007-07-03 00:32:58 -060025 . = ALIGN(16);
Trent Piephof62fb992009-02-18 15:22:05 -080026 *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
Grant Likelyd181c9a2007-07-03 00:32:58 -060027 }
Grant Likelyd181c9a2007-07-03 00:32:58 -060028
29 /* Read-write section, merged into data segment: */
30 . = (. + 0x0FFF) & 0xFFFFF000;
31 _erotext = .;
32 PROVIDE (erotext = .);
33 .reloc :
34 {
Wolfgang Denk085ecde2010-11-23 13:20:22 +010035 KEEP(*(.got))
Grant Likelyd181c9a2007-07-03 00:32:58 -060036 _GOT2_TABLE_ = .;
Wolfgang Denk085ecde2010-11-23 13:20:22 +010037 KEEP(*(.got2))
Grant Likelyd181c9a2007-07-03 00:32:58 -060038 _FIXUP_TABLE_ = .;
Wolfgang Denk085ecde2010-11-23 13:20:22 +010039 KEEP(*(.fixup))
Grant Likelyd181c9a2007-07-03 00:32:58 -060040 }
41 __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >> 2;
42 __fixup_entries = (. - _FIXUP_TABLE_) >> 2;
43
44 .data :
45 {
Wolfgang Denk085ecde2010-11-23 13:20:22 +010046 *(.data*)
47 *(.sdata*)
Grant Likelyd181c9a2007-07-03 00:32:58 -060048 }
49 _edata = .;
50 PROVIDE (edata = .);
51
52 . = .;
Grant Likelyd181c9a2007-07-03 00:32:58 -060053
Marek Vasut55675142012-10-12 10:27:03 +000054 .u_boot_list : {
Albert ARIBAUDef123c52013-02-25 00:59:00 +000055 KEEP(*(SORT(.u_boot_list*)));
Marek Vasut55675142012-10-12 10:27:03 +000056 }
Grant Likelyd181c9a2007-07-03 00:32:58 -060057
58 . = .;
59 __start___ex_table = .;
60 __ex_table : { *(__ex_table) }
61 __stop___ex_table = .;
62
63 . = ALIGN(4096);
64 __init_begin = .;
65 .text.init : { *(.text.init) }
66 .data.init : { *(.data.init) }
67 . = ALIGN(4096);
68 __init_end = .;
69
70 __bss_start = .;
Wolfgang Denk64134f02008-01-12 20:31:39 +010071 .bss (NOLOAD) :
Grant Likelyd181c9a2007-07-03 00:32:58 -060072 {
Wolfgang Denk085ecde2010-11-23 13:20:22 +010073 *(.bss*)
74 *(.sbss*)
Grant Likelyd181c9a2007-07-03 00:32:58 -060075 *(COMMON)
Selvamuthukumar9b827cf2008-10-16 22:54:03 +053076 . = ALIGN(4);
Grant Likelyd181c9a2007-07-03 00:32:58 -060077 }
Simon Glass3929fb02013-03-14 06:54:53 +000078 __bss_end = . ;
Grant Likelyd181c9a2007-07-03 00:32:58 -060079 PROVIDE (end = .);
80}