blob: 5f69bc4ebe6896ae6111d503d2559f475d381ff6 [file] [log] [blame]
wdenk910607b2002-09-15 17:46:36 +00001/*
Wolfgang Denkcd0402a2010-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 Denk1a459662013-07-08 09:37:19 +02005 * SPDX-License-Identifier: GPL-2.0+
wdenk910607b2002-09-15 17:46:36 +00006 */
7
8OUTPUT_ARCH(powerpc)
Wolfgang Denkcd0402a2010-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 Denkcd0402a2010-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 Denkcd0402a2010-11-20 15:07:45 +010021 *(.text*)
wdenk910607b2002-09-15 17:46:36 +000022 }
23 _etext = .;
24 PROVIDE (etext = .);
25 .rodata :
26 {
Trent Piephof62fb992009-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 Denkcd0402a2010-11-20 15:07:45 +010037 KEEP(*(.got2))
Joakim Tjernlund9d8fbd12011-04-20 14:22:59 +020038 KEEP(*(.got))
39 PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4);
wdenk910607b2002-09-15 17:46:36 +000040 _FIXUP_TABLE_ = .;
Wolfgang Denkcd0402a2010-11-20 15:07:45 +010041 KEEP(*(.fixup))
wdenk910607b2002-09-15 17:46:36 +000042 }
Joakim Tjernlund9d8fbd12011-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 Denkcd0402a2010-11-20 15:07:45 +010048 *(.data*)
49 *(.sdata*)
wdenk910607b2002-09-15 17:46:36 +000050 }
51 _edata = .;
52 PROVIDE (edata = .);
53
Wolfgang Denk807d5d72005-08-31 12:28:00 +020054 . = .;
wdenk8bde7f72003-06-27 21:31:46 +000055
Marek Vasut55675142012-10-12 10:27:03 +000056 . = ALIGN(4);
57 .u_boot_list : {
Albert ARIBAUDef123c52013-02-25 00:59:00 +000058 KEEP(*(SORT(.u_boot_list*)));
Marek Vasut55675142012-10-12 10:27:03 +000059 }
60
wdenk8bde7f72003-06-27 21:31:46 +000061
Wolfgang Denk807d5d72005-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 Denk64134f02008-01-12 20:31:39 +010075 .bss (NOLOAD) :
wdenk910607b2002-09-15 17:46:36 +000076 {
Wolfgang Denkcd0402a2010-11-20 15:07:45 +010077 *(.bss*)
78 *(.sbss*)
wdenk910607b2002-09-15 17:46:36 +000079 *(COMMON)
Selvamuthukumar9b827cf2008-10-16 22:54:03 +053080 . = ALIGN(4);
wdenk910607b2002-09-15 17:46:36 +000081 }
Simon Glass3929fb02013-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-VILLARD0cf4fd32008-09-10 22:48:01 +020087 common/env_embedded.o (.ppcenv)
wdenk910607b2002-09-15 17:46:36 +000088 }
89}