blob: 9a331c50a95e4f7b330f95798707f01f651e9294 [file] [log] [blame]
Stefan Roese720c5852007-11-03 12:08:28 +01001/*
2 * (C) Copyright 2007
3 * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
4 *
Wolfgang Denkd79de1d2013-07-08 09:37:19 +02005 * SPDX-License-Identifier: GPL-2.0+
Stefan Roese720c5852007-11-03 12:08:28 +01006 */
7
8OUTPUT_ARCH(powerpc)
Stefan Roese720c5852007-11-03 12:08:28 +01009SECTIONS
10{
11 /* Read-only sections, merged into text segment: */
12 . = + SIZEOF_HEADERS;
Stefan Roese720c5852007-11-03 12:08:28 +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 Roese99f2be62010-12-14 17:49:52 +010018 arch/powerpc/cpu/ppc4xx/start.o (.text*)
Stefan Roese720c5852007-11-03 12:08:28 +010019
20 /* Align to next NAND block */
21 . = ALIGN(0x4000);
Jean-Christophe PLAGNIOL-VILLARD4436c1e2008-09-10 22:48:01 +020022 common/env_embedded.o (.ppcenv)
Stefan Roese720c5852007-11-03 12:08:28 +010023 /* Keep some space here for redundant env and potential bad env blocks */
24 . = ALIGN(0x10000);
25
Stefan Roese99f2be62010-12-14 17:49:52 +010026 *(.text*)
Stefan Roese720c5852007-11-03 12:08:28 +010027 }
28 _etext = .;
29 PROVIDE (etext = .);
30 .rodata :
31 {
Trent Piepho4438e5e2009-02-18 15:22:05 -080032 *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
Stefan Roese720c5852007-11-03 12:08:28 +010033 }
Stefan Roese720c5852007-11-03 12:08:28 +010034
35 /* Read-write section, merged into data segment: */
36 . = (. + 0x00FF) & 0xFFFFFF00;
37 _erotext = .;
38 PROVIDE (erotext = .);
39 .reloc :
40 {
Stefan Roese99f2be62010-12-14 17:49:52 +010041 KEEP(*(.got))
Stefan Roese720c5852007-11-03 12:08:28 +010042 _GOT2_TABLE_ = .;
Stefan Roese99f2be62010-12-14 17:49:52 +010043 KEEP(*(.got2))
Stefan Roese720c5852007-11-03 12:08:28 +010044 _FIXUP_TABLE_ = .;
Stefan Roese99f2be62010-12-14 17:49:52 +010045 KEEP(*(.fixup))
Stefan Roese720c5852007-11-03 12:08:28 +010046 }
47 __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >>2;
48 __fixup_entries = (. - _FIXUP_TABLE_)>>2;
49
50 .data :
51 {
Stefan Roese99f2be62010-12-14 17:49:52 +010052 *(.data*)
53 *(.sdata*)
Stefan Roese720c5852007-11-03 12:08:28 +010054 }
55 _edata = .;
56 PROVIDE (edata = .);
57
58 . = .;
Stefan Roese720c5852007-11-03 12:08:28 +010059
Marek Vasut607092a2012-10-12 10:27:03 +000060 .u_boot_list : {
Albert ARIBAUDc24895e2013-02-25 00:59:00 +000061 KEEP(*(SORT(.u_boot_list*)));
Marek Vasut607092a2012-10-12 10:27:03 +000062 }
Stefan Roese720c5852007-11-03 12:08:28 +010063
64 . = .;
65 __start___ex_table = .;
66 __ex_table : { *(__ex_table) }
67 __stop___ex_table = .;
68
69 . = ALIGN(256);
70 __init_begin = .;
71 .text.init : { *(.text.init) }
72 .data.init : { *(.data.init) }
73 . = ALIGN(256);
74 __init_end = .;
75
76 __bss_start = .;
Wolfgang Denk828a9782008-01-12 20:31:39 +010077 .bss (NOLOAD) :
Stefan Roese720c5852007-11-03 12:08:28 +010078 {
Stefan Roese99f2be62010-12-14 17:49:52 +010079 *(.bss*)
80 *(.sbss*)
Stefan Roese720c5852007-11-03 12:08:28 +010081 *(COMMON)
Selvamuthukumard2454ba2008-10-16 22:54:03 +053082 . = ALIGN(4);
Stefan Roese720c5852007-11-03 12:08:28 +010083 }
84
Simon Glassed70c8f2013-03-14 06:54:53 +000085 __bss_end = . ;
Stefan Roese720c5852007-11-03 12:08:28 +010086 PROVIDE (end = .);
87}