blob: 1ade3b344b67d5b3afd95926d1a819bbe3f29525 [file] [log] [blame]
Wolfgang Denk1a459662013-07-08 09:37:19 +02001/*
Masahiro Yamada9d78b9a2014-06-20 14:58:22 +09002 * (C) Copyright 2007-2008
Daniel Hellstrom823edd82008-03-28 10:06:52 +01003 * Daniel Hellstrom, Gaisler Research, daniel@gaisler.com.
4 *
Wolfgang Denk1a459662013-07-08 09:37:19 +02005 * SPDX-License-Identifier: GPL-2.0+
Daniel Hellstrom823edd82008-03-28 10:06:52 +01006 */
7
8OUTPUT_FORMAT("elf32-sparc", "elf32-sparc", "elf32-sparc")
9OUTPUT_ARCH(sparc)
10ENTRY(_start)
11SECTIONS
12{
13
14/* Read-only sections, merged into text segment: */
15 . = + SIZEOF_HEADERS;
16 .interp : { *(.interp) }
17 .hash : { *(.hash) }
18 .dynsym : { *(.dynsym) }
19 .dynstr : { *(.dynstr) }
20 .rel.text : { *(.rel.text) }
21 .rela.text : { *(.rela.text) }
22 .rel.data : { *(.rel.data) }
23 .rela.data : { *(.rela.data) }
24 .rel.rodata : { *(.rel.rodata) }
25 .rela.rodata : { *(.rela.rodata) }
26 .rel.got : { *(.rel.got) }
27 .rela.got : { *(.rela.got) }
28 .rel.ctors : { *(.rel.ctors) }
29 .rela.ctors : { *(.rela.ctors) }
30 .rel.dtors : { *(.rel.dtors) }
31 .rela.dtors : { *(.rela.dtors) }
32 .rel.bss : { *(.rel.bss) }
33 .rela.bss : { *(.rela.bss) }
34 .rel.plt : { *(.rel.plt) }
35 .rela.plt : { *(.rela.plt) }
36 .init : { *(.init) }
37 .plt : { *(.plt) }
38
39 .text : {
40 _load_addr = .;
41 _text = .;
42
43 *(.start)
Masahiro Yamada9d78b9a2014-06-20 14:58:22 +090044 */start.o (.text)
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +020045/* 8k is the same as the PROM offset from end of main memory, (CONFIG_SYS_PROM_SIZE) */
Daniel Hellstrom823edd82008-03-28 10:06:52 +010046 . = ALIGN(8192);
47/* PROM CODE, Will be relocated to the end of memory,
48 * no global data accesses please.
49 */
50 __prom_start = .;
51 *(.prom.pgt)
52 *(.prom.data)
53 *(.prom.text)
54 . = ALIGN(16);
55 __prom_end = .;
56 *(.text)
57 *(.fixup)
58 *(.gnu.warning)
59/* *(.got1)*/
60 . = ALIGN(16);
Daniel Hellstrom823edd82008-03-28 10:06:52 +010061 *(.eh_frame)
Trent Piephof62fb992009-02-18 15:22:05 -080062 *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
Daniel Hellstrom823edd82008-03-28 10:06:52 +010063 }
64 . = ALIGN(4);
65 _etext = .;
66
67 /* CMD Table */
68
Daniel Hellstrom823edd82008-03-28 10:06:52 +010069
Marek Vasut55675142012-10-12 10:27:03 +000070 . = ALIGN(4);
71 .u_boot_list : {
Albert ARIBAUDef123c52013-02-25 00:59:00 +000072 KEEP(*(SORT(.u_boot_list*)));
Marek Vasut55675142012-10-12 10:27:03 +000073 }
74
Daniel Hellstrom823edd82008-03-28 10:06:52 +010075 .data :
76 {
77 *(.data)
78 *(.data1)
79 *(.data.rel)
80 *(.data.rel.*)
81 *(.sdata)
82 *(.sdata2)
83 *(.dynamic)
84 CONSTRUCTORS
85 }
86 _edata = .;
87 PROVIDE (edata = .);
88
89 . = ALIGN(4);
90 __got_start = .;
91 .got : {
92 *(.got)
93/* *(.data.rel)
94 *(.data.rel.local)*/
95 . = ALIGN(16);
96 }
97 __got_end = .;
98
99/* .data.rel : { } */
100
101
102 . = ALIGN(4096);
103 __init_begin = .;
104 .text.init : { *(.text.init) }
105 .data.init : { *(.data.init) }
106 . = ALIGN(4096);
107 __init_end = .;
108
109 __bss_start = .;
110 .bss :
111 {
112 *(.sbss) *(.scommon)
113 *(.dynbss)
114 *(.bss)
115 *(COMMON)
116 . = ALIGN(16); /* to speed clearing of bss up */
117 }
118 __bss_end = . ;
Simon Glass3929fb02013-03-14 06:54:53 +0000119 __bss_end = . ;
Daniel Hellstrom823edd82008-03-28 10:06:52 +0100120 PROVIDE (end = .);
121
122/* Relocated into main memory */
123
124 /* Start of main memory */
125 /*. = 0x40000000;*/
126
127 .stack (NOLOAD) : { *(.stack) }
128
129 /* PROM CODE */
130
131 /* global data in RAM passed to kernel after booting */
132
133
134 .stab 0 : { *(.stab) }
135 .stabstr 0 : { *(.stabstr) }
136 .stab.excl 0 : { *(.stab.excl) }
137 .stab.exclstr 0 : { *(.stab.exclstr) }
138 .stab.index 0 : { *(.stab.index) }
139 .stab.indexstr 0 : { *(.stab.indexstr) }
140 .comment 0 : { *(.comment) }
141
142}