Remove arm-epoc-pe support
[deliverable/binutils-gdb.git] / bfd / ChangeLog
1 2018-04-16 Alan Modra <amodra@gmail.com>
2
3 * Makefile.am: Remove arm-epoc-pe support.
4 * coff-arm.c: Likewise.
5 * config.bfd: Likewise.
6 * configure.ac: Likewise.
7 * targets.c: Likewise.
8 * epoc-pe-arm.c: Delete.
9 * epoc-pei-arm.c: Delete.
10 * Makefile.in: Regenerate.
11 * configure: Regenerate.
12 * po/SRC-POTFILES.in: Regenerate.
13
14 2018-04-16 Alan Modra <amodra@gmail.com>
15
16 * Makefile.am: Remove sparc-aout and sparc-coff support.
17 * config.bfd: Likewise.
18 * configure.ac: Likewise.
19 * targets.c: Likewise.
20 * aout-sparcle.c: Delete.
21 * aoutf1.h: Delete.
22 * cf-sparclynx.c: Delete.
23 * coff-sparc.c: Delete.
24 * demo64.c: Delete.
25 * sparclinux.c: Delete.
26 * sparclynx.c: Delete.
27 * sparcnetbsd.c: Delete.
28 * sunos.c: Delete.
29 * Makefile.in: Regenerate.
30 * configure: Regenerate.
31 * po/SRC-POTFILES.in: Regenerate.
32
33 2018-04-16 Alan Modra <amodra@gmail.com>
34
35 * Makefile.am: Remove m68k-aout and m68k-coff support.
36 * aoutf1.h: Likewise.
37 * aoutx.h: Likewise.
38 * archive.c: Likewise.
39 * bfd-in.h: Likewise.
40 * bfd.c: Likewise.
41 * coffcode.h: Likewise.
42 * coffswap.h: Likewise.
43 * config.bfd: Likewise.
44 * configure.ac: Likewise.
45 * configure.host: Likewise.
46 * doc/bfd.texinfo: Likewise.
47 * doc/bfdint.texi: Likewise.
48 * freebsd.h: Likewise.
49 * gen-aout.c: Likewise.
50 * hpux-core.c: Likewise.
51 * libaout.h: Likewise.
52 * libbfd-in.h: Likewise.
53 * pdp11.c: Likewise.
54 * peicode.h: Likewise.
55 * riscix.c: Likewise.
56 * targets.c: Likewise.
57 * aout0.c: Delete.
58 * coff-apollo.c: Delete.
59 * coff-aux.c: Delete.
60 * coff-m68k.c: Delete.
61 * coff-svm68k.c: Delete.
62 * coff-u68k.c: Delete.
63 * hosts/delta68.h: Delete.
64 * hosts/hp300bsd.h: Delete.
65 * hosts/m68kaux.h: Delete.
66 * hosts/news.h: Delete.
67 * hp300bsd.c: Delete.
68 * hp300hpux.c: Delete.
69 * liboasys.h: Delete.
70 * m68k4knetbsd.c: Delete.
71 * m68klinux.c: Delete.
72 * m68knetbsd.c: Delete.
73 * oasys.c: Delete.
74 * versados.c: Delete.
75 * Makefile.in: Regenerate.
76 * bfd-in2.h: Regenerate.
77 * configure: Regenerate.
78 * libbfd.h: Regenerate.
79 * po/SRC-POTFILES.in: Regenerate.
80
81 2018-04-16 Alan Modra <amodra@gmail.com>
82
83 * Makefile.am: Remove sh5 and sh64 support.
84 * archures.c: Likewise.
85 * config.bfd: Likewise.
86 * configure.ac: Likewise.
87 * cpu-sh.c: Likewise.
88 * elf32-sh-relocs.h: Likewise.
89 * elf32-sh.c: Likewise.
90 * targets.c: Likewise.
91 * elf32-sh64-com.c: Delete.
92 * elf32-sh64.c: Delete.
93 * elf32-sh64.h: Delete.
94 * elf64-sh64.c: Delete.
95 * Makefile.in: Regenerate.
96 * bfd-in2.h: Regenerate.
97 * configure: Regenerate.
98 * po/SRC-POTFILES.in: Regenerate.
99
100 2018-04-16 Alan Modra <amodra@gmail.com>
101
102 * Makefile.am: Remove sh-symbianelf support.
103 * config.bfd: Likewise.
104 * configure.ac: Likewise.
105 * targets.c: Likewise.
106 * elf32-sh-symbian.c: Delete.
107 * Makefile.in: Regenerate.
108 * configure: Regenerate.
109 * po/SRC-POTFILES.in: Regenerate.
110
111 2018-04-16 Alan Modra <amodra@gmail.com>
112
113 * Makefile.am: Remove vax-bsd and vax-ultrix support.
114 * config.bfd: Likewise.
115 * configure.ac: Likewise.
116 * targets.c: Likewise.
117 * vaxbsd.c: Delete.
118 * Makefile.in: Regenerate.
119 * configure: Regenerate.
120 * po/SRC-POTFILES.in: Regenerate.
121
122 2018-04-16 Alan Modra <amodra@gmail.com>
123
124 * Makefile.am: Remove w65 support.
125 * archures.c: Likewise.
126 * coffcode.h: Likewise.
127 * config.bfd: Likewise.
128 * configure.ac: Likewise.
129 * targets.c: Likewise.
130 * coff-w65.c: Delete.
131 * cpu-w65.c: Delete.
132 * Makefile.in: Regenerate.
133 * bfd-in2.h: Regenerate.
134 * configure: Regenerate.
135 * po/SRC-POTFILES.in: Regenerate.
136
137 2018-04-16 Alan Modra <amodra@gmail.com>
138
139 * Makefile.am: Remove we32k support.
140 * archures.c: Likewise.
141 * coffcode.h: Likewise.
142 * config.bfd: Likewise.
143 * configure.ac: Likewise.
144 * targets.c: Likewise.
145 * coff-we32k.c: Delete.
146 * cpu-we32k.c: Delete.
147 * Makefile.in: Regenerate.
148 * bfd-in2.h: Regenerate.
149 * configure: Regenerate.
150 * po/SRC-POTFILES.in: Regenerate.
151
152 2018-04-16 Alan Modra <amodra@gmail.com>
153
154 * Makefile.am: Remove m88k support.
155 * aoutx.h: Likewise.
156 * archures.c: Likewise.
157 * coffcode.h: Likewise.
158 * coffswap.h: Likewise.
159 * config.bfd: Likewise.
160 * configure.ac: Likewise.
161 * cpu-ns32k.c: Likewise.
162 * elf32-nds32.c: Likewise.
163 * mach-o.c: Likewise.
164 * netbsd-core.c: Likewise.
165 * reloc.c: Likewise.
166 * targets.c: Likewise.
167 * coff-m88k.c: Delete.
168 * cpu-m88k.c: Delete.
169 * elf32-m88k.c: Delete.
170 * hosts/m88kmach3.h: Delete.
171 * m88kmach3.c: Delete.
172 * m88kopenbsd.c: Delete.
173 * Makefile.in: Regenerate.
174 * bfd-in2.h: Regenerate.
175 * configure: Regenerate.
176 * po/SRC-POTFILES.in: Regenerate.
177
178 2018-04-16 Alan Modra <amodra@gmail.com>
179
180 * Makefile.am: Remove i370 support.
181 * archures.c: Likewise.
182 * config.bfd: Likewise.
183 * configure.ac: Likewise.
184 * targets.c: Likewise.
185 * cpu-i370.c: Delete.
186 * elf32-i370.c: Delete.
187 * Makefile.in: Regenerate.
188 * bfd-in2.h: Regenerate.
189 * configure: Regenerate.
190 * po/SRC-POTFILES.in: Regenerate.
191
192 2018-04-16 Alan Modra <amodra@gmail.com>
193
194 * Makefile.am: Remove h8500 support.
195 * archures.c: Likewise.
196 * coffcode.h: Likewise.
197 * config.bfd: Likewise.
198 * configure.ac: Likewise.
199 * targets.c: Likewise.
200 * coff-h8500.c: Delete.
201 * cpu-h8500.c: Delete.
202 * Makefile.in: Regenerate.
203 * bfd-in2.h: Regenerate.
204 * configure: Regenerate.
205 * po/SRC-POTFILES.in: Regenerate.
206
207 2018-04-16 Alan Modra <amodra@gmail.com>
208
209 * Makefile.am: Remove h8300-coff support.
210 * coffcode.h: Likewise.
211 * config.bfd: Likewise.
212 * configure.ac: Likewise.
213 * reloc16.c: Likewise.
214 * targets.c: Likewise.
215 * coff-h8300.c: Delete.
216 * Makefile.in: Regenerate.
217 * configure: Regenerate.
218 * po/SRC-POTFILES.in: Regenerate.
219
220 2018-04-16 Alan Modra <amodra@gmail.com>
221
222 * Makefile.am: Remove IEEE 695 support.
223 * archures.c: Likewise.
224 * bfd.c: Likewise.
225 * config.bfd: Likewise.
226 * configure.ac: Likewise.
227 * doc/bfd.texinfo: Likewise.
228 * doc/bfdint.texi: Likewise.
229 * doc/bfdsumm.texi: Likewise.
230 * section.c: Likewise.
231 * targets.c: Likewise.
232 * ieee.c: Delete.
233 * libieee.h: Delete.
234 * Makefile.in: Regenerate.
235 * bfd-in2.h: Regenerate.
236 * configure: Regenerate.
237 * po/SRC-POTFILES.in: Regenerate.
238
239 2018-04-16 Alan Modra <amodra@gmail.com>
240
241 * config.bfd: Remove tandem support.
242
243 2018-04-16 Alan Modra <amodra@gmail.com>
244
245 * Makefile.am: Remove newsos3 support.
246 * aoutx.h: Likewise.
247 * config.bfd: Likewise.
248 * configure.ac: Likewise.
249 * targets.c: Likewise.
250 * newsos3.c: Delete.
251 * Makefile.in: Regenerate.
252 * configure: Regenerate.
253 * po/SRC-POTFILES.in: Regenerate.
254
255 2018-04-16 Alan Modra <amodra@gmail.com>
256
257 * Makefile.am: Remove netware support.
258 * bfd-in.h: Likewise.
259 * bfd.c: Likewise.
260 * config.bfd: Likewise.
261 * configure.ac: Likewise.
262 * doc/bfdint.texi: Likewise.
263 * ecoff.c: Likewise.
264 * targets.c: Likewise.
265 * libnlm.h: Delete.
266 * nlm-target.h: Delete.
267 * nlm.c: Delete.
268 * nlm32-alpha.c: Delete.
269 * nlm32-i386.c: Delete.
270 * nlm32-ppc.c: Delete.
271 * nlm32-sparc.c: Delete.
272 * nlm32.c: Delete.
273 * nlm64.c: Delete.
274 * nlmcode.h: Delete.
275 * nlmswap.h: Delete.
276 * Makefile.in: Regenerate.
277 * bfd-in2.h: Regenerate.
278 * configure: Regenerate.
279 * po/SRC-POTFILES.in: Regenerate.
280
281 2018-04-16 Alan Modra <amodra@gmail.com>
282
283 * archures.c: Remove tahoe support.
284 * config.bfd: Likewise.
285 * configure.ac: Likewise.
286 * hosts/tahoe.h: Delete.
287 * bfd-in2.h: Regenerate.
288 * configure: Regenerate.
289
290 2018-04-14 Alan Modra <amodra@gmail.com>
291
292 * elf-bfd.h (struct elf_backend_data): Add relropagesize.
293 * elfxx-target.h (ELF_RELROPAGESIZE): Provide default and
294 sanity test.
295 (elfNN_bed): Init relropagesize.
296 * bfd.c (bfd_emul_get_commonpagesize): Add boolean param to
297 select relropagesize.
298 * elf32-ppc.c (ELF_COMMONPAGESIZE): Define as 0x1000.
299 (ELF_RELROPAGESIZE): Define as ELF_MAXPAGESIZE.
300 (ELF_MINPAGESIZE): Don't define.
301 * elf64-ppc.c (ELF_COMMONPAGESIZE): Define as 0x1000.
302 (ELF_RELROPAGESIZE): Define as ELF_MAXPAGESIZE.
303 * bfd-in2.h: Regenerate.
304
305 2018-04-14 Alan Modra <amodra@gmail.com>
306
307 * elf32-ppc.c (ELF_MAXPAGESIZE, ELF_COMMONPAGESIZE): Don't depend
308 on __QNXTARGET__ define.
309
310 2018-04-14 Alan Modra <amodra@gmail.com>
311
312 * config.bfd: Add powerpc-*-lynxos* and powerpc-*-windiss*
313 to obsolete list.
314
315 2018-04-11 Alan Modra <amodra@gmail.com>
316
317 * aout-adobe.c: Delete.
318 * bout.c: Delete.
319 * coff-i860.c: Delete.
320 * coff-i960.c: Delete.
321 * cpu-i860.c: Delete.
322 * cpu-i960.c: Delete.
323 * elf32-i860.c: Delete.
324 * elf32-i960.c: Delete.
325 * hosts/i860mach3.h: Delete.
326 * Makefile.am: Remove i860, i960, bout, and adobe support.
327 * archures.c: Remove i860 and i960 support.
328 * coffcode.h: Likewise.
329 * reloc.c: Likewise.
330 * aoutx.h: Comment updates.
331 * archive.c: Remove BOUT and i960 support.
332 * bfd.c: Remove BOUT support.
333 * coffswap.h: Remove i960 support.
334 * config.bfd: Remove i860, i960 and adobe targets.
335 * configure.ac: Remove adode, bout, i860, i960, icoff targets.
336 * targets.c: Likewise.
337 * ieee.c: Remove i960 support.
338 * mach-o.c: Remove i860 support.
339 * Makefile.in: Regenerate.
340 * bfd-in2.h: Regenerate.
341 * configure: Regenerate.
342 * libbfd.h: Regenerate.
343 * po/SRC-POTFILES.in: Regenerate.
344
345 2018-04-09 Maciej W. Rozycki <macro@mips.com>
346
347 * elf64-mips.c (mips_elf64_write_rel): Handle a NULL BFD pointer
348 in the BFD symbol referred by the relocation.
349 (mips_elf64_write_rela): Likewise.
350
351 2018-04-09 Maciej W. Rozycki <macro@mips.com>
352
353 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Issue an
354 error for out-of-range `r_sym' values.
355
356 2018-04-09 Alan Modra <amodra@gmail.com>
357
358 * elf64-ppc.c (struct _ppc64_elf_section_data): Add has_pltcall field.
359 (struct ppc_link_hash_table): Add can_convert_all_inline_plt.
360 (ppc64_elf_check_relocs): Set has_pltcall.
361 (ppc64_elf_adjust_dynamic_symbol): Discard some PLT entries.
362 (ppc64_elf_inline_plt): New function.
363 (ppc64_elf_size_dynamic_sections): Discard some PLT entries for locals.
364 * elf64-ppc.h (ppc64_elf_inline_plt): Declare.
365 * elf32-ppc.c (has_pltcall): Define.
366 (struct ppc_elf_link_hash_table): Add can_convert_all_inline_plt.
367 (ppc_elf_check_relocs): Set has_pltcall.
368 (ppc_elf_inline_plt): New function.
369 (ppc_elf_adjust_dynamic_symbol): Discard some PLT entries.
370 (ppc_elf_size_dynamic_sections): Likewise.
371 * elf32-ppc.h (ppc_elf_inline_plt): Declare.
372
373 2018-04-09 Alan Modra <amodra@gmail.com>
374
375 * elf32-ppc.c (ppc_elf_howto_raw): Add PLTSEQ and PLTCALL howtos.
376 (is_plt_seq_reloc): New function.
377 (ppc_elf_check_relocs): Handle PLTSEQ and PLTCALL relocs.
378 (ppc_elf_tls_optimize): Handle inline plt call sequence.
379 (ppc_elf_relax_section): Handle PLTCALL reloc.
380 (ppc_elf_relocate_section): Nop out inline plt call sequence when
381 resolving locally.
382 * elf64-ppc.c (ppc64_elf_howto_raw): Add R_PPC64_PLTSEQ and
383 R_PPC64_PLTCALL entries. Comment R_PPC64_TOCSAVE.
384 (has_tls_get_addr_call): Correct comment.
385 (is_branch_reloc): Add PLTCALL.
386 (is_plt_seq_reloc): New function.
387 (ppc64_elf_check_relocs): Handle PLT16_LO_DS reloc. Set
388 has_tls_reloc for R_PPC64_TLSGD and R_PPC64_TLSLD. Create plt
389 entry for R_PPC64_PLTCALL.
390 (ppc64_elf_tls_optimize): Handle inline plt call sequence.
391 (ppc_type_of_stub): Handle PLTCALL reloc.
392 (toc_adjusting_stub_needed): Likewise.
393 (ppc64_elf_relocate_section): Set "can_plt_call" for PLTCALL
394 reloc insn. Nop out inline plt call sequence when resolving
395 locally. Handle __tls_get_addr inline plt call optimization.
396
397 2018-04-09 Alan Modra <amodra@gmail.com>
398
399 * elf64-ppc.c (LOCAL_PLT_ENTRY_SIZE): Define.
400 (struct ppc_stub_hash_entry): Add symtype field.
401 (PLT_KEEP): Define.
402 (struct ppc_link_hash_table): Add pltlocal and relpltlocal.
403 (create_linkage_sections): Create pltlocal and relpltlocal.
404 (ppc64_elf_check_relocs): Allow PLT relocs on local symbols.
405 Set PLT_KEEP.
406 (ppc64_elf_adjust_dynamic_symbol): Keep PLT entries for inline calls.
407 (allocate_dynrelocs): Allocate pltlocal and relpltlocal.
408 (ppc64_elf_size_dynamic_sections): Size pltlocal and relpltlocal.
409 Keep PLT entries for inline calls against locals.
410 (ppc_build_one_stub): Use pltlocal as appropriate.
411 (ppc_size_one_stub): Likewise.
412 (ppc64_elf_size_stubs): Set symtype.
413 (build_global_entry_stubs_and_plt): Init pltlocal and write
414 relpltlocal for globals.
415 (write_plt_relocs_for_local_syms): Likewise for local syms.
416 (ppc64_elf_relocate_section): Support PLT for local syms.
417 * elf32-ppc.c (PLT_KEEP): Define.
418 (struct ppc_elf_link_hash_table): Add pltlocal and relpltlocal.
419 (ppc_elf_create_glink): Create pltlocal and relpltlocal.
420 (ppc_elf_check_relocs): Allow PLT relocs on local symbols.
421 Set PLT_KEEP. Adjust update_local_sym_info call.
422 (ppc_elf_adjust_dynamic_symbol): Keep PLT entries for inline calls.
423 (allocate_dynrelocs): Allocate pltlocal and relpltlocal.
424 (ppc_elf_size_dynamic_sections): Size pltlocal and relpltlocal.
425 (ppc_elf_relocate_section): Support PLT16 relocs for local syms.
426 (write_global_sym_plt): Init pltlocal and write relpltlocal.
427 (ppc_finish_symbols): Likewise for locals.
428
429 2018-04-09 Alan Modra <amodra@gmail.com>
430
431 * elf64-ppc.c (ppc_build_one_stub): Move output of PLT relocs
432 for local symbols to..
433 (write_plt_relocs_for_local_syms): ..here. New function.
434 (ppc64_elf_finish_dynamic_symbol): Move output of PLT relocs for
435 global symbols to..
436 (build_global_entry_stubs_and_plt): ..here. Rename from
437 build_global_entry_stubs.
438 (ppc64_elf_build_stubs): Always call build_global_entry_stubs_and_plt.
439 Call write_plt_relocs_for_local_syms.
440 * elf32-ppc.c (get_sym_h): New function.
441 (ppc_elf_relax_section): Use get_sym_h.
442 (ppc_elf_relocate_section): Move output of PLT relocs and glink
443 stubs for local symbols to..
444 (ppc_finish_symbols): ..here. New function.
445 (ppc_elf_finish_dynamic_symbol): Move output of PLT relocs for
446 global syms to..
447 (write_global_sym_plt): ..here. New function.
448 * elf32-ppc.h (ppc_elf_modify_segment_map): Delete attribute.
449 (ppc_finish_symbols): Declare.
450
451 2018-04-09 Alan Modra <amodra@gmail.com>
452
453 * elf32-ppc.c (ppc_elf_check_relocs): Handle PLT16 relocs.
454 (ppc_elf_relocate_section): Likewise.
455 * elf64-ppc.c (ppc64_elf_check_relocs): Handle PLT16_LO_DS.
456 (ppc64_elf_relocate_section): Likewise. Correct PLT16
457 resolution to plt entry relative to toc pointer.
458
459 2018-04-09 Alan Modra <amodra@gmail.com>
460
461 * elf64-ppc.c (TLS_TLS, TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL,
462 TLS_TPRELGD, TLS_EXPLICIT): Renumber. Test TLS_TLS throughout
463 file when other TLS flags are tested in a mask.
464 (TLS_MARK, NON_GOT): Define.
465 (PLT_IFUNC): Redefine, and test TLS_TLS throughout file as well.
466 (update_local_sym_info): Don't create got entry when NON_GOT.
467 (ppc64_elf_check_relocs): Pass NON_GOT with PLT_IFUNC.
468 Set TLS_MARK.
469 (get_tls_mask): Do toc lookup if tls_mask is just TLS_MARK.
470 (ppc64_elf_relocate_section): Likewise.
471 (ppc64_elf_tls_optimize): Don't attempt to optimize indirect
472 __tls_get_addr calls lacking a marker reloc.
473 * elf32-ppc.c (TLS_TLS, TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL,
474 TLS_TPRELGD): Renumber. Update comment.
475 (TLS_MARK, NON_GOT): Define.
476 (PLT_IFUNC): Redefine, and test TLS_TLS throughout file as well.
477 (update_local_sym_info): Don't create got entry when NON_GOT.
478 (ppc_elf_check_relocs): Pass NON_GOT with PLT_IFUNC.
479 Set TLS_MARK.
480 (ppc_elf_tls_optimize): Don't attempt to optimize indirect
481 __tls_get_addr calls lacking a marker reloc.
482
483 2018-04-06 H.J. Lu <hongjiu.lu@intel.com>
484
485 * elf64-x86-64.c (elf_x86_64_info_to_howto): Don't mask out
486 R_X86_64_converted_reloc_bit.
487
488 2018-04-05 H.J. Lu <hongjiu.lu@intel.com>
489
490 PR gas/22318
491 * configure: Regenerated.
492
493 2018-04-05 Alan Modra <amodra@gmail.com>
494
495 * elf-hppa.h (elf_hppa_info_to_howto): Init howto to NULL.
496 (elf_hppa_info_to_howto_rel): Likewise.
497
498 2018-04-04 Maciej W. Rozycki <macro@mips.com>
499
500 * elf-hppa.h (elf_hppa_info_to_howto): Also return
501 unsuccessfully for unimplemented relocations.
502 (elf_hppa_info_to_howto_rel): Likewise.
503
504 2018-04-04 Maciej W. Rozycki <macro@mips.com>
505
506 * elf32-i860.c (lookup_howto): Add `abfd' parameter. Set the
507 `bfd_error_bad_value' error and call `_bfd_error_handler' on a
508 howto lookup failure.
509 (elf32_i860_reloc_type_lookup): Adjust `lookup_howto' call
510 accordingly.
511 (elf32_i860_info_to_howto_rela): Likewise.
512 (elf32_i860_relocate_splitn): Likewise.
513 (elf32_i860_relocate_pc16): Likewise.
514 (elf32_i860_relocate_pc26): Likewise.
515 (elf32_i860_relocate_section): Likewise.
516
517 2018-04-04 Maciej W. Rozycki <macro@mips.com>
518
519 * elf32-visium.c (visium_info_to_howto_rela): Correct the range
520 check for `visium_elf_howto_table' table access.
521
522 2018-04-04 Maciej W. Rozycki <macro@mips.com>
523
524 * elf32-iq2000.c (iq2000_info_to_howto_rela): Correct the range
525 check for `iq2000_elf_howto_table' table access.
526
527 2018-04-04 Maciej W. Rozycki <macro@mips.com>
528
529 * elf32-frv.c (frv_info_to_howto_rela): Correct the range check
530 for `elf32_frv_howto_table' table access.
531
532 2018-04-04 Maciej W. Rozycki <macro@mips.com>
533
534 * elf32-mips.c (mips_elf32_rtype_to_howto): Also return
535 unsuccessfully for placeholder howtos.
536 * elf64-mips.c (mips_elf64_rtype_to_howto): Likewise.
537 * elfn32-mips.c (mips_elf_n32_rtype_to_howto): Likewise.
538
539 2018-03-29 Maciej W. Rozycki <macro@mips.com>
540
541 * elf32-mips.c (mips_info_to_howto_rel): Remove the calls to
542 `_bfd_error_handler' and to set the `bfd_error_bad_value' error.
543
544 2018-03-28 Maciej W. Rozycki <macro@mips.com>
545
546 * elf-hppa.h (elf_hppa_info_to_howto_rel): Remove
547 ATTRIBUTE_UNUSED from `abfd'.
548
549 2018-03-28 Maciej W. Rozycki <macro@mips.com>
550
551 * elf-hppa.h (elf_hppa_info_to_howto_rel): Correct
552 `_bfd_error_handler' call formatting.
553
554 2018-03-28 Maciej W. Rozycki <macro@mips.com>
555
556 * elf32-mips.c (mips_info_to_howto_rel): Call
557 `mips_elf32_rtype_to_howto' directly rather than via
558 `->elf_backend_mips_rtype_to_howto'.
559
560 2018-03-28 Renlin Li <renlin.li@arm.com>
561
562 PR ld/22970
563 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Add cases for
564 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12,
565 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC,
566 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12,
567 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC,
568 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12,
569 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC,
570 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12,
571 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC.
572 (elfNN_aarch64_final_link_relocate): Support new relocations.
573 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Support new
574 relocations.
575 (_bfd_aarch64_elf_resolve_relocation): Support new relocations.
576
577 2018-03-28 Renlin Li <renlin.li@arm.com>
578
579 PR ld/22970
580 * reloc.c: Add BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12
581 BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12_NC,
582 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12,
583 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC,
584 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12,
585 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC,
586 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12,
587 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC,
588 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12,
589 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC.
590 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Add table entry for
591 TLSLE_LDST16_TPREL_LO12,
592 TLSLE_LDST16_TPREL_LO12_NC,
593 TLSLE_LDST32_TPREL_LO12,
594 TLSLE_LDST32_TPREL_LO12_NC,
595 TLSLE_LDST64_TPREL_LO12,
596 TLSLE_LDST64_TPREL_LO12_NC,
597 TLSLE_LDST8_TPREL_LO12,
598 TLSLE_LDST8_TPREL_LO12_NC.
599 * bfd-in2.h: Regenerated.
600 * libbfd.h: Regenerated.
601
602 2018-03-28 Eric Botcazou <ebotcazou@adacore.com>
603
604 PR ld/22972
605 * elfxx-sparc.c (struct _bfd_sparc_elf_link_hash_entry): Add new flag
606 has_old_style_got_reloc.
607 (_bfd_sparc_elf_check_relocs) <GOT relocations>: Set it for old-style
608 relocations. Fix a couple of long lines.
609 (_bfd_sparc_elf_relocate_section) <R_SPARC_GOTDATA_OP>: Do not generate
610 a R_SPARC_NONE for the GOT slot if the symbol is also subject to old-style
611 GOT relocations.
612
613 2018-03-25 H.J. Lu <hongjiu.lu@intel.com>
614
615 PR ld/23000
616 * elf64-x86-64.c (elf_x86_64_finish_dynamic_sections): Add
617 ENDBR64 to the TLSDESC PLT entry.
618
619 2018-03-21 Alan Modra <amodra@gmail.com>
620
621 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Trim uninteresting
622 symbols. Use size_t counts. Delete redundant opd test.
623
624 2018-03-21 Alan Modra <amodra@gmail.com>
625
626 * elf32-ppc.c (ppc_elf_tls_optimize): Delete locsyms.
627
628 2018-03-21 Alan Modra <amodra@gmail.com>
629
630 * elf32-ppc.c (struct ppc_elf_link_hash_entry): Make tls_mask
631 field unsigned.
632 (update_local_sym_info): Likewise for local_got_tls_masks.
633 (ppc_elf_tls_optimize): Likewise for lgot_masks.
634
635 2018-03-21 Alan Modra <amodra@gmail.com>
636
637 * elf64-ppc.c (ppc_size_one_stub): Fix comment typo.
638 (ppc64_elf_layout_multitoc): Allocate relocs for tprel as we
639 do in size_dynamic_sections.
640
641 2018-03-21 Alan Modra <amodra@gmail.com>
642
643 * elf64-ppc.c (ppc64_elf_relocate_section): Don't access rel[1]
644 without first checking array bounds.
645 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
646
647 2018-03-20 H.J. Lu <hongjiu.lu@intel.com>
648
649 PR ld/22983
650 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Set
651 non_ir_ref_dynamic if a symbol is made dynamic by --dynamic-list.
652
653 2018-03-19 Nick Clifton <nickc@redhat.com>
654
655 * po/es.po: Updated Spanish translation.
656
657 2018-03-15 Max Filippov <jcmvbkbc@gmail.com>
658
659 * elf32-xtensa.c (xlate_map_entry): Change types of address
660 fields from 'unsigned' to 'bfd_vma'.
661 (xlate_offset_with_removed_text): Use struct xlate_map_entry as
662 the key argument to bsearch. Allow offsets past the end of a
663 section, use the last map entry for translation of such offsets.
664
665 2018-03-15 Kuan-Lin Chen <kuanlinchentw@gmail.com>
666
667 * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Removed.
668 Not support the target feature.
669 (nds32_elf_ex9_itb_base): Likewise.
670 (nds32_elf_ex9_import_table): Likewise.
671 (nds32_elf_ex9_finish): Likewise.
672 (nds32_elf_ex9_reloc_jmp): Likewise.
673 (nds32_elf_get_insn_with_reg): Likewise.
674 (nds32_get_local_syms): Likewise.
675 (nds32_elf_ex9_replace_instruction): Likewise.
676 (nds32_elf_ifc_calc): Likewise.
677 (nds32_elf_ifc_finish): Likewise.
678 (nds32_elf_ifc_replace): Likewise.
679 (nds32_elf_ifc_reloc): Likewise.
680
681 2018-03-14 Alan Modra <amodra@gmail.com>
682
683 * elf64-ppc.c (sfpr_define): Adjust for stub_sec size having
684 sfpr size added before defining alias symbols.
685 (ppc64_elf_build_stubs): Add stub section padding before
686 copying sfpr contents and defining save/restore alias symbols.
687
688 2018-03-14 H.J. Lu <hongjiu.lu@intel.com>
689
690 PR ld/20882
691 * elflink.c (elf_gc_mark_debug_section): Also check the local
692 debug definition section.
693
694 2018-03-13 Nick Clifton <nickc@redhat.com>
695
696 PR 22113
697 * pei-x86_64.c (pex64_get_unwind_info): Change to a boolean
698 function. Add an end address parameter. Check access of the data
699 pointer to make sure that they do not extend beyond the end
700 address. Return FALSE if any check fails. Add the end address
701 pointer to the ui structure.
702 (pex64_xdata_print_uwd_codes): Check accesses of the raw unwind
703 codes to make sure that they do not extend beyond the end address
704 pointer. Print an error message and return immediately if any
705 check fails.
706
707 2018-03-09 Nick Clifton <nickc@redhat.com>
708
709 * elf64-s390.c (elf_s390_relocate_section): Move check for
710 relocations against non-allocated sections to before the code that
711 handles ifunc relocations.
712 * elf32-s390.c (elf_s390_relocate_section): Likewise.
713 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Treat
714 relocs against IFUNC symbols in non-allocated sections as relocs
715 against FUNC symbols.
716 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
717
718 2018-03-08 H.J. Lu <hongjiu.lu@intel.com>
719
720 PR ld/22929
721 * elf32-i386.c (elf_i386_relocate_section): Treat relocation
722 against IFUNC symbol in SHT_NOTE section without SHF_ALLOC as
723 relocation against FUNC symbol.
724 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
725
726 2018-03-07 Renlin Li <renlin.li@arm.com>
727
728 PR ld/20402
729 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Check absolute
730 symbol, and don't emit relocation in specific case.
731
732 2018-03-07 Alan Modra <amodra@gmail.com>
733
734 * elf64-mips.c (mips_elf64_rtype_to_howto): Return NULL on error.
735 (mips_elf64_slurp_one_reloc_table): Pass on error.
736
737 2018-03-03 James Cowgill <james.cowgill@mips.com>
738 Maciej W. Rozycki <macro@mips.com>
739
740 PR ld/21900
741 * elfxx-mips.c (mips_elf_calculate_relocation): Only return
742 after calling `undefined_symbol' hook if this is an error
743 condition. Assume the value of 0 for the symbol requested
744 otherwise.
745
746 2018-03-02 Jim Wilson <jimw@sifive.com>
747
748 PR 22903
749 * elfnn-aarch64.c (_bfd_aarch64_resize_stubs): Add 8 bytes for branch
750 and nop instead of 4.
751 (elfNN_arch64_build_stubs): Add nop after branch. Increase size by
752 8 instead of 4.
753
754 2018-03-01 Jim Wilson <jimw@sifive.com>
755
756 PR 22756
757 * elfnn-riscv.c (riscv_relax_delete_bytes): When adjust st_size, use
758 else if instead of if.
759
760 2018-03-01 Alan Modra <amodra@gmail.com>
761
762 * elf32-ft32.c (ft32_info_to_howto_rela): Correct range test.
763
764 2018-02-28 Alan Modra <amodra@gmail.com>
765
766 PR 22887
767 * aoutx.h (swap_std_reloc_in): Correct r_index bound check.
768
769 2018-02-28 Nick Clifton <nickc@redhat.com>
770
771 PR 22895
772 PR 22893
773 * dwarf2.c (read_n_bytes): Replace size parameter with dwarf_block
774 pointer. Drop unused abfd parameter. Check the size of the block
775 before initialising the data field. Return the end pointer if the
776 size is invalid.
777 (read_attribute_value): Adjust invocations of read_n_bytes.
778
779 PR 22894
780 * dwarf1.c (parse_die): Check the length of form blocks before
781 advancing the data pointer.
782
783 2018-02-28 Alan Modra <amodra@gmail.com>
784
785 PR 22887
786 * aoutx.h (translate_symbol_table): Print an error message and set
787 bfd_error on finding an invalid name string offset.
788
789 2018-02-27 H.J. Lu <hongjiu.lu@intel.com>
790
791 * config.in: Regenerated.
792 * configure: Likewise.
793 * configure.ac: Add --enable-separate-code.
794 (DEFAULT_LD_Z_SEPARATE_CODE): New AC_DEFINE_UNQUOTED. Default
795 to 1 for Linux/x86 targets,
796 * elf64-x86-64.c (ELF_MAXPAGESIZE): Set to 0x1000 if
797 DEFAULT_LD_Z_SEPARATE_CODE is 1.
798
799 2018-02-27 Nick Clifton <nickc@redhat.com>
800
801 * aout-cris.c (swap_ext_reloc_out): Standadize error/warning
802 message.
803 * elf-hppa.h (elf_hppa_info_to_howto_rel): Likewise.
804 * elf32-i386.c (elf_i386_reloc_type_lookup): Likewise.
805 * elf32-xtensa.c (elf_xtensa_reloc_type_lookup): Likewise.
806 * elf64-ppc.c (ppc64_elf_reloc_type_lookup): Likewise.
807 * elf64-s390.c (elf_s390_reloc_type_lookup): Likewise.
808 * elf64-sh64.c (sh_elf64_info_to_howto): Likewise.
809 * elfxx-ia64.c (ia64_elf_reloc_type_lookup): Likewise.
810 * elfxx-sparc.c (_bfd_sparc_elf_reloc_type_lookup): Likewise.
811 * elfxx-tilegx.c (tilegx_reloc_type_lookup): Likewise.
812
813 PR 22875
814 * elf-bfd.h (struct elf_backend_data): Change the return type of
815 the elf_info_to_howto and elf_info_to_howto_rel function pointers
816 to bfd_boolean.
817 * elfcode.h (elf_slurp_reloc_table_from_section): Check the return
818 value from the info_to_howto function and fail if that function
819 failed.
820 * elf32-h8300.c (elf32_h8_relocate_section): Check return value
821 from the info_to_howto function.
822 (elf32_h8_relax_section): Likewise.
823 * elf32-lm32.c (lm32_elf_relocate_section): Likewise.
824 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise.
825 * elf32-score.c (s3_bfd_score_elf_relocate_section): Likewise.
826 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
827 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
828 * elf64-ia64-vms.c (elf64_ia64_relocate_section): Likewise.
829 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Likewise.
830 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
831 * elfnn-ia64.c (elfNN_ia64_relocate_section): Likewise.
832 * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
833 (riscv_elf_relocate_section): Likewise.
834 * elf-hppa.h (elf_hppa_info_to_howto): Change return type to
835 bfd_boolean. Issue an error message, set an error value and
836 return FALSE if the reloc is not recognized.
837 (elf_hppa_info_to_howto_rel): Likewise.
838 * elf-m10200.c (mn10200_info_to_howto): Likewise.
839 * elf-m10300.c (mn10300_info_to_howto): Likewise.
840 * elf.c (_bfd_elf_no_info_to_howto): Likewise.
841 * elf32-arc.c (arc_info_to_howto_rel): Likewise.
842 * elf32-arm.c (elf32_arm_info_to_howto): Likewise.
843 * elf32-avr.c (avr_info_to_howto_rela): Likewise.
844 * elf32-bfin.c (bfin_info_to_howto): Likewise.
845 * elf32-cr16.c (elf_cr16_info_to_howto): Likewise.
846 * elf32-cr16c.c (elf_cr16c_info_to_howto): Likewise.
847 * elf32-cris.c (elf_cr16c_info_to_howto_rel)
848 (cris_info_to_howto_rela): Likewise.
849 * elf32-crx.c (elf_crx_info_to_howto): Likewise.
850 * elf32-d10v.c (d10v_info_to_howto_rel): Likewise.
851 * elf32-d30v.c (d30v_info_to_howto_rel, d30v_info_to_howto_rela):
852 Likewise.
853 * elf32-dlx.c (dlx_rtype_to_howto, elf32_dlx_info_to_howto)
854 (elf32_dlx_info_to_howto_rel): Likewise.
855 * elf32-epiphany.c (epiphany_info_to_howto_rela): Likewise.
856 * elf32-fr30.c (fr30_info_to_howto_rela): Likewise.
857 * elf32-frv.c (frv_info_to_howto_rela)
858 (frvfdpic_info_to_howto_rel): Likewise.
859 * elf32-ft32.c (ft32_info_to_howto_rela): Likewise.
860 * elf32-gen.c (elf_generic_info_to_howto)
861 (elf_generic_info_to_howto_rel): Likewise.
862 * elf32-h8300.c (elf32_h8_info_to_howto)
863 (elf32_h8_info_to_howto_rel): Likewise.
864 * elf32-i370.c (i370_elf_info_to_howto): Likewise.
865 * elf32-i386.c (elf_i386_reloc_type_lookup)
866 (elf_i386_rtype_to_howto, elf_i386_info_to_howto_rel): Likewise.
867 * elf32-i860.c (lookup_howto, elf32_i860_info_to_howto_rela):
868 Likewise.
869 * elf32-i960.c (elf32_i960_info_to_howto_rel): Likewise.
870 * elf32-ip2k.c (ip2k_info_to_howto_rela): Likewise.
871 * elf32-iq2000.c (iq2000_info_to_howto_rela): Likewise.
872 * elf32-lm32.c (lm32_info_to_howto_rela): Likewise.
873 * elf32-m32c.c (m32c_info_to_howto_rela): Likewise.
874 * elf32-m32r.c (m32r_info_to_howto_rel, m32r_info_to_howto):
875 Likewise.
876 * elf32-m68hc11.c (m68hc11_info_to_howto_rel): Likewise.
877 * elf32-m68hc12.c (m68hc11_info_to_howto_rel): Likewise.
878 * elf32-m68k.c (rtype_to_howto): Likewise.
879 * elf32-mcore.c (mcore_elf_info_to_howto): Likewise.
880 * elf32-mep.c (mep_info_to_howto_rela): Likewise.
881 * elf32-metag.c (metag_info_to_howto_rela): Likewise.
882 * elf32-microblaze.c (microblaze_elf_info_to_howto): Likewise.
883 * elf32-mips.c (mips_info_to_howto_rel, mips_info_to_howto_rela):
884 Likewise.
885 * elf32-moxie.c (moxie_info_to_howto_rela): Likewise.
886 * elf32-msp430.c (msp430_info_to_howto_rela): Likewise.
887 * elf32-mt.c (mt_info_to_howto_rela): Likewise.
888 * elf32-nds32.c (nds32_info_to_howto_rel, nds32_info_to_howto):
889 Likewise.
890 * elf32-nios2.c (nios2_elf32_info_to_howto): Likewise.
891 * elf32-or1k.c (or1k_info_to_howto_rela): Likewise.
892 * elf32-pj.c (pj_elf_info_to_howto): Likewise.
893 * elf32-ppc.c (ppc_elf_info_to_howto): Likewise.
894 * elf32-pru.c (pru_elf32_info_to_howto): Likewise.
895 * elf32-rl78.c (rl78_info_to_howto_rela): Likewise.
896 * elf32-rx.c (rx_info_to_howto_rela): Likewise.
897 * elf32-s390.c (elf_s390_info_to_howto): Likewise.
898 * elf32-score.c (s3_bfd_score_info_to_howto)
899 (_bfd_score_info_to_howto): Likewise.
900 * elf32-score7.c (s7_bfd_score_info_to_howto): Likewise.
901 * elf32-sh.c (sh_elf_info_to_howto): Likewise.
902 * elf32-spu.c (spu_elf_info_to_howto): Likewise.
903 * elf32-tic6x.c (elf32_tic6x_info_to_howto)
904 (elf32_tic6x_info_to_howto_rel): Likewise.
905 * elf32-tilepro.c (tilepro_info_to_howto_rela): Likewise.
906 * elf32-v850.c (v850_elf_info_to_howto_rel)
907 (v850_elf_info_to_howto_rela, v800_elf_info_to_howto): Likewise.
908 * elf32-vax.c (rtype_to_howto): Likewise.
909 * elf32-visium.c (visium_info_to_howto_rela): Likewise.
910 * elf32-wasm32.c (elf32_wasm32_rtype_to_howto)
911 (elf32_wasm32_info_to_howto_rela): Likewise.
912 * elf32-xc16x.c (elf32_xc16x_info_to_howto): Likewise.
913 * elf32-xgate.c (xgate_info_to_howto_rel): Likewise.
914 * elf32-xstormy16.c (xstormy16_info_to_howto_rela): Likewise.
915 * elf32-xtensa.c (elf_xtensa_info_to_howto_rela): Likewise.
916 * elf64-alpha.c (elf64_alpha_info_to_howto): Likewise.
917 * elf64-gen.c (elf_generic_info_to_howto)
918 (elf_generic_info_to_howto_rel): Likewise.
919 * elf64-ia64-vms.c (elf64_ia64_info_to_howto): Likewise.
920 * elf64-mips.c (mips_elf64_info_to_howto_rela): Likewise.
921 * elf64-mmix.c (mmix_info_to_howto_rela): Likewise.
922 * elf64-ppc.c (ppc64_elf_info_to_howto): Likewise.
923 * elf64-s390.c (elf_s390_reloc_type_lookup): Likewise.
924 * elf64-sh64.c (elf_s390_info_to_howto, sh_elf64_info_to_howto):
925 Likewise.
926 * elf64-x86-64.c (elf_x86_64_info_to_howto): Likewise.
927 * elfn32-mips.c (mips_info_to_howto_rel, mips_info_to_howto_rela):
928 Likewise.
929 * elfnn-aarch64.c (elfNN_aarch64_info_to_howto): Likewise.
930 * elfnn-ia64.c (elfNN_ia64_info_to_howto): Likewise.
931 * elfnn-riscv.c (riscv_info_to_howto_rela): Likewise.
932 * elfxx-ia64.c (ia64_elf_reloc_type_lookup): Likewise.
933 * elfxx-sparc.c (_bfd_sparc_elf_info_to_howto): Likewise.
934 * elfxx-tilegx.c (tilegx_info_to_howto_rela): Likewise.
935 * elf32-score.h (s7_bfd_score_info_to_howto): Update prototype.
936 * elfxx-sparc.h (_bfd_sparc_elf_info_to_howto): Update prototype.
937 * elfxx-tilegx.h (tilegx_info_to_howto_rela): Update prototype.
938 * elfxx-target.h (elf_info_to_howto, elf_info_to_howto_rel):
939 Default to NULL.
940
941 2018-02-26 Jim Wilson <jimw@sifive.com>
942 Stephan Schreiber <info@fs-driver.org>
943
944 PR 15904
945 * elfnn-ia64.c (elfNN_ia64_relax_section): After ia64_elf_relax_brl
946 call, set changed_contents and changed_relocs. Likewise after
947 successful ia64_elf_relax_br call.
948
949 2018-02-26 Alan Modra <amodra@gmail.com>
950
951 * elf.c (assign_file_positions_except_relocs): Don't segfault
952 when actual number of phdrs is less than allocated. Delete
953 outdated comment. Formatting.
954
955 2018-02-26 Alan Modra <amodra@gmail.com>
956
957 * elf-m10300.c, * elf-s390-common.c, * elf32-arc.c, * elf32-cris.c,
958 * elf32-dlx.c, * elf32-frv.c, * elf32-i370.c, * elf32-lm32.c,
959 * elf32-m32r.c, * elf32-m68hc1x.c, * elf32-m68k.c,
960 * elf32-microblaze.c, * elf32-msp430.c, * elf32-nds32.c,
961 * elf32-nios2.c, * elf32-or1k.c, * elf32-rl78.c, * elf32-rx.c,
962 * elf32-score.c, * elf32-score7.c, * elf32-sh-symbian.c,
963 * elf32-sh.c, * elf32-spu.c, * elf32-v850.c, * elf32-xtensa.c,
964 * elf64-alpha.c, * elf64-ia64-vms.c, * elf64-mmix.c,
965 * elf64-sh64.c, * elf64-sparc.c, * elfnn-ia64.c, * elfxx-tilegx.c,
966 * mmo.c, * osf-core.c, * srec.c, * vms-alpha.c: Standardize
967 error/warning messages.
968
969 2018-02-26 Alan Modra <amodra@gmail.com>
970
971 * archive.c, * bfd.c, * linker.c, * reloc.c, * stabs.c,
972 * syms.c: Standardize error/warning messages.
973
974 2018-02-26 Alan Modra <amodra@gmail.com>
975
976 * aout-adobe.c, * aout-cris.c, * i386linux.c, * m68klinux.c,
977 * sparclinux.c, * coff-alpha.c, * coff-arm.c, * coff-mcore.c,
978 * coffcode.h, * coffgen.c, * cofflink.c, * ecoff.c, * pe-mips.c,
979 * peXXigen.c, * peicode.h: Standardize error/warning messages.
980
981 2018-02-26 Alan Modra <amodra@gmail.com>
982
983 * elf32-arm.c, * elfnn-aarch64.c: Standardize error/warning messages.
984
985 2018-02-26 Alan Modra <amodra@gmail.com>
986
987 * elfxx-mips.c: Standardize error/warning messages.
988
989 2018-02-26 Alan Modra <amodra@gmail.com>
990
991 * dwarf2.c, * elf-attrs.c, * elf-eh-frame.c, * elf.c, * elf32-gen.c,
992 * elflink.c: Standardize error/warning messages. Replace use of
993 linker callback einfo with _bfd_error_handler when possible.
994
995 2018-02-26 Alan Modra <amodra@gmail.com>
996
997 * aoutx.h, * coff-alpha.c, * coff-i860.c, * coff-m68k.c,
998 * coff-mcore.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c,
999 * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-w65.c,
1000 * elf-bfd.h, * elf-m10300.c, * elf.c, * elf32-avr.c, * elf32-bfin.c,
1001 * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c,
1002 * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c,
1003 * elf32-fr30.c, * elf32-frv.c, * elf32-i370.c, * elf32-i386.c,
1004 * elf32-i960.c, * elf32-ip2k.c, * elf32-iq2000.c, * elf32-lm32.c,
1005 * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c,
1006 * elf32-m68k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c,
1007 * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c,
1008 * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-or1k.c,
1009 * elf32-pj.c, * elf32-ppc.c, * elf32-rl78.c, * elf32-rx.c,
1010 * elf32-s390.c, * elf32-sh.c, * elf32-spu.c, * elf32-tic6x.c,
1011 * elf32-v850.c, * elf32-vax.c, * elf32-visium.c, * elf32-wasm32.c,
1012 * elf32-xgate.c, * elf32-xtensa.c, * elf64-alpha.c,
1013 * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c,
1014 * elf64-ppc.c, * elf64-s390.c, * elf64-sparc.c, * elf64-x86-64.c,
1015 * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c,
1016 * elfnn-riscv.c, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-riscv.h,
1017 * elfxx-sparc.c, * elfxx-sparc.h, * reloc.c: Standardize
1018 unrecognized/unsupported reloc message.
1019
1020 2018-02-26 Alan Modra <amodra@gmail.com>
1021
1022 * elf32-ppc.c: Standardize error/warning messages. Use
1023 _bfd_error_handler rather than einfo when einfo features not used.
1024 * elf64-ppc.c: Likewise.
1025
1026 2018-02-23 Alan Modra <amodra@gmail.com>
1027
1028 PR 22881
1029 * elf.c (assign_file_positions_for_non_load_sections): Remove RELRO
1030 segment if no matching LOAD segment.
1031
1032 2018-02-23 Kuan-Lin Chen <kuanlinchentw@gmail.com>
1033
1034 * elf32-nds32.h: Define mask for ict_model.
1035
1036 2018-02-20 Jason Duerstock <jason.duerstock@gmail.com>
1037
1038 * elfnn-ia64.c (elf_backend_can_gc_sections): Enable.
1039
1040 2018-02-19 Maciej W. Rozycki <macro@mips.com>
1041
1042 Revert
1043 2018-01-12 Vlad Ivanov <vlad@ivanov.email>
1044
1045 * elfxx-mips.c (_bfd_mips_elf_final_link): Notify user when
1046 .reginfo section has wrong size.
1047
1048 2018-02-19 Maciej W. Rozycki <macro@mips.com>
1049
1050 * elfxx-mips.c (_bfd_mips_elf_always_size_sections): Set
1051 SEC_FIXED_SIZE and SEC_HAS_CONTENTS flags for `.reginfo' and
1052 `.MIPS.abiflags' sections.
1053 (_bfd_mips_elf_final_link): Avoid reading beyond `.reginfo'
1054 section's end.
1055
1056 2018-02-19 Maciej W. Rozycki <macro@mips.com>
1057
1058 * section.c (SEC_FIXED_SIZE): New macro.
1059 * bfd-in2.h: Regenerate.
1060
1061 2018-02-19 Maciej W. Rozycki <macro@mips.com>
1062
1063 * section.c (SEC_HAS_GOT_REF): Remove macro.
1064 * bfd-in2.h: Regenerate.
1065
1066 2018-02-19 Alan Modra <amodra@gmail.com>
1067
1068 * elf-attrs.c (_bfd_elf_parse_attributes): Correct _bfd_error_handler
1069 arguments.
1070 * elfxx-mips.c (_bfd_mips_elf_final_link): Likewise.
1071 * elfnn-riscv.c (_bfd_riscv_relax_align): Likewise.
1072 (_bfd_riscv_relax_pc): Likewise and fix typos.
1073 * libbfd-in.h (_bfd_error_handler): Add attribute printf.
1074 * libbfd.h: Regenerate.
1075
1076 2018-02-19 Alan Modra <amodra@gmail.com>
1077
1078 * dwarf2.c (read_section): Don't use 'll' format modifier.
1079 (find_abstract_instance): Likewise.
1080 * elfcore.h (elf_core_file_p): Likewise.
1081
1082 2018-02-19 Alan Modra <amodra@gmail.com>
1083
1084 * bfd-in.h: Include inttypes.h or if not available define
1085 PRId64, PRIu64 and PRIx64.
1086 * bfd.c (_bfd_doprnt, _bfd_doprnt_scan): Remove support for L
1087 modifier to print bfd_vma.
1088 * coff-arm.c, * coff-mcore.c, * coff-ppc.c, * coff-rs6000.c,
1089 * coff-sh.c, * coff-tic80.c, * coffcode.h, * coffgen.c, * cofflink.c,
1090 * compress.c, * dwarf2.c, * elf-m10300.c, * elf.c, * elf32-arc.c,
1091 * elf32-arm.c, * elf32-bfin.c, * elf32-cris.c, * elf32-hppa.c,
1092 * elf32-i386.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32r.c,
1093 * elf32-m68k.c, * elf32-metag.c, * elf32-nds32.c, * elf32-nios2.c,
1094 * elf32-ppc.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c,
1095 * elf32-score7.c, * elf32-sh.c, * elf32-sh64.c, * elf32-spu.c,
1096 * elf32-tic6x.c, * elf32-tilepro.c, * elf32-v850.c, * elf32-vax.c,
1097 * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c,
1098 * elf64-mmix.c, * elf64-s390.c, * elf64-sh64.c, * elf64-x86-64.c,
1099 * elfcode.h, * elfcore.h, * elflink.c, * elfnn-aarch64.c,
1100 * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-mips.c, * elfxx-sparc.c,
1101 * elfxx-tilegx.c, * ieee.c, * ihex.c, * mach-o.c, * merge.c, * mmo.c,
1102 * peXXigen.c, * xcofflink.c: Replace use of Lx modifier with PRIx64,
1103 and cast input to uint64_t, and similarly for Ld and Lu.
1104 * bfd-in2.h: Regenerate.
1105
1106 2018-02-19 Alan Modra <amodra@gmail.com>
1107
1108 * elf32-arm.c, * elf32-hppa.c, * elf32-lm32.c, * elf32-m32r.c,
1109 * elf32-metag.c, * elf32-nds32.c, * elf32-or1k.c, * elf32-ppc.c,
1110 * elf32-s390.c, * elf32-sh.c, * elf32-tic6x.c, * elf32-tilepro.c,
1111 * elf64-ppc.c, * elf64-s390.c, * elflink.c, * elfnn-aarch64.c,
1112 * elfnn-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c,
1113 * reloc.c: Replace use of %R and %T in format strings passed to
1114 einfo and friends by %pR and %pT.
1115
1116 2018-02-19 Alan Modra <amodra@gmail.com>
1117
1118 * bfd.c (_bfd_doprnt, _bfd_doprnt_scan): Handle %pA and %pB in place
1119 of %A and %B.
1120 * aout-adobe.c: Update all messages using %A and %B.
1121 * aout-cris.c: Likewise.
1122 * aoutx.h: Likewise.
1123 * archive.c: Likewise.
1124 * binary.c: Likewise.
1125 * cache.c: Likewise.
1126 * coff-alpha.c: Likewise.
1127 * coff-arm.c: Likewise.
1128 * coff-i860.c: Likewise.
1129 * coff-mcore.c: Likewise.
1130 * coff-ppc.c: Likewise.
1131 * coff-rs6000.c: Likewise.
1132 * coff-sh.c: Likewise.
1133 * coff-tic4x.c: Likewise.
1134 * coff-tic54x.c: Likewise.
1135 * coff-tic80.c: Likewise.
1136 * coff64-rs6000.c: Likewise.
1137 * coffcode.h: Likewise.
1138 * coffgen.c: Likewise.
1139 * cofflink.c: Likewise.
1140 * coffswap.h: Likewise.
1141 * compress.c: Likewise.
1142 * cpu-arm.c: Likewise.
1143 * ecoff.c: Likewise.
1144 * elf-attrs.c: Likewise.
1145 * elf-eh-frame.c: Likewise.
1146 * elf-ifunc.c: Likewise.
1147 * elf-m10300.c: Likewise.
1148 * elf-properties.c: Likewise.
1149 * elf-s390-common.c: Likewise.
1150 * elf.c: Likewise.
1151 * elf32-arc.c: Likewise.
1152 * elf32-arm.c: Likewise.
1153 * elf32-avr.c: Likewise.
1154 * elf32-bfin.c: Likewise.
1155 * elf32-cr16.c: Likewise.
1156 * elf32-cr16c.c: Likewise.
1157 * elf32-cris.c: Likewise.
1158 * elf32-crx.c: Likewise.
1159 * elf32-d10v.c: Likewise.
1160 * elf32-d30v.c: Likewise.
1161 * elf32-epiphany.c: Likewise.
1162 * elf32-fr30.c: Likewise.
1163 * elf32-frv.c: Likewise.
1164 * elf32-gen.c: Likewise.
1165 * elf32-hppa.c: Likewise.
1166 * elf32-i370.c: Likewise.
1167 * elf32-i386.c: Likewise.
1168 * elf32-i960.c: Likewise.
1169 * elf32-ip2k.c: Likewise.
1170 * elf32-iq2000.c: Likewise.
1171 * elf32-lm32.c: Likewise.
1172 * elf32-m32c.c: Likewise.
1173 * elf32-m32r.c: Likewise.
1174 * elf32-m68hc11.c: Likewise.
1175 * elf32-m68hc12.c: Likewise.
1176 * elf32-m68hc1x.c: Likewise.
1177 * elf32-m68k.c: Likewise.
1178 * elf32-mcore.c: Likewise.
1179 * elf32-mep.c: Likewise.
1180 * elf32-metag.c: Likewise.
1181 * elf32-microblaze.c: Likewise.
1182 * elf32-moxie.c: Likewise.
1183 * elf32-msp430.c: Likewise.
1184 * elf32-mt.c: Likewise.
1185 * elf32-nds32.c: Likewise.
1186 * elf32-nios2.c: Likewise.
1187 * elf32-or1k.c: Likewise.
1188 * elf32-pj.c: Likewise.
1189 * elf32-ppc.c: Likewise.
1190 * elf32-rl78.c: Likewise.
1191 * elf32-rx.c: Likewise.
1192 * elf32-s390.c: Likewise.
1193 * elf32-score.c: Likewise.
1194 * elf32-score7.c: Likewise.
1195 * elf32-sh-symbian.c: Likewise.
1196 * elf32-sh.c: Likewise.
1197 * elf32-sh64.c: Likewise.
1198 * elf32-sparc.c: Likewise.
1199 * elf32-spu.c: Likewise.
1200 * elf32-tic6x.c: Likewise.
1201 * elf32-tilepro.c: Likewise.
1202 * elf32-v850.c: Likewise.
1203 * elf32-vax.c: Likewise.
1204 * elf32-visium.c: Likewise.
1205 * elf32-wasm32.c: Likewise.
1206 * elf32-xgate.c: Likewise.
1207 * elf32-xtensa.c: Likewise.
1208 * elf64-alpha.c: Likewise.
1209 * elf64-gen.c: Likewise.
1210 * elf64-hppa.c: Likewise.
1211 * elf64-ia64-vms.c: Likewise.
1212 * elf64-mmix.c: Likewise.
1213 * elf64-ppc.c: Likewise.
1214 * elf64-s390.c: Likewise.
1215 * elf64-sh64.c: Likewise.
1216 * elf64-sparc.c: Likewise.
1217 * elf64-x86-64.c: Likewise.
1218 * elfcode.h: Likewise.
1219 * elfcore.h: Likewise.
1220 * elflink.c: Likewise.
1221 * elfnn-aarch64.c: Likewise.
1222 * elfnn-ia64.c: Likewise.
1223 * elfnn-riscv.c: Likewise.
1224 * elfxx-mips.c: Likewise.
1225 * elfxx-sparc.c: Likewise.
1226 * elfxx-tilegx.c: Likewise.
1227 * elfxx-x86.c: Likewise.
1228 * hpux-core.c: Likewise.
1229 * ieee.c: Likewise.
1230 * ihex.c: Likewise.
1231 * libbfd.c: Likewise.
1232 * linker.c: Likewise.
1233 * mach-o.c: Likewise.
1234 * merge.c: Likewise.
1235 * mmo.c: Likewise.
1236 * oasys.c: Likewise.
1237 * pdp11.c: Likewise.
1238 * pe-mips.c: Likewise.
1239 * peXXigen.c: Likewise.
1240 * peicode.h: Likewise.
1241 * reloc.c: Likewise.
1242 * rs6000-core.c: Likewise.
1243 * srec.c: Likewise.
1244 * stabs.c: Likewise.
1245 * vms-alpha.c: Likewise.
1246 * xcofflink.c: Likewise.
1247
1248 2018-02-19 Alan Modra <amodra@gmail.com>
1249
1250 PR 22845
1251 * elf.c (IS_TBSS): Define.
1252 (_bfd_elf_map_sections_to_segments): Use IS_TBSS.
1253 (assign_file_positions_for_non_load_sections): Revert last change.
1254 Properly calculate load segment limits to compare against relro limits.
1255
1256 2018-02-17 Alan Modra <amodra@gmail.com>
1257
1258 PR 22845
1259 * elf.c (assign_file_positions_for_non_load_sections): Ignore
1260 degenerate zero size PT_LOAD segments when finding one overlapping
1261 the PT_GNU_RELRO segment.
1262
1263 2018-02-16 Alan Modra <amodra@gmail.com>
1264
1265 * libbfd.c (_bfd_bool_bfd_false_error): Rename from bfd_false.
1266 (_bfd_bool_bfd_true): Rename from bfd_true.
1267 (_bfd_ptr_bfd_null_error): Rename from bfd_nullvoidptr.
1268 (_bfd_int_bfd_0): Rename from bfd_0.
1269 (_bfd_uint_bfd_0): Rename from bfd_0u.
1270 (_bfd_long_bfd_0): Rename from bfd_0l.
1271 (_bfd_long_bfd_n1_error): Rename from _bfd_n1.
1272 (_bfd_void_bfd): Rename from bfd_void.
1273 (_bfd_bool_bfd_false, _bfd_bool_bfd_asymbol_false),
1274 (_bfd_bool_bfd_link_false_error),
1275 (_bfd_bool_bfd_link_true, _bfd_bool_bfd_bfd_true),
1276 (_bfd_bool_bfd_uint_true, _bfd_bool_bfd_ptr_true),
1277 (_bfd_bool_bfd_asection_bfd_asection_true),
1278 (_bfd_bool_bfd_asymbol_bfd_asymbol_true),
1279 (_bfd_void_bfd_link, _bfd_void_bfd_asection): New functions.
1280 * archive.c (_bfd_noarchive_get_elt_at_index),
1281 (_bfd_noarchive_openr_next_archived_file),
1282 (_bfd_noarchive_construct_extended_name_table),
1283 (_bfd_noarchive_write_ar_hdr, _bfd_noarchive_truncate_arname),
1284 (_bfd_noarchive_write_armap): New functions.
1285 * archures.c (_bfd_nowrite_set_arch_mach): New function.
1286 * coff-alpha.c (alpha_ecoff_swap_coff_aux_in),
1287 (alpha_ecoff_swap_coff_sym_in, alpha_ecoff_swap_coff_lineno_in),
1288 (alpha_ecoff_swap_coff_aux_out, alpha_ecoff_swap_coff_sym_out),
1289 (alpha_ecoff_swap_coff_lineno_out),
1290 (alpha_ecoff_swap_coff_reloc_out): New functions.
1291 * coff-mips.c (mips_ecoff_swap_coff_aux_in),
1292 (mips_ecoff_swap_coff_sym_in, mips_ecoff_swap_coff_lineno_in),
1293 (mips_ecoff_swap_coff_aux_out, mips_ecoff_swap_coff_sym_out),
1294 (mips_ecoff_swap_coff_lineno_out),
1295 (mips_ecoff_swap_coff_reloc_out): New functions.
1296 * coffcode.h (coff_set_alignment_hook): Replace define with
1297 new function.
1298 (symname_in_debug_hook): Likewise.
1299 * ecoff.c (_bfd_ecoff_set_alignment_hook): New function.
1300 * elfxx-target.h (elf_backend_allow_non_load_phdr): Default to 0.
1301 * elf.c (assign_file_positions_except_relocs): Test
1302 elf_backend_allow_non_load_phdr for NULL.
1303 * elflink.c (_bfd_elf_omit_section_dynsym_default): Rename from
1304 _bfd_elf_link_omit_section_dynsym. Update uses.
1305 (_bfd_elf_omit_section_dynsym_all): New function.
1306 * elf-bfd.h (_bfd_elf_link_omit_section_dynsym): Delete.
1307 (_bfd_elf_omit_section_dynsym_default): Declare.
1308 (_bfd_elf_omit_section_dynsym_all): Declare.
1309 * linker.c (_bfd_nolink_sizeof_headers, _bfd_nolink_bfd_relax_section),
1310 (_bfd_nolink_bfd_get_relocated_section_contents),
1311 (_bfd_nolink_bfd_lookup_section_flags),
1312 (_bfd_nolink_bfd_is_group_section, _bfd_nolink_bfd_discard_group),
1313 (_bfd_nolink_bfd_link_hash_table_create),
1314 (_bfd_nolink_bfd_link_just_syms),
1315 (_bfd_nolink_bfd_copy_link_hash_symbol_type),
1316 (_bfd_nolink_bfd_link_split_section),
1317 (_bfd_nolink_section_already_linked),
1318 (_bfd_nolink_bfd_define_common_symbol),
1319 (_bfd_nolink_bfd_define_start_stop): New functions.
1320 * reloc.c (_bfd_norelocs_bfd_reloc_type_lookup),
1321 (_bfd_norelocs_bfd_reloc_name_lookup),
1322 (_bfd_nodynamic_canonicalize_dynamic_reloc): New functions.
1323 * section.c (_bfd_nowrite_set_section_contents): New function.
1324 * syms.c (_bfd_nosymbols_canonicalize_symtab),
1325 (_bfd_nosymbols_print_symbol, _bfd_nosymbols_get_symbol_info),
1326 (_bfd_nosymbols_get_symbol_version_string),
1327 (_bfd_nosymbols_bfd_is_local_label_name),
1328 (_bfd_nosymbols_get_lineno, _bfd_nosymbols_find_nearest_line),
1329 (_bfd_nosymbols_find_line, _bfd_nosymbols_find_inliner_info),
1330 (_bfd_nosymbols_bfd_make_debug_symbol),
1331 ( _bfd_nosymbols_read_minisymbols),
1332 ( _bfd_nosymbols_minisymbol_to_symbol),
1333 (_bfd_nodynamic_get_synthetic_symtab): New functions.
1334 * libbfd-in.h: Declare new functions. Update existing defines,
1335 removing casts.
1336 * aix386-core.c: Update to use new hooks. Formatting.
1337 * aout-adobe.c: Likewise.
1338 * aout-arm.c: Likewise.
1339 * aout-target.h: Likewise.
1340 * aout-tic30.c: Likewise.
1341 * aoutf1.h: Likewise.
1342 * binary.c: Likewise.
1343 * bout.c: Likewise.
1344 * cisco-core.c: Likewise.
1345 * coff-alpha.c: Likewise.
1346 * coff-i386.c: Likewise.
1347 * coff-i860.c: Likewise.
1348 * coff-i960.c: Likewise.
1349 * coff-ia64.c: Likewise.
1350 * coff-mips.c: Likewise.
1351 * coff-ppc.c: Likewise.
1352 * coff-rs6000.c: Likewise.
1353 * coff-sh.c: Likewise.
1354 * coff-tic30.c: Likewise.
1355 * coff-tic54x.c: Likewise.
1356 * coff-x86_64.c: Likewise.
1357 * coff64-rs6000.c: Likewise.
1358 * coffcode.h: Likewise.
1359 * elf-m10300.c: Likewise.
1360 * elf32-cr16.c: Likewise.
1361 * elf32-lm32.c: Likewise.
1362 * elf32-m32r.c: Likewise.
1363 * elf32-metag.c: Likewise.
1364 * elf32-score.c: Likewise.
1365 * elf32-score7.c: Likewise.
1366 * elf32-tilepro.c: Likewise.
1367 * elf32-xstormy16.c: Likewise.
1368 * elf32-xtensa.c: Likewise.
1369 * elf64-alpha.c: Likewise.
1370 * elf64-hppa.c: Likewise.
1371 * elf64-ia64-vms.c: Likewise.
1372 * elf64-mmix.c: Likewise.
1373 * elf64-sh64.c: Likewise.
1374 * elfnn-ia64.c: Likewise.
1375 * elfxx-sparc.c: Likewise.
1376 * elfxx-target.h: Likewise.
1377 * elfxx-tilegx.c: Likewise.
1378 * elfxx-x86.h: Likewise.
1379 * hp300hpux.c: Likewise.
1380 * hppabsd-core.c: Likewise.
1381 * hpux-core.c: Likewise.
1382 * i386msdos.c: Likewise.
1383 * i386os9k.c: Likewise.
1384 * ieee.c: Likewise.
1385 * ihex.c: Likewise.
1386 * irix-core.c: Likewise.
1387 * libaout.h: Likewise.
1388 * libecoff.h: Likewise.
1389 * mach-o-target.c: Likewise.
1390 * mach-o.c: Likewise.
1391 * mipsbsd.c: Likewise.
1392 * mmo.c: Likewise.
1393 * netbsd-core.c: Likewise.
1394 * nlm-target.h: Likewise.
1395 * oasys.c: Likewise.
1396 * osf-core.c: Likewise.
1397 * pdp11.c: Likewise.
1398 * pe-mips.c: Likewise.
1399 * pe-x86_64.c: Likewise.
1400 * pef.c: Likewise.
1401 * plugin.c: Likewise.
1402 * ppcboot.c: Likewise.
1403 * ptrace-core.c: Likewise.
1404 * sco5-core.c: Likewise.
1405 * som.c: Likewise.
1406 * sparclynx.c: Likewise.
1407 * srec.c: Likewise.
1408 * tekhex.c: Likewise.
1409 * trad-core.c: Likewise.
1410 * verilog.c: Likewise.
1411 * versados.c: Likewise.
1412 * vms-alpha.c: Likewise.
1413 * vms-lib.c: Likewise.
1414 * wasm-module.c: Likewise.
1415 * xsym.c: Likewise.
1416 * libbfd.h: Regenerate.
1417
1418 2018-02-15 Jim Wilson <jimw@sifive.com>
1419
1420 * elfnn-riscv.c (_bfd_riscv_relax_section): Ifdef out check to ignore
1421 symbols whose section address is zero.
1422
1423 * elfnn-riscv.c (riscv_elf_relocate_section): Use bfd_reloc_dangerous
1424 when pcrel_lo reloc has an addend. Use reloc_dangerous callback for
1425 bfd_reloc_dangerous. Use einfo instead of warning callback for errors.
1426 Add %X%P to error messages.
1427
1428 2018-02-15 Eric Botcazou <ebotcazou@adacore.com>
1429
1430 PR ld/22832
1431 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs) <R_SPARC_TLS_GD_CALL>:
1432 Pass FALSE instead of TRUE as 'create' argument to bfd_link_hash_lookup
1433 and assert that the result of the call is not NULL.
1434
1435 2018-02-14 Nick Clifton <nickc@redhat.com>
1436
1437 PR 22823
1438 Revert previous delta. Add extra casts to avoid compile time
1439 warnings instead.
1440 * libbfd-in.h (_bfd_generic_bfd_copy_private_bfd_data): Add extra
1441 cast to avoid warning from gcc v8 compiler.
1442 (_bfd_generic_bfd_merge_private_bfd_data): Likewise.
1443 (_bfd_generic_bfd_set_private_flags): Likewise.
1444 (_bfd_generic_bfd_copy_private_section_data): Likewise.
1445 (_bfd_generic_bfd_copy_private_symbol_data): Likewise.
1446 (_bfd_generic_bfd_copy_private_header_data): Likewise.
1447 (_bfd_generic_bfd_print_private_bfd_data): Likewise.
1448 (_bfd_noarchive_construct_extended_name_table): Likewise.
1449 (_bfd_noarchive_truncate_arname): Likewise.
1450 (_bfd_noarchive_write_ar_hdr): Likewise.
1451 (_bfd_noarchive_get_elt_at_index): Likewise.
1452 (_bfd_nosymbols_canonicalize_symtab): Likewise.
1453 (_bfd_nosymbols_print_symbol): Likewise.
1454 (_bfd_nosymbols_get_symbol_info): Likewise.
1455 (_bfd_nosymbols_get_symbol_version_string): Likewise.
1456 (_bfd_nosymbols_bfd_is_local_label_name): Likewise.
1457 (_bfd_nosymbols_bfd_is_target_special_symbol): Likewise.
1458 (_bfd_nosymbols_get_lineno): Likewise.
1459 (_bfd_nosymbols_find_nearest_line): Likewise.
1460 (_bfd_nosymbols_find_line): Likewise.
1461 (_bfd_nosymbols_find_inliner_info): Likewise.
1462 (_bfd_nosymbols_bfd_make_debug_symbol): Likewise.
1463 (_bfd_nosymbols_read_minisymbols): Likewise.
1464 (_bfd_nosymbols_minisymbol_to_symbol): Likewise.
1465 (_bfd_norelocs_bfd_reloc_type_lookup): Likewise.
1466 (_bfd_norelocs_bfd_reloc_name_lookup): Likewise.
1467 (_bfd_nowrite_set_arch_mach): Likewise.
1468 (_bfd_nowrite_set_section_contents): Likewise.
1469 (_bfd_nolink_sizeof_headers): Likewise.
1470 (_bfd_nolink_bfd_get_relocated_section_contents): Likewise.
1471 (_bfd_nolink_bfd_relax_section): Likewise.
1472 (_bfd_nolink_bfd_gc_sections): Likewise.
1473 (_bfd_nolink_bfd_lookup_section_flags): Likewise.
1474 (_bfd_nolink_bfd_merge_sections): Likewise.
1475 (_bfd_nolink_bfd_is_group_section): Likewise.
1476 (_bfd_nolink_bfd_discard_group): Likewise.
1477 (_bfd_nolink_bfd_link_hash_table_create): Likewise.
1478 (_bfd_nolink_bfd_link_add_symbols): Likewise.
1479 (_bfd_nolink_bfd_link_just_syms): Likewise.
1480 (_bfd_nolink_bfd_copy_link_hash_symbol_type): Likewise.
1481 (_bfd_nolink_bfd_final_link): Likewise.
1482 (_bfd_nolink_bfd_link_split_section): Likewise.
1483 (_bfd_nolink_section_already_linked): Likewise.
1484 (_bfd_nolink_bfd_define_common_symbol): Likewise.
1485 (_bfd_nolink_bfd_define_start_stop): Likewise.
1486 (_bfd_nodynamic_canonicalize_dynamic_symtab): Likewise.
1487 (_bfd_nodynamic_get_synthetic_symtab): Likewise.
1488 (_bfd_nodynamic_get_dynamic_reloc_upper_bound _bfd_): Likewise.
1489 (_bfd_nodynamic_canonicalize_dynamic_reloc): Likewise.
1490 * libbfd.c (bfd_false_any): Delete.
1491 (bfd_true_any, bfd_nullvoidptr_any, bfd_0_any): Delete.
1492 (bfd_0u_any, bfd_0l_any, _bfd_n1_any, bfd_void_any): Delete.
1493 * libbfd.h (extern): Regenerate
1494 * aout-target.h (MY_bfd_is_target_special_symbol): Add extra
1495 cast to avoid warning from gcc v8 compiler.
1496 * aout-tic30.c (tic30_aout_set_arch_mach): Likewise.
1497 * binary.c (binary_get_symbol_info): Likewise.
1498 * coff-alpha.c (alpha_ecoff_backend_data): Likewise.
1499 * coff-mips.c (mips_ecoff_backend_data): Likewise.
1500 * coffcode.h (coff_set_alignment_hook): Likewise.
1501 (symname_in_debug_hook): Likewise.
1502 (bfd_coff_backend_data bigobj_swap_table): Likewise.
1503 * elf-m10300.c (elf_backend_omit_section_dynsym): Likewise.
1504 * elf32-cr16.c (elf_backend_omit_section_dynsym): Likewise.
1505 * elf32-lm32.c (elf_backend_omit_section_dynsym): Likewise.
1506 * elf32-m32r.c (elf_backend_omit_section_dynsym): Likewise.
1507 * elf32-metag.c (elf_backend_omit_section_dynsym): Likewise.
1508 * elf32-score.c (elf_backend_omit_section_dynsym): Likewise.
1509 * elf32-score7.c (elf_backend_omit_section_dynsym): Likewise.
1510 * elf32-xstormy16.c (elf_backend_omit_section_dynsym): Likewise.
1511 * elf32-xtensa.c (elf_backend_omit_section_dynsym): Likewise.
1512 * elf64-alpha.c (elf_backend_omit_section_dynsym): Likewise.
1513 * elf64-hppa.c (elf_backend_omit_section_dynsym): Likewise.
1514 * elf64-ia64-vms.c (elf_backend_omit_section_dynsym): Likewise.
1515 * elf64-mmix.c (elf_backend_omit_section_dynsym): Likewise.
1516 * elf64-sh64.c (elf_backend_omit_section_dynsym): Likewise.
1517 * elfnn-ia64.c (elf_backend_omit_section_dynsym): Likewise.
1518 * elfxx-target.h (bfd_elfNN_bfd_debug_info_accumulate): Likewise.
1519 (bfd_elfNN_bfd_make_debug_symbol): Likewise.
1520 (bfd_elfNN_bfd_merge_private_bfd_data): Likewise.
1521 (bfd_elfNN_bfd_set_private_flags): Likewise.
1522 (bfd_elfNN_bfd_is_target_special_symbol): Likewise.
1523 (elf_backend_init_index_section): Likewise.
1524 (elf_backend_allow_non_load_phdr): Likewise.
1525 * elfxx-x86.h (elf_backend_omit_section_dynsym): Likewise.
1526 * i386msdos.c (msdos_bfd_is_target_special_symbol): Likewise.
1527 * ieee.c (ieee_construct_extended_name_table): Likewise.
1528 (ieee_write_armap): Likewise.
1529 (ieee_write_ar_hdr): Likewise.
1530 (ieee_bfd_is_target_special_symbol): Likewise.
1531 * ihex.c (ihex_canonicalize_symtab): Likewise.
1532 (ihex_bfd_is_target_special_symbol): Likewise.
1533 * libaout.h (aout_32_bfd_is_target_special_symbol): Likewise.
1534 * libecoff.h (_bfd_ecoff_bfd_is_target_special_symbol): Likewise.
1535 (_bfd_ecoff_set_alignment_hook): Likewise.
1536 * mach-o-target.c (bfd_mach_o_bfd_is_target_special_symbol): Likewise.
1537 * mmo.c (mmo_bfd_is_target_special_symbol): Likewise.
1538 * nlm-target.h (nlm_bfd_is_target_special_symbol): Likewise.
1539 * oasys.c (oasys_construct_extended_name_table): Likewise.
1540 (oasys_write_armap): Likewise.
1541 (oasys_write_ar_hdr): Likewise.
1542 (oasys_bfd_is_target_special_symbol): Likewise.
1543 * pef.c (bfd_pef_bfd_is_target_special_symbol): Likewise.
1544 * plugin.c (bfd_plugin_bfd_is_target_special_symbol): Likewise.
1545 * ppcboot.c (ppcboot_bfd_is_target_special_symbol): Likewise.
1546 * som.c (som_bfd_is_target_special_symbol): Likewise.
1547 * srec.c (srec_bfd_is_target_special_symbol): Likewise.
1548 * tekhex.c (tekhex_bfd_is_target_special_symbol): Likewise.
1549 * verilog.c (verilog_bfd_is_target_special_symbol): Likewise.
1550 * versados.c (versados_bfd_is_target_special_symbol): Likewise.
1551 (versados_bfd_reloc_name_lookup): Likewise.
1552 * vms-alpha.c (vms_bfd_is_target_special_symbol): Likewise.
1553 (vms_bfd_define_start_stop): Likewise.
1554 (alpha_vms_bfd_is_target_special_symbol): Likewise.
1555 * wasm-module.c (wasm_bfd_is_target_special_symbol): Likewise.
1556 * xsym.c (bfd_sym_bfd_is_target_special_symbol): Likewise.
1557
1558 2018-02-14 H.J. Lu <hongjiu.lu@intel.com>
1559
1560 PR ld/22842
1561 * elf32-i386.c (elf_i386_check_relocs): Pass FALSE for non
1562 PC-relative PLT to NEED_DYNAMIC_RELOCATION_P.
1563 * elf64-x86-64.c (elf_x86_64_check_relocs): Create PLT for
1564 R_X86_64_PC32 reloc against dynamic function in data section.
1565 Pass TRUE for PC-relative PLT to NEED_DYNAMIC_RELOCATION_P.
1566 (elf_x86_64_relocate_section): Use PLT for R_X86_64_PC32 reloc
1567 against dynamic function in data section.
1568 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Use PLT in PIE as
1569 function address only if pcrel_plt is true.
1570 (_bfd_x86_elf_link_hash_table_create): Set pcrel_plt.
1571 * elfxx-x86.h (NEED_DYNAMIC_RELOCATION_P): Add PCREL_PLT for
1572 PC-relative PLT. If PLT is PC-relative, don't generate dynamic
1573 PC-relative relocation against a function definition in data
1574 secton in PIE. Remove the obsolete comments.
1575 (elf_x86_link_hash_table): Add pcrel_plt.
1576
1577 2018-02-13 H.J. Lu <hongjiu.lu@intel.com>
1578
1579 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Check bfd_link_dll,
1580 instead of bfd_link_pic, for building shared library.
1581
1582 2018-02-13 H.J. Lu <hongjiu.lu@intel.com>
1583
1584 PR gas/22791
1585 * elf64-x86-64.c (is_32bit_relative_branch): Removed.
1586 (elf_x86_64_relocate_section): Check PIC relocations in PIE.
1587 Remove is_32bit_relative_branch usage. Disallow PC32 reloc
1588 against protected function in shared object.
1589
1590 2018-02-13 Sergei Trofimovich <slyfox@inbox.ru>
1591
1592 PR 22828
1593 * po/ru.po: Fix typo in Russian translation.
1594
1595 2018-02-13 Maciej W. Rozycki <macro@mips.com>
1596
1597 * wasm-module.c (wasm_scan_name_function_section): Rename
1598 `index' local variable to `idx'.
1599
1600 2018-02-13 Nick Clifton <nickc@redhat.com>
1601
1602 PR 22823
1603 Fix compile time warnings generated by gcc version 8.
1604 * libbfd-in.h: Remove extraneous text from prototypes.
1605 Add prototypes for bfd_false_any, bfd_true_any,
1606 bfd_nullvoidptr_any, bfd_0_any, bfd_0u_any, bfd_0l_any,
1607 bfd_n1_any, bfd_void_any.
1608 (_bfd_generic_bfd_copy_private_bfd_data): Use vararg based dummy
1609 function.
1610 (_bfd_generic_bfd_merge_private_bfd_data): Likewise.
1611 (_bfd_generic_bfd_set_private_flags): Likewise.
1612 (_bfd_generic_bfd_copy_private_section_data): Likewise.
1613 (_bfd_generic_bfd_copy_private_symbol_data): Likewise.
1614 (_bfd_generic_bfd_copy_private_header_data): Likewise.
1615 (_bfd_generic_bfd_print_private_bfd_data): Likewise.
1616 (_bfd_noarchive_construct_extended_name_table): Likewise.
1617 (_bfd_noarchive_truncate_arname): Likewise.
1618 (_bfd_noarchive_write_ar_hdr): Likewise.
1619 (_bfd_noarchive_get_elt_at_index): Likewise.
1620 (_bfd_nosymbols_canonicalize_symtab): Likewise.
1621 (_bfd_nosymbols_print_symbol): Likewise.
1622 (_bfd_nosymbols_get_symbol_info): Likewise.
1623 (_bfd_nosymbols_get_symbol_version_string): Likewise.
1624 (_bfd_nosymbols_bfd_is_local_label_name): Likewise.
1625 (_bfd_nosymbols_bfd_is_target_special_symbol): Likewise.
1626 (_bfd_nosymbols_get_lineno): Likewise.
1627 (_bfd_nosymbols_find_nearest_line): Likewise.
1628 (_bfd_nosymbols_find_line): Likewise.
1629 (_bfd_nosymbols_find_inliner_info): Likewise.
1630 (_bfd_nosymbols_bfd_make_debug_symbol): Likewise.
1631 (_bfd_nosymbols_read_minisymbols): Likewise.
1632 (_bfd_nosymbols_minisymbol_to_symbol): Likewise.
1633 (_bfd_norelocs_bfd_reloc_type_lookup): Likewise.
1634 (_bfd_norelocs_bfd_reloc_name_lookup): Likewise.
1635 (_bfd_nowrite_set_arch_mach): Likewise.
1636 (_bfd_nowrite_set_section_contents): Likewise.
1637 (_bfd_nolink_sizeof_headers): Likewise.
1638 (_bfd_nolink_bfd_get_relocated_section_contents): Likewise.
1639 (_bfd_nolink_bfd_relax_section): Likewise.
1640 (_bfd_nolink_bfd_gc_sections): Likewise.
1641 (_bfd_nolink_bfd_lookup_section_flags): Likewise.
1642 (_bfd_nolink_bfd_merge_sections): Likewise.
1643 (_bfd_nolink_bfd_is_group_section): Likewise.
1644 (_bfd_nolink_bfd_discard_group): Likewise.
1645 (_bfd_nolink_bfd_link_hash_table_create): Likewise.
1646 (_bfd_nolink_bfd_link_add_symbols): Likewise.
1647 (_bfd_nolink_bfd_link_just_syms): Likewise.
1648 (_bfd_nolink_bfd_copy_link_hash_symbol_type): Likewise.
1649 (_bfd_nolink_bfd_final_link): Likewise.
1650 (_bfd_nolink_bfd_link_split_section): Likewise.
1651 (_bfd_nolink_section_already_linked): Likewise.
1652 (_bfd_nolink_bfd_define_common_symbol): Likewise.
1653 (_bfd_nolink_bfd_define_start_stop): Likewise.
1654 (_bfd_nodynamic_canonicalize_dynamic_symtab): Likewise.
1655 (_bfd_nodynamic_get_synthetic_symtab): Likewise.
1656 (_bfd_nodynamic_get_dynamic_reloc_upper_bound _bfd_): Likewise.
1657 (_bfd_nodynamic_canonicalize_dynamic_reloc): Likewise.
1658 * libbfd.c (bfd_false_any): New function. Like bfd_false but
1659 accepts one or more arguments.
1660 (bfd_true_any): Likewise.
1661 (bfd_nullvoidptr_any): Likewise.
1662 (bfd_0_any): Likewise.
1663 (bfd_0u_any): Likewise.
1664 (bfd_0l_any): Likewise.
1665 (_bfd_n1_any): Likewise.
1666 (bfd_void_any): Likewise.
1667 * libbfd.h (extern): Regenerate
1668 * aout-target.h (MY_bfd_is_target_special_symbol): Use vararg
1669 based dummy function.
1670 * aout-tic30.c (tic30_aout_set_arch_mach): Likewise.
1671 * binary.c (binary_get_symbol_info): Likewise.
1672 * coff-alpha.c (alpha_ecoff_backend_data): Likewise.
1673 * coff-mips.c (mips_ecoff_backend_data): Likewise.
1674 * coffcode.h (coff_set_alignment_hook): Likewise.
1675 (symname_in_debug_hook): Likewise.
1676 (bfd_coff_backend_data bigobj_swap_table): Likewise.
1677 * elf-m10300.c (elf_backend_omit_section_dynsym): Likewise.
1678 * elf32-cr16.c (elf_backend_omit_section_dynsym): Likewise.
1679 * elf32-lm32.c (elf_backend_omit_section_dynsym): Likewise.
1680 * elf32-m32r.c (elf_backend_omit_section_dynsym): Likewise.
1681 * elf32-metag.c (elf_backend_omit_section_dynsym): Likewise.
1682 * elf32-score.c (elf_backend_omit_section_dynsym): Likewise.
1683 * elf32-score7.c (elf_backend_omit_section_dynsym): Likewise.
1684 * elf32-xstormy16.c (elf_backend_omit_section_dynsym): Likewise.
1685 * elf32-xtensa.c (elf_backend_omit_section_dynsym): Likewise.
1686 * elf64-alpha.c (elf_backend_omit_section_dynsym): Likewise.
1687 * elf64-hppa.c (elf_backend_omit_section_dynsym): Likewise.
1688 * elf64-ia64-vms.c (elf_backend_omit_section_dynsym): Likewise.
1689 * elf64-mmix.c (elf_backend_omit_section_dynsym): Likewise.
1690 * elf64-sh64.c (elf_backend_omit_section_dynsym): Likewise.
1691 * elfnn-ia64.c (elf_backend_omit_section_dynsym): Likewise.
1692 * elfxx-target.h (bfd_elfNN_bfd_debug_info_accumulate): Likewise.
1693 (bfd_elfNN_bfd_make_debug_symbol): Likewise.
1694 (bfd_elfNN_bfd_merge_private_bfd_data): Likewise.
1695 (bfd_elfNN_bfd_set_private_flags): Likewise.
1696 (bfd_elfNN_bfd_is_target_special_symbol): Likewise.
1697 (elf_backend_init_index_section): Likewise.
1698 (elf_backend_allow_non_load_phdr): Likewise.
1699 * elfxx-x86.h (elf_backend_omit_section_dynsym): Likewise.
1700 * i386msdos.c (msdos_bfd_is_target_special_symbol): Likewise.
1701 * ieee.c (ieee_construct_extended_name_table): Likewise.
1702 (ieee_write_armap): Likewise.
1703 (ieee_write_ar_hdr): Likewise.
1704 (ieee_bfd_is_target_special_symbol): Likewise.
1705 * ihex.c (ihex_canonicalize_symtab): Likewise.
1706 (ihex_bfd_is_target_special_symbol): Likewise.
1707 * libaout.h (aout_32_bfd_is_target_special_symbol): Likewise.
1708 * libecoff.h (_bfd_ecoff_bfd_is_target_special_symbol): Likewise.
1709 (_bfd_ecoff_set_alignment_hook): Likewise.
1710 * mach-o-target.c (bfd_mach_o_bfd_is_target_special_symbol): Likewise.
1711 * mmo.c (mmo_bfd_is_target_special_symbol): Likewise.
1712 * nlm-target.h (nlm_bfd_is_target_special_symbol): Likewise.
1713 * oasys.c (oasys_construct_extended_name_table): Likewise.
1714 (oasys_write_armap): Likewise.
1715 (oasys_write_ar_hdr): Likewise.
1716 (oasys_bfd_is_target_special_symbol): Likewise.
1717 * pef.c (bfd_pef_bfd_is_target_special_symbol): Likewise.
1718 * plugin.c (bfd_plugin_bfd_is_target_special_symbol): Likewise.
1719 * ppcboot.c (ppcboot_bfd_is_target_special_symbol): Likewise.
1720 * som.c (som_bfd_is_target_special_symbol): Likewise.
1721 * srec.c (srec_bfd_is_target_special_symbol): Likewise.
1722 * tekhex.c (tekhex_bfd_is_target_special_symbol): Likewise.
1723 * verilog.c (verilog_bfd_is_target_special_symbol): Likewise.
1724 * versados.c (versados_bfd_is_target_special_symbol): Likewise.
1725 (versados_bfd_reloc_name_lookup): Likewise.
1726 * vms-alpha.c (vms_bfd_is_target_special_symbol): Likewise.
1727 (vms_bfd_define_start_stop): Likewise.
1728 (alpha_vms_bfd_is_target_special_symbol): Likewise.
1729 * wasm-module.c (wasm_bfd_is_target_special_symbol): Likewise.
1730 * xsym.c (bfd_sym_bfd_is_target_special_symbol): Likewise.
1731 * elf32-arc.c (get_replace_function): Assign replacement function
1732 to func pointer.
1733 * elf32-i370.c (i370_noop): Update prototype.
1734
1735 2018-02-13 Alan Modra <amodra@gmail.com>
1736
1737 PR 22836
1738 * elf.c (_bfd_elf_fixup_group_sections): Account for removed
1739 relocation sections. If size reduces to just the flag word,
1740 remove that too and mark with SEC_EXCLUDE.
1741 * elflink.c (bfd_elf_final_link): Strip empty group sections.
1742
1743 2018-02-13 Alan Modra <amodra@gmail.com>
1744
1745 PR 22829
1746 * elf.c (assign_file_positions_for_non_load_sections): Rewrite
1747 PT_GNU_RELRO setup.
1748
1749 2018-02-12 Zebediah Figura <z.figura12@gmail.com>
1750
1751 * i386msdos.c (msdos_mkobject); New function.
1752 (msdos_object_p): New function.
1753 (i386_msdos_vec): Use msdos_object_p as the check_format
1754 function.
1755 * peicode.h: Rename external_PEI_DOS_hdr, DOSMAGIC, and
1756 NT_SIGNATURE to external_DOS_hdr, IMAGE_DOS_SIGNATURE, and
1757 IMAGE_NT_SIGNATURE.
1758 * peXXigen.c: Likewise.
1759 * coff-ia64.c: Likewise.
1760
1761 2018-02-12 Nick Clifton <nickc@redhat.com>
1762
1763 * elf32-nds32.c (nds32_elf_relax_longjump3): Remove redundant
1764 assignment.
1765 * elf32-arc.c (elf_arc_relocate_section): Likewise.
1766
1767 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
1768
1769 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Reorder conditions.
1770 (sparc_elf_append_rela): Assert that there is enough room in section.
1771 (_bfd_sparc_elf_copy_indirect_symbol): Fix formatting.
1772 (_bfd_sparc_elf_adjust_dynamic_symbol): Minor tweak.
1773 (allocate_dynrelocs): Remove outdated comments and reorder conditions.
1774 For a symbol subject to a GOT relocation, reserve a slot in the
1775 relocation section if the symbol isn't dynamic and we are in PIC mode.
1776 (_bfd_sparc_elf_relocate_section) <R_SPARC_GOTDATA_OP>: If relocation
1777 is relaxed and a slot was reserved, generate a R_SPARC_NONE relocation.
1778 <R_SPARC_GOTDATA_OP_HIX22>: Adjust comments.
1779 <R_SPARC_PC10>: Reorder conditions. Remove always-false assertion.
1780 (_bfd_sparc_elf_finish_dynamic_symbol): Rename local_undefweak into
1781 resolved_to_zero. Do not generate a dynamic GOT relocation for an
1782 undefined weak symbol with non-default visibility. Remove superfluous
1783 'else' and fix formatting.
1784
1785 2018-02-09 H.J. Lu <hongjiu.lu@intel.com>
1786
1787 * elf32-i386.c (elf_i386_get_synthetic_symtab): Also handle
1788 is_solaris.
1789 (i386_elf32_sol2_vec): Don't declare.
1790 (elf_i386_link_setup_gnu_properties): Also handle is_solaris.
1791 Don't set need_global_offset_table.
1792 (elf_i386_solaris_arch_bed): New.
1793 (elf_backend_arch_data): Set to elf_i386_solaris_arch_bed for
1794 Solaris.
1795 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Check
1796 target_os != is_nacl instead of target_os == is_normal.
1797 (x86_64_elf64_sol2_vec): Don't declare.
1798 (elf_x86_64_link_setup_gnu_properties): Check target_os !=
1799 is_nacl instead of target_os == is_normal. Don't set
1800 need_global_offset_table.
1801 (elf_x86_64_solaris_arch_bed): New.
1802 (elf_backend_arch_data): Set to elf_x86_64_solaris_arch_bed for
1803 Solaris.
1804 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Keep
1805 _GLOBAL_OFFSET_TABLE_ for Solaris.
1806 (_bfd_x86_elf_link_setup_gnu_properties): Don't copy
1807 need_global_offset_table.
1808 * elfxx-x86.h (elf_x86_target_os): Add is_solaris.
1809 (elf_x86_link_hash_table): Remove need_global_offset_table.
1810 (elf_x86_init_table): Likewise.
1811
1812 2018-02-08 H.J. Lu <hongjiu.lu@intel.com>
1813
1814 * elf32-i386.c (elf32_i386_copy_solaris_special_section_fields):
1815 Remove prototype.
1816 (i386_elf32_sol2_vec): Declared.
1817 (elf_i386_link_setup_gnu_properties): Set
1818 need_global_offset_table with info->output_bfd->xvec.
1819 * elf64-x86-64.c (elf64_x86_64_copy_solaris_special_section_fields):
1820 Remove prototype.
1821 (x86_64_elf64_sol2_vec): Declared.
1822 (elf_x86_64_link_setup_gnu_properties): Set
1823 need_global_offset_table with info->output_bfd->xvec.
1824
1825 2018-02-08 H.J. Lu <hongjiu.lu@intel.com>
1826
1827 * elf32-i386.c (elf32_i386_copy_solaris_special_section_fields):
1828 New prototype.
1829 (elf_i386_link_setup_gnu_properties): Set need_global_offset_table
1830 for Solaris.
1831 * elf64-x86-64.c (elf64_x86_64_copy_solaris_special_section_fields):
1832 New prototype.
1833 (elf_x86_64_link_setup_gnu_properties): Set
1834 need_global_offset_table for Solaris.
1835 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Keep the
1836 unused _GLOBAL_OFFSET_TABLE_ for Solaris.
1837 (_bfd_x86_elf_link_setup_gnu_properties): Copy
1838 need_global_offset_table.
1839 * elfxx-x86.h (elf_x86_link_hash_table): Add
1840 need_global_offset_table.
1841 (elf_x86_init_table): Likewise.
1842
1843 2018-02-08 Jim Wilson <jimw@sifive.com>
1844
1845 * elfnn-riscv.c (riscv_elf_relocate_section): Add comment for previous
1846 change.
1847
1848 2018-02-08 Nick Clifton <nickc@redhat.com>
1849
1850 PR 22788
1851 * elf.c (elf_parse_notes): Reject notes with excessuively large
1852 alignments.
1853
1854 2018-02-07 Alan Modra <amodra@gmail.com>
1855
1856 Revert 2018-01-17 Alan Modra <amodra@gmail.com>
1857 * elf32-ppc.c: Remove speculation barrier support.
1858 * elf32-ppc.h: Likewise.
1859 * elf64-ppc.c: Likewise.
1860 * elf64-ppc.h: Likewise.
1861
1862 2018-02-06 Jim Wilson <jimw@sifive.com>
1863
1864 * elfnn-riscv.c (riscv_elf_relocate_section): Return TRUE if used
1865 callback to report an error.
1866
1867 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
1868
1869 PR ld/22263
1870 * elfxx-sparc.c (sparc_elf_tls_transition): Turn call to bfd_link_pic
1871 into call to !bfd_link_executable and tidy up.
1872 (_bfd_sparc_elf_check_relocs): Fix formatting and tidy up.
1873 <R_SPARC_TLS_LE_HIX22>: Turn call to bfd_link_pic into call to
1874 !bfd_link_executable.
1875 <R_SPARC_TLS_IE_HI22>: Likewise.
1876 <GOT relocations>: Remove useless code, tidy and merge related blocks.
1877 <R_SPARC_TLS_GD_CALL>: Turn call to bfd_link_pic into call to
1878 !bfd_link_executable.
1879 <R_SPARC_WPLT30>: Tidy up.
1880 (_bfd_sparc_elf_gc_mark_hook): Turn call to bfd_link_pic into call to
1881 !bfd_link_executable.
1882 (allocate_dynrelocs): Likewise.
1883 (_bfd_sparc_elf_relocate_section): Fix formatting and tidy up.
1884 <R_SPARC_TLS_GD_HI22>: Merge into...
1885 <R_SPARC_TLS_GD_LO10>: ...this. Adjust 4th argument in call to
1886 sparc_elf_tls_transition and remove redundant code.
1887 <R_SPARC_TLS_LDM_HI22>: Turn call to bfd_link_pic into call to
1888 !bfd_link_executable.
1889 <R_SPARC_TLS_LDO_HIX22>: Likewise.
1890 <R_SPARC_TLS_LE_HIX22>: Likewise. Tidy up.
1891 <R_SPARC_TLS_LDM_CALL>: Likewise.
1892 <R_SPARC_TLS_GD_CALL>: Likewise. Tidy up.
1893 <R_SPARC_TLS_GD_ADD>: Likewise.
1894 <R_SPARC_TLS_LDM_ADD>: Likewise.
1895 <R_SPARC_TLS_LDO_ADD>: Likewise.
1896 <R_SPARC_TLS_IE_LD>: Likewise.
1897
1898 2018-02-06 Miloš Stojanović <milos.stojanovic@rt-rk.com>
1899
1900 PR 22789
1901 * elfxx-mips.c (_bfd_mips_elf_find_nearest_line): If the dwarf
1902 functions failed to find the function name, try the generic elf
1903 find function instead.
1904
1905 2018-02-06 Sergio Durigan Junior <sergiodj@redhat.com>
1906
1907 * coff-rs6000.c (xcoff_write_archive_contents_old): Use
1908 'memcpy' instead of 'strncpy' when writing the magic number.
1909
1910 2018-02-06 Nick Clifton <nickc@redhat.com>
1911
1912 PR 22794
1913 * opncls.c (bfd_get_debug_link_info_1): Check the size of the
1914 section before attempting to read it in.
1915 (bfd_get_alt_debug_link_info): Likewise.
1916
1917 2018-02-06 Paul Carroll <pcarroll@codesourcery.com>
1918
1919 * bfd/dwarf2.c (find_abstract_name): Modified to return file and
1920 line information in addition to name, if they can be found.
1921
1922 2018-02-05 Renlin Li <renlin.li@arm.com>
1923
1924 PR ld/22764
1925 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Relax the
1926 R_AARCH64_ABS32 and R_AARCH64_ABS16 for absolute symbol. Apply the
1927 check for writeable section as well.
1928
1929 2018-02-05 H.J. Lu <hongjiu.lu@intel.com>
1930
1931 PR ld/22782
1932 * elf32-i386.c (elf_i386_check_relocs): Set got_referenced if
1933 _GLOBAL_OFFSET_TABLE_ is referenced or GOT is needed to resolve
1934 undefined weak symbol to 0.
1935 * elf64-x86-64.c (elf_x86_64_check_relocs): Set got_referenced
1936 if _GLOBAL_OFFSET_TABLE_ is referenced.
1937 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Check
1938 got_referenced instead of ref_regular_nonweak. Remove the
1939 unused _GLOBAL_OFFSET_TABLE_ from symbol table.
1940 * elfxx-x86.h (elf_x86_link_hash_table): Add got_referenced.
1941
1942 2018-02-05 Maciej W. Rozycki <macro@mips.com>
1943
1944 * elfnn-riscv.c (_bfd_riscv_relax_pc): Use `memset' to
1945 initialize `hi_reloc'.
1946
1947 2018-02-05 Maciej W. Rozycki <macro@mips.com>
1948
1949 * elfxx-mips.c (_bfd_mips_elf_section_processing): For
1950 SHT_MIPS_REGINFO sections don't assert the correct size and
1951 report an error instead.
1952
1953 2018-02-05 Maciej W. Rozycki <macro@mips.com>
1954
1955 * elf.c (_bfd_elf_write_object_contents): Propagate a failure
1956 status from `->elf_backend_section_processing'.
1957
1958 2018-02-02 Jim Wilson <jimw@sifive.com>
1959
1960 PR ld/22756
1961 * elfnn-riscv.c (riscv_relax_delete_bytes): New parameter link_info.
1962 If link_info->wrap_hash, check for a duplicate symbol and ignore.
1963 (_bfd_riscv_relax_call, bfd_riscv_relax_lui, _bfd_riscv_relax_tls_le):
1964 Pass new argument to riscv_relax_delete_bytes.
1965 (_bfd_riscv_relax_align, _bfd_riscv_relax_delete): Likewise. Remove
1966 ATTRIBUTE_UNUSED from link_info parameter.
1967
1968 2018-02-02 Alan Modra <amodra@gmail.com>
1969
1970 * elf64-ppc.c (ppc64_elf_relocate_section): Don't relocate nops
1971 emitted for toc sequence optimization. Set and use "howto" later.
1972
1973 2018-02-01 Simon Marchi <simon.marchi@ericsson.com>
1974
1975 * elf64-ppc.c (ppc64_elf_archive_symbol_lookup): Avoid pointer
1976 arithmetic on NULL pointer.
1977 * elflink.c (_bfd_elf_archive_symbol_lookup,
1978 elf_link_add_archive_symbols): Likewise.
1979
1980 2018-01-31 Michael Matz <matz@suse.de>
1981
1982 * elflink.c (bfd_elf_define_start_stop): Fix check of
1983 def_dynamic.
1984
1985 2018-01-31 H.J. Lu <hongjiu.lu@intel.com>
1986
1987 PR ld/21964
1988 * elflink.c (bfd_elf_define_start_stop): Check if __start and
1989 __stop symbols are referenced by shared objects.
1990
1991 2018-01-30 Alan Modra <amodra@gmail.com>
1992
1993 PR 22758
1994 * elf.c (_bfd_elf_map_sections_to_segments): Don't start a new
1995 segment when demand paged with lma on the same page. Test this
1996 before load/non-load, executable/non-executable,
1997 writable/non-writable tests and simplify. Delete bogus relro
1998 condition in writable/non-writable test. Delete outdated
1999 comment. Formatting.
2000
2001 2018-01-30 Alan Modra <amodra@gmail.com>
2002
2003 * elflink.c (bfd_elf_define_start_stop): Make __start and __stop
2004 symbols dynamic.
2005
2006 2018-01-29 Alan Modra <amodra@gmail.com>
2007
2008 PR 22741
2009 * coffgen.c (coff_pointerize_aux): Ensure auxent tagndx is in
2010 range before converting to a symbol table pointer.
2011
2012 2018-01-27 Nick Clifton <nickc@redhat.com>
2013
2014 * po/ru.po: Updated Russian translation.
2015
2016 2018-01-26 Alan Modra <amodra@gmail.com>
2017
2018 * elflink.c (bfd_elf_define_start_stop): Override symbols when
2019 they are defined dynamically.
2020
2021 2018-01-26 Alan Modra <amodra@gmail.com>
2022
2023 * elf64-ppc.c (ppc64_elf_size_stubs): Iterate sizing when
2024 .branch_lt changes size.
2025
2026 2018-01-25 Alan Modra <amodra@gmail.com>
2027
2028 PR 22746
2029 * elfcode.h (elf_object_p): Avoid integer overflow.
2030
2031 2018-01-25 Eric Botcazou <ebotcazou@adacore.com>
2032
2033 PR ld/22727
2034 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs) <R_SPARC_TLS_GD_CALL>:
2035 Do a mere lookup of the __tls_get_addr symbol instead of adding it.
2036
2037 Revert
2038 2017-10-19 H.J. Lu <hongjiu.lu@intel.com>
2039
2040 PR ld/22263
2041 * elfxx-sparc.c (sparc_elf_tls_transition): Replace
2042 bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
2043 bfd_link_executable for TLS check.
2044 (_bfd_sparc_elf_check_relocs): Likewise.
2045 (allocate_dynrelocs): Likewise.
2046 (_bfd_sparc_elf_relocate_section): Likewise.
2047
2048 2018-01-24 Renlin Li <renlin.li@arm.com>
2049
2050 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Add support for
2051 BFD_RELOC_AARCH64_MOVW_PREL_G0, BFD_RELOC_AARCH64_MOVW_PREL_G0_NC,
2052 BFD_RELOC_AARCH64_MOVW_PREL_G1, BFD_RELOC_AARCH64_MOVW_PREL_G1_NC,
2053 BFD_RELOC_AARCH64_MOVW_PREL_G2, BFD_RELOC_AARCH64_MOVW_PREL_G2_NC,
2054 BFD_RELOC_AARCH64_MOVW_PREL_G3.
2055 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
2056 (_bfd_aarch64_elf_resolve_relocation): Likewise.
2057
2058 2018-01-24 Renlin Li <renlin.li@arm.com>
2059
2060 * reloc.c: Add BFD_RELOC_AARCH64_MOVW_PREL_G0,
2061 BFD_RELOC_AARCH64_MOVW_PREL_G0_NC, BFD_RELOC_AARCH64_MOVW_PREL_G1,
2062 BFD_RELOC_AARCH64_MOVW_PREL_G1_NC, BFD_RELOC_AARCH64_MOVW_PREL_G2,
2063 BFD_RELOC_AARCH64_MOVW_PREL_G2_NC, BFD_RELOC_AARCH64_MOVW_PREL_G3.
2064 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Add entries for
2065 BFD_RELOC_AARCH64_MOVW_PREL_G0, BFD_RELOC_AARCH64_MOVW_PREL_G0_NC,
2066 BFD_RELOC_AARCH64_MOVW_PREL_G1, BFD_RELOC_AARCH64_MOVW_PREL_G1_NC,
2067 BFD_RELOC_AARCH64_MOVW_PREL_G2, BFD_RELOC_AARCH64_MOVW_PREL_G2_NC,
2068 BFD_RELOC_AARCH64_MOVW_PREL_G3.
2069 * bfd-in2.h: Regenerate.
2070 * libbfd.h: Regenerate.
2071
2072 2018-01-23 Maciej W. Rozycki <macro@mips.com>
2073
2074 * elfxx-mips.c (_bfd_mips_elf_final_link): Update a stale
2075 `mips_elf32_section_processing' comment reference.
2076
2077 2018-01-20 H.J. Lu <hongjiu.lu@intel.com>
2078
2079 PR ld/22721
2080 * elfxx-x86.c (_bfd_x86_elf_link_check_relocs): Check the
2081 versioned __tls_get_addr symbol.
2082
2083 2018-01-19 Nick Clifton <nickc@redhat.com>
2084
2085 * po/fr.po: Updated French translation.
2086
2087 2018-01-18 Alan Modra <amodra@gmail.com>
2088
2089 * elf32-ppc.c (ppc_elf_create_glink): Correct alignment of .glink.
2090 * elf64-ppc.c (ppc64_elf_size_stubs): Handle negative plt_stub_align.
2091 (ppc64_elf_build_stubs): Likewise.
2092
2093 2018-01-17 Nick Clifton <nickc@redhat.com>
2094
2095 * po/ru.po: Updated Russian translation.
2096 * po/uk/po: Updated Ukranian translation.
2097
2098 2018-01-17 Alan Modra <amodra@gmail.com>
2099
2100 * elf64-ppc.c (ppc64_elf_build_stubs): Silence gcc warning.
2101
2102 2018-01-17 Alan Modra <amodra@gmail.com>
2103
2104 * elf32-ppc.c (GLINK_ENTRY_SIZE): Handle speculation barrier.
2105 (CRSETEQ, BEQCTRM): Define.
2106 (is_nonpic_glink_stub): Don't check bctr.
2107 (ppc_elf_link_hash_table_create): Init new ppc_elf_params field.
2108 (ppc_elf_relax_section): Size speculation barrier.
2109 (output_bctr): New function.
2110 (write_glink_stub): Use output_bctr.
2111 (ppc_elf_relocate_section): Use output_bctr for long branch stub.
2112 (ppc_elf_finish_dynamic_symbol): Likewise.
2113 (ppc_elf_finish_dynamic_sections): Use output_bctr.
2114 * elf32-ppc.h (struct ppc_elf_params): Add speculate_indirect_jumps.
2115 * elf64-ppc.c (CRSETEQ, BEQCTRM, BEQCTRLM): Define.
2116 (GLINK_PLTRESOLVE_SIZE): Size speculation barrier.
2117 (size_global_entry_stubs): Handle speculation barrier sizing.
2118 (plt_stub_size): Likewise.
2119 (output_bctr): New function.
2120 (build_plt_stub, build_tls_get_addr_stub): Output speculation
2121 barrier.
2122 (ppc_build_one_stub): Likewise for ppc_stub_plt_branch.
2123 (ppc_size_one_stub): Size speculation barrier in ppc_stub_plt_branch.
2124 (build_global_entry_stubs): Output speculation barrier.
2125 (ppc64_elf_build_stubs): Likewise in __glink_PLTresolve stub.
2126 * elf64-ppc.h (struct ppc64_elf_params): Add speculate_indirect_jumps.
2127
2128 2018-01-17 Alan Modra <amodra@gmail.com>
2129
2130 * elf32-ppc.c (GLINK_ENTRY_SIZE): Add parameters, handle
2131 __tls_get_addr_opt, and alignment sizing.
2132 (TLS_GET_ADDR_GLINK_SIZE): Delete.
2133 (is_nonpic_glink_stub): Don't use GLINK_ENTRY_SIZE.
2134 (ppc_elf_get_synthetic_symtab): Recognize stubs spaced at 4, 6,
2135 or 8 insns.
2136 (ppc_elf_link_hash_table_create): Init new ppc_elf_params field.
2137 (allocate_dynrelocs): Use new GLINK_ENTRY_SIZE.
2138 (ppc_elf_size_dynamic_sections): Likewise. Size branch table
2139 by PLT reloc count.
2140 (write_glink_stub): Handle __tls_get_addr_opt stub.
2141 Pad out to size given by GLINK_ENTRY_SIZE.
2142 (ppc_elf_relocate_section): Adjust write_glink_stub call.
2143 (ppc_elf_finish_dynamic_symbol): Likewise.
2144 (ppc_elf_finish_dynamic_sections): Write PLTresolve without using
2145 insn array since so many need rewriting.
2146 * elf32-ppc.h (struct ppc_elf_params): Add plt_stub_align.
2147 * elf64-ppc.c (GLINK_PLTRESOLVE_SIZE): Rename from
2148 GLINK_CALL_STUB_SIZE. Add htab param and evaluate to size without
2149 nops. Adjust all uses.
2150 (ppc64_elf_get_synthetic_symtab): Don't use GLINK_CALL_STUB_SIZE
2151 in glink_vma calculation.
2152 (struct ppc_link_hash_table): Add global_entry section pointer.
2153 (create_linkage_sections): Create separate section for global
2154 entry stubs.
2155 (PPC_LO, PPC_HI, PPC_HA): Move earlier.
2156 (size_global_entry_stubs): Handle sizing for aligned stubs.
2157 (ppc64_elf_size_dynamic_sections): Handle global_entry alloc,
2158 and don't stash end of glink branch table in rawsize.
2159 (ppc_build_one_stub): Rewrite stub size calculations.
2160 (build_global_entry_stubs): Use new section.
2161 (ppc64_elf_build_stubs): Don't pad __glink_PLTresolve with nops.
2162 Build lazy link stubs out to end of section. Build global entry
2163 stubs in new section.
2164
2165 2018-01-15 Nick Clifton <nickc@redhat.com>
2166
2167 * po/uk.po: Updated Ukranian translation.
2168
2169 2018-01-13 Nick Clifton <nickc@redhat.com>
2170
2171 * po/bfd.pot: Regenerated.
2172
2173 2018-01-13 Nick Clifton <nickc@redhat.com>
2174
2175 * version.m4: Bump version to 2.30.51
2176 * configure: Regenerate.
2177
2178 2018-01-13 Nick Clifton <nickc@redhat.com>
2179
2180 2.30 branch created.
2181
2182 2018-01-12 Jens Widell <jl@opera.com>
2183
2184 * elf.c (setup_group): Optimize search for group by remembering
2185 last found group and restarting search at that index.
2186 * elf-bfd.h (struct elf_obj_tdata): Add group_search_offset field.
2187
2188 2018-01-12 Gunther Nikl <gnikl@users.sourceforge.net>
2189
2190 * aoutx.h (aout_link_check_ar_symbols): Remove default and handle
2191 bfd_link_common_skip_none in switch.
2192
2193 2018-01-12 Alan Modra <amodra@gmail.com>
2194
2195 PR ld/22649
2196 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Ignore dynamic
2197 references on forced local symbols.
2198
2199 2018-01-12 Vlad Ivanov <vlad@ivanov.email>
2200
2201 * elfxx-mips.c (_bfd_mips_elf_final_link): Notify user when
2202 .reginfo section has wrong size.
2203
2204 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
2205
2206 PR ld/22393
2207 * elf.c (_bfd_elf_map_sections_to_segments): When generating
2208 separate code and read-only data LOAD segments, create a new
2209 LOAD segment if the previous section contains text and the
2210 current section doesn't or vice versa. Don't put a writable
2211 section in a read-only segment if there is a RELRO segment.
2212
2213 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
2214
2215 PR ld/22649
2216 * elflink.c (bfd_elf_gc_mark_dynamic_ref_symbol): Ignore dynamic
2217 references on forced local symbols.
2218
2219 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
2220
2221 PR ld/22677
2222 * elflink.c (bfd_elf_gc_sections): Keep all PREINIT_ARRAY,
2223 INIT_ARRAY as well as FINI_ARRAY sections for ld -r --gc-section.
2224
2225 2018-01-09 Kuan-Lin Chen <kuanlinchentw@gmail.com>
2226
2227 PR 22662
2228 * elf32-nds32.c (nds32_elf_relax_loadstore): Fix a typographical error.
2229
2230 2018-01-03 John Baldwin <jhb@FreeBSD.org>
2231
2232 * elf.c (elfcore_grok_freebsd_note): Handle
2233 NT_FREEBSD_PROCSTAT_PROC, NT_FREEBSD_PROCSTAT_FILES, and
2234 NT_FREEBSD_PROCSTAT_VMMAP.
2235
2236 2018-01-03 Alan Modra <amodra@gmail.com>
2237
2238 Update year range in copyright notice of all files.
2239
2240 For older changes see ChangeLog-2017
2241 \f
2242 Copyright (C) 2018 Free Software Foundation, Inc.
2243
2244 Copying and distribution of this file, with or without modification,
2245 are permitted in any medium without royalty provided the copyright
2246 notice and this notice are preserved.
2247
2248 Local Variables:
2249 mode: change-log
2250 left-margin: 8
2251 fill-column: 74
2252 version-control: never
2253 End:
This page took 0.096583 seconds and 5 git commands to generate.