blob: 5f69bc4ebe6896ae6111d503d2559f475d381ff6 [file] [log] [blame]
wdenk910607b2002-09-15 17:46:36 +00001/*
Wolfgang Denke71d99d2010-11-20 15:07:45 +01002 * (C) Copyright 2000-2010
wdenk910607b2002-09-15 17:46:36 +00003 * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
4 *
Wolfgang Denkd79de1d2013-07-08 09:37:19 +02005 * SPDX-License-Identifier: GPL-2.0+
wdenk910607b2002-09-15 17:46:36 +00006 */
7
8OUTPUT_ARCH(powerpc)
Wolfgang Denke71d99d2010-11-20 15:07:45 +01009
wdenk910607b2002-09-15 17:46:36 +000010SECTIONS
11{
12 /* Read-only sections, merged into text segment: */
13 . = + SIZEOF_HEADERS;
wdenk910607b2002-09-15 17:46:36 +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*)
wdenk910607b2002-09-15 17:46:36 +000020
Wolfgang Denke71d99d2010-11-20 15:07:45 +010021 *(.text*)
wdenk910607b2002-09-15 17:46:36 +000022 }
23 _etext = .;
24 PROVIDE (etext = .);
25 .rodata :
26 {
Trent Piepho4438e5e2009-02-18 15:22:05 -080027 *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
wdenk910607b2002-09-15 17:46:36 +000028 }
wdenk910607b2002-09-15 17:46:36 +000029
30 /* Read-write section, merged into data segment: */
31 . = (. + 0x00FF) & 0xFFFFFF00;
32 _erotext = .;
33 PROVIDE (erotext = .);
34 .reloc :
35 {
wdenk910607b2002-09-15 17:46:36 +000036 _GOT2_TABLE_ = .;
Wolfgang Denke71d99d2010-11-20 15:07:45 +010037 KEEP(*(.got2))
Joakim Tjernlunda65f8c82011-04-20 14:22:59 +020038 KEEP(*(.got))
39 PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4);
wdenk910607b2002-09-15 17:46:36 +000040 _FIXUP_TABLE_ = .;
Wolfgang Denke71d99d2010-11-20 15:07:45 +010041 KEEP(*(.fixup))
wdenk910607b2002-09-15 17:46:36 +000042 }
Joakim Tjernlunda65f8c82011-04-20 14:22:59 +020043 __got2_entries = ((_GLOBAL_OFFSET_TABLE_ - _GOT2_TABLE_) >> 2) - 1;
wdenk910607b2002-09-15 17:46:36 +000044 __fixup_entries = (. - _FIXUP_TABLE_)>>2;
45
46 .data :
47 {
Wolfgang Denke71d99d2010-11-20 15:07:45 +010048 *(.data*)
49 *(.sdata*)
wdenk910607b2002-09-15 17:46:36 +000050 }
51 _edata = .;
52 PROVIDE (edata = .);
53
Wolfgang Denk5dd2c652005-08-31 12:28:00 +020054 . = .;
wdenk57b2d802003-06-27 21:31:46 +000055
Marek Vasut607092a2012-10-12 10:27:03 +000056 . = ALIGN(4);
57 .u_boot_list : {
Albert ARIBAUDc24895e2013-02-25 00:59:00 +000058 KEEP(*(SORT(.u_boot_list*)));
Marek Vasut607092a2012-10-12 10:27:03 +000059 }
60
wdenk57b2d802003-06-27 21:31:46 +000061
Wolfgang Denk5dd2c652005-08-31 12:28:00 +020062 . = .;
wdenk910607b2002-09-15 17:46:36 +000063 __start___ex_table = .;
64 __ex_table : { *(__ex_table) }
65 __stop___ex_table = .;
66
67 . = ALIGN(256);
68 __init_begin = .;
69 .text.init : { *(.text.init) }
70 .data.init : { *(.data.init) }
71 . = ALIGN(256);
72 __init_end = .;
73
74 __bss_start = .;
Wolfgang Denk828a9782008-01-12 20:31:39 +010075 .bss (NOLOAD) :
wdenk910607b2002-09-15 17:46:36 +000076 {
Wolfgang Denke71d99d2010-11-20 15:07:45 +010077 *(.bss*)
78 *(.sbss*)
wdenk910607b2002-09-15 17:46:36 +000079 *(COMMON)
Selvamuthukumard2454ba2008-10-16 22:54:03 +053080 . = ALIGN(4);
wdenk910607b2002-09-15 17:46:36 +000081 }
Simon Glassed70c8f2013-03-14 06:54:53 +000082 __bss_end = . ;
wdenk910607b2002-09-15 17:46:36 +000083 PROVIDE (end = .);
84 . = ALIGN(128 * 1024);
85 .ppcenv :
86 {
Jean-Christophe PLAGNIOL-VILLARD4436c1e2008-09-10 22:48:01 +020087 common/env_embedded.o (.ppcenv)
wdenk910607b2002-09-15 17:46:36 +000088 }
89}