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