blob: f4d752c30b59ef03f982d2beb54a7303153c835f [file] [log] [blame]
Stefan Roese887e2ec2006-09-07 11:51:23 +02001/*
Stefan Roesed12ae802006-09-12 20:19:10 +02002 * (C) Copyright 2006
Stefan Roese887e2ec2006-09-07 11:51:23 +02003 * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
4 *
Wolfgang Denk1a459662013-07-08 09:37:19 +02005 * SPDX-License-Identifier: GPL-2.0+
Stefan Roese887e2ec2006-09-07 11:51:23 +02006 */
7
8OUTPUT_ARCH(powerpc)
Stefan Roese887e2ec2006-09-07 11:51:23 +02009SECTIONS
10{
11 /* Read-only sections, merged into text segment: */
12 . = + SIZEOF_HEADERS;
Stefan Roese887e2ec2006-09-07 11:51:23 +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
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/sequoia/init.o (.text*)
Stefan Roese887e2ec2006-09-07 11:51:23 +020020
Stefan Roesed12ae802006-09-12 20:19:10 +020021 /* Align to next NAND block */
22 . = ALIGN(0x4000);
Jean-Christophe PLAGNIOL-VILLARD0cf4fd32008-09-10 22:48:01 +020023 common/env_embedded.o (.ppcenv)
Stefan Roesed12ae802006-09-12 20:19:10 +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 Roese887e2ec2006-09-07 11:51:23 +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 Roese887e2ec2006-09-07 11:51:23 +020034 }
Stefan Roese887e2ec2006-09-07 11:51:23 +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 Roese887e2ec2006-09-07 11:51:23 +020043 _GOT2_TABLE_ = .;
Wolfgang Denkee8028b2010-11-21 20:55:42 +010044 KEEP(*(.got2))
Stefan Roese887e2ec2006-09-07 11:51:23 +020045 _FIXUP_TABLE_ = .;
Wolfgang Denkee8028b2010-11-21 20:55:42 +010046 KEEP(*(.fixup))
Stefan Roese887e2ec2006-09-07 11:51:23 +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 Roese887e2ec2006-09-07 11:51:23 +020055 }
56 _edata = .;
57 PROVIDE (edata = .);
58
59 . = .;
Stefan Roese887e2ec2006-09-07 11:51:23 +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 Roese887e2ec2006-09-07 11:51:23 +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 Roese887e2ec2006-09-07 11:51:23 +020079 {
Wolfgang Denkee8028b2010-11-21 20:55:42 +010080 *(.bss*)
81 *(.sbss*)
Stefan Roese887e2ec2006-09-07 11:51:23 +020082 *(COMMON)
Selvamuthukumar9b827cf2008-10-16 22:54:03 +053083 . = ALIGN(4);
Stefan Roese887e2ec2006-09-07 11:51:23 +020084 }
85
Simon Glass3929fb02013-03-14 06:54:53 +000086 __bss_end = . ;
Stefan Roese887e2ec2006-09-07 11:51:23 +020087 PROVIDE (end = .);
88}