blob: 9470a24e7487fd8e94b53ec59a0b16a739e279b0 [file] [log] [blame]
wdenk8fcbdbc2002-10-16 11:07:24 +00001/*
Wolfgang Denkcd0402a2010-11-20 15:07:45 +01002 * (C) Copyright 2000-2010
wdenk8fcbdbc2002-10-16 11:07:24 +00003 * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
4 *
Wolfgang Denk1a459662013-07-08 09:37:19 +02005 * SPDX-License-Identifier: GPL-2.0+
wdenk8fcbdbc2002-10-16 11:07:24 +00006 */
7
8OUTPUT_ARCH(powerpc)
Wolfgang Denkcd0402a2010-11-20 15:07:45 +01009
wdenk8fcbdbc2002-10-16 11:07:24 +000010SECTIONS
11{
12 /* Read-only sections, merged into text segment: */
13 . = + SIZEOF_HEADERS;
wdenk8fcbdbc2002-10-16 11:07:24 +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*)
wdenk8fcbdbc2002-10-16 11:07:24 +000020
21 . = env_offset;
Jean-Christophe PLAGNIOL-VILLARD0cf4fd32008-09-10 22:48:01 +020022 common/env_embedded.o (.ppcenv)
wdenk8fcbdbc2002-10-16 11:07:24 +000023
Wolfgang Denkcd0402a2010-11-20 15:07:45 +010024 *(.text*)
wdenk8fcbdbc2002-10-16 11:07:24 +000025 }
26 _etext = .;
27 PROVIDE (etext = .);
28 .rodata :
29 {
Trent Piephof62fb992009-02-18 15:22:05 -080030 *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
wdenk8fcbdbc2002-10-16 11:07:24 +000031 }
wdenk8fcbdbc2002-10-16 11:07:24 +000032
33 /* Read-write section, merged into data segment: */
34 . = (. + 0x00FF) & 0xFFFFFF00;
35 _erotext = .;
36 PROVIDE (erotext = .);
37 .reloc :
38 {
wdenk8fcbdbc2002-10-16 11:07:24 +000039 _GOT2_TABLE_ = .;
Wolfgang Denkcd0402a2010-11-20 15:07:45 +010040 KEEP(*(.got2))
Joakim Tjernlund9d8fbd12011-04-20 14:22:59 +020041 KEEP(*(.got))
42 PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4);
wdenk8fcbdbc2002-10-16 11:07:24 +000043 _FIXUP_TABLE_ = .;
Wolfgang Denkcd0402a2010-11-20 15:07:45 +010044 KEEP(*(.fixup))
wdenk8fcbdbc2002-10-16 11:07:24 +000045 }
Joakim Tjernlund9d8fbd12011-04-20 14:22:59 +020046 __got2_entries = ((_GLOBAL_OFFSET_TABLE_ - _GOT2_TABLE_) >> 2) - 1;
wdenk8fcbdbc2002-10-16 11:07:24 +000047 __fixup_entries = (. - _FIXUP_TABLE_)>>2;
48
49 .data :
50 {
Wolfgang Denkcd0402a2010-11-20 15:07:45 +010051 *(.data*)
52 *(.sdata*)
wdenk8fcbdbc2002-10-16 11:07:24 +000053 }
54 _edata = .;
55 PROVIDE (edata = .);
56
Wolfgang Denk807d5d72005-08-31 12:28:00 +020057 . = .;
wdenk8bde7f72003-06-27 21:31:46 +000058
Marek Vasut55675142012-10-12 10:27:03 +000059 . = ALIGN(4);
60 .u_boot_list : {
Albert ARIBAUDef123c52013-02-25 00:59:00 +000061 KEEP(*(SORT(.u_boot_list*)));
Marek Vasut55675142012-10-12 10:27:03 +000062 }
63
wdenk8bde7f72003-06-27 21:31:46 +000064
Wolfgang Denk807d5d72005-08-31 12:28:00 +020065 . = .;
wdenk8fcbdbc2002-10-16 11:07:24 +000066 __start___ex_table = .;
67 __ex_table : { *(__ex_table) }
68 __stop___ex_table = .;
69
70 . = ALIGN(256);
71 __init_begin = .;
72 .text.init : { *(.text.init) }
73 .data.init : { *(.data.init) }
74 . = ALIGN(256);
75 __init_end = .;
76
77 __bss_start = .;
Wolfgang Denk64134f02008-01-12 20:31:39 +010078 .bss (NOLOAD) :
wdenk8fcbdbc2002-10-16 11:07:24 +000079 {
Wolfgang Denkcd0402a2010-11-20 15:07:45 +010080 *(.bss*)
81 *(.sbss*)
wdenk8fcbdbc2002-10-16 11:07:24 +000082 *(COMMON)
Selvamuthukumar9b827cf2008-10-16 22:54:03 +053083 . = ALIGN(4);
wdenk8fcbdbc2002-10-16 11:07:24 +000084 }
Simon Glass3929fb02013-03-14 06:54:53 +000085 __bss_end = . ;
wdenk8fcbdbc2002-10-16 11:07:24 +000086 PROVIDE (end = .);
87}