ld whitespace fixes
[deliverable/binutils-gdb.git] / ld / scripttempl / v850_rh850.sc
CommitLineData
2571583a 1# Copyright (C) 2014-2017 Free Software Foundation, Inc.
6c19b93b 2#
985743c7
NC
3# Copying and distribution of this file, with or without modification,
4# are permitted in any medium without royalty provided the copyright
5# notice and this notice are preserved.
6
de863c74 7cat << EOF
2571583a 8/* Copyright (C) 2014-2017 Free Software Foundation, Inc.
985743c7
NC
9
10 Copying and distribution of this script, with or without modification,
11 are permitted in any medium without royalty provided the copyright
12 notice and this notice are preserved. */
13
de863c74
NC
14OUTPUT_FORMAT("elf32-v850-rh850", "elf32-v850-rh850",
15 "elf32-v850-rh850")
4b05e0a7 16OUTPUT_ARCH(v850:rh850)
de863c74
NC
17${RELOCATING+ENTRY(_start)}
18SEARCH_DIR(.);
76276ff6 19${RELOCATING+EXTERN(__ctbp __ep __gp)};
de863c74
NC
20SECTIONS
21{
22 /* This saves a little space in the ELF file, since the zda starts
23 at a higher location that the ELF headers take up. */
24
25 .zdata ${ZDATA_START_ADDR} :
26 {
27 *(.zdata)
28 *(.zdata23)
29 *(.zbss)
30 *(.zbss23)
31 *(reszdata)
32 *(.zcommon)
33 }
34
35 /* This is the read only part of the zero data area.
b81c93c8 36 Having it as a separate section prevents its
de863c74
NC
37 attributes from being inherited by the zdata
38 section. Specifically it prevents the zdata
39 section from being marked READONLY. */
40
41 .rozdata ${ROZDATA_START_ADDR} :
42 {
43 *(.rozdata)
44 *(romzdata)
45 *(romzbss)
46 *(.zconst)
47 *(.zconst23)
48 }
49
50 /* Read-only sections, merged into text segment. */
51 . = ${TEXT_START_ADDR};
52 .interp : { *(.interp) }
53 .hash : { *(.hash) }
54 .dynsym : { *(.dynsym) }
55 .dynstr : { *(.dynstr) }
56 .rel.text : { *(.rel.text) }
57 .rela.text : { *(.rela.text) }
58 .rel.data : { *(.rel.data) }
59 .rela.data : { *(.rela.data) }
60 .rel.rodata : { *(.rel.rodata) }
61 .rela.rodata : { *(.rela.rodata) }
62 .rel.gcc_except_table : { *(.rel.gcc_except_table) }
63 .rela.gcc_except_table : { *(.rela.gcc_except_table) }
64 .rel.got : { *(.rel.got) }
65 .rela.got : { *(.rela.got) }
66 .rel.ctors : { *(.rel.ctors) }
67 .rela.ctors : { *(.rela.ctors) }
68 .rel.dtors : { *(.rel.dtors) }
69 .rela.dtors : { *(.rela.dtors) }
70 .rel.init : { *(.rel.init) }
71 .rela.init : { *(.rela.init) }
72 .rel.fini : { *(.rel.fini) }
73 .rela.fini : { *(.rela.fini) }
74 .rel.bss : { *(.rel.bss) }
75 .rela.bss : { *(.rela.bss) }
76 .rel.plt : { *(.rel.plt) }
77 .rela.plt : { *(.rela.plt) }
78 .init : { KEEP (*(.init)) } =0
79 .plt : { *(.plt) }
80
81 .text :
82 {
83 *(.text)
84 ${RELOCATING+*(.text.*)}
6c19b93b 85
de863c74
NC
86 /* .gnu.warning sections are handled specially by elf32.em. */
87 *(.gnu.warning)
88 *(.gnu.linkonce.t*)
89 } =0
90
91 ${RELOCATING+_etext = .;}
92 ${RELOCATING+PROVIDE (etext = .);}
93
94 /* This is special code area at the end of the normal text section.
95 It contains a small lookup table at the start followed by the
96 code pointed to by entries in the lookup table. */
97
98 .call_table_data ${CALL_TABLE_START_ADDR} :
99 {
100 ${RELOCATING+PROVIDE(__ctbp = .);}
101 *(.call_table_data)
102 } = 0xff /* Fill gaps with 0xff. */
6c19b93b 103
de863c74
NC
104 .call_table_text :
105 {
106 *(.call_table_text)
107 }
108
109 .fini : { KEEP (*(.fini)) } =0
110 .rodata :
111 {
112 *(.rodata)
113 ${RELOCATING+*(.rodata.*)}
114 *(.gnu.linkonce.r*)
115 *(.const)
116 }
117 .rodata1 : { *(.rodata1) }
118
119 .data :
120 {
121 *(.data)
122 ${RELOCATING+*(.data.*)}
123 *(.gnu.linkonce.d*)
124 CONSTRUCTORS
125 }
126 .data1 : { *(.data1) }
127 .ctors :
128 {
129 ${CONSTRUCTING+___ctors = .;}
130 KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))
131 KEEP (*(SORT(.ctors.*)))
132 KEEP (*crtend(.ctors))
133 ${CONSTRUCTING+___ctors_end = .;}
134 }
135 .dtors :
136 {
137 ${CONSTRUCTING+___dtors = .;}
138 KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors))
139 KEEP (*(SORT(.dtors.*)))
140 KEEP (*crtend.o(.dtors))
141 ${CONSTRUCTING+___dtors_end = .;}
142 }
143 .jcr :
144 {
145 KEEP (*(.jcr))
146 }
147
148 .gcc_except_table : { *(.gcc_except_table) }
149
150 .got : { *(.got.plt) *(.got) }
151 .dynamic : { *(.dynamic) }
152
153 .tdata ${TDATA_START_ADDR} :
154 {
155 ${RELOCATING+PROVIDE (__ep = .);}
156 *(.edata)
157 *(.edata23)
158 *(.tbyte)
159 *(.tcommon_byte)
160 *(.tdata)
161 *(.tdata*)
162 *(.ebss)
163 *(.ebss23)
164 *(.tbss)
165 *(.tbss*)
166 *(.tcommon)
167 }
168
169 /* We want the small data sections together, so single-instruction offsets
170 can access them all, and initialized data all before uninitialized, so
171 we can shorten the on-disk segment size. */
6c19b93b 172
de863c74
NC
173 .sdata ${SDATA_START_ADDR} :
174 {
175 ${RELOCATING+PROVIDE (__gp = . + 0x8000);}
176 *(.sdata)
177 *(.sdata23)
178 }
179
180 /* See comment about .rozdata. */
181 .rosdata ${ROSDATA_START_ADDR} :
182 {
183 *(.rosdata)
184 *(.sconst)
185 *(.sconst23)
186 }
187
188 /* We place the .sbss data section AFTER the .rosdata section, so that
b81c93c8 189 it can directly precede the .bss section. This allows runtime startup
de863c74
NC
190 code to initialise all the zero-data sections by simply taking the
191 value of '_edata' and zeroing until it reaches '_end'. */
6c19b93b 192
de863c74
NC
193 .sbss :
194 {
195 ${RELOCATING+__sbss_start = .;}
196 *(.sbss)
197 *(.sbss23)
198 *(.scommon)
199 }
200
201 ${RELOCATING+_edata = DEFINED (__sbss_start) ? __sbss_start : . ;}
202 ${RELOCATING+PROVIDE (edata = _edata);}
203
204 .bss :
205 {
206 ${RELOCATING+__bss_start = DEFINED (__sbss_start) ? __sbss_start : . ;}
207 ${RELOCATING+__real_bss_start = . ;}
208 *(.dynbss)
209 *(.bss)
210 *(COMMON)
211 }
212
213 ${RELOCATING+_end = . ;}
214 ${RELOCATING+PROVIDE (end = .);}
215 ${RELOCATING+PROVIDE (_heap_start = .);}
216
6c19b93b 217 .note.renesas 0 : { KEEP(*(.note.renesas)) }
685080f2 218
de863c74
NC
219 /* Stabs debugging sections. */
220 .stab 0 : { *(.stab) }
221 .stabstr 0 : { *(.stabstr) }
222 .stab.excl 0 : { *(.stab.excl) }
223 .stab.exclstr 0 : { *(.stab.exclstr) }
224 .stab.index 0 : { *(.stab.index) }
225 .stab.indexstr 0 : { *(.stab.indexstr) }
226 .comment 0 : { *(.comment) }
227
ceb0a680 228EOF
de863c74 229
d061dfac 230. $srcdir/scripttempl/DWARF.sc
de863c74 231
ceb0a680 232cat <<EOF
de863c74
NC
233 /* User stack. */
234 .stack 0x200000 :
235 {
236 ${RELOCATING+__stack = .;}
237 *(.stack)
238 }
239}
240EOF
This page took 0.228071 seconds and 4 git commands to generate.