blob: 5e84369fe15f411542b009f4029c573a7e16d92a [file] [log] [blame]
Stefan Roese18d156e2007-06-01 16:18:17 +02001/*
2 * (C) Copyright 2007
3 * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
4 *
Wolfgang Denk1a459662013-07-08 09:37:19 +02005 * SPDX-License-Identifier: GPL-2.0+
Stefan Roese18d156e2007-06-01 16:18:17 +02006 */
7
8OUTPUT_ARCH(powerpc)
Stefan Roese18d156e2007-06-01 16:18:17 +02009SECTIONS
10{
11 /* Read-only sections, merged into text segment: */
12 . = + SIZEOF_HEADERS;
Stefan Roese18d156e2007-06-01 16:18:17 +020013 .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 Denkee8028b2010-11-21 20:55:42 +010018 arch/powerpc/cpu/ppc4xx/start.o (.text*)
19 board/amcc/bamboo/init.o (.text*)
Stefan Roese18d156e2007-06-01 16:18:17 +020020
21 /* Align to next NAND block */
22 . = ALIGN(0x4000);
Jean-Christophe PLAGNIOL-VILLARD0cf4fd32008-09-10 22:48:01 +020023 common/env_embedded.o (.ppcenv)
Stefan Roese18d156e2007-06-01 16:18:17 +020024 /* Keep some space here for redundant env and potential bad env blocks */
25 . = ALIGN(0x10000);
26
Wolfgang Denkee8028b2010-11-21 20:55:42 +010027 *(.text*)
Stefan Roese18d156e2007-06-01 16:18:17 +020028 }
29 _etext = .;
30 PROVIDE (etext = .);
31 .rodata :
32 {
Trent Piephof62fb992009-02-18 15:22:05 -080033 *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
Stefan Roese18d156e2007-06-01 16:18:17 +020034 }
Stefan Roese18d156e2007-06-01 16:18:17 +020035
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 Roese18d156e2007-06-01 16:18:17 +020043 _GOT2_TABLE_ = .;
Wolfgang Denkee8028b2010-11-21 20:55:42 +010044 KEEP(*(.got2))
Stefan Roese18d156e2007-06-01 16:18:17 +020045 _FIXUP_TABLE_ = .;
Wolfgang Denkee8028b2010-11-21 20:55:42 +010046 KEEP(*(.fixup))
Stefan Roese18d156e2007-06-01 16:18:17 +020047 }
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 Roese18d156e2007-06-01 16:18:17 +020055 }
56 _edata = .;
57 PROVIDE (edata = .);
58
59 . = .;
Stefan Roese18d156e2007-06-01 16:18:17 +020060
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 Roese18d156e2007-06-01 16:18:17 +020064
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 = .;
Wolfgang Denk64134f02008-01-12 20:31:39 +010078 .bss (NOLOAD) :
Stefan Roese18d156e2007-06-01 16:18:17 +020079 {
Wolfgang Denkee8028b2010-11-21 20:55:42 +010080 *(.bss*)
81 *(.sbss*)
Stefan Roese18d156e2007-06-01 16:18:17 +020082 *(COMMON)
Selvamuthukumar9b827cf2008-10-16 22:54:03 +053083 . = ALIGN(4);
Stefan Roese18d156e2007-06-01 16:18:17 +020084 }
85
Simon Glass3929fb02013-03-14 06:54:53 +000086 __bss_end = . ;
Stefan Roese18d156e2007-06-01 16:18:17 +020087 PROVIDE (end = .);
88}