blob: 31a2123bf12f5e9dae36f8c547379734c8d84261 [file] [log] [blame]
Stefan Roese71665eb2008-03-03 17:27:02 +01001/*
2 * (C) Copyright 2008
3 * Stefan Roese, DENX Software Engineering, sr@denx.de.
4 *
Wolfgang Denk1a459662013-07-08 09:37:19 +02005 * SPDX-License-Identifier: GPL-2.0+
Stefan Roese71665eb2008-03-03 17:27:02 +01006 */
7
8OUTPUT_ARCH(powerpc)
Stefan Roese71665eb2008-03-03 17:27:02 +01009SECTIONS
10{
11 /* Read-only sections, merged into text segment: */
12 . = + SIZEOF_HEADERS;
Stefan Roese71665eb2008-03-03 17:27:02 +010013 .text :
14 {
15 /* WARNING - the following is hand-optimized to fit within */
16 /* the sector layout of our flash chips! XXX FIXME XXX */
17
Stefan Roesea47a12b2010-04-15 16:07:28 +020018 arch/powerpc/cpu/ppc4xx/start.o (.text)
Wolfgang Denkee8028b2010-11-21 20:55:42 +010019 board/amcc/canyonlands/init.o (.text*)
Stefan Roese71665eb2008-03-03 17:27:02 +010020
21 /* Align to next NAND block */
Stefan Roese499e7832008-04-08 10:33:29 +020022 . = ALIGN(0x20000);
Jean-Christophe PLAGNIOL-VILLARD0cf4fd32008-09-10 22:48:01 +020023 common/env_embedded.o (.ppcenv)
Stefan Roese71665eb2008-03-03 17:27:02 +010024 /* Keep some space here for redundant env and potential bad env blocks */
Stefan Roese499e7832008-04-08 10:33:29 +020025 . = ALIGN(0x80000);
Stefan Roese71665eb2008-03-03 17:27:02 +010026
Wolfgang Denkee8028b2010-11-21 20:55:42 +010027 *(.text*)
Stefan Roese71665eb2008-03-03 17:27:02 +010028 }
29 _etext = .;
30 PROVIDE (etext = .);
31 .rodata :
32 {
Trent Piephof62fb992009-02-18 15:22:05 -080033 *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
Stefan Roese71665eb2008-03-03 17:27:02 +010034 }
Stefan Roese71665eb2008-03-03 17:27:02 +010035
36 /* Read-write section, merged into data segment: */
37 . = (. + 0x00FF) & 0xFFFFFF00;
38 _erotext = .;
39 PROVIDE (erotext = .);
40 .reloc :
41 {
Wolfgang Denkee8028b2010-11-21 20:55:42 +010042 KEEP(*(.got))
Stefan Roese71665eb2008-03-03 17:27:02 +010043 _GOT2_TABLE_ = .;
Wolfgang Denkee8028b2010-11-21 20:55:42 +010044 KEEP(*(.got2))
Stefan Roese71665eb2008-03-03 17:27:02 +010045 _FIXUP_TABLE_ = .;
Wolfgang Denkee8028b2010-11-21 20:55:42 +010046 KEEP(*(.fixup))
Stefan Roese71665eb2008-03-03 17:27:02 +010047 }
48 __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >>2;
49 __fixup_entries = (. - _FIXUP_TABLE_)>>2;
50
51 .data :
52 {
Wolfgang Denkee8028b2010-11-21 20:55:42 +010053 *(.data*)
54 *(.sdata*)
Stefan Roese71665eb2008-03-03 17:27:02 +010055 }
56 _edata = .;
57 PROVIDE (edata = .);
58
59 . = .;
Stefan Roese71665eb2008-03-03 17:27:02 +010060
Marek Vasut55675142012-10-12 10:27:03 +000061 .u_boot_list : {
Albert ARIBAUDef123c52013-02-25 00:59:00 +000062 KEEP(*(SORT(.u_boot_list*)));
Marek Vasut55675142012-10-12 10:27:03 +000063 }
Stefan Roese71665eb2008-03-03 17:27:02 +010064
65 . = .;
66 __start___ex_table = .;
67 __ex_table : { *(__ex_table) }
68 __stop___ex_table = .;
69
70 . = ALIGN(256);
71 __init_begin = .;
72 .text.init : { *(.text.init) }
73 .data.init : { *(.data.init) }
74 . = ALIGN(256);
75 __init_end = .;
76
77 __bss_start = .;
78 .bss (NOLOAD) :
79 {
Wolfgang Denkee8028b2010-11-21 20:55:42 +010080 *(.bss*)
81 *(.sbss*)
Stefan Roese71665eb2008-03-03 17:27:02 +010082 *(COMMON)
Selvamuthukumar9b827cf2008-10-16 22:54:03 +053083 . = ALIGN(4);
Stefan Roese71665eb2008-03-03 17:27:02 +010084 }
85
Simon Glass3929fb02013-03-14 06:54:53 +000086 __bss_end = . ;
Stefan Roese71665eb2008-03-03 17:27:02 +010087 PROVIDE (end = .);
88}