Extend the linker's error message for missing libraries if there is an almost match.
[deliverable/binutils-gdb.git] / ld / scripttempl / v850_rh850.sc
CommitLineData
b3adc24a 1# Copyright (C) 2014-2020 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
b3adc24a 8/* Copyright (C) 2014-2020 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)
2bf2bf23 28 ${RELOCATING+*(.zdata23)
de863c74
NC
29 *(.zbss)
30 *(.zbss23)
31 *(reszdata)
2bf2bf23 32 *(.zcommon)}
de863c74
NC
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)
2bf2bf23 44 ${RELOCATING+*(romzdata)
de863c74
NC
45 *(romzbss)
46 *(.zconst)
2bf2bf23 47 *(.zconst23)}
de863c74
NC
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) }
2d3181c7 78 .init : { KEEP (*(SORT_NONE(.init))) } =0
de863c74
NC
79 .plt : { *(.plt) }
80
81 .text :
82 {
83 *(.text)
84 ${RELOCATING+*(.text.*)}
6c19b93b 85
075a2b89 86 /* .gnu.warning sections are handled specially by elf.em. */
de863c74 87 *(.gnu.warning)
2bf2bf23 88 ${RELOCATING+*(.gnu.linkonce.t*)}
de863c74
NC
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
2d3181c7 109 .fini : { KEEP (*(SORT_NONE(.fini))) } =0
de863c74
NC
110 .rodata :
111 {
112 *(.rodata)
2bf2bf23 113 ${RELOCATING+*(.rodata.*)
de863c74 114 *(.gnu.linkonce.r*)
2bf2bf23 115 *(.const)}
de863c74
NC
116 }
117 .rodata1 : { *(.rodata1) }
118
119 .data :
120 {
121 *(.data)
2bf2bf23
AM
122 ${RELOCATING+*(.data.*)
123 *(.gnu.linkonce.d*)}
124 ${CONSTRUCTING+CONSTRUCTORS}
de863c74
NC
125 }
126 .data1 : { *(.data1) }
127 .ctors :
128 {
129 ${CONSTRUCTING+___ctors = .;}
130 KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))
2bf2bf23 131 ${RELOCATING+KEEP (*(SORT(.ctors.*)))}
de863c74
NC
132 KEEP (*crtend(.ctors))
133 ${CONSTRUCTING+___ctors_end = .;}
134 }
135 .dtors :
136 {
137 ${CONSTRUCTING+___dtors = .;}
138 KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors))
2bf2bf23 139 ${RELOCATING+KEEP (*(SORT(.dtors.*)))}
de863c74
NC
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
2bf2bf23 150 .got : {${RELOCATING+ *(.got.plt)} *(.got) }
de863c74
NC
151 .dynamic : { *(.dynamic) }
152
153 .tdata ${TDATA_START_ADDR} :
154 {
2bf2bf23 155 ${RELOCATING+PROVIDE (__ep = .);
de863c74
NC
156 *(.edata)
157 *(.edata23)
158 *(.tbyte)
2bf2bf23 159 *(.tcommon_byte)}
de863c74 160 *(.tdata)
2bf2bf23 161 ${RELOCATING+*(.tdata*)
de863c74
NC
162 *(.ebss)
163 *(.ebss23)
164 *(.tbss)
165 *(.tbss*)
2bf2bf23 166 *(.tcommon)}
de863c74
NC
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)
2bf2bf23 177 ${RELOCATING+*(.sdata23)}
de863c74
NC
178 }
179
180 /* See comment about .rozdata. */
181 .rosdata ${ROSDATA_START_ADDR} :
182 {
183 *(.rosdata)
2bf2bf23
AM
184 ${RELOCATING+*(.sconst)
185 *(.sconst23)}
de863c74
NC
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)
2bf2bf23
AM
197 ${RELOCATING+*(.sbss23)
198 *(.scommon)}
de863c74
NC
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 = . ;}
2bf2bf23 208 ${RELOCATING+*(.dynbss)}
de863c74 209 *(.bss)
2bf2bf23 210 ${RELOCATING+*(COMMON)}
de863c74
NC
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.345743 seconds and 4 git commands to generate.