blob: 719846526f46c2ec75ec8a6e8ffe25edaf9184fb [file] [log] [blame]
Grant Likelyd68c71c2007-07-03 00:32:53 -06001/*
Wolfgang Denk61c7a6e2010-11-22 22:44:01 +01002 * (C) Copyright 2001-2010 Wolfgang Denk, DENX Software Engineering, wd@denx.de
Grant Likelyd68c71c2007-07-03 00:32:53 -06003 * (C) Copyright 2003 Martin Winistoerfer, martinwinistoerfer@gmx.ch
4 *
Wolfgang Denkd79de1d2013-07-08 09:37:19 +02005 * SPDX-License-Identifier: GPL-2.0+
Grant Likelyd68c71c2007-07-03 00:32:53 -06006 */
7
8OUTPUT_ARCH(powerpc)
Wolfgang Denk61c7a6e2010-11-22 22:44:01 +01009
Grant Likelyd68c71c2007-07-03 00:32:53 -060010SECTIONS
11{
12 /* Read-only sections, merged into text segment: */
13 . = + SIZEOF_HEADERS;
Grant Likelyd68c71c2007-07-03 00:32:53 -060014 .text :
15 {
Wolfgang Denk61c7a6e2010-11-22 22:44:01 +010016 arch/powerpc/cpu/mpc5xx/start.o (.text*)
Grant Likelyd68c71c2007-07-03 00:32:53 -060017
Wolfgang Denk61c7a6e2010-11-22 22:44:01 +010018 *(.text*)
Grant Likelyd68c71c2007-07-03 00:32:53 -060019 }
20 _etext = .;
21 PROVIDE (etext = .);
22 .rodata :
23 {
Trent Piepho4438e5e2009-02-18 15:22:05 -080024 *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
Grant Likelyd68c71c2007-07-03 00:32:53 -060025 }
Grant Likelyd68c71c2007-07-03 00:32:53 -060026
27 /* Read-write section, merged into data segment: */
28 . = (. + 0x00FF) & 0xFFFFFF00;
29 _erotext = .;
30 PROVIDE (erotext = .);
31 .reloc :
32 {
Grant Likelyd68c71c2007-07-03 00:32:53 -060033 _GOT2_TABLE_ = .;
Wolfgang Denk61c7a6e2010-11-22 22:44:01 +010034 KEEP(*(.got2))
Joakim Tjernlund42126a62010-12-03 17:30:37 +010035 KEEP(*(.got))
36 PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4);
Grant Likelyd68c71c2007-07-03 00:32:53 -060037 _FIXUP_TABLE_ = .;
Wolfgang Denk61c7a6e2010-11-22 22:44:01 +010038 KEEP(*(.fixup))
Grant Likelyd68c71c2007-07-03 00:32:53 -060039 }
Joakim Tjernlund42126a62010-12-03 17:30:37 +010040 __got2_entries = ((_GLOBAL_OFFSET_TABLE_ - _GOT2_TABLE_) >> 2) - 1;
Grant Likelyd68c71c2007-07-03 00:32:53 -060041 __fixup_entries = (. - _FIXUP_TABLE_)>>2;
42
43 .data :
44 {
Wolfgang Denk61c7a6e2010-11-22 22:44:01 +010045 *(.data*)
46 *(.sdata*)
Grant Likelyd68c71c2007-07-03 00:32:53 -060047 }
48 _edata = .;
49 PROVIDE (edata = .);
50
51 . = .;
Grant Likelyd68c71c2007-07-03 00:32:53 -060052
Marek Vasut607092a2012-10-12 10:27:03 +000053 . = ALIGN(4);
54 .u_boot_list : {
Albert ARIBAUDc24895e2013-02-25 00:59:00 +000055 KEEP(*(SORT(.u_boot_list*)));
Marek Vasut607092a2012-10-12 10:27:03 +000056 }
57
Grant Likelyd68c71c2007-07-03 00:32:53 -060058
59 . = .;
60 __start___ex_table = .;
61 __ex_table : { *(__ex_table) }
62 __stop___ex_table = .;
63
64 . = ALIGN(256);
65 __init_begin = .;
66 .text.init : { *(.text.init) }
67 .data.init : { *(.data.init) }
68 . = ALIGN(256);
69 __init_end = .;
70
71 __bss_start = .;
Wolfgang Denk828a9782008-01-12 20:31:39 +010072 .bss (NOLOAD) :
Grant Likelyd68c71c2007-07-03 00:32:53 -060073 {
Wolfgang Denk61c7a6e2010-11-22 22:44:01 +010074 *(.bss*)
75 *(.sbss*)
Grant Likelyd68c71c2007-07-03 00:32:53 -060076 *(COMMON)
Selvamuthukumard2454ba2008-10-16 22:54:03 +053077 . = ALIGN(4);
Grant Likelyd68c71c2007-07-03 00:32:53 -060078 }
79
Simon Glassed70c8f2013-03-14 06:54:53 +000080 __bss_end = . ;
Grant Likelyd68c71c2007-07-03 00:32:53 -060081 PROVIDE (end = .);
Wolfgang Denk61c7a6e2010-11-22 22:44:01 +010082 . = env_start;
83 .ppcenv :
84 {
85 common/env_embedded.o (.ppcenv)
86 }
Grant Likelyd68c71c2007-07-03 00:32:53 -060087}