blob: e217f0681947c401b5af4bf8dc774dac0c0a6a5c [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 */
18
Wolfgang Denke71d99d2010-11-20 15:07:45 +010019 arch/powerpc/cpu/mpc8xx/start.o (.text*)
20 arch/powerpc/cpu/mpc8xx/traps.o (.text*)
21 lib/libgeneric.o (.text*)
22 net/libnet.o (.text*)
23 arch/powerpc/cpu/mpc8xx/libmpc8xx.o (.text*)
24 board/genietv/libgenietv.o (.text*)
25 arch/powerpc/lib/libpowerpc.o (.text*)
26 *(.text.do_load_serial*)
27 *(.text.do_mem_*)
28 *(.text.do_bootm*)
wdenkefee1702002-07-20 20:14:13 +000029
30 . = env_offset;
Wolfgang Denke71d99d2010-11-20 15:07:45 +010031 common/env_embedded.o (.text*)
32
33 *(.text*)
wdenkefee1702002-07-20 20:14:13 +000034 }
35 _etext = .;
36 PROVIDE (etext = .);
37 .rodata :
38 {
Trent Piepho4438e5e2009-02-18 15:22:05 -080039 *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
wdenkefee1702002-07-20 20:14:13 +000040 }
wdenkefee1702002-07-20 20:14:13 +000041
42 /* Read-write section, merged into data segment: */
43 . = (. + 0x0FFF) & 0xFFFFF000;
44 _erotext = .;
45 PROVIDE (erotext = .);
46 .reloc :
47 {
wdenkefee1702002-07-20 20:14:13 +000048 _GOT2_TABLE_ = .;
Wolfgang Denke71d99d2010-11-20 15:07:45 +010049 KEEP(*(.got2))
Joakim Tjernlunda65f8c82011-04-20 14:22:59 +020050 KEEP(*(.got))
51 PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4);
wdenkefee1702002-07-20 20:14:13 +000052 _FIXUP_TABLE_ = .;
Wolfgang Denke71d99d2010-11-20 15:07:45 +010053 KEEP(*(.fixup))
wdenkefee1702002-07-20 20:14:13 +000054 }
Joakim Tjernlunda65f8c82011-04-20 14:22:59 +020055 __got2_entries = ((_GLOBAL_OFFSET_TABLE_ - _GOT2_TABLE_) >> 2) - 1;
wdenkefee1702002-07-20 20:14:13 +000056 __fixup_entries = (. - _FIXUP_TABLE_)>>2;
57
58 .data :
59 {
Wolfgang Denke71d99d2010-11-20 15:07:45 +010060 *(.data*)
61 *(.sdata*)
wdenkefee1702002-07-20 20:14:13 +000062 }
63 _edata = .;
64 PROVIDE (edata = .);
65
Wolfgang Denk5dd2c652005-08-31 12:28:00 +020066 . = .;
wdenk57b2d802003-06-27 21:31:46 +000067
Marek Vasut607092a2012-10-12 10:27:03 +000068 . = ALIGN(4);
69 .u_boot_list : {
Albert ARIBAUDc24895e2013-02-25 00:59:00 +000070 KEEP(*(SORT(.u_boot_list*)));
Marek Vasut607092a2012-10-12 10:27:03 +000071 }
72
wdenk57b2d802003-06-27 21:31:46 +000073
Wolfgang Denk5dd2c652005-08-31 12:28:00 +020074 . = .;
wdenkefee1702002-07-20 20:14:13 +000075 __start___ex_table = .;
76 __ex_table : { *(__ex_table) }
77 __stop___ex_table = .;
78
79 . = ALIGN(4096);
80 __init_begin = .;
81 .text.init : { *(.text.init) }
82 .data.init : { *(.data.init) }
83 . = ALIGN(4096);
84 __init_end = .;
85
86 __bss_start = .;
Wolfgang Denk828a9782008-01-12 20:31:39 +010087 .bss (NOLOAD) :
wdenkefee1702002-07-20 20:14:13 +000088 {
Wolfgang Denke71d99d2010-11-20 15:07:45 +010089 *(.bss*)
90 *(.sbss*)
wdenkefee1702002-07-20 20:14:13 +000091 *(COMMON)
92 }
93 . = ALIGN(256 * 1024);
94 .ppcenv :
95 {
Jean-Christophe PLAGNIOL-VILLARD4436c1e2008-09-10 22:48:01 +020096 common/env_embedded.o (.ppcenv)
wdenkefee1702002-07-20 20:14:13 +000097 }
Selvamuthukumard2454ba2008-10-16 22:54:03 +053098 . = ALIGN(4);
Simon Glassed70c8f2013-03-14 06:54:53 +000099 __bss_end = . ;
wdenkefee1702002-07-20 20:14:13 +0000100 PROVIDE (end = .);
101}