blob: 9419f83a70c60e37d65c69a1433b12661e557579 [file] [log] [blame]
wdenkefee1702002-07-20 20:14:13 +00001/*
Wolfgang Denke71d99d2010-11-20 15:07:45 +01002 * (C) Copyright 2000-2010
wdenkefee1702002-07-20 20:14:13 +00003 * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
4 *
Wolfgang Denkd79de1d2013-07-08 09:37:19 +02005 * SPDX-License-Identifier: GPL-2.0+
wdenkefee1702002-07-20 20:14:13 +00006 */
7
8OUTPUT_ARCH(powerpc)
Wolfgang Denke71d99d2010-11-20 15:07:45 +01009
wdenkefee1702002-07-20 20:14:13 +000010SECTIONS
11{
12 /* Read-only sections, merged into text segment: */
13 . = + SIZEOF_HEADERS;
wdenkefee1702002-07-20 20:14:13 +000014 .text :
15 {
16 /* WARNING - the following is hand-optimized to fit within */
17 /* the sector layout of our flash chips! XXX FIXME XXX */
Wolfgang Denke71d99d2010-11-20 15:07:45 +010018 arch/powerpc/cpu/mpc8xx/start.o (.text*)
19 arch/powerpc/cpu/mpc8xx/traps.o (.text*)
20 board/hermes/libhermes.o (.text*)
wdenkefee1702002-07-20 20:14:13 +000021
wdenkefee1702002-07-20 20:14:13 +000022 . = env_offset;
Wolfgang Denke71d99d2010-11-20 15:07:45 +010023 common/env_embedded.o (.text*)
wdenkefee1702002-07-20 20:14:13 +000024
Wolfgang Denke71d99d2010-11-20 15:07:45 +010025 *(.text*)
wdenkefee1702002-07-20 20:14:13 +000026 }
27 _etext = .;
28 PROVIDE (etext = .);
29 .rodata :
30 {
Trent Piepho4438e5e2009-02-18 15:22:05 -080031 *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
wdenkefee1702002-07-20 20:14:13 +000032 }
wdenkefee1702002-07-20 20:14:13 +000033
34 /* Read-write section, merged into data segment: */
35 . = (. + 0x00FF) & 0xFFFFFF00;
36 _erotext = .;
37 PROVIDE (erotext = .);
38 .reloc :
39 {
wdenkefee1702002-07-20 20:14:13 +000040 _GOT2_TABLE_ = .;
Wolfgang Denke71d99d2010-11-20 15:07:45 +010041 KEEP(*(.got2))
Joakim Tjernlunda65f8c82011-04-20 14:22:59 +020042 KEEP(*(.got))
43 PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4);
wdenkefee1702002-07-20 20:14:13 +000044 _FIXUP_TABLE_ = .;
Wolfgang Denke71d99d2010-11-20 15:07:45 +010045 KEEP(*(.fixup))
wdenkefee1702002-07-20 20:14:13 +000046 }
Joakim Tjernlunda65f8c82011-04-20 14:22:59 +020047 __got2_entries = ((_GLOBAL_OFFSET_TABLE_ - _GOT2_TABLE_) >> 2) - 1;
wdenkefee1702002-07-20 20:14:13 +000048 __fixup_entries = (. - _FIXUP_TABLE_)>>2;
49
50 .data :
51 {
Wolfgang Denke71d99d2010-11-20 15:07:45 +010052 *(.data*)
53 *(.sdata*)
wdenkefee1702002-07-20 20:14:13 +000054 }
55 _edata = .;
56 PROVIDE (edata = .);
57
Wolfgang Denk5dd2c652005-08-31 12:28:00 +020058 . = .;
wdenk57b2d802003-06-27 21:31:46 +000059
Marek Vasut607092a2012-10-12 10:27:03 +000060 . = ALIGN(4);
61 .u_boot_list : {
Albert ARIBAUDc24895e2013-02-25 00:59:00 +000062 KEEP(*(SORT(.u_boot_list*)));
Marek Vasut607092a2012-10-12 10:27:03 +000063 }
64
wdenk57b2d802003-06-27 21:31:46 +000065
Wolfgang Denk5dd2c652005-08-31 12:28:00 +020066 . = .;
wdenkefee1702002-07-20 20:14:13 +000067 __start___ex_table = .;
68 __ex_table : { *(__ex_table) }
69 __stop___ex_table = .;
70
71 . = ALIGN(256);
72 __init_begin = .;
73 .text.init : { *(.text.init) }
74 .data.init : { *(.data.init) }
75 . = ALIGN(256);
76 __init_end = .;
77
78 __bss_start = .;
Wolfgang Denk828a9782008-01-12 20:31:39 +010079 .bss (NOLOAD) :
wdenkefee1702002-07-20 20:14:13 +000080 {
Wolfgang Denke71d99d2010-11-20 15:07:45 +010081 *(.bss*)
82 *(.sbss*)
wdenkefee1702002-07-20 20:14:13 +000083 *(COMMON)
Selvamuthukumard2454ba2008-10-16 22:54:03 +053084 . = ALIGN(4);
wdenkefee1702002-07-20 20:14:13 +000085 }
Simon Glassed70c8f2013-03-14 06:54:53 +000086 __bss_end = . ;
wdenkefee1702002-07-20 20:14:13 +000087 PROVIDE (end = .);
88}