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