blob: 4c63ff2946f7f9324a06f91fba1f9543561726fd [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
Wolfgang Denkba273f02010-11-24 19:19:08 +01008#include <config.h>
wdenk4a5b6a32001-04-28 17:59:11 +00009OUTPUT_ARCH(powerpc)
Wolfgang Denkcd0402a2010-11-20 15:07:45 +010010
wdenk4a5b6a32001-04-28 17:59:11 +000011SECTIONS
12{
13 /* Read-only sections, merged into text segment: */
14 . = + SIZEOF_HEADERS;
wdenk4a5b6a32001-04-28 17:59:11 +000015 .text :
16 {
Wolfgang Denkba273f02010-11-24 19:19:08 +010017#ifdef CONFIG_MPC8260
18 arch/powerpc/cpu/mpc8260/start.o (.text*)
19#else
Wolfgang Denkcd0402a2010-11-20 15:07:45 +010020 arch/powerpc/cpu/mpc8xx/start.o (.text*)
21 arch/powerpc/cpu/mpc8xx/traps.o (.text*)
Wolfgang Denkba273f02010-11-24 19:19:08 +010022#endif
Wolfgang Denkcd0402a2010-11-20 15:07:45 +010023 *(.text*)
wdenk4a5b6a32001-04-28 17:59:11 +000024 }
25 _etext = .;
26 PROVIDE (etext = .);
27 .rodata :
28 {
Trent Piephof62fb992009-02-18 15:22:05 -080029 *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
wdenk4a5b6a32001-04-28 17:59:11 +000030 }
wdenk4a5b6a32001-04-28 17:59:11 +000031
32 /* Read-write section, merged into data segment: */
33 . = (. + 0x0FFF) & 0xFFFFF000;
34 _erotext = .;
35 PROVIDE (erotext = .);
36 .reloc :
37 {
wdenk4a5b6a32001-04-28 17:59:11 +000038 _GOT2_TABLE_ = .;
Wolfgang Denkcd0402a2010-11-20 15:07:45 +010039 KEEP(*(.got2))
Joakim Tjernlund9d8fbd12011-04-20 14:22:59 +020040 KEEP(*(.got))
41 PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4);
wdenk4a5b6a32001-04-28 17:59:11 +000042 _FIXUP_TABLE_ = .;
Wolfgang Denkcd0402a2010-11-20 15:07:45 +010043 KEEP(*(.fixup))
wdenk4a5b6a32001-04-28 17:59:11 +000044 }
Joakim Tjernlund9d8fbd12011-04-20 14:22:59 +020045 __got2_entries = ((_GLOBAL_OFFSET_TABLE_ - _GOT2_TABLE_) >> 2) - 1;
wdenk4a5b6a32001-04-28 17:59:11 +000046 __fixup_entries = (. - _FIXUP_TABLE_)>>2;
47
48 .data :
49 {
Wolfgang Denkcd0402a2010-11-20 15:07:45 +010050 *(.data*)
51 *(.sdata*)
wdenk4a5b6a32001-04-28 17:59:11 +000052 }
53 _edata = .;
54 PROVIDE (edata = .);
55
Wolfgang Denk807d5d72005-08-31 12:28:00 +020056 . = .;
wdenk8bde7f72003-06-27 21:31:46 +000057
Marek Vasut55675142012-10-12 10:27:03 +000058 . = ALIGN(4);
59 .u_boot_list : {
Albert ARIBAUDef123c52013-02-25 00:59:00 +000060 KEEP(*(SORT(.u_boot_list*)));
Marek Vasut55675142012-10-12 10:27:03 +000061 }
62
wdenk8bde7f72003-06-27 21:31:46 +000063
Wolfgang Denk807d5d72005-08-31 12:28:00 +020064 . = .;
wdenk4a5b6a32001-04-28 17:59:11 +000065 __start___ex_table = .;
66 __ex_table : { *(__ex_table) }
67 __stop___ex_table = .;
68
69 . = ALIGN(4096);
70 __init_begin = .;
71 .text.init : { *(.text.init) }
72 .data.init : { *(.data.init) }
73 . = ALIGN(4096);
74 __init_end = .;
75
76 __bss_start = .;
Wolfgang Denk64134f02008-01-12 20:31:39 +010077 .bss (NOLOAD) :
wdenk4a5b6a32001-04-28 17:59:11 +000078 {
Wolfgang Denkcd0402a2010-11-20 15:07:45 +010079 *(.bss*)
80 *(.sbss*)
wdenk4a5b6a32001-04-28 17:59:11 +000081 *(COMMON)
Selvamuthukumar9b827cf2008-10-16 22:54:03 +053082 . = ALIGN(4);
wdenk4a5b6a32001-04-28 17:59:11 +000083 }
Simon Glass3929fb02013-03-14 06:54:53 +000084 __bss_end = . ;
wdenk4a5b6a32001-04-28 17:59:11 +000085 PROVIDE (end = .);
86}