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