assorted target messages
[binutils-gdb.git] / bfd / ChangeLog
1 2018-02-26 Alan Modra <amodra@gmail.com>
2
3 * elf-m10300.c, * elf-s390-common.c, * elf32-arc.c, * elf32-cris.c,
4 * elf32-dlx.c, * elf32-frv.c, * elf32-i370.c, * elf32-lm32.c,
5 * elf32-m32r.c, * elf32-m68hc1x.c, * elf32-m68k.c,
6 * elf32-microblaze.c, * elf32-msp430.c, * elf32-nds32.c,
7 * elf32-nios2.c, * elf32-or1k.c, * elf32-rl78.c, * elf32-rx.c,
8 * elf32-score.c, * elf32-score7.c, * elf32-sh-symbian.c,
9 * elf32-sh.c, * elf32-spu.c, * elf32-v850.c, * elf32-xtensa.c,
10 * elf64-alpha.c, * elf64-ia64-vms.c, * elf64-mmix.c,
11 * elf64-sh64.c, * elf64-sparc.c, * elfnn-ia64.c, * elfxx-tilegx.c,
12 * mmo.c, * osf-core.c, * srec.c, * vms-alpha.c: Standardize
13 error/warning messages.
14
15 2018-02-26 Alan Modra <amodra@gmail.com>
16
17 * archive.c, * bfd.c, * linker.c, * reloc.c, * stabs.c,
18 * syms.c: Standardize error/warning messages.
19
20 2018-02-26 Alan Modra <amodra@gmail.com>
21
22 * aout-adobe.c, * aout-cris.c, * i386linux.c, * m68klinux.c,
23 * sparclinux.c, * coff-alpha.c, * coff-arm.c, * coff-mcore.c,
24 * coffcode.h, * coffgen.c, * cofflink.c, * ecoff.c, * pe-mips.c,
25 * peXXigen.c, * peicode.h: Standardize error/warning messages.
26
27 2018-02-26 Alan Modra <amodra@gmail.com>
28
29 * elf32-arm.c, * elfnn-aarch64.c: Standardize error/warning messages.
30
31 2018-02-26 Alan Modra <amodra@gmail.com>
32
33 * elfxx-mips.c: Standardize error/warning messages.
34
35 2018-02-26 Alan Modra <amodra@gmail.com>
36
37 * dwarf2.c, * elf-attrs.c, * elf-eh-frame.c, * elf.c, * elf32-gen.c,
38 * elflink.c: Standardize error/warning messages. Replace use of
39 linker callback einfo with _bfd_error_handler when possible.
40
41 2018-02-26 Alan Modra <amodra@gmail.com>
42
43 * aoutx.h, * coff-alpha.c, * coff-i860.c, * coff-m68k.c,
44 * coff-mcore.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c,
45 * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-w65.c,
46 * elf-bfd.h, * elf-m10300.c, * elf.c, * elf32-avr.c, * elf32-bfin.c,
47 * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c,
48 * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c,
49 * elf32-fr30.c, * elf32-frv.c, * elf32-i370.c, * elf32-i386.c,
50 * elf32-i960.c, * elf32-ip2k.c, * elf32-iq2000.c, * elf32-lm32.c,
51 * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c,
52 * elf32-m68k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c,
53 * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c,
54 * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-or1k.c,
55 * elf32-pj.c, * elf32-ppc.c, * elf32-rl78.c, * elf32-rx.c,
56 * elf32-s390.c, * elf32-sh.c, * elf32-spu.c, * elf32-tic6x.c,
57 * elf32-v850.c, * elf32-vax.c, * elf32-visium.c, * elf32-wasm32.c,
58 * elf32-xgate.c, * elf32-xtensa.c, * elf64-alpha.c,
59 * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c,
60 * elf64-ppc.c, * elf64-s390.c, * elf64-sparc.c, * elf64-x86-64.c,
61 * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c,
62 * elfnn-riscv.c, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-riscv.h,
63 * elfxx-sparc.c, * elfxx-sparc.h, * reloc.c: Standardize
64 unrecognized/unsupported reloc message.
65
66 2018-02-26 Alan Modra <amodra@gmail.com>
67
68 * elf32-ppc.c: Standardize error/warning messages. Use
69 _bfd_error_handler rather than einfo when einfo features not used.
70 * elf64-ppc.c: Likewise.
71
72 2018-02-23 Alan Modra <amodra@gmail.com>
73
74 PR 22881
75 * elf.c (assign_file_positions_for_non_load_sections): Remove RELRO
76 segment if no matching LOAD segment.
77
78 2018-02-23 Kuan-Lin Chen <kuanlinchentw@gmail.com>
79
80 * elf32-nds32.h: Define mask for ict_model.
81
82 2018-02-20 Jason Duerstock <jason.duerstock@gmail.com>
83
84 * elfnn-ia64.c (elf_backend_can_gc_sections): Enable.
85
86 2018-02-19 Maciej W. Rozycki <macro@mips.com>
87
88 Revert
89 2018-01-12 Vlad Ivanov <vlad@ivanov.email>
90
91 * elfxx-mips.c (_bfd_mips_elf_final_link): Notify user when
92 .reginfo section has wrong size.
93
94 2018-02-19 Maciej W. Rozycki <macro@mips.com>
95
96 * elfxx-mips.c (_bfd_mips_elf_always_size_sections): Set
97 SEC_FIXED_SIZE and SEC_HAS_CONTENTS flags for `.reginfo' and
98 `.MIPS.abiflags' sections.
99 (_bfd_mips_elf_final_link): Avoid reading beyond `.reginfo'
100 section's end.
101
102 2018-02-19 Maciej W. Rozycki <macro@mips.com>
103
104 * section.c (SEC_FIXED_SIZE): New macro.
105 * bfd-in2.h: Regenerate.
106
107 2018-02-19 Maciej W. Rozycki <macro@mips.com>
108
109 * section.c (SEC_HAS_GOT_REF): Remove macro.
110 * bfd-in2.h: Regenerate.
111
112 2018-02-19 Alan Modra <amodra@gmail.com>
113
114 * elf-attrs.c (_bfd_elf_parse_attributes): Correct _bfd_error_handler
115 arguments.
116 * elfxx-mips.c (_bfd_mips_elf_final_link): Likewise.
117 * elfnn-riscv.c (_bfd_riscv_relax_align): Likewise.
118 (_bfd_riscv_relax_pc): Likewise and fix typos.
119 * libbfd-in.h (_bfd_error_handler): Add attribute printf.
120 * libbfd.h: Regenerate.
121
122 2018-02-19 Alan Modra <amodra@gmail.com>
123
124 * dwarf2.c (read_section): Don't use 'll' format modifier.
125 (find_abstract_instance): Likewise.
126 * elfcore.h (elf_core_file_p): Likewise.
127
128 2018-02-19 Alan Modra <amodra@gmail.com>
129
130 * bfd-in.h: Include inttypes.h or if not available define
131 PRId64, PRIu64 and PRIx64.
132 * bfd.c (_bfd_doprnt, _bfd_doprnt_scan): Remove support for L
133 modifier to print bfd_vma.
134 * coff-arm.c, * coff-mcore.c, * coff-ppc.c, * coff-rs6000.c,
135 * coff-sh.c, * coff-tic80.c, * coffcode.h, * coffgen.c, * cofflink.c,
136 * compress.c, * dwarf2.c, * elf-m10300.c, * elf.c, * elf32-arc.c,
137 * elf32-arm.c, * elf32-bfin.c, * elf32-cris.c, * elf32-hppa.c,
138 * elf32-i386.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32r.c,
139 * elf32-m68k.c, * elf32-metag.c, * elf32-nds32.c, * elf32-nios2.c,
140 * elf32-ppc.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c,
141 * elf32-score7.c, * elf32-sh.c, * elf32-sh64.c, * elf32-spu.c,
142 * elf32-tic6x.c, * elf32-tilepro.c, * elf32-v850.c, * elf32-vax.c,
143 * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c,
144 * elf64-mmix.c, * elf64-s390.c, * elf64-sh64.c, * elf64-x86-64.c,
145 * elfcode.h, * elfcore.h, * elflink.c, * elfnn-aarch64.c,
146 * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-mips.c, * elfxx-sparc.c,
147 * elfxx-tilegx.c, * ieee.c, * ihex.c, * mach-o.c, * merge.c, * mmo.c,
148 * peXXigen.c, * xcofflink.c: Replace use of Lx modifier with PRIx64,
149 and cast input to uint64_t, and similarly for Ld and Lu.
150 * bfd-in2.h: Regenerate.
151
152 2018-02-19 Alan Modra <amodra@gmail.com>
153
154 * elf32-arm.c, * elf32-hppa.c, * elf32-lm32.c, * elf32-m32r.c,
155 * elf32-metag.c, * elf32-nds32.c, * elf32-or1k.c, * elf32-ppc.c,
156 * elf32-s390.c, * elf32-sh.c, * elf32-tic6x.c, * elf32-tilepro.c,
157 * elf64-ppc.c, * elf64-s390.c, * elflink.c, * elfnn-aarch64.c,
158 * elfnn-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c,
159 * reloc.c: Replace use of %R and %T in format strings passed to
160 einfo and friends by %pR and %pT.
161
162 2018-02-19 Alan Modra <amodra@gmail.com>
163
164 * bfd.c (_bfd_doprnt, _bfd_doprnt_scan): Handle %pA and %pB in place
165 of %A and %B.
166 * aout-adobe.c: Update all messages using %A and %B.
167 * aout-cris.c: Likewise.
168 * aoutx.h: Likewise.
169 * archive.c: Likewise.
170 * binary.c: Likewise.
171 * cache.c: Likewise.
172 * coff-alpha.c: Likewise.
173 * coff-arm.c: Likewise.
174 * coff-i860.c: Likewise.
175 * coff-mcore.c: Likewise.
176 * coff-ppc.c: Likewise.
177 * coff-rs6000.c: Likewise.
178 * coff-sh.c: Likewise.
179 * coff-tic4x.c: Likewise.
180 * coff-tic54x.c: Likewise.
181 * coff-tic80.c: Likewise.
182 * coff64-rs6000.c: Likewise.
183 * coffcode.h: Likewise.
184 * coffgen.c: Likewise.
185 * cofflink.c: Likewise.
186 * coffswap.h: Likewise.
187 * compress.c: Likewise.
188 * cpu-arm.c: Likewise.
189 * ecoff.c: Likewise.
190 * elf-attrs.c: Likewise.
191 * elf-eh-frame.c: Likewise.
192 * elf-ifunc.c: Likewise.
193 * elf-m10300.c: Likewise.
194 * elf-properties.c: Likewise.
195 * elf-s390-common.c: Likewise.
196 * elf.c: Likewise.
197 * elf32-arc.c: Likewise.
198 * elf32-arm.c: Likewise.
199 * elf32-avr.c: Likewise.
200 * elf32-bfin.c: Likewise.
201 * elf32-cr16.c: Likewise.
202 * elf32-cr16c.c: Likewise.
203 * elf32-cris.c: Likewise.
204 * elf32-crx.c: Likewise.
205 * elf32-d10v.c: Likewise.
206 * elf32-d30v.c: Likewise.
207 * elf32-epiphany.c: Likewise.
208 * elf32-fr30.c: Likewise.
209 * elf32-frv.c: Likewise.
210 * elf32-gen.c: Likewise.
211 * elf32-hppa.c: Likewise.
212 * elf32-i370.c: Likewise.
213 * elf32-i386.c: Likewise.
214 * elf32-i960.c: Likewise.
215 * elf32-ip2k.c: Likewise.
216 * elf32-iq2000.c: Likewise.
217 * elf32-lm32.c: Likewise.
218 * elf32-m32c.c: Likewise.
219 * elf32-m32r.c: Likewise.
220 * elf32-m68hc11.c: Likewise.
221 * elf32-m68hc12.c: Likewise.
222 * elf32-m68hc1x.c: Likewise.
223 * elf32-m68k.c: Likewise.
224 * elf32-mcore.c: Likewise.
225 * elf32-mep.c: Likewise.
226 * elf32-metag.c: Likewise.
227 * elf32-microblaze.c: Likewise.
228 * elf32-moxie.c: Likewise.
229 * elf32-msp430.c: Likewise.
230 * elf32-mt.c: Likewise.
231 * elf32-nds32.c: Likewise.
232 * elf32-nios2.c: Likewise.
233 * elf32-or1k.c: Likewise.
234 * elf32-pj.c: Likewise.
235 * elf32-ppc.c: Likewise.
236 * elf32-rl78.c: Likewise.
237 * elf32-rx.c: Likewise.
238 * elf32-s390.c: Likewise.
239 * elf32-score.c: Likewise.
240 * elf32-score7.c: Likewise.
241 * elf32-sh-symbian.c: Likewise.
242 * elf32-sh.c: Likewise.
243 * elf32-sh64.c: Likewise.
244 * elf32-sparc.c: Likewise.
245 * elf32-spu.c: Likewise.
246 * elf32-tic6x.c: Likewise.
247 * elf32-tilepro.c: Likewise.
248 * elf32-v850.c: Likewise.
249 * elf32-vax.c: Likewise.
250 * elf32-visium.c: Likewise.
251 * elf32-wasm32.c: Likewise.
252 * elf32-xgate.c: Likewise.
253 * elf32-xtensa.c: Likewise.
254 * elf64-alpha.c: Likewise.
255 * elf64-gen.c: Likewise.
256 * elf64-hppa.c: Likewise.
257 * elf64-ia64-vms.c: Likewise.
258 * elf64-mmix.c: Likewise.
259 * elf64-ppc.c: Likewise.
260 * elf64-s390.c: Likewise.
261 * elf64-sh64.c: Likewise.
262 * elf64-sparc.c: Likewise.
263 * elf64-x86-64.c: Likewise.
264 * elfcode.h: Likewise.
265 * elfcore.h: Likewise.
266 * elflink.c: Likewise.
267 * elfnn-aarch64.c: Likewise.
268 * elfnn-ia64.c: Likewise.
269 * elfnn-riscv.c: Likewise.
270 * elfxx-mips.c: Likewise.
271 * elfxx-sparc.c: Likewise.
272 * elfxx-tilegx.c: Likewise.
273 * elfxx-x86.c: Likewise.
274 * hpux-core.c: Likewise.
275 * ieee.c: Likewise.
276 * ihex.c: Likewise.
277 * libbfd.c: Likewise.
278 * linker.c: Likewise.
279 * mach-o.c: Likewise.
280 * merge.c: Likewise.
281 * mmo.c: Likewise.
282 * oasys.c: Likewise.
283 * pdp11.c: Likewise.
284 * pe-mips.c: Likewise.
285 * peXXigen.c: Likewise.
286 * peicode.h: Likewise.
287 * reloc.c: Likewise.
288 * rs6000-core.c: Likewise.
289 * srec.c: Likewise.
290 * stabs.c: Likewise.
291 * vms-alpha.c: Likewise.
292 * xcofflink.c: Likewise.
293
294 2018-02-19 Alan Modra <amodra@gmail.com>
295
296 PR 22845
297 * elf.c (IS_TBSS): Define.
298 (_bfd_elf_map_sections_to_segments): Use IS_TBSS.
299 (assign_file_positions_for_non_load_sections): Revert last change.
300 Properly calculate load segment limits to compare against relro limits.
301
302 2018-02-17 Alan Modra <amodra@gmail.com>
303
304 PR 22845
305 * elf.c (assign_file_positions_for_non_load_sections): Ignore
306 degenerate zero size PT_LOAD segments when finding one overlapping
307 the PT_GNU_RELRO segment.
308
309 2018-02-16 Alan Modra <amodra@gmail.com>
310
311 * libbfd.c (_bfd_bool_bfd_false_error): Rename from bfd_false.
312 (_bfd_bool_bfd_true): Rename from bfd_true.
313 (_bfd_ptr_bfd_null_error): Rename from bfd_nullvoidptr.
314 (_bfd_int_bfd_0): Rename from bfd_0.
315 (_bfd_uint_bfd_0): Rename from bfd_0u.
316 (_bfd_long_bfd_0): Rename from bfd_0l.
317 (_bfd_long_bfd_n1_error): Rename from _bfd_n1.
318 (_bfd_void_bfd): Rename from bfd_void.
319 (_bfd_bool_bfd_false, _bfd_bool_bfd_asymbol_false),
320 (_bfd_bool_bfd_link_false_error),
321 (_bfd_bool_bfd_link_true, _bfd_bool_bfd_bfd_true),
322 (_bfd_bool_bfd_uint_true, _bfd_bool_bfd_ptr_true),
323 (_bfd_bool_bfd_asection_bfd_asection_true),
324 (_bfd_bool_bfd_asymbol_bfd_asymbol_true),
325 (_bfd_void_bfd_link, _bfd_void_bfd_asection): New functions.
326 * archive.c (_bfd_noarchive_get_elt_at_index),
327 (_bfd_noarchive_openr_next_archived_file),
328 (_bfd_noarchive_construct_extended_name_table),
329 (_bfd_noarchive_write_ar_hdr, _bfd_noarchive_truncate_arname),
330 (_bfd_noarchive_write_armap): New functions.
331 * archures.c (_bfd_nowrite_set_arch_mach): New function.
332 * coff-alpha.c (alpha_ecoff_swap_coff_aux_in),
333 (alpha_ecoff_swap_coff_sym_in, alpha_ecoff_swap_coff_lineno_in),
334 (alpha_ecoff_swap_coff_aux_out, alpha_ecoff_swap_coff_sym_out),
335 (alpha_ecoff_swap_coff_lineno_out),
336 (alpha_ecoff_swap_coff_reloc_out): New functions.
337 * coff-mips.c (mips_ecoff_swap_coff_aux_in),
338 (mips_ecoff_swap_coff_sym_in, mips_ecoff_swap_coff_lineno_in),
339 (mips_ecoff_swap_coff_aux_out, mips_ecoff_swap_coff_sym_out),
340 (mips_ecoff_swap_coff_lineno_out),
341 (mips_ecoff_swap_coff_reloc_out): New functions.
342 * coffcode.h (coff_set_alignment_hook): Replace define with
343 new function.
344 (symname_in_debug_hook): Likewise.
345 * ecoff.c (_bfd_ecoff_set_alignment_hook): New function.
346 * elfxx-target.h (elf_backend_allow_non_load_phdr): Default to 0.
347 * elf.c (assign_file_positions_except_relocs): Test
348 elf_backend_allow_non_load_phdr for NULL.
349 * elflink.c (_bfd_elf_omit_section_dynsym_default): Rename from
350 _bfd_elf_link_omit_section_dynsym. Update uses.
351 (_bfd_elf_omit_section_dynsym_all): New function.
352 * elf-bfd.h (_bfd_elf_link_omit_section_dynsym): Delete.
353 (_bfd_elf_omit_section_dynsym_default): Declare.
354 (_bfd_elf_omit_section_dynsym_all): Declare.
355 * linker.c (_bfd_nolink_sizeof_headers, _bfd_nolink_bfd_relax_section),
356 (_bfd_nolink_bfd_get_relocated_section_contents),
357 (_bfd_nolink_bfd_lookup_section_flags),
358 (_bfd_nolink_bfd_is_group_section, _bfd_nolink_bfd_discard_group),
359 (_bfd_nolink_bfd_link_hash_table_create),
360 (_bfd_nolink_bfd_link_just_syms),
361 (_bfd_nolink_bfd_copy_link_hash_symbol_type),
362 (_bfd_nolink_bfd_link_split_section),
363 (_bfd_nolink_section_already_linked),
364 (_bfd_nolink_bfd_define_common_symbol),
365 (_bfd_nolink_bfd_define_start_stop): New functions.
366 * reloc.c (_bfd_norelocs_bfd_reloc_type_lookup),
367 (_bfd_norelocs_bfd_reloc_name_lookup),
368 (_bfd_nodynamic_canonicalize_dynamic_reloc): New functions.
369 * section.c (_bfd_nowrite_set_section_contents): New function.
370 * syms.c (_bfd_nosymbols_canonicalize_symtab),
371 (_bfd_nosymbols_print_symbol, _bfd_nosymbols_get_symbol_info),
372 (_bfd_nosymbols_get_symbol_version_string),
373 (_bfd_nosymbols_bfd_is_local_label_name),
374 (_bfd_nosymbols_get_lineno, _bfd_nosymbols_find_nearest_line),
375 (_bfd_nosymbols_find_line, _bfd_nosymbols_find_inliner_info),
376 (_bfd_nosymbols_bfd_make_debug_symbol),
377 ( _bfd_nosymbols_read_minisymbols),
378 ( _bfd_nosymbols_minisymbol_to_symbol),
379 (_bfd_nodynamic_get_synthetic_symtab): New functions.
380 * libbfd-in.h: Declare new functions. Update existing defines,
381 removing casts.
382 * aix386-core.c: Update to use new hooks. Formatting.
383 * aout-adobe.c: Likewise.
384 * aout-arm.c: Likewise.
385 * aout-target.h: Likewise.
386 * aout-tic30.c: Likewise.
387 * aoutf1.h: Likewise.
388 * binary.c: Likewise.
389 * bout.c: Likewise.
390 * cisco-core.c: Likewise.
391 * coff-alpha.c: Likewise.
392 * coff-i386.c: Likewise.
393 * coff-i860.c: Likewise.
394 * coff-i960.c: Likewise.
395 * coff-ia64.c: Likewise.
396 * coff-mips.c: Likewise.
397 * coff-ppc.c: Likewise.
398 * coff-rs6000.c: Likewise.
399 * coff-sh.c: Likewise.
400 * coff-tic30.c: Likewise.
401 * coff-tic54x.c: Likewise.
402 * coff-x86_64.c: Likewise.
403 * coff64-rs6000.c: Likewise.
404 * coffcode.h: Likewise.
405 * elf-m10300.c: Likewise.
406 * elf32-cr16.c: Likewise.
407 * elf32-lm32.c: Likewise.
408 * elf32-m32r.c: Likewise.
409 * elf32-metag.c: Likewise.
410 * elf32-score.c: Likewise.
411 * elf32-score7.c: Likewise.
412 * elf32-tilepro.c: Likewise.
413 * elf32-xstormy16.c: Likewise.
414 * elf32-xtensa.c: Likewise.
415 * elf64-alpha.c: Likewise.
416 * elf64-hppa.c: Likewise.
417 * elf64-ia64-vms.c: Likewise.
418 * elf64-mmix.c: Likewise.
419 * elf64-sh64.c: Likewise.
420 * elfnn-ia64.c: Likewise.
421 * elfxx-sparc.c: Likewise.
422 * elfxx-target.h: Likewise.
423 * elfxx-tilegx.c: Likewise.
424 * elfxx-x86.h: Likewise.
425 * hp300hpux.c: Likewise.
426 * hppabsd-core.c: Likewise.
427 * hpux-core.c: Likewise.
428 * i386msdos.c: Likewise.
429 * i386os9k.c: Likewise.
430 * ieee.c: Likewise.
431 * ihex.c: Likewise.
432 * irix-core.c: Likewise.
433 * libaout.h: Likewise.
434 * libecoff.h: Likewise.
435 * mach-o-target.c: Likewise.
436 * mach-o.c: Likewise.
437 * mipsbsd.c: Likewise.
438 * mmo.c: Likewise.
439 * netbsd-core.c: Likewise.
440 * nlm-target.h: Likewise.
441 * oasys.c: Likewise.
442 * osf-core.c: Likewise.
443 * pdp11.c: Likewise.
444 * pe-mips.c: Likewise.
445 * pe-x86_64.c: Likewise.
446 * pef.c: Likewise.
447 * plugin.c: Likewise.
448 * ppcboot.c: Likewise.
449 * ptrace-core.c: Likewise.
450 * sco5-core.c: Likewise.
451 * som.c: Likewise.
452 * sparclynx.c: Likewise.
453 * srec.c: Likewise.
454 * tekhex.c: Likewise.
455 * trad-core.c: Likewise.
456 * verilog.c: Likewise.
457 * versados.c: Likewise.
458 * vms-alpha.c: Likewise.
459 * vms-lib.c: Likewise.
460 * wasm-module.c: Likewise.
461 * xsym.c: Likewise.
462 * libbfd.h: Regenerate.
463
464 2018-02-15 Jim Wilson <jimw@sifive.com>
465
466 * elfnn-riscv.c (_bfd_riscv_relax_section): Ifdef out check to ignore
467 symbols whose section address is zero.
468
469 * elfnn-riscv.c (riscv_elf_relocate_section): Use bfd_reloc_dangerous
470 when pcrel_lo reloc has an addend. Use reloc_dangerous callback for
471 bfd_reloc_dangerous. Use einfo instead of warning callback for errors.
472 Add %X%P to error messages.
473
474 2018-02-15 Eric Botcazou <ebotcazou@adacore.com>
475
476 PR ld/22832
477 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs) <R_SPARC_TLS_GD_CALL>:
478 Pass FALSE instead of TRUE as 'create' argument to bfd_link_hash_lookup
479 and assert that the result of the call is not NULL.
480
481 2018-02-14 Nick Clifton <nickc@redhat.com>
482
483 PR 22823
484 Revert previous delta. Add extra casts to avoid compile time
485 warnings instead.
486 * libbfd-in.h (_bfd_generic_bfd_copy_private_bfd_data): Add extra
487 cast to avoid warning from gcc v8 compiler.
488 (_bfd_generic_bfd_merge_private_bfd_data): Likewise.
489 (_bfd_generic_bfd_set_private_flags): Likewise.
490 (_bfd_generic_bfd_copy_private_section_data): Likewise.
491 (_bfd_generic_bfd_copy_private_symbol_data): Likewise.
492 (_bfd_generic_bfd_copy_private_header_data): Likewise.
493 (_bfd_generic_bfd_print_private_bfd_data): Likewise.
494 (_bfd_noarchive_construct_extended_name_table): Likewise.
495 (_bfd_noarchive_truncate_arname): Likewise.
496 (_bfd_noarchive_write_ar_hdr): Likewise.
497 (_bfd_noarchive_get_elt_at_index): Likewise.
498 (_bfd_nosymbols_canonicalize_symtab): Likewise.
499 (_bfd_nosymbols_print_symbol): Likewise.
500 (_bfd_nosymbols_get_symbol_info): Likewise.
501 (_bfd_nosymbols_get_symbol_version_string): Likewise.
502 (_bfd_nosymbols_bfd_is_local_label_name): Likewise.
503 (_bfd_nosymbols_bfd_is_target_special_symbol): Likewise.
504 (_bfd_nosymbols_get_lineno): Likewise.
505 (_bfd_nosymbols_find_nearest_line): Likewise.
506 (_bfd_nosymbols_find_line): Likewise.
507 (_bfd_nosymbols_find_inliner_info): Likewise.
508 (_bfd_nosymbols_bfd_make_debug_symbol): Likewise.
509 (_bfd_nosymbols_read_minisymbols): Likewise.
510 (_bfd_nosymbols_minisymbol_to_symbol): Likewise.
511 (_bfd_norelocs_bfd_reloc_type_lookup): Likewise.
512 (_bfd_norelocs_bfd_reloc_name_lookup): Likewise.
513 (_bfd_nowrite_set_arch_mach): Likewise.
514 (_bfd_nowrite_set_section_contents): Likewise.
515 (_bfd_nolink_sizeof_headers): Likewise.
516 (_bfd_nolink_bfd_get_relocated_section_contents): Likewise.
517 (_bfd_nolink_bfd_relax_section): Likewise.
518 (_bfd_nolink_bfd_gc_sections): Likewise.
519 (_bfd_nolink_bfd_lookup_section_flags): Likewise.
520 (_bfd_nolink_bfd_merge_sections): Likewise.
521 (_bfd_nolink_bfd_is_group_section): Likewise.
522 (_bfd_nolink_bfd_discard_group): Likewise.
523 (_bfd_nolink_bfd_link_hash_table_create): Likewise.
524 (_bfd_nolink_bfd_link_add_symbols): Likewise.
525 (_bfd_nolink_bfd_link_just_syms): Likewise.
526 (_bfd_nolink_bfd_copy_link_hash_symbol_type): Likewise.
527 (_bfd_nolink_bfd_final_link): Likewise.
528 (_bfd_nolink_bfd_link_split_section): Likewise.
529 (_bfd_nolink_section_already_linked): Likewise.
530 (_bfd_nolink_bfd_define_common_symbol): Likewise.
531 (_bfd_nolink_bfd_define_start_stop): Likewise.
532 (_bfd_nodynamic_canonicalize_dynamic_symtab): Likewise.
533 (_bfd_nodynamic_get_synthetic_symtab): Likewise.
534 (_bfd_nodynamic_get_dynamic_reloc_upper_bound _bfd_): Likewise.
535 (_bfd_nodynamic_canonicalize_dynamic_reloc): Likewise.
536 * libbfd.c (bfd_false_any): Delete.
537 (bfd_true_any, bfd_nullvoidptr_any, bfd_0_any): Delete.
538 (bfd_0u_any, bfd_0l_any, _bfd_n1_any, bfd_void_any): Delete.
539 * libbfd.h (extern): Regenerate
540 * aout-target.h (MY_bfd_is_target_special_symbol): Add extra
541 cast to avoid warning from gcc v8 compiler.
542 * aout-tic30.c (tic30_aout_set_arch_mach): Likewise.
543 * binary.c (binary_get_symbol_info): Likewise.
544 * coff-alpha.c (alpha_ecoff_backend_data): Likewise.
545 * coff-mips.c (mips_ecoff_backend_data): Likewise.
546 * coffcode.h (coff_set_alignment_hook): Likewise.
547 (symname_in_debug_hook): Likewise.
548 (bfd_coff_backend_data bigobj_swap_table): Likewise.
549 * elf-m10300.c (elf_backend_omit_section_dynsym): Likewise.
550 * elf32-cr16.c (elf_backend_omit_section_dynsym): Likewise.
551 * elf32-lm32.c (elf_backend_omit_section_dynsym): Likewise.
552 * elf32-m32r.c (elf_backend_omit_section_dynsym): Likewise.
553 * elf32-metag.c (elf_backend_omit_section_dynsym): Likewise.
554 * elf32-score.c (elf_backend_omit_section_dynsym): Likewise.
555 * elf32-score7.c (elf_backend_omit_section_dynsym): Likewise.
556 * elf32-xstormy16.c (elf_backend_omit_section_dynsym): Likewise.
557 * elf32-xtensa.c (elf_backend_omit_section_dynsym): Likewise.
558 * elf64-alpha.c (elf_backend_omit_section_dynsym): Likewise.
559 * elf64-hppa.c (elf_backend_omit_section_dynsym): Likewise.
560 * elf64-ia64-vms.c (elf_backend_omit_section_dynsym): Likewise.
561 * elf64-mmix.c (elf_backend_omit_section_dynsym): Likewise.
562 * elf64-sh64.c (elf_backend_omit_section_dynsym): Likewise.
563 * elfnn-ia64.c (elf_backend_omit_section_dynsym): Likewise.
564 * elfxx-target.h (bfd_elfNN_bfd_debug_info_accumulate): Likewise.
565 (bfd_elfNN_bfd_make_debug_symbol): Likewise.
566 (bfd_elfNN_bfd_merge_private_bfd_data): Likewise.
567 (bfd_elfNN_bfd_set_private_flags): Likewise.
568 (bfd_elfNN_bfd_is_target_special_symbol): Likewise.
569 (elf_backend_init_index_section): Likewise.
570 (elf_backend_allow_non_load_phdr): Likewise.
571 * elfxx-x86.h (elf_backend_omit_section_dynsym): Likewise.
572 * i386msdos.c (msdos_bfd_is_target_special_symbol): Likewise.
573 * ieee.c (ieee_construct_extended_name_table): Likewise.
574 (ieee_write_armap): Likewise.
575 (ieee_write_ar_hdr): Likewise.
576 (ieee_bfd_is_target_special_symbol): Likewise.
577 * ihex.c (ihex_canonicalize_symtab): Likewise.
578 (ihex_bfd_is_target_special_symbol): Likewise.
579 * libaout.h (aout_32_bfd_is_target_special_symbol): Likewise.
580 * libecoff.h (_bfd_ecoff_bfd_is_target_special_symbol): Likewise.
581 (_bfd_ecoff_set_alignment_hook): Likewise.
582 * mach-o-target.c (bfd_mach_o_bfd_is_target_special_symbol): Likewise.
583 * mmo.c (mmo_bfd_is_target_special_symbol): Likewise.
584 * nlm-target.h (nlm_bfd_is_target_special_symbol): Likewise.
585 * oasys.c (oasys_construct_extended_name_table): Likewise.
586 (oasys_write_armap): Likewise.
587 (oasys_write_ar_hdr): Likewise.
588 (oasys_bfd_is_target_special_symbol): Likewise.
589 * pef.c (bfd_pef_bfd_is_target_special_symbol): Likewise.
590 * plugin.c (bfd_plugin_bfd_is_target_special_symbol): Likewise.
591 * ppcboot.c (ppcboot_bfd_is_target_special_symbol): Likewise.
592 * som.c (som_bfd_is_target_special_symbol): Likewise.
593 * srec.c (srec_bfd_is_target_special_symbol): Likewise.
594 * tekhex.c (tekhex_bfd_is_target_special_symbol): Likewise.
595 * verilog.c (verilog_bfd_is_target_special_symbol): Likewise.
596 * versados.c (versados_bfd_is_target_special_symbol): Likewise.
597 (versados_bfd_reloc_name_lookup): Likewise.
598 * vms-alpha.c (vms_bfd_is_target_special_symbol): Likewise.
599 (vms_bfd_define_start_stop): Likewise.
600 (alpha_vms_bfd_is_target_special_symbol): Likewise.
601 * wasm-module.c (wasm_bfd_is_target_special_symbol): Likewise.
602 * xsym.c (bfd_sym_bfd_is_target_special_symbol): Likewise.
603
604 2018-02-14 H.J. Lu <hongjiu.lu@intel.com>
605
606 PR ld/22842
607 * elf32-i386.c (elf_i386_check_relocs): Pass FALSE for non
608 PC-relative PLT to NEED_DYNAMIC_RELOCATION_P.
609 * elf64-x86-64.c (elf_x86_64_check_relocs): Create PLT for
610 R_X86_64_PC32 reloc against dynamic function in data section.
611 Pass TRUE for PC-relative PLT to NEED_DYNAMIC_RELOCATION_P.
612 (elf_x86_64_relocate_section): Use PLT for R_X86_64_PC32 reloc
613 against dynamic function in data section.
614 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Use PLT in PIE as
615 function address only if pcrel_plt is true.
616 (_bfd_x86_elf_link_hash_table_create): Set pcrel_plt.
617 * elfxx-x86.h (NEED_DYNAMIC_RELOCATION_P): Add PCREL_PLT for
618 PC-relative PLT. If PLT is PC-relative, don't generate dynamic
619 PC-relative relocation against a function definition in data
620 secton in PIE. Remove the obsolete comments.
621 (elf_x86_link_hash_table): Add pcrel_plt.
622
623 2018-02-13 H.J. Lu <hongjiu.lu@intel.com>
624
625 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Check bfd_link_dll,
626 instead of bfd_link_pic, for building shared library.
627
628 2018-02-13 H.J. Lu <hongjiu.lu@intel.com>
629
630 PR gas/22791
631 * elf64-x86-64.c (is_32bit_relative_branch): Removed.
632 (elf_x86_64_relocate_section): Check PIC relocations in PIE.
633 Remove is_32bit_relative_branch usage. Disallow PC32 reloc
634 against protected function in shared object.
635
636 2018-02-13 Sergei Trofimovich <slyfox@inbox.ru>
637
638 PR 22828
639 * po/ru.po: Fix typo in Russian translation.
640
641 2018-02-13 Maciej W. Rozycki <macro@mips.com>
642
643 * wasm-module.c (wasm_scan_name_function_section): Rename
644 `index' local variable to `idx'.
645
646 2018-02-13 Nick Clifton <nickc@redhat.com>
647
648 PR 22823
649 Fix compile time warnings generated by gcc version 8.
650 * libbfd-in.h: Remove extraneous text from prototypes.
651 Add prototypes for bfd_false_any, bfd_true_any,
652 bfd_nullvoidptr_any, bfd_0_any, bfd_0u_any, bfd_0l_any,
653 bfd_n1_any, bfd_void_any.
654 (_bfd_generic_bfd_copy_private_bfd_data): Use vararg based dummy
655 function.
656 (_bfd_generic_bfd_merge_private_bfd_data): Likewise.
657 (_bfd_generic_bfd_set_private_flags): Likewise.
658 (_bfd_generic_bfd_copy_private_section_data): Likewise.
659 (_bfd_generic_bfd_copy_private_symbol_data): Likewise.
660 (_bfd_generic_bfd_copy_private_header_data): Likewise.
661 (_bfd_generic_bfd_print_private_bfd_data): Likewise.
662 (_bfd_noarchive_construct_extended_name_table): Likewise.
663 (_bfd_noarchive_truncate_arname): Likewise.
664 (_bfd_noarchive_write_ar_hdr): Likewise.
665 (_bfd_noarchive_get_elt_at_index): Likewise.
666 (_bfd_nosymbols_canonicalize_symtab): Likewise.
667 (_bfd_nosymbols_print_symbol): Likewise.
668 (_bfd_nosymbols_get_symbol_info): Likewise.
669 (_bfd_nosymbols_get_symbol_version_string): Likewise.
670 (_bfd_nosymbols_bfd_is_local_label_name): Likewise.
671 (_bfd_nosymbols_bfd_is_target_special_symbol): Likewise.
672 (_bfd_nosymbols_get_lineno): Likewise.
673 (_bfd_nosymbols_find_nearest_line): Likewise.
674 (_bfd_nosymbols_find_line): Likewise.
675 (_bfd_nosymbols_find_inliner_info): Likewise.
676 (_bfd_nosymbols_bfd_make_debug_symbol): Likewise.
677 (_bfd_nosymbols_read_minisymbols): Likewise.
678 (_bfd_nosymbols_minisymbol_to_symbol): Likewise.
679 (_bfd_norelocs_bfd_reloc_type_lookup): Likewise.
680 (_bfd_norelocs_bfd_reloc_name_lookup): Likewise.
681 (_bfd_nowrite_set_arch_mach): Likewise.
682 (_bfd_nowrite_set_section_contents): Likewise.
683 (_bfd_nolink_sizeof_headers): Likewise.
684 (_bfd_nolink_bfd_get_relocated_section_contents): Likewise.
685 (_bfd_nolink_bfd_relax_section): Likewise.
686 (_bfd_nolink_bfd_gc_sections): Likewise.
687 (_bfd_nolink_bfd_lookup_section_flags): Likewise.
688 (_bfd_nolink_bfd_merge_sections): Likewise.
689 (_bfd_nolink_bfd_is_group_section): Likewise.
690 (_bfd_nolink_bfd_discard_group): Likewise.
691 (_bfd_nolink_bfd_link_hash_table_create): Likewise.
692 (_bfd_nolink_bfd_link_add_symbols): Likewise.
693 (_bfd_nolink_bfd_link_just_syms): Likewise.
694 (_bfd_nolink_bfd_copy_link_hash_symbol_type): Likewise.
695 (_bfd_nolink_bfd_final_link): Likewise.
696 (_bfd_nolink_bfd_link_split_section): Likewise.
697 (_bfd_nolink_section_already_linked): Likewise.
698 (_bfd_nolink_bfd_define_common_symbol): Likewise.
699 (_bfd_nolink_bfd_define_start_stop): Likewise.
700 (_bfd_nodynamic_canonicalize_dynamic_symtab): Likewise.
701 (_bfd_nodynamic_get_synthetic_symtab): Likewise.
702 (_bfd_nodynamic_get_dynamic_reloc_upper_bound _bfd_): Likewise.
703 (_bfd_nodynamic_canonicalize_dynamic_reloc): Likewise.
704 * libbfd.c (bfd_false_any): New function. Like bfd_false but
705 accepts one or more arguments.
706 (bfd_true_any): Likewise.
707 (bfd_nullvoidptr_any): Likewise.
708 (bfd_0_any): Likewise.
709 (bfd_0u_any): Likewise.
710 (bfd_0l_any): Likewise.
711 (_bfd_n1_any): Likewise.
712 (bfd_void_any): Likewise.
713 * libbfd.h (extern): Regenerate
714 * aout-target.h (MY_bfd_is_target_special_symbol): Use vararg
715 based dummy function.
716 * aout-tic30.c (tic30_aout_set_arch_mach): Likewise.
717 * binary.c (binary_get_symbol_info): Likewise.
718 * coff-alpha.c (alpha_ecoff_backend_data): Likewise.
719 * coff-mips.c (mips_ecoff_backend_data): Likewise.
720 * coffcode.h (coff_set_alignment_hook): Likewise.
721 (symname_in_debug_hook): Likewise.
722 (bfd_coff_backend_data bigobj_swap_table): Likewise.
723 * elf-m10300.c (elf_backend_omit_section_dynsym): Likewise.
724 * elf32-cr16.c (elf_backend_omit_section_dynsym): Likewise.
725 * elf32-lm32.c (elf_backend_omit_section_dynsym): Likewise.
726 * elf32-m32r.c (elf_backend_omit_section_dynsym): Likewise.
727 * elf32-metag.c (elf_backend_omit_section_dynsym): Likewise.
728 * elf32-score.c (elf_backend_omit_section_dynsym): Likewise.
729 * elf32-score7.c (elf_backend_omit_section_dynsym): Likewise.
730 * elf32-xstormy16.c (elf_backend_omit_section_dynsym): Likewise.
731 * elf32-xtensa.c (elf_backend_omit_section_dynsym): Likewise.
732 * elf64-alpha.c (elf_backend_omit_section_dynsym): Likewise.
733 * elf64-hppa.c (elf_backend_omit_section_dynsym): Likewise.
734 * elf64-ia64-vms.c (elf_backend_omit_section_dynsym): Likewise.
735 * elf64-mmix.c (elf_backend_omit_section_dynsym): Likewise.
736 * elf64-sh64.c (elf_backend_omit_section_dynsym): Likewise.
737 * elfnn-ia64.c (elf_backend_omit_section_dynsym): Likewise.
738 * elfxx-target.h (bfd_elfNN_bfd_debug_info_accumulate): Likewise.
739 (bfd_elfNN_bfd_make_debug_symbol): Likewise.
740 (bfd_elfNN_bfd_merge_private_bfd_data): Likewise.
741 (bfd_elfNN_bfd_set_private_flags): Likewise.
742 (bfd_elfNN_bfd_is_target_special_symbol): Likewise.
743 (elf_backend_init_index_section): Likewise.
744 (elf_backend_allow_non_load_phdr): Likewise.
745 * elfxx-x86.h (elf_backend_omit_section_dynsym): Likewise.
746 * i386msdos.c (msdos_bfd_is_target_special_symbol): Likewise.
747 * ieee.c (ieee_construct_extended_name_table): Likewise.
748 (ieee_write_armap): Likewise.
749 (ieee_write_ar_hdr): Likewise.
750 (ieee_bfd_is_target_special_symbol): Likewise.
751 * ihex.c (ihex_canonicalize_symtab): Likewise.
752 (ihex_bfd_is_target_special_symbol): Likewise.
753 * libaout.h (aout_32_bfd_is_target_special_symbol): Likewise.
754 * libecoff.h (_bfd_ecoff_bfd_is_target_special_symbol): Likewise.
755 (_bfd_ecoff_set_alignment_hook): Likewise.
756 * mach-o-target.c (bfd_mach_o_bfd_is_target_special_symbol): Likewise.
757 * mmo.c (mmo_bfd_is_target_special_symbol): Likewise.
758 * nlm-target.h (nlm_bfd_is_target_special_symbol): Likewise.
759 * oasys.c (oasys_construct_extended_name_table): Likewise.
760 (oasys_write_armap): Likewise.
761 (oasys_write_ar_hdr): Likewise.
762 (oasys_bfd_is_target_special_symbol): Likewise.
763 * pef.c (bfd_pef_bfd_is_target_special_symbol): Likewise.
764 * plugin.c (bfd_plugin_bfd_is_target_special_symbol): Likewise.
765 * ppcboot.c (ppcboot_bfd_is_target_special_symbol): Likewise.
766 * som.c (som_bfd_is_target_special_symbol): Likewise.
767 * srec.c (srec_bfd_is_target_special_symbol): Likewise.
768 * tekhex.c (tekhex_bfd_is_target_special_symbol): Likewise.
769 * verilog.c (verilog_bfd_is_target_special_symbol): Likewise.
770 * versados.c (versados_bfd_is_target_special_symbol): Likewise.
771 (versados_bfd_reloc_name_lookup): Likewise.
772 * vms-alpha.c (vms_bfd_is_target_special_symbol): Likewise.
773 (vms_bfd_define_start_stop): Likewise.
774 (alpha_vms_bfd_is_target_special_symbol): Likewise.
775 * wasm-module.c (wasm_bfd_is_target_special_symbol): Likewise.
776 * xsym.c (bfd_sym_bfd_is_target_special_symbol): Likewise.
777 * elf32-arc.c (get_replace_function): Assign replacement function
778 to func pointer.
779 * elf32-i370.c (i370_noop): Update prototype.
780
781 2018-02-13 Alan Modra <amodra@gmail.com>
782
783 PR 22836
784 * elf.c (_bfd_elf_fixup_group_sections): Account for removed
785 relocation sections. If size reduces to just the flag word,
786 remove that too and mark with SEC_EXCLUDE.
787 * elflink.c (bfd_elf_final_link): Strip empty group sections.
788
789 2018-02-13 Alan Modra <amodra@gmail.com>
790
791 PR 22829
792 * elf.c (assign_file_positions_for_non_load_sections): Rewrite
793 PT_GNU_RELRO setup.
794
795 2018-02-12 Zebediah Figura <z.figura12@gmail.com>
796
797 * i386msdos.c (msdos_mkobject); New function.
798 (msdos_object_p): New function.
799 (i386_msdos_vec): Use msdos_object_p as the check_format
800 function.
801 * peicode.h: Rename external_PEI_DOS_hdr, DOSMAGIC, and
802 NT_SIGNATURE to external_DOS_hdr, IMAGE_DOS_SIGNATURE, and
803 IMAGE_NT_SIGNATURE.
804 * peXXigen.c: Likewise.
805 * coff-ia64.c: Likewise.
806
807 2018-02-12 Nick Clifton <nickc@redhat.com>
808
809 * elf32-nds32.c (nds32_elf_relax_longjump3): Remove redundant
810 assignment.
811 * elf32-arc.c (elf_arc_relocate_section): Likewise.
812
813 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
814
815 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Reorder conditions.
816 (sparc_elf_append_rela): Assert that there is enough room in section.
817 (_bfd_sparc_elf_copy_indirect_symbol): Fix formatting.
818 (_bfd_sparc_elf_adjust_dynamic_symbol): Minor tweak.
819 (allocate_dynrelocs): Remove outdated comments and reorder conditions.
820 For a symbol subject to a GOT relocation, reserve a slot in the
821 relocation section if the symbol isn't dynamic and we are in PIC mode.
822 (_bfd_sparc_elf_relocate_section) <R_SPARC_GOTDATA_OP>: If relocation
823 is relaxed and a slot was reserved, generate a R_SPARC_NONE relocation.
824 <R_SPARC_GOTDATA_OP_HIX22>: Adjust comments.
825 <R_SPARC_PC10>: Reorder conditions. Remove always-false assertion.
826 (_bfd_sparc_elf_finish_dynamic_symbol): Rename local_undefweak into
827 resolved_to_zero. Do not generate a dynamic GOT relocation for an
828 undefined weak symbol with non-default visibility. Remove superfluous
829 'else' and fix formatting.
830
831 2018-02-09 H.J. Lu <hongjiu.lu@intel.com>
832
833 * elf32-i386.c (elf_i386_get_synthetic_symtab): Also handle
834 is_solaris.
835 (i386_elf32_sol2_vec): Don't declare.
836 (elf_i386_link_setup_gnu_properties): Also handle is_solaris.
837 Don't set need_global_offset_table.
838 (elf_i386_solaris_arch_bed): New.
839 (elf_backend_arch_data): Set to elf_i386_solaris_arch_bed for
840 Solaris.
841 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Check
842 target_os != is_nacl instead of target_os == is_normal.
843 (x86_64_elf64_sol2_vec): Don't declare.
844 (elf_x86_64_link_setup_gnu_properties): Check target_os !=
845 is_nacl instead of target_os == is_normal. Don't set
846 need_global_offset_table.
847 (elf_x86_64_solaris_arch_bed): New.
848 (elf_backend_arch_data): Set to elf_x86_64_solaris_arch_bed for
849 Solaris.
850 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Keep
851 _GLOBAL_OFFSET_TABLE_ for Solaris.
852 (_bfd_x86_elf_link_setup_gnu_properties): Don't copy
853 need_global_offset_table.
854 * elfxx-x86.h (elf_x86_target_os): Add is_solaris.
855 (elf_x86_link_hash_table): Remove need_global_offset_table.
856 (elf_x86_init_table): Likewise.
857
858 2018-02-08 H.J. Lu <hongjiu.lu@intel.com>
859
860 * elf32-i386.c (elf32_i386_copy_solaris_special_section_fields):
861 Remove prototype.
862 (i386_elf32_sol2_vec): Declared.
863 (elf_i386_link_setup_gnu_properties): Set
864 need_global_offset_table with info->output_bfd->xvec.
865 * elf64-x86-64.c (elf64_x86_64_copy_solaris_special_section_fields):
866 Remove prototype.
867 (x86_64_elf64_sol2_vec): Declared.
868 (elf_x86_64_link_setup_gnu_properties): Set
869 need_global_offset_table with info->output_bfd->xvec.
870
871 2018-02-08 H.J. Lu <hongjiu.lu@intel.com>
872
873 * elf32-i386.c (elf32_i386_copy_solaris_special_section_fields):
874 New prototype.
875 (elf_i386_link_setup_gnu_properties): Set need_global_offset_table
876 for Solaris.
877 * elf64-x86-64.c (elf64_x86_64_copy_solaris_special_section_fields):
878 New prototype.
879 (elf_x86_64_link_setup_gnu_properties): Set
880 need_global_offset_table for Solaris.
881 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Keep the
882 unused _GLOBAL_OFFSET_TABLE_ for Solaris.
883 (_bfd_x86_elf_link_setup_gnu_properties): Copy
884 need_global_offset_table.
885 * elfxx-x86.h (elf_x86_link_hash_table): Add
886 need_global_offset_table.
887 (elf_x86_init_table): Likewise.
888
889 2018-02-08 Jim Wilson <jimw@sifive.com>
890
891 * elfnn-riscv.c (riscv_elf_relocate_section): Add comment for previous
892 change.
893
894 2018-02-08 Nick Clifton <nickc@redhat.com>
895
896 PR 22788
897 * elf.c (elf_parse_notes): Reject notes with excessuively large
898 alignments.
899
900 2018-02-07 Alan Modra <amodra@gmail.com>
901
902 Revert 2018-01-17 Alan Modra <amodra@gmail.com>
903 * elf32-ppc.c: Remove speculation barrier support.
904 * elf32-ppc.h: Likewise.
905 * elf64-ppc.c: Likewise.
906 * elf64-ppc.h: Likewise.
907
908 2018-02-06 Jim Wilson <jimw@sifive.com>
909
910 * elfnn-riscv.c (riscv_elf_relocate_section): Return TRUE if used
911 callback to report an error.
912
913 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
914
915 PR ld/22263
916 * elfxx-sparc.c (sparc_elf_tls_transition): Turn call to bfd_link_pic
917 into call to !bfd_link_executable and tidy up.
918 (_bfd_sparc_elf_check_relocs): Fix formatting and tidy up.
919 <R_SPARC_TLS_LE_HIX22>: Turn call to bfd_link_pic into call to
920 !bfd_link_executable.
921 <R_SPARC_TLS_IE_HI22>: Likewise.
922 <GOT relocations>: Remove useless code, tidy and merge related blocks.
923 <R_SPARC_TLS_GD_CALL>: Turn call to bfd_link_pic into call to
924 !bfd_link_executable.
925 <R_SPARC_WPLT30>: Tidy up.
926 (_bfd_sparc_elf_gc_mark_hook): Turn call to bfd_link_pic into call to
927 !bfd_link_executable.
928 (allocate_dynrelocs): Likewise.
929 (_bfd_sparc_elf_relocate_section): Fix formatting and tidy up.
930 <R_SPARC_TLS_GD_HI22>: Merge into...
931 <R_SPARC_TLS_GD_LO10>: ...this. Adjust 4th argument in call to
932 sparc_elf_tls_transition and remove redundant code.
933 <R_SPARC_TLS_LDM_HI22>: Turn call to bfd_link_pic into call to
934 !bfd_link_executable.
935 <R_SPARC_TLS_LDO_HIX22>: Likewise.
936 <R_SPARC_TLS_LE_HIX22>: Likewise. Tidy up.
937 <R_SPARC_TLS_LDM_CALL>: Likewise.
938 <R_SPARC_TLS_GD_CALL>: Likewise. Tidy up.
939 <R_SPARC_TLS_GD_ADD>: Likewise.
940 <R_SPARC_TLS_LDM_ADD>: Likewise.
941 <R_SPARC_TLS_LDO_ADD>: Likewise.
942 <R_SPARC_TLS_IE_LD>: Likewise.
943
944 2018-02-06 Miloš Stojanović <milos.stojanovic@rt-rk.com>
945
946 PR 22789
947 * elfxx-mips.c (_bfd_mips_elf_find_nearest_line): If the dwarf
948 functions failed to find the function name, try the generic elf
949 find function instead.
950
951 2018-02-06 Sergio Durigan Junior <sergiodj@redhat.com>
952
953 * coff-rs6000.c (xcoff_write_archive_contents_old): Use
954 'memcpy' instead of 'strncpy' when writing the magic number.
955
956 2018-02-06 Nick Clifton <nickc@redhat.com>
957
958 PR 22794
959 * opncls.c (bfd_get_debug_link_info_1): Check the size of the
960 section before attempting to read it in.
961 (bfd_get_alt_debug_link_info): Likewise.
962
963 2018-02-06 Paul Carroll <pcarroll@codesourcery.com>
964
965 * bfd/dwarf2.c (find_abstract_name): Modified to return file and
966 line information in addition to name, if they can be found.
967
968 2018-02-05 Renlin Li <renlin.li@arm.com>
969
970 PR ld/22764
971 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Relax the
972 R_AARCH64_ABS32 and R_AARCH64_ABS16 for absolute symbol. Apply the
973 check for writeable section as well.
974
975 2018-02-05 H.J. Lu <hongjiu.lu@intel.com>
976
977 PR ld/22782
978 * elf32-i386.c (elf_i386_check_relocs): Set got_referenced if
979 _GLOBAL_OFFSET_TABLE_ is referenced or GOT is needed to resolve
980 undefined weak symbol to 0.
981 * elf64-x86-64.c (elf_x86_64_check_relocs): Set got_referenced
982 if _GLOBAL_OFFSET_TABLE_ is referenced.
983 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Check
984 got_referenced instead of ref_regular_nonweak. Remove the
985 unused _GLOBAL_OFFSET_TABLE_ from symbol table.
986 * elfxx-x86.h (elf_x86_link_hash_table): Add got_referenced.
987
988 2018-02-05 Maciej W. Rozycki <macro@mips.com>
989
990 * elfnn-riscv.c (_bfd_riscv_relax_pc): Use `memset' to
991 initialize `hi_reloc'.
992
993 2018-02-05 Maciej W. Rozycki <macro@mips.com>
994
995 * elfxx-mips.c (_bfd_mips_elf_section_processing): For
996 SHT_MIPS_REGINFO sections don't assert the correct size and
997 report an error instead.
998
999 2018-02-05 Maciej W. Rozycki <macro@mips.com>
1000
1001 * elf.c (_bfd_elf_write_object_contents): Propagate a failure
1002 status from `->elf_backend_section_processing'.
1003
1004 2018-02-02 Jim Wilson <jimw@sifive.com>
1005
1006 PR ld/22756
1007 * elfnn-riscv.c (riscv_relax_delete_bytes): New parameter link_info.
1008 If link_info->wrap_hash, check for a duplicate symbol and ignore.
1009 (_bfd_riscv_relax_call, bfd_riscv_relax_lui, _bfd_riscv_relax_tls_le):
1010 Pass new argument to riscv_relax_delete_bytes.
1011 (_bfd_riscv_relax_align, _bfd_riscv_relax_delete): Likewise. Remove
1012 ATTRIBUTE_UNUSED from link_info parameter.
1013
1014 2018-02-02 Alan Modra <amodra@gmail.com>
1015
1016 * elf64-ppc.c (ppc64_elf_relocate_section): Don't relocate nops
1017 emitted for toc sequence optimization. Set and use "howto" later.
1018
1019 2018-02-01 Simon Marchi <simon.marchi@ericsson.com>
1020
1021 * elf64-ppc.c (ppc64_elf_archive_symbol_lookup): Avoid pointer
1022 arithmetic on NULL pointer.
1023 * elflink.c (_bfd_elf_archive_symbol_lookup,
1024 elf_link_add_archive_symbols): Likewise.
1025
1026 2018-01-31 Michael Matz <matz@suse.de>
1027
1028 * elflink.c (bfd_elf_define_start_stop): Fix check of
1029 def_dynamic.
1030
1031 2018-01-31 H.J. Lu <hongjiu.lu@intel.com>
1032
1033 PR ld/21964
1034 * elflink.c (bfd_elf_define_start_stop): Check if __start and
1035 __stop symbols are referenced by shared objects.
1036
1037 2018-01-30 Alan Modra <amodra@gmail.com>
1038
1039 PR 22758
1040 * elf.c (_bfd_elf_map_sections_to_segments): Don't start a new
1041 segment when demand paged with lma on the same page. Test this
1042 before load/non-load, executable/non-executable,
1043 writable/non-writable tests and simplify. Delete bogus relro
1044 condition in writable/non-writable test. Delete outdated
1045 comment. Formatting.
1046
1047 2018-01-30 Alan Modra <amodra@gmail.com>
1048
1049 * elflink.c (bfd_elf_define_start_stop): Make __start and __stop
1050 symbols dynamic.
1051
1052 2018-01-29 Alan Modra <amodra@gmail.com>
1053
1054 PR 22741
1055 * coffgen.c (coff_pointerize_aux): Ensure auxent tagndx is in
1056 range before converting to a symbol table pointer.
1057
1058 2018-01-27 Nick Clifton <nickc@redhat.com>
1059
1060 * po/ru.po: Updated Russian translation.
1061
1062 2018-01-26 Alan Modra <amodra@gmail.com>
1063
1064 * elflink.c (bfd_elf_define_start_stop): Override symbols when
1065 they are defined dynamically.
1066
1067 2018-01-26 Alan Modra <amodra@gmail.com>
1068
1069 * elf64-ppc.c (ppc64_elf_size_stubs): Iterate sizing when
1070 .branch_lt changes size.
1071
1072 2018-01-25 Alan Modra <amodra@gmail.com>
1073
1074 PR 22746
1075 * elfcode.h (elf_object_p): Avoid integer overflow.
1076
1077 2018-01-25 Eric Botcazou <ebotcazou@adacore.com>
1078
1079 PR ld/22727
1080 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs) <R_SPARC_TLS_GD_CALL>:
1081 Do a mere lookup of the __tls_get_addr symbol instead of adding it.
1082
1083 Revert
1084 2017-10-19 H.J. Lu <hongjiu.lu@intel.com>
1085
1086 PR ld/22263
1087 * elfxx-sparc.c (sparc_elf_tls_transition): Replace
1088 bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
1089 bfd_link_executable for TLS check.
1090 (_bfd_sparc_elf_check_relocs): Likewise.
1091 (allocate_dynrelocs): Likewise.
1092 (_bfd_sparc_elf_relocate_section): Likewise.
1093
1094 2018-01-24 Renlin Li <renlin.li@arm.com>
1095
1096 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Add support for
1097 BFD_RELOC_AARCH64_MOVW_PREL_G0, BFD_RELOC_AARCH64_MOVW_PREL_G0_NC,
1098 BFD_RELOC_AARCH64_MOVW_PREL_G1, BFD_RELOC_AARCH64_MOVW_PREL_G1_NC,
1099 BFD_RELOC_AARCH64_MOVW_PREL_G2, BFD_RELOC_AARCH64_MOVW_PREL_G2_NC,
1100 BFD_RELOC_AARCH64_MOVW_PREL_G3.
1101 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
1102 (_bfd_aarch64_elf_resolve_relocation): Likewise.
1103
1104 2018-01-24 Renlin Li <renlin.li@arm.com>
1105
1106 * reloc.c: Add BFD_RELOC_AARCH64_MOVW_PREL_G0,
1107 BFD_RELOC_AARCH64_MOVW_PREL_G0_NC, BFD_RELOC_AARCH64_MOVW_PREL_G1,
1108 BFD_RELOC_AARCH64_MOVW_PREL_G1_NC, BFD_RELOC_AARCH64_MOVW_PREL_G2,
1109 BFD_RELOC_AARCH64_MOVW_PREL_G2_NC, BFD_RELOC_AARCH64_MOVW_PREL_G3.
1110 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Add entries for
1111 BFD_RELOC_AARCH64_MOVW_PREL_G0, BFD_RELOC_AARCH64_MOVW_PREL_G0_NC,
1112 BFD_RELOC_AARCH64_MOVW_PREL_G1, BFD_RELOC_AARCH64_MOVW_PREL_G1_NC,
1113 BFD_RELOC_AARCH64_MOVW_PREL_G2, BFD_RELOC_AARCH64_MOVW_PREL_G2_NC,
1114 BFD_RELOC_AARCH64_MOVW_PREL_G3.
1115 * bfd-in2.h: Regenerate.
1116 * libbfd.h: Regenerate.
1117
1118 2018-01-23 Maciej W. Rozycki <macro@mips.com>
1119
1120 * elfxx-mips.c (_bfd_mips_elf_final_link): Update a stale
1121 `mips_elf32_section_processing' comment reference.
1122
1123 2018-01-20 H.J. Lu <hongjiu.lu@intel.com>
1124
1125 PR ld/22721
1126 * elfxx-x86.c (_bfd_x86_elf_link_check_relocs): Check the
1127 versioned __tls_get_addr symbol.
1128
1129 2018-01-19 Nick Clifton <nickc@redhat.com>
1130
1131 * po/fr.po: Updated French translation.
1132
1133 2018-01-18 Alan Modra <amodra@gmail.com>
1134
1135 * elf32-ppc.c (ppc_elf_create_glink): Correct alignment of .glink.
1136 * elf64-ppc.c (ppc64_elf_size_stubs): Handle negative plt_stub_align.
1137 (ppc64_elf_build_stubs): Likewise.
1138
1139 2018-01-17 Nick Clifton <nickc@redhat.com>
1140
1141 * po/ru.po: Updated Russian translation.
1142 * po/uk/po: Updated Ukranian translation.
1143
1144 2018-01-17 Alan Modra <amodra@gmail.com>
1145
1146 * elf64-ppc.c (ppc64_elf_build_stubs): Silence gcc warning.
1147
1148 2018-01-17 Alan Modra <amodra@gmail.com>
1149
1150 * elf32-ppc.c (GLINK_ENTRY_SIZE): Handle speculation barrier.
1151 (CRSETEQ, BEQCTRM): Define.
1152 (is_nonpic_glink_stub): Don't check bctr.
1153 (ppc_elf_link_hash_table_create): Init new ppc_elf_params field.
1154 (ppc_elf_relax_section): Size speculation barrier.
1155 (output_bctr): New function.
1156 (write_glink_stub): Use output_bctr.
1157 (ppc_elf_relocate_section): Use output_bctr for long branch stub.
1158 (ppc_elf_finish_dynamic_symbol): Likewise.
1159 (ppc_elf_finish_dynamic_sections): Use output_bctr.
1160 * elf32-ppc.h (struct ppc_elf_params): Add speculate_indirect_jumps.
1161 * elf64-ppc.c (CRSETEQ, BEQCTRM, BEQCTRLM): Define.
1162 (GLINK_PLTRESOLVE_SIZE): Size speculation barrier.
1163 (size_global_entry_stubs): Handle speculation barrier sizing.
1164 (plt_stub_size): Likewise.
1165 (output_bctr): New function.
1166 (build_plt_stub, build_tls_get_addr_stub): Output speculation
1167 barrier.
1168 (ppc_build_one_stub): Likewise for ppc_stub_plt_branch.
1169 (ppc_size_one_stub): Size speculation barrier in ppc_stub_plt_branch.
1170 (build_global_entry_stubs): Output speculation barrier.
1171 (ppc64_elf_build_stubs): Likewise in __glink_PLTresolve stub.
1172 * elf64-ppc.h (struct ppc64_elf_params): Add speculate_indirect_jumps.
1173
1174 2018-01-17 Alan Modra <amodra@gmail.com>
1175
1176 * elf32-ppc.c (GLINK_ENTRY_SIZE): Add parameters, handle
1177 __tls_get_addr_opt, and alignment sizing.
1178 (TLS_GET_ADDR_GLINK_SIZE): Delete.
1179 (is_nonpic_glink_stub): Don't use GLINK_ENTRY_SIZE.
1180 (ppc_elf_get_synthetic_symtab): Recognize stubs spaced at 4, 6,
1181 or 8 insns.
1182 (ppc_elf_link_hash_table_create): Init new ppc_elf_params field.
1183 (allocate_dynrelocs): Use new GLINK_ENTRY_SIZE.
1184 (ppc_elf_size_dynamic_sections): Likewise. Size branch table
1185 by PLT reloc count.
1186 (write_glink_stub): Handle __tls_get_addr_opt stub.
1187 Pad out to size given by GLINK_ENTRY_SIZE.
1188 (ppc_elf_relocate_section): Adjust write_glink_stub call.
1189 (ppc_elf_finish_dynamic_symbol): Likewise.
1190 (ppc_elf_finish_dynamic_sections): Write PLTresolve without using
1191 insn array since so many need rewriting.
1192 * elf32-ppc.h (struct ppc_elf_params): Add plt_stub_align.
1193 * elf64-ppc.c (GLINK_PLTRESOLVE_SIZE): Rename from
1194 GLINK_CALL_STUB_SIZE. Add htab param and evaluate to size without
1195 nops. Adjust all uses.
1196 (ppc64_elf_get_synthetic_symtab): Don't use GLINK_CALL_STUB_SIZE
1197 in glink_vma calculation.
1198 (struct ppc_link_hash_table): Add global_entry section pointer.
1199 (create_linkage_sections): Create separate section for global
1200 entry stubs.
1201 (PPC_LO, PPC_HI, PPC_HA): Move earlier.
1202 (size_global_entry_stubs): Handle sizing for aligned stubs.
1203 (ppc64_elf_size_dynamic_sections): Handle global_entry alloc,
1204 and don't stash end of glink branch table in rawsize.
1205 (ppc_build_one_stub): Rewrite stub size calculations.
1206 (build_global_entry_stubs): Use new section.
1207 (ppc64_elf_build_stubs): Don't pad __glink_PLTresolve with nops.
1208 Build lazy link stubs out to end of section. Build global entry
1209 stubs in new section.
1210
1211 2018-01-15 Nick Clifton <nickc@redhat.com>
1212
1213 * po/uk.po: Updated Ukranian translation.
1214
1215 2018-01-13 Nick Clifton <nickc@redhat.com>
1216
1217 * po/bfd.pot: Regenerated.
1218
1219 2018-01-13 Nick Clifton <nickc@redhat.com>
1220
1221 * version.m4: Bump version to 2.30.51
1222 * configure: Regenerate.
1223
1224 2018-01-13 Nick Clifton <nickc@redhat.com>
1225
1226 2.30 branch created.
1227
1228 2018-01-12 Jens Widell <jl@opera.com>
1229
1230 * elf.c (setup_group): Optimize search for group by remembering
1231 last found group and restarting search at that index.
1232 * elf-bfd.h (struct elf_obj_tdata): Add group_search_offset field.
1233
1234 2018-01-12 Gunther Nikl <gnikl@users.sourceforge.net>
1235
1236 * aoutx.h (aout_link_check_ar_symbols): Remove default and handle
1237 bfd_link_common_skip_none in switch.
1238
1239 2018-01-12 Alan Modra <amodra@gmail.com>
1240
1241 PR ld/22649
1242 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Ignore dynamic
1243 references on forced local symbols.
1244
1245 2018-01-12 Vlad Ivanov <vlad@ivanov.email>
1246
1247 * elfxx-mips.c (_bfd_mips_elf_final_link): Notify user when
1248 .reginfo section has wrong size.
1249
1250 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
1251
1252 PR ld/22393
1253 * elf.c (_bfd_elf_map_sections_to_segments): When generating
1254 separate code and read-only data LOAD segments, create a new
1255 LOAD segment if the previous section contains text and the
1256 current section doesn't or vice versa. Don't put a writable
1257 section in a read-only segment if there is a RELRO segment.
1258
1259 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
1260
1261 PR ld/22649
1262 * elflink.c (bfd_elf_gc_mark_dynamic_ref_symbol): Ignore dynamic
1263 references on forced local symbols.
1264
1265 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
1266
1267 PR ld/22677
1268 * elflink.c (bfd_elf_gc_sections): Keep all PREINIT_ARRAY,
1269 INIT_ARRAY as well as FINI_ARRAY sections for ld -r --gc-section.
1270
1271 2018-01-09 Kuan-Lin Chen <kuanlinchentw@gmail.com>
1272
1273 PR 22662
1274 * elf32-nds32.c (nds32_elf_relax_loadstore): Fix a typographical error.
1275
1276 2018-01-03 John Baldwin <jhb@FreeBSD.org>
1277
1278 * elf.c (elfcore_grok_freebsd_note): Handle
1279 NT_FREEBSD_PROCSTAT_PROC, NT_FREEBSD_PROCSTAT_FILES, and
1280 NT_FREEBSD_PROCSTAT_VMMAP.
1281
1282 2018-01-03 Alan Modra <amodra@gmail.com>
1283
1284 Update year range in copyright notice of all files.
1285
1286 For older changes see ChangeLog-2017
1287 \f
1288 Copyright (C) 2018 Free Software Foundation, Inc.
1289
1290 Copying and distribution of this file, with or without modification,
1291 are permitted in any medium without royalty provided the copyright
1292 notice and this notice are preserved.
1293
1294 Local Variables:
1295 mode: change-log
1296 left-margin: 8
1297 fill-column: 74
1298 version-control: never
1299 End: