blob: 2a68934c327894df516109bacc886f0745f336aa [file] [log] [blame]
wdenk4a5b6a32001-04-28 17:59:11 +00001/*
Wolfgang Denkcd0402a2010-11-20 15:07:45 +01002 * (C) Copyright 2000-2010
wdenk4a5b6a32001-04-28 17:59:11 +00003 * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
4 *
Wolfgang Denk1a459662013-07-08 09:37:19 +02005 * SPDX-License-Identifier: GPL-2.0+
wdenk4a5b6a32001-04-28 17:59:11 +00006 */
7
8OUTPUT_ARCH(powerpc)
Wolfgang Denkcd0402a2010-11-20 15:07:45 +01009
wdenk4a5b6a32001-04-28 17:59:11 +000010SECTIONS
11{
12 /* Read-only sections, merged into text segment: */
13 . = + SIZEOF_HEADERS;
wdenk4a5b6a32001-04-28 17:59:11 +000014 .text :
15 {
Wolfgang Denkcd0402a2010-11-20 15:07:45 +010016 /* WARNING - the following is hand-optimized to fit within */
17 /* the sector layout of our flash chips! XXX FIXME XXX */
18
19 arch/powerpc/cpu/mpc8xx/start.o (.text*)
20 arch/powerpc/cpu/mpc8xx/traps.o (.text*)
21 net/libnet.o (.text*)
22 arch/powerpc/cpu/mpc8xx/libmpc8xx.o (.text*)
Wolfgang Denkcd0402a2010-11-20 15:07:45 +010023 *(.text.v*printf)
24
25 . = DEFINED(env_offset) ? env_offset : .;
26 common/env_embedded.o (.ppcenv*)
27
28 *(.text*)
wdenk4a5b6a32001-04-28 17:59:11 +000029 }
30 _etext = .;
31 PROVIDE (etext = .);
32 .rodata :
33 {
Trent Piephof62fb992009-02-18 15:22:05 -080034 *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
wdenk4a5b6a32001-04-28 17:59:11 +000035 }
wdenk4a5b6a32001-04-28 17:59:11 +000036
37 /* Read-write section, merged into data segment: */
38 . = (. + 0x0FF) & 0xFFFFFF00;
39 _erotext = .;
40 PROVIDE (erotext = .);
41 .reloc :
42 {
wdenk4a5b6a32001-04-28 17:59:11 +000043 _GOT2_TABLE_ = .;
Wolfgang Denkcd0402a2010-11-20 15:07:45 +010044 KEEP(*(.got2))
Joakim Tjernlund9d8fbd12011-04-20 14:22:59 +020045 KEEP(*(.got))
46 PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4);
wdenk4a5b6a32001-04-28 17:59:11 +000047 _FIXUP_TABLE_ = .;
Wolfgang Denkcd0402a2010-11-20 15:07:45 +010048 KEEP(*(.fixup))
wdenk4a5b6a32001-04-28 17:59:11 +000049 }
Joakim Tjernlund9d8fbd12011-04-20 14:22:59 +020050 __got2_entries = ((_GLOBAL_OFFSET_TABLE_ - _GOT2_TABLE_) >> 2) - 1;
wdenk4a5b6a32001-04-28 17:59:11 +000051 __fixup_entries = (. - _FIXUP_TABLE_)>>2;
52
53 .data :
54 {
Wolfgang Denkcd0402a2010-11-20 15:07:45 +010055 *(.data*)
56 *(.sdata*)
wdenk4a5b6a32001-04-28 17:59:11 +000057 }
58 _edata = .;
59 PROVIDE (edata = .);
60
Wolfgang Denk807d5d72005-08-31 12:28:00 +020061 . = .;
wdenk8bde7f72003-06-27 21:31:46 +000062
Marek Vasut55675142012-10-12 10:27:03 +000063 . = ALIGN(4);
64 .u_boot_list : {
Albert ARIBAUDef123c52013-02-25 00:59:00 +000065 KEEP(*(SORT(.u_boot_list*)));
Marek Vasut55675142012-10-12 10:27:03 +000066 }
67
wdenk8bde7f72003-06-27 21:31:46 +000068
Wolfgang Denk807d5d72005-08-31 12:28:00 +020069 . = .;
wdenk4a5b6a32001-04-28 17:59:11 +000070 __start___ex_table = .;
71 __ex_table : { *(__ex_table) }
72 __stop___ex_table = .;
73
74 . = ALIGN(256);
75 __init_begin = .;
76 .text.init : { *(.text.init) }
77 .data.init : { *(.data.init) }
78 . = ALIGN(256);
79 __init_end = .;
80
81 __bss_start = .;
Wolfgang Denk64134f02008-01-12 20:31:39 +010082 .bss (NOLOAD) :
wdenk4a5b6a32001-04-28 17:59:11 +000083 {
Wolfgang Denkcd0402a2010-11-20 15:07:45 +010084 *(.bss*)
85 *(.sbss*)
wdenk4a5b6a32001-04-28 17:59:11 +000086 *(COMMON)
Selvamuthukumar9b827cf2008-10-16 22:54:03 +053087 . = ALIGN(4);
wdenk4a5b6a32001-04-28 17:59:11 +000088 }
Simon Glass3929fb02013-03-14 06:54:53 +000089 __bss_end = . ;
wdenk4a5b6a32001-04-28 17:59:11 +000090 PROVIDE (end = .);
91}