blob: 44bcd19fb1a69c9745b04a25b649b4fbf3c3b595 [file] [log] [blame]
wdenk4a5b6a32001-04-28 17:59:11 +00001/*
2 * (C) Copyright 2000
3 * 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
8OUTPUT_ARCH(powerpc)
wdenk4a5b6a32001-04-28 17:59:11 +00009/* Do we need any of these for elf?
10 __DYNAMIC = 0; */
11SECTIONS
12{
13 /* Read-only sections, merged into text segment: */
14 . = + SIZEOF_HEADERS;
15 .interp : { *(.interp) }
16 .hash : { *(.hash) }
17 .dynsym : { *(.dynsym) }
18 .dynstr : { *(.dynstr) }
19 .rel.text : { *(.rel.text) }
Wolfgang Denk53677ef2008-05-20 16:00:29 +020020 .rela.text : { *(.rela.text) }
wdenk4a5b6a32001-04-28 17:59:11 +000021 .rel.data : { *(.rel.data) }
Wolfgang Denk53677ef2008-05-20 16:00:29 +020022 .rela.data : { *(.rela.data) }
23 .rel.rodata : { *(.rel.rodata) }
24 .rela.rodata : { *(.rela.rodata) }
wdenk4a5b6a32001-04-28 17:59:11 +000025 .rel.got : { *(.rel.got) }
26 .rela.got : { *(.rela.got) }
27 .rel.ctors : { *(.rel.ctors) }
28 .rela.ctors : { *(.rela.ctors) }
29 .rel.dtors : { *(.rel.dtors) }
30 .rela.dtors : { *(.rela.dtors) }
31 .rel.bss : { *(.rel.bss) }
32 .rela.bss : { *(.rela.bss) }
33 .rel.plt : { *(.rel.plt) }
34 .rela.plt : { *(.rela.plt) }
35 .init : { *(.init) }
36 .plt : { *(.plt) }
37 .text :
38 {
Stefan Roesea47a12b2010-04-15 16:07:28 +020039 arch/powerpc/cpu/mpc8260/start.o (.text)
wdenk4a5b6a32001-04-28 17:59:11 +000040 *(.text)
wdenk4a5b6a32001-04-28 17:59:11 +000041 *(.got1)
42 /*. = env_offset; */
43 }
44 _etext = .;
45 PROVIDE (etext = .);
46 .rodata :
47 {
Wolfgang Denk74812662005-12-12 16:06:05 +010048 *(.eh_frame)
Trent Piephof62fb992009-02-18 15:22:05 -080049 *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
wdenk4a5b6a32001-04-28 17:59:11 +000050 }
51 .fini : { *(.fini) } =0
52 .ctors : { *(.ctors) }
53 .dtors : { *(.dtors) }
54
55 /* Read-write section, merged into data segment: */
56 . = (. + 0x0FFF) & 0xFFFFF000;
57 _erotext = .;
58 PROVIDE (erotext = .);
59 .reloc :
60 {
wdenk4a5b6a32001-04-28 17:59:11 +000061 _GOT2_TABLE_ = .;
Joakim Tjernlundc1fa1b72011-04-24 10:29:32 +020062 KEEP(*(.got2))
63 KEEP(*(.got))
64 PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4);
wdenk4a5b6a32001-04-28 17:59:11 +000065 _FIXUP_TABLE_ = .;
Joakim Tjernlundc1fa1b72011-04-24 10:29:32 +020066 KEEP(*(.fixup))
wdenk4a5b6a32001-04-28 17:59:11 +000067 }
Joakim Tjernlund9d8fbd12011-04-20 14:22:59 +020068 __got2_entries = ((_GLOBAL_OFFSET_TABLE_ - _GOT2_TABLE_) >> 2) - 1;
wdenk4a5b6a32001-04-28 17:59:11 +000069 __fixup_entries = (. - _FIXUP_TABLE_)>>2;
70
71 .data :
72 {
73 *(.data)
74 *(.data1)
75 *(.sdata)
76 *(.sdata2)
77 *(.dynamic)
78 CONSTRUCTORS
79 }
80 _edata = .;
81 PROVIDE (edata = .);
82
Wolfgang Denk807d5d72005-08-31 12:28:00 +020083 . = .;
wdenk8bde7f72003-06-27 21:31:46 +000084
Marek Vasut55675142012-10-12 10:27:03 +000085 . = ALIGN(4);
86 .u_boot_list : {
Albert ARIBAUDef123c52013-02-25 00:59:00 +000087 KEEP(*(SORT(.u_boot_list*)));
Marek Vasut55675142012-10-12 10:27:03 +000088 }
89
wdenk8bde7f72003-06-27 21:31:46 +000090
Wolfgang Denk807d5d72005-08-31 12:28:00 +020091 . = .;
wdenk4a5b6a32001-04-28 17:59:11 +000092 __start___ex_table = .;
93 __ex_table : { *(__ex_table) }
94 __stop___ex_table = .;
95
96 . = ALIGN(4096);
97 __init_begin = .;
98 .text.init : { *(.text.init) }
99 .data.init : { *(.data.init) }
100 . = ALIGN(4096);
101 __init_end = .;
102
103 __bss_start = .;
Wolfgang Denk64134f02008-01-12 20:31:39 +0100104 .bss (NOLOAD) :
wdenk4a5b6a32001-04-28 17:59:11 +0000105 {
106 *(.sbss) *(.scommon)
107 *(.dynbss)
108 *(.bss)
109 *(COMMON)
Selvamuthukumar9b827cf2008-10-16 22:54:03 +0530110 . = ALIGN(4);
wdenk4a5b6a32001-04-28 17:59:11 +0000111 }
Simon Glass3929fb02013-03-14 06:54:53 +0000112 __bss_end = . ;
wdenk4a5b6a32001-04-28 17:59:11 +0000113 PROVIDE (end = .);
114}