blob: cd9e23fbb79f2408cff1d3022af33117ecca25bf [file] [log] [blame]
Grant Likely17208ae2007-07-03 00:32:58 -06001/*
Wolfgang Denk01fd9152010-11-23 13:20:22 +01002 * (C) Copyright 2003-2010
Grant Likely17208ae2007-07-03 00:32:58 -06003 * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
4 *
Wolfgang Denkd79de1d2013-07-08 09:37:19 +02005 * SPDX-License-Identifier: GPL-2.0+
Grant Likely17208ae2007-07-03 00:32:58 -06006 */
7
8OUTPUT_ARCH(powerpc)
Wolfgang Denk01fd9152010-11-23 13:20:22 +01009
Grant Likely17208ae2007-07-03 00:32:58 -060010SECTIONS
11{
12 /* Read-only sections, merged into text segment: */
Grant Likely17208ae2007-07-03 00:32:58 -060013 .text :
14 {
Wolfgang Denk01fd9152010-11-23 13:20:22 +010015 arch/powerpc/cpu/mpc5xxx/start.o (.text*)
16 arch/powerpc/cpu/mpc5xxx/traps.o (.text*)
17 *(.text*)
Grant Likely17208ae2007-07-03 00:32:58 -060018 . = ALIGN(16);
Trent Piepho4438e5e2009-02-18 15:22:05 -080019 *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
Grant Likely17208ae2007-07-03 00:32:58 -060020 }
Grant Likely17208ae2007-07-03 00:32:58 -060021
22 /* Read-write section, merged into data segment: */
23 . = (. + 0x0FFF) & 0xFFFFF000;
24 _erotext = .;
25 PROVIDE (erotext = .);
26 .reloc :
27 {
Grant Likely17208ae2007-07-03 00:32:58 -060028 _GOT2_TABLE_ = .;
Wolfgang Denk01fd9152010-11-23 13:20:22 +010029 KEEP(*(.got2))
Joakim Tjernlund42126a62010-12-03 17:30:37 +010030 KEEP(*(.got))
31 PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4);
Grant Likely17208ae2007-07-03 00:32:58 -060032 _FIXUP_TABLE_ = .;
Wolfgang Denk01fd9152010-11-23 13:20:22 +010033 KEEP(*(.fixup))
Grant Likely17208ae2007-07-03 00:32:58 -060034 }
Joakim Tjernlund42126a62010-12-03 17:30:37 +010035 __got2_entries = ((_GLOBAL_OFFSET_TABLE_ - _GOT2_TABLE_) >> 2) - 1;
Grant Likely17208ae2007-07-03 00:32:58 -060036 __fixup_entries = (. - _FIXUP_TABLE_) >> 2;
37
38 .data :
39 {
Wolfgang Denk01fd9152010-11-23 13:20:22 +010040 *(.data*)
41 *(.sdata*)
Grant Likely17208ae2007-07-03 00:32:58 -060042 }
43 _edata = .;
44 PROVIDE (edata = .);
45
46 . = .;
Grant Likely17208ae2007-07-03 00:32:58 -060047
Marek Vasut607092a2012-10-12 10:27:03 +000048 . = ALIGN(4);
49 .u_boot_list : {
Albert ARIBAUDc24895e2013-02-25 00:59:00 +000050 KEEP(*(SORT(.u_boot_list*)));
Marek Vasut607092a2012-10-12 10:27:03 +000051 }
52
Grant Likely17208ae2007-07-03 00:32:58 -060053
54 . = .;
55 __start___ex_table = .;
56 __ex_table : { *(__ex_table) }
57 __stop___ex_table = .;
58
59 . = ALIGN(4096);
60 __init_begin = .;
61 .text.init : { *(.text.init) }
62 .data.init : { *(.data.init) }
63 . = ALIGN(4096);
64 __init_end = .;
65
66 __bss_start = .;
Wolfgang Denk828a9782008-01-12 20:31:39 +010067 .bss (NOLOAD) :
Grant Likely17208ae2007-07-03 00:32:58 -060068 {
Grant Likely17208ae2007-07-03 00:32:58 -060069 *(COMMON)
Wolfgang Denk01fd9152010-11-23 13:20:22 +010070 *(.bss*)
71 *(.sbss*)
Selvamuthukumard2454ba2008-10-16 22:54:03 +053072 . = ALIGN(4);
Grant Likely17208ae2007-07-03 00:32:58 -060073 }
Simon Glassed70c8f2013-03-14 06:54:53 +000074 __bss_end = . ;
Grant Likely17208ae2007-07-03 00:32:58 -060075 PROVIDE (end = .);
76}