__tls_get_addr_opt stubs and tocsave optimization
[external/binutils.git] / bfd / ChangeLog
1 2018-08-07  Alan Modra  <amodra@gmail.com>
2
3         * elf64-ppc.c (ppc64_elf_relocate_section): Don't skip first
4         instruction of __tls_get_addr_opt stub.
5         (plt_stub_size): Omit ALWAYS_EMIT_R2SAVE condition when
6         dealing with __tls_get_addr_opt stub.
7         (build_tls_get_addr_stub, ppc_size_one_stub): Likewise.
8
9 2018-08-06  Claudiu Zissulescu  <claziss@synopsys.com>
10
11         * elf32-arc.c (arc_elf_merge_private_bfd_data): Complain about
12         efalgs only when in/out exists.
13         (elf32_arc_section_from_shdr): Don't complain about 0x0c
14         section type.  It is mwdt compiler specific.
15
16 2018-08-06  Claudiu Zissulescu  <claziss@synopsys.com>
17
18         * elf32-arc.c (arc_elf_merge_attributes): Fix merge attributes.
19
20 2018-08-06  Claudiu Zissulescu  <claziss@synopsys.com>
21
22         * elf32-arc.c (arc_elf_merge_attributes): Handle
23         Tag_ARC_ATR_version.
24
25 2018-08-05  Alan Modra  <amodra@gmail.com>
26
27         * elf64-ppc.c (ADDI_R12_R11, ADDI_R12_R12, LIS_R12),
28         (ADDIS_R12_R11, ORIS_R12_R12_0, ORI_R12_R12_0),
29         (SLDI_R12_R12_32, LDX_R12_R11_R12, ADD_R12_R11_R12): Define.
30         (ppc64_elf_howto_raw): Add R_PPC64_REL24_NOTOC entry.
31         (ppc64_elf_reloc_type_lookup): Support R_PPC64_REL24_NOTOC.
32         (ppc_stub_type): Add ppc_stub_long_branch_notoc,
33         ppc_stub_long_branch_both, ppc_stub_plt_branch_notoc,
34         ppc_stub_plt_branch_both, ppc_stub_plt_call_notoc, and
35         ppc_stub_plt_call_both.
36         (is_branch_reloc): Add R_PPC64_REL24_NOTOC.
37         (build_offset, size_offset): New functions.
38         (plt_stub_size): Support plt_call_notoc and plt_call_both.
39         (ppc_build_one_stub, ppc_size_one_stub): Support new stubs.
40         (toc_adjusting_stub_needed): Handle R_PPC64_REL24_NOTOC.
41         (ppc64_elf_size_stubs): Likewise, and new stubs.
42         (ppc64_elf_build_stubs, ppc64_elf_relocate_section): Likewise.
43         * reloc.c: Add BFD_RELOC_PPC64_REL24_NOTOC.
44         * bfd-in2.h: Regenerate.
45         * libbfd.h: Regenerate.
46
47 2018-08-05  Alan Modra  <amodra@gmail.com>
48
49         * elf64-ppc.c (ppc_build_one_stub): Lose "_r2off" in stub symbols.
50
51 2018-08-02  Jim Wilson  <jimw@sifive.com>
52
53         * elfnn-riscv.c (riscv_elf_create_dynamic_sections): For .tdata.dyn,
54         add SEC_LINKER_CREATED flag.
55
56 2018-08-01  Nick Clifton  <nickc@redhat.com>
57
58         * coff-rs6000.c (_bfd_xcoff_put_ldsymbol_name): Suppress warnings
59         about potentially truncated strncpy operations.
60         (_bfd_xcoff_put_symbol_name): Likewise.
61
62         * elf32-avr.c (avr_stub_name): Check for a NULL return from
63         bfd_malloc.
64
65 2018-08-01  Zenith  <zenith432@users.sourceforge.net>
66
67         PR 23460
68         * plugin.c (bfd_plugin_open_input): Close file descriptor if the
69         call to fstat fails.
70         (try_claim): Always close the file descriptor at the end of the
71         function.
72         (try_load_plugin): If a plugin has already been registered, then
73         skip the dlopen and onload steps and go straight to claiming the
74         file.  If these is an error, close the plugin.
75
76 2018-08-01  Alan Modra  <amodra@gmail.com>
77
78         * elf64-ppc.c (plt_stub_pad): Delay plt_stub_size call until needed.
79         (ppc_build_one_stub): Don't set stub_offset, instead assert that
80         it is sane.  Don't adjust stub_offset for alignment.  Adjust size
81         calculation.  Use "targ" temp when calculating offsets.
82         (ppc_size_one_stub): Set stub_offset here.  Use "targ" temp when
83         calculating offsets.  Adjust for alignment before setting
84         tls_get_addr_opt_bctrl.
85
86 2018-08-01  Alan Modra  <amodra@gmail.com>
87
88         * po/SRC-POTFILES.in: Regenerate.
89
90 2018-07-30  Nick Clifton  <nickc@redhat.com>
91
92         PR 22706
93         * elf32-sh.c (sh_elf_relocate_section): When processing
94         translation relocs, fail if the relocation offset is too small.
95         Replace BFD_ASSERTs with more helpful error messages.
96
97 2018-07-30  Andrew Jenner  <andrew@codesourcery.com>
98
99         * Makefile.am (ALL_MACHINES, ALL_MACHINES_CFILES): Add C-SKY.
100         (BFD32_BACKENDS, BFD_BACKENDS_CFILES): Likewise.
101         * Makefile.in: Regenerated.
102         * archures.c (enum bfd_architecture): Add bfd_arch_csky and
103         related bfd_mach defines.
104         (bfd_csky_arch): Declare.
105         (bfd_archures_list): Add C-SKY.
106         * bfd-in.h (elf32_csky_build_stubs): Declare.
107         (elf32_csky_size_stubs): Declare.
108         (elf32_csky_next_input_section: Declare.
109         (elf32_csky_setup_section_lists): Declare.
110         * bfd-in2.h: Regenerated.
111         * config.bfd: Add C-SKY.
112         * configure.ac: Likewise.
113         * configure: Regenerated.
114         * cpu-csky.c: New file.
115         * elf-bfd.h (enum elf_target_id): Add C-SKY.
116         * elf32-csky.c: New file.
117         * libbfd.h: Regenerated.
118         * reloc.c: Add C-SKY relocations.
119         * targets.c (csky_elf32_be_vec, csky_elf32_le_vec): Declare.
120         (_bfd_target_vector): Add C-SKY target vector entries.
121
122 2018-07-27  John Darrington  <john@darrington.wattle.id.au>
123
124         * elf32-s12z.c (ELF_TARGET_ID): Don't define.
125
126 2018-07-27  John Darrington  <john@darrington.wattle.id.au>
127
128         * libbfd.c (bfd_getb24, bfd_getl24): New functions.
129         (bfd_get_24, bfd_put_24): New macros.
130         * bfd-in2.h: Regenerate.
131
132 2018-07-27  John Darrington  <john@darrington.wattle.id.au>
133
134         * elf32-s12z.c (s12z_elf_set_mach_from_flags): Remove comment.
135
136 2018-07-26  Alan Modra  <amodra@gmail.com>
137
138         * elf64-ppc.c (ppc64_elf_size_stubs): Use a ppc_stub_long_branch_r2off
139         for calls to symbols with STO_PPC64_LOCAL_MASK bits set to 1.
140
141 2018-07-25  Alan Modra  <amodra@gmail.com>
142
143         * elf32-ppc.c (ppc_elf_relax_section): Ignore common or undef locals.
144         Avoid trashing toff with added when used as a symbol index.
145         Ignore R_PPC_PLTREL24 addends in unused example code.  Avoid
146         creating unnecessary fixups when relocatable.
147
148 2018-07-25  Alan Modra  <amodra@gmail.com>
149
150         * elf32-arm.c (elf32_arm_nabi_write_core_note): Disable
151         -Wstringop-truncation warning for gcc-8.0 too.
152         * elf32-ppc.c (ppc_elf_write_core_note): Likewise.
153         * elf64-ppc.c (ppc64_elf_write_core_note): Likewise.
154         * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewise.
155         * elf32-s390.c (elf_s390_write_core_note): Comment fix.
156         * elf64-s390.c (elf_s390_write_core_note): Likewise.
157
158 2018-07-24  Alan Modra  <amodra@gmail.com>
159
160         PR 23430
161         * dwarf2.c (dwarf_debug_section_enum): Fix comment typo.
162         * elf.c (bfd_section_from_shdr, elf_sort_sections): Likewise.
163
164 2018-07-23  Max Filippov  <jcmvbkbc@gmail.com>
165
166         * elf32-xtensa.c (elf_xtensa_finish_dynamic_sections): Move
167         relocation sections consistency check to always check both
168         .rela.dyn and .rela.plt when they exist. Rearrange variable
169         definition and assignment places.
170
171 2018-07-23  Max Filippov  <jcmvbkbc@gmail.com>
172
173         * elf32-xtensa.c (shrink_dynamic_reloc_sections): Shrink dynamic
174         relocations section for dynamic undefined weak symbols when
175         linking a shared object.
176
177 2018-07-23  Tom Tromey  <tom@tromey.com>
178
179         * elf.c (bfd_get_elf_phdrs): Don't call memcpy with size 0.
180
181 2018-07-21  Eric Botcazou  <ebotcazou@adacore.com>
182
183         * elf32-arm.c (elf32_arm_final_link_relocate) <R_ARM_GOT32>: Small
184         cleanup for the case of a global symbol that binds locally.  Also
185         install a value in the GOT slot in the case of a local symbol in
186         a non-PIC link.
187
188 2018-07-20  H.J. Lu  <hongjiu.lu@intel.com>
189
190         PR ld/23428
191         * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): If the
192         separate code program header is needed, make sure that the first
193         read-only PT_LOAD segment has no code by adding a
194         GNU_PROPERTY_X86_ISA_1_USED note.
195
196 2018-07-20  Chenghua Xu  <paul.hua.gm@gmail.com>
197             Maciej W. Rozycki  <macro@mips.com>
198
199         * elfxx-mips.c (print_mips_ases): Add MMI extension.
200
201 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
202
203         * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Do not
204         create DT_REL, DT_RELSZ or DT_RELENT dynamic entries if the
205         dynamic relocation section will be discarded from output.
206         (_bfd_mips_elf_finish_dynamic_sections) <DT_RELSZ>: Assert that
207         the dynamic relocation section will be retained in output.
208
209 2018-07-18  Maciej W. Rozycki  <macro@mips.com>
210
211         * xcofflink.c (xcoff_write_global_symbol): Fix symbol type
212         checks for defined weak symbols.
213
214 2018-07-17  Maciej W. Rozycki  <macro@mips.com>
215
216         * elf32-nds32.c (nds32_elf_relax_loadstore): Use
217         `bfd_is_abs_symbol' rather than `bfd_is_abs_section' in checking
218         whether the symbol is absolute.
219         (nds32_elf_relax_lo12): Likewise.
220         * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
221         (elfNN_aarch64_check_relocs): Likewise.
222         * xcofflink.c (xcoff_need_ldrel_p): Likewise.
223         (bfd_xcoff_import_symbol): Likewise.
224         (xcoff_write_global_symbol): Likewise.
225
226 2018-07-17  Maciej W. Rozycki  <macro@mips.com>
227
228         * linker.c (bfd_is_abs_symbol): New macro.
229         * bfd-in2.h: Regenerate.
230
231 2018-07-16  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
232
233         * elf-bfd.h (elfcore_write_ppc_tar): Add prototype.
234         (elfcore_write_ppc_ppr): Likewise.
235         (elfcore_write_ppc_dscr): Likewise.
236         (elfcore_write_ppc_ebb): Likewise.
237         (elfcore_write_ppc_pmu): Likewise.
238         (elfcore_write_ppc_tm_cgpr): Likewise.
239         (elfcore_write_ppc_tm_cfpr): Likewise.
240         (elfcore_write_ppc_tm_cvmx): Likewise.
241         (elfcore_write_ppc_tm_cvsx): Likewise.
242         (elfcore_write_ppc_tm_spr): Likewise.
243         (elfcore_write_ppc_tm_ctar): Likewise.
244         (elfcore_write_ppc_tm_cppr): Likewise.
245         (elfcore_write_ppc_tm_cdscr): Likewise.
246         * elf.c (elfcore_write_ppc_tar): New function.
247         (elfcore_write_ppc_ppr): Likewise.
248         (elfcore_write_ppc_dscr): Likewise.
249         (elfcore_write_ppc_ebb): Likewise.
250         (elfcore_write_ppc_pmu): Likewise.
251         (elfcore_write_ppc_tm_cgpr): Likewise.
252         (elfcore_write_ppc_tm_cfpr): Likewise.
253         (elfcore_write_ppc_tm_cvmx): Likewise.
254         (elfcore_write_ppc_tm_cvsx): Likewise.
255         (elfcore_write_ppc_tm_spr): Likewise.
256         (elfcore_write_ppc_tm_ctar): Likewise.
257         (elfcore_write_ppc_tm_cppr): Likewise.
258         (elfcore_write_ppc_tm_cdscr): Likewise.
259         (elfcore_write_register_note): Call them.
260         (elfcore_grok_ppc_tar): New function.
261         (elfcore_grok_ppc_ppr): Likewise.
262         (elfcore_grok_ppc_dscr): Likewise.
263         (elfcore_grok_ppc_ebb): Likewise.
264         (elfcore_grok_ppc_pmu): Likewise.
265         (elfcore_grok_ppc_tm_cgpr): Likewise.
266         (elfcore_grok_ppc_tm_cfpr): Likewise.
267         (elfcore_grok_ppc_tm_cvmx): Likewise.
268         (elfcore_grok_ppc_tm_cvsx): Likewise.
269         (elfcore_grok_ppc_tm_spr): Likewise.
270         (elfcore_grok_ppc_tm_ctar): Likewise.
271         (elfcore_grok_ppc_tm_cppr): Likewise.
272         (elfcore_grok_ppc_tm_cdscr): Likewise.
273         (elfcore_grok_note): Call them.
274
275 2018-07-11  Maciej W. Rozycki  <macro@mips.com>
276
277         * elfxx-mips.c (mips_tls_got_relocs): Use `bfd_link_dll' rather
278         than `!bfd_link_pic' in determining the dynamic symbol index.
279         Avoid the index of -1.
280         (mips_elf_initialize_tls_slots): Likewise.  Flatten code by
281         moving `dyn' to the beginning of the function block.
282
283 2018-07-11  Maciej W. Rozycki  <macro@mips.com>
284             Rich Felker  <bugdal@aerifal.cx>
285
286         PR ld/22570
287         * elfxx-mips.c (mips_tls_got_relocs): Use `bfd_link_dll' rather
288         than `bfd_link_pic' to determine whether dynamic relocations are
289         to be produced.
290         (mips_elf_initialize_tls_slots): Likewise.
291
292 2018-07-10  Maciej W. Rozycki  <macro@mips.com>
293
294         * elflink.c (bfd_elf_final_link): Rename `remove' local variable
295         to `remove_section'.
296
297 2018-07-10  Alan Modra  <amodra@gmail.com>
298
299         * elf32-xgate.h: Delete.
300         * elf32-xgate.c: Delete unnecessary forward declarations, add two
301         that are now needed.
302         (xgate_elf_bfd_link_hash_table_create)
303         (xgate_elf_bfd_link_hash_table_free)
304         (xgate_elf_set_mach_from_flags, struct xgate_scan_param)
305         (stub_hash_newfunc, elf32_xgate_add_symbol_hook)
306         (elf32_xgate_setup_section_lists, elf32_xgate_size_stubs)
307         (elf32_xgate_build_stubs, elf32_xgate_check_relocs)
308         (elf32_xgate_relocate_section, _bfd_xgate_elf_set_private_flags)
309         (elf32_xgate_post_process_headers): Delete.
310         (elf32_xgate_backend_symbol_processing): New function.
311         (xgate_elf_ignore_reloc, xgate_elf_special_reloc)
312         (_bfd_xgate_elf_print_private_bfd_data): Make static.
313         (ELF_TARGET_ID, elf_info_to_howto, elf_backend_check_relocs)
314         (elf_backend_relocate_section, elf_backend_object_p)
315         (elf_backend_final_write_processing, elf_backend_can_gc_sections)
316         (elf_backend_post_process_headers, elf_backend_add_symbol_hook)
317         (bfd_elf32_bfd_link_hash_table_create)
318         (bfd_elf32_bfd_set_private_flags)
319         (xgate_stub_hash_lookup): Don't define.
320         (elf_backend_symbol_processing): Define.
321         * elf-bfd.h (elf_target_id): Delete XGATE_ELF_DATA.
322
323 2018-07-09  Maciej W. Rozycki  <macro@mips.com>
324
325         * elfxx-mips.c (_bfd_mips_elf_adjust_dynamic_symbol): Don't set
326         `->needs_lazy_stub' if the stubs output section is the absolute
327         section.
328
329 2018-07-09  H.J. Lu  <hongjiu.lu@intel.com>
330
331         PR ld/23388
332         * configure.ac: Use changequote for "i[3-7]86-*-linux-*".
333         * configure: Regenerated.
334
335 2018-07-09  Alan Modra  <amodra@gmail.com>
336
337         * elf32-m68hc1x.c (elf32_m68hc11_post_process_headers): Call
338         _bfd_elf_post_process_headers.
339
340 2018-07-06  Max Filippov  <jcmvbkbc@gmail.com>
341
342         * elf32-xtensa.c (elf_xtensa_allocate_dynrelocs): Don't allocate
343         space for dynamic relocation for undefined weak symbol.
344         (elf_xtensa_relocate_section): Don't emit R_XTENSA_RELATIVE
345         relocation for undefined weak symbols.
346         (shrink_dynamic_reloc_sections): Don't shrink dynamic relocation
347         section for relocations against undefined weak symbols.
348
349 2018-07-06  Alan Hayward  <alan.hayward@arm.com>
350
351         * elf.c (elfcore_grok_aarch_sve): New function.
352         (elfcore_grok_note): Check for Aarch64 SVE.
353         (elfcore_write_aarch_sve): New function.
354         (elfcore_write_register_note): Check for Aarch64 SVE.
355         * elf-bfd.h(elfcore_grok_aarch_sve): New declaration.
356
357 2018-07-06  Alan Modra  <amodra@gmail.com>
358
359         * elf32-arm.c (elf32_arm_nabi_write_core_note): Don't use
360         DIAGNOTIC_PUSH and DIAGNOSTIC_POP unconditionally.
361         * elf32-ppc.c (ppc_elf_write_core_note): Likewise.
362         * elf32-s390.c (elf_s390_write_core_note): Likewise.
363         * elf64-ppc.c (ppc64_elf_write_core_note): Likewise.
364         * elf64-s390.c (elf_s390_write_core_note): Likewise.
365         * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewise.
366
367 2018-07-05  Jim Wilson  <jimw@sifive.com>
368
369         * config.bfd (riscv32*-*-*): Renamed from riscv32-*-*.
370         (riscv64*-*-*): Likewise.
371         (riscv-*-*): Add as an alias for riscv32*-*-*.
372
373 2018-07-05  H.J. Lu  <hongjiu.lu@intel.com>
374
375         PR ld/23372
376         * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Remove x86
377         ISA properties with empty bits.
378
379 2018-07-05  Nick Clifton  <nickc@redhat.com>
380
381         * po/ru.po: Updated Russian translation.
382
383 2018-07-05  Alan Modra  <amodra@gmail.com>
384
385         * elf-bfd.h (_bfd_elf_ppc_merge_fp_attributes): Update prototype.
386         * elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Return error
387         on mismatch.  Remove "warning: " from messages.  Track last bfd
388         used to set tags.
389         (ppc_elf_merge_obj_attributes): Likewise.  Handle status from
390         _bfd_elf_ppc_merge_fp_attributes.
391         * elf64-ppc.c (ppc64_elf_merge_private_bfd_data): Handle status
392         from _bfd_elf_ppc_merge_fp_attributes.
393
394 2018-07-04  H.J. Lu  <hongjiu.lu@intel.com>
395
396         * Makefile.am (bfdinclude_HEADERS): Add $(INCDIR)/diagnostics.h.
397         * Makefile.in: Regenerated.
398
399 2018-07-03  Alan Modra  <amodra@gmail.com>
400
401         * elflink.c (bfd_elf_final_link): Remove zero size .gnu.attributes
402         sections.
403
404 2018-07-03  Alan Modra  <amodra@gmail.com>
405
406         * elf-bfd.h (ATTR_TYPE_FLAG_ERROR, ATTR_TYPE_HAS_ERROR): Define.
407         * elf-attrs.c (is_default_attr): Handle ATTR_TYPE_HAS_ERROR.
408         * elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Use
409         ATTR_TYPE_FLAG_INT_VAL.  Set ATTR_TYPE_HAS_ERROR on finding
410         incompatible attribute.
411         (ppc_elf_merge_obj_attributes): Likewise.  Return
412         _bfd_elf_merge_object_attributes result.
413         * elf64-ppc.c (ppc64_elf_merge_private_bfd_data): Return
414         _bfd_elf_merge_object_attributes result.
415
416 2018-07-03  Alan Modra  <amodra@gmail.com>
417
418         PR 17550
419         * elflink.c (_bfd_elf_fix_symbol_flags): Hide dynamic symbols
420         in discarded sections.
421
422 2018-07-02  Maciej W. Rozycki  <macro@mips.com>
423
424         * elfxx-mips.c (_bfd_mips_elf_create_dynamic_sections): Set
425         `mark' for symbols created from `mips_elf_dynsym_rtproc_names'
426         list.
427
428 2018-07-02  Maciej W. Rozycki  <macro@mips.com>
429
430         * elf64-mips.c (micromips_elf64_howto_table_rel): Add
431         R_MICROMIPS_HI0_LO16, R_MICROMIPS_TLS_GD, R_MICROMIPS_TLS_LDM,
432         R_MICROMIPS_TLS_DTPREL_HI16, R_MICROMIPS_TLS_DTPREL_LO16,
433         R_MICROMIPS_TLS_GOTTPREL, R_MICROMIPS_TLS_TPREL_HI16,
434         R_MICROMIPS_TLS_TPREL_LO16, R_MICROMIPS_GPREL7_S2 and
435         R_MICROMIPS_PC23_S2 relocation entries.
436         (micromips_elf64_howto_table_rela): Likewise.
437         (micromips_reloc_map): Likewise.
438         * elfn32-mips.c (elf_micromips_howto_table_rel): Likewise.
439         (elf_micromips_howto_table_rela): Likewise.
440         (micromips_reloc_map): Likewise.
441
442 2018-07-02  H.J. Lu  <hongjiu.lu@intel.com>
443
444         PR ld/23324
445         * elf64-x86-64.c (elf_x86_64_relocate_section): Clear the
446         R_X86_64_converted_reloc_bit bit.
447
448 2018-07-02  Jeff Muizelaar  <jrmuizel@gmail.com>
449             Tom Tromey  <tom@tromey.com>
450
451         PR 13157
452         PR 21787
453         * mach-o.c (bfd_mach_o_fat_close_and_cleanup): New function.
454         (bfd_mach_o_close_and_cleanup): Redefine.
455         * archive.c (_bfd_unlink_from_archive_parent): New function,
456         extracted from..
457         (_bfd_archive_close_and_cleanup): ..here.
458         (bfd_generic_archive_p): Do not clear archive's format.
459         * libbfd-in.h (_bfd_unlink_from_archive_parent): Declare.
460         * libbfd.h: Regenerate.
461
462 2018-07-02  Thomas Preud'homme  <thomas.preudhomme@arm.com>
463
464         * archures.c (bfd_mach_arm_5TEJ, bfd_mach_arm_6, bfd_mach_arm_6KZ,
465         bfd_mach_arm_6T2, bfd_mach_arm_6K, bfd_mach_arm_7, bfd_mach_arm_6M,
466         bfd_mach_arm_6SM, bfd_mach_arm_7EM, bfd_mach_arm_8, bfd_mach_arm_8R,
467         bfd_mach_arm_8M_BASE, bfd_mach_arm_8M_MAIN): Define.
468         * bfd-in2.h: Regenerate.
469         * cpu-arm.c (arch_info_struct): Add entries for above new
470         bfd_mach_arm values.
471         * elf32-arm.c (bfd_arm_get_mach_from_attributes): Add Tag_CPU_arch to
472         bfd_mach_arm mapping logic for pre Armv4 and Armv5TEJ and later
473         architectures.  Force assert failure for any new Tag_CPU_arch value.
474
475 2018-07-02  Thomas Preud'homme  <thomas.preudhomme@arm.com>
476
477         * doc/bfdint.texi: Use command-line consistently when used in a
478         compount word.
479         * doc/bfdsumm.texi: Likewise.
480
481 2018-06-29  Maciej W. Rozycki  <macro@mips.com>
482
483         * elfxx-mips.c (allocate_dynrelocs): Remove extraneous symbol
484         visibility check made for undefined weak symbols.
485
486 2018-06-26  Nick Clifton  <nickc@redhat.com>
487
488         * po/uk.po: Updated Ukranian translation.
489
490 2018-06-25  Nick Clifton  <nickc@redhat.com>
491
492         * elfnn-aarch64.c (_bfd_aarch64_erratum_835769_stub_name): Check
493         for malloc returning NULL.
494         (_bfd_aarch64_erratum_843419_fixup): Check for
495         _bfd_aarch64_erratum_835769_stub_name returning NULL.
496
497 2018-06-24  Nick Clifton  <nickc@redhat.com>
498
499         * po/bfd.pot: Regenerate.
500
501 2018-06-24  Nick Clifton  <nickc@redhat.com>
502
503         * version.m4: Update version string to 2.31.51.
504         * configure: Regenerate.
505
506 2018-06-24  Nick Clifton  <nickc@redhat.com>
507
508         2.31 branch created.
509
510 2018-06-21  Maciej W. Rozycki  <macro@mips.com>
511
512         * elfxx-mips.c (_bfd_mips_elf_compact_eh_encoding)
513         (_bfd_mips_elf_cant_unwind_opcode): Correct formatting.
514
515 2018-06-21  Maciej W. Rozycki  <macro@mips.com>
516
517         * elfxx-mips.c (_bfd_mips_post_process_headers): Keep
518         EI_ABIVERSION setting together.
519
520 2018-06-21  Maciej W. Rozycki  <macro@mips.com>
521
522         * elfxx-mips.c (MIPS_LIBC_ABI_DEFAULT, MIPS_LIBC_ABI_MIPS_PLT)
523         (MIPS_LIBC_ABI_UNIQUE, MIPS_LIBC_ABI_MIPS_O32_FP64)
524         (MIPS_LIBC_ABI_MAX): New enumeration constants.
525         (_bfd_mips_post_process_headers): Use them in place of magic
526         numbers.
527
528 2018-06-21  Jim Wilson  <jimw@sifive.com>
529
530         * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Update comment.
531         Use SYMBOL_REFERENCES_LOCAL.  Add asserts for h->got.offset.
532
533 2018-06-21  Alan Modra  <amodra@gmail.com>
534
535         * doc/Makefile.am (AUTOMAKE_OPTIONS): Add "foreign".
536         * doc/Makefile.in: Regenerate.
537
538 2018-06-20  Renlin Li  <renlin.li@arm.com>
539
540         * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Use PG_OFFSET
541         to resolve BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC,
542         BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC,
543         BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC,
544         BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC,
545         BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC,
546         BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC,
547         BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC,
548         BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC.
549
550 2018-06-20  Nick Clifton  <nickc@redhat.com>
551
552         PR 23316
553         * opncls.c (get_build_id): Check for a negative or excessive data
554         size in the build-id note.
555
556 2018-06-20  Nick Clifton  <nickc@redhat.com>
557
558         PR 23299
559         * mach-o.c (cputype): New function.
560         (cpusubtype): New function.
561         (bfd_mach_o_bfd_print_private_data): New function.  Dispalys the
562         values in the MACH-O file header.
563         (bfd_mach_o_bfd_copy_private_header_data): Copy the cputype and
564         cpusubtype fields from the input bfd's mach-o header to the output
565         bfd.
566         * mach-o-target.c (bfd_mach_o_bfd_print_private_bfd_data):
567         Redefine to bfd_mach_o_bfd_print_private_data.
568         * mach-o.h (bfd_mach_o_bfd_print_private_bfd_data): Prototype.
569
570 2018-06-19  Maciej W. Rozycki  <macro@mips.com>
571
572         PR ld/22966
573         * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Verify the
574         `.got.plt' entry referred is in range.
575         (mips_finish_exec_plt): Correct the range check for `.got.plt'
576         start.  Replace the assertion used for that with a proper error
577         message.
578
579 2018-06-19  Maciej W. Rozycki  <macro@mips.com>
580
581         * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Fix
582         formatting.
583
584 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
585
586         * Makefile.am (AUTOMAKE_OPTIONS): Remove 1.11.
587         (INCLUDES): Rename to ...
588         (AM_CPPFLAGS): ... this.
589         * configure.ac: Remove AC_PREREQ.
590         * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove 1.9, cygnus, add
591         info-in-builddir no-texinfo.tex.
592         (info_TEXINFOS): Rename bfd.texinfo to bfd.texi.
593         * doc/bfd.texinfo: Rename to ...
594         * doc/bfd.texi: ... this.
595         * Makefile.in: Re-generate.
596         * aclocal.m4: Re-generate.
597         * config.in: Re-generate.
598         * configure: Re-generate.
599         * doc/Makefile.in: Re-generate.
600
601 2018-06-18  Mephi  <mephi42@gmail.com>
602
603         PR 23297
604         * mach-o-x86-64.c (x86_64_howto_table): Add entry for
605         BFD_RELOC_MACH_O_X86_64_RELOC_TLV.
606         (bfd_mach_o_x86_64_canonicalize_one_reloc): Handle the new reloc.
607         (bfd_mach_o_x86_64_swap_reloc_out): Likewise.
608         * reloc.c (BFD_RELOC_MACH_O_X86_64_TV): New entry.
609         * bfd-in2.h: Regenerate.
610         * libbfd.h: Regenerate.
611
612 2018-06-14  Faraz Shahbazker  <Faraz.Shahbazker@mips.com>
613
614         * elfxx-mips.c (print_mips_ases): Add GINV extension.
615
616 2018-06-14  H.J. Lu  <hongjiu.lu@intel.com>
617
618         PR binutils/23267
619         * elf.c (_bfd_elf_get_symbol_version_string): Check if the first
620         symbol version is base version.
621
622 2018-06-14  Alan Modra  <amodra@gmail.com>
623
624         * elf-bfd.h (struct elf_link_hash_table): Add "dynamic_relocs".
625         * elflink.c (_bfd_elf_init_2_index_sections): Comment fix.
626         (_bfd_elf_add_dynamic_entry): Set "dynamic_relocs".
627         (_bfd_elf_link_renumber_dynsyms): Exclude all section symbols when
628         "dynamic_relocs" is not set.
629         * elfxx-mips.c (count_section_dynsyms): Likewise.
630
631 2018-06-14  Alan Modra  <amodra@gmail.com>
632
633         PR 23282
634         * bfdio.c (bfd_seek): Optimize away seeks to current position.
635
636 2018-06-13  Scott Egerton  <scott.egerton@imgtec.com>
637             Faraz Shahbazker  <Faraz.Shahbazker@mips.com>
638
639         * elfxx-mips.c (print_mips_ases): Add CRC.
640
641 2018-06-08  H.J. Lu  <hongjiu.lu@intel.com>
642
643         PR ld/23161
644         * elfxx-x86.c (elf_x86_hide_linker_defined): New function.
645         (_bfd_x86_elf_link_check_relocs): Use it to hide hidden
646         __bss_start, _end and _edata in shared libraries.
647
648 2018-06-07  Alan Modra  <amodra@gmail.com>
649
650         * elf32-tic6x.c (elf32_tic6x_check_relocs): Reference
651         __c6xabi_DSBT_BASE explicitly for R_C6000_SBR_* relocs.
652
653 2018-06-05  Alan Modra  <amodra@gmail.com>
654
655         * bfd.c (struct bfd): Update comment on "where" usage.
656         * bfdio.c (bfd_bwrite, bfd_stat): Use and update "iovec",
657         "iostream", and "where" from containing archive file.  Return
658         error on NULL iovec.
659         (bfd_bread): Similarly, and return error attempted out of
660         bounds archive element access.
661         (bfd_tell, bfd_flush): Use and update "iovec", "iostream", and
662         "where" from containing archive file.
663         (bfd_seek): Likewise.  Return error on NULL iovec.  Don't
664         attempt to optimize away seeks.  Don't paper over errors by
665         calling bfd_tell.
666         (bfd_get_mtime): Call bfd_stat rather than iovec->bstat.
667         (bfd_get_size): Likewise.
668         (bfd_mmap): Operate on and use iovec of containing archive
669         file.  Return error on NULL iovec.
670         * cache.c (bfd_cache_lookup_worker): Abort if working on
671         archive element bfd.
672         (cache_bread_1): Delete bfd parameter, add FILE* parameter.
673         Don't ignore zero byte reads.
674         (cache_bread): Look up FILE* in cache here.  Error on NULL
675         lookup.
676         (cache_bwrite): Rename "where" to "from".
677         (cache_bmmap): Don't handle archive elements.
678         * coffcode.h (coff_slurp_line_table): Exit early on zero
679         lineno count.
680         * bfd-in2.h: Regenerate.
681
682 2018-06-05  Alan Modra  <amodra@gmail.com>
683
684         PR 23254
685         * plugin.c (bfd_plugin_open_input): Allow for possibility of
686         nested archives.  Open file again for plugin.
687         (try_claim): Don't save and restore file position.  Close file
688         if not claimed.
689         * sysdep.h (O_BINARY): Define.
690
691 2018-06-04  Max Filippov  <jcmvbkbc@gmail.com>
692
693         * elf32-xtensa.c (xtensa_read_table_entries): Make global.
694         (compute_fill_extra_space): Drop declaration. Rename function to
695         xtensa_compute_fill_extra_space.
696         (compute_ebb_actions, remove_dead_literal): Update references to
697         compute_fill_extra_space.
698
699 2018-06-04  Volodymyr Arbatov  <arbatov@cadence.com>
700
701         * elf32-xtensa.c (elf32xtensa_separate_props): New global
702         variable.
703         (xtensa_add_names): New function.
704         (xtensa_property_section_name): Add new parameter
705         separate_sections, use it to choose property section name.
706         (xtensa_get_separate_property_section): New function.
707         (xtensa_get_property_section): Invoke
708         xtensa_get_separate_property_section to get individual property
709         section if it exists, common property section otherwise.
710         (xtensa_make_property_section): Pass elf32xtensa_separate_props
711         to xtensa_property_section_name.
712
713 2018-06-04  H.J. Lu  <hongjiu.lu@intel.com>
714
715         PR binutils/23146
716         * bfd-in.h: Include "diagnostics.h".
717         * bfd-in2.h: Regenerated.
718         * elf32-arm.c (elf32_arm_nabi_write_core_note): Use
719         DIAGNOSTIC_PUSH, DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION and
720         DIAGNOSTIC_POP to silence GCC 8.1 warnings with
721         -Wstringop-truncation.
722         * elf32-ppc.c (ppc_elf_write_core_note): Likewse.
723         * elf32-s390.c (elf_s390_write_core_note): Likewse.
724         * elf64-ppc.c (ppc64_elf_write_core_note): Likewse.
725         * elf64-s390.c (elf_s390_write_core_note): Likewse.
726         * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewse.
727
728 2018-06-03  Jim Wilson  <jimw@sifive.com>
729
730         PR ld/23244
731         * elfnn-riscv.c (riscv_elf_relocate_section) <R_RISCV_CALL>: Check
732         for and handle an undefined weak with no PLT.
733
734         PR ld/22756
735         * elfnn-riscv.c (riscv_relax_delete_bytes): Add versioned_hidden check
736         to code that ignores duplicate symbols.
737
738 2018-06-01  H.J. Lu  <hongjiu.lu@intel.com>
739
740         * version.m4: Bump version to 2.30.52
741         * configure: Regenerated.
742
743 2018-06-01  Alan Modra  <amodra@gmail.com>
744
745         * bfd.c (_bfd_error_handler): Arrange for this function to be
746         declared in bfd-in2.h.
747         * libbfd-in.h (_bfd_error_handler): Don't declare.
748         * libbfd.h: Regenerate.
749         * bfd-in2.h: Regenerate.
750
751 2018-05-30  Amaan Cheval <amaan.cheval@gmail.com>
752
753         * config.bfd (x86_64-*-*): Add pei-x86-64 target to x86_64-*-rtems*
754         This is needed to generate UEFI application image files from ELFs.
755
756 2018-05-28  H.J. Lu  <hongjiu.lu@intel.com>
757
758         * elf32-i386.c (elf_i386_lazy_plt): Add plt_tlsdesc_entry,
759         plt_tlsdesc_entry_size, plt_tlsdesc_got1_offset,
760         plt_tlsdesc_got2_offset, plt_tlsdesc_got1_insn_end and
761         plt_tlsdesc_got2_insn_end for TLSDESC entry.
762         (elf_i386_lazy_ibt_plt): Likewise.
763         (elf_i386_nacl_plt): Likewise.
764         * elf64-x86-64.c (tlsdesc_plt_entry): Moved and renamed to ...
765         (elf_x86_64_tlsdesc_plt_entry): This.
766         (elf_x86_64_lazy_plt): Add plt_tlsdesc_entry,
767         plt_tlsdesc_entry_size, plt_tlsdesc_got1_offset,
768         plt_tlsdesc_got2_offset, plt_tlsdesc_got1_insn_end and
769         plt_tlsdesc_got2_insn_end for TLSDESC entry.
770         (elf_x86_64_lazy_bnd_plt): Likewise.
771         (elf_x86_64_lazy_ibt_plt): Likewise.
772         (elf_x32_lazy_ibt_plt): Likewise.
773         (elf_x86_64_nacl_plt): Likewise.
774         (elf_x86_64_finish_dynamic_sections): Use plt_tlsdesc_entry,
775         plt_tlsdesc_entry_size, plt_tlsdesc_got1_offset,
776         plt_tlsdesc_got2_offset, plt_tlsdesc_got1_insn_end and
777         plt_tlsdesc_got2_insn_end to update TLSDESC entry.
778         * elfxx-x86.h (elf_x86_lazy_plt_layout): Update comments.
779         Add plt_tlsdesc_entry, plt_tlsdesc_entry_size,
780         plt_tlsdesc_got1_offset, plt_tlsdesc_got2_offset,
781         plt_tlsdesc_got1_insn_end and plt_tlsdesc_got2_insn_end.
782         (elf_x86_non_lazy_plt_layout): Update comments.
783         (elf_x86_plt_layout): Likewise.
784
785 2018-05-28  H.J. Lu  <hongjiu.lu@intel.com>
786
787         PR ld/23238
788         * elf-s390-common.c (elf_s390_add_symbol_hook): Removed.
789         * elf32-arc.c (elf_arc_add_symbol_hook): Likewise.
790         (elf_backend_add_symbol_hook): Likewise.
791         * elf32-m68k.c (elf_m68k_add_symbol_hook): Likewise.
792         (elf_backend_add_symbol_hook): Likewise.
793         * elf32-s390.c (elf_backend_add_symbol_hook): Likewise.
794         * elf32-sparc.c (elf32_sparc_add_symbol_hook): Likewise.
795         (elf_backend_add_symbol_hook): Likewise.
796         * elf64-s390.c (elf_backend_add_symbol_hook): Likewise.
797         * elfxx-aarch64.c (_bfd_aarch64_elf_add_symbol_hook): Likewise.
798         * elfxx-aarch64.h (_bfd_aarch64_elf_add_symbol_hook): Likewise.
799         (elf_backend_add_symbol_hook): Likewise.
800         * elf32-arm.c (elf32_arm_add_symbol_hook): Remove STT_GNU_IFUNC
801         handling.
802         * elf32-ppc.c (ppc_elf_add_symbol_hook): Likewise.
803         * elf64-ppc.c (ppc64_elf_add_symbol_hook): Likewise.
804         * elf64-sparc.c (elf64_sparc_add_symbol_hook): Likewise.
805         * elflink.c (elf_link_add_object_symbols): Set
806         elf_gnu_symbol_ifunc for STT_GNU_IFUNC symbols.
807
808 2018-05-26  H.J. Lu  <hongjiu.lu@intel.com>
809
810         PR ld/23194
811         * elf-bfd.h (_bfd_elf_link_hide_sym_by_version): New.
812         * elflink.c (_bfd_elf_link_hide_versioned_symbol): New function.
813         Extracted from _bfd_elf_link_assign_sym_version.
814         (_bfd_elf_link_hide_sym_by_version): New function.
815         (_bfd_elf_link_assign_sym_version): Use
816         _bfd_elf_link_hide_versioned_symbol.
817         * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Call
818         _bfd_elf_link_hide_sym_by_version instead of
819         bfd_hide_sym_by_version.  Don't check unversioned symbol.
820
821 2018-05-25  Alan Modra  <amodra@gmail.com>
822
823         * Makefile.in: Regenerate.
824         * po/SRC-POTFILES.in: Regenerate.
825
826 2018-05-25  Alan Modra  <amodra@gmail.com>
827
828         * configure.ac (bfd_cv_hidden): Run test with -Werror in CFLAGS.
829         * configure: Regenerate.
830
831 2018-05-23  H.J. Lu  <hongjiu.lu@intel.com>
832
833         * elf64-ppc.c (ppc64_elf_write_core_note): Add ATTRIBUTE_NONSTRING
834         to data.
835
836 2018-05-22  Alan Modra  <amodra@gmail.com>
837
838         PR 23207
839         * elf32-hppa.c (hppa_get_stub_entry): Return NULL when link_sec
840         is NULL.
841         (elf32_hppa_size_stubs): Only create stubs for load, alloc, code
842         sections.
843         (final_link_relocate): Revert last change.
844
845 2018-05-22  Alan Modra  <amodra@gmail.com>
846
847         PR 23207
848         * elf32-hppa.c (final_link_relocate): Don't look for plt call
849         stubs in non-alloc sections.
850
851 2018-05-21  H.J. Lu  <hongjiu.lu@intel.com>
852
853         PR ld/23201
854         * aout-target.h (MY_bfd_link_hide_symbol): New.
855         * aout-tic30.c (MY_bfd_link_hide_symbol): Likewise.
856         * binary.c (binary_bfd_link_hide_symbol): Likewise.
857         * coff-alpha.c (_bfd_ecoff_bfd_link_hide_symbol): Likewise.
858         * coff-mips.c (_bfd_ecoff_bfd_link_hide_symbol): Likewise.
859         * coff-rs6000.c (_bfd_xcoff_bfd_link_hide_symbol): Likewise.
860         * coffcode.h (coff_bfd_link_hide_symbol): Likewise.
861         * elf-bfd.h (_bfd_elf_link_hide_symbol): Likewise.
862         * elfxx-target.h (bfd_elfNN_bfd_link_hide_symbol): Likewise.
863         * i386msdos.c (msdos_bfd_link_hide_symbol): Likewise.
864         * ihex.c (ihex_bfd_link_hide_symbol): Likewise.
865         * libbfd-in.h (_bfd_nolink_bfd_link_hide_symbol): Likewise.
866         * linker.c (_bfd_generic_link_hide_symbol): Likewise.
867         (bfd_link_hide_symbol): Likewise.
868         * mach-o-target.c (bfd_mach_o_bfd_link_hide_symbol): Likewise.
869         * mmo.c (mmo_bfd_link_hide_symbol): Likewise.
870         * pef.c (bfd_pef_bfd_link_hide_symbol): Likewise.
871         * plugin.c (bfd_plugin_bfd_link_hide_symbol): Likewise.
872         * ppcboot.c (ppcboot_bfd_link_hide_symbol): Likewise.
873         * som.c (som_bfd_link_hide_symbol): Likewise.
874         * srec.c (srec_bfd_link_hide_symbol): Likewise.
875         * tekhex.c (tekhex_bfd_link_hide_symbol): Likewise.
876         * vms-alpha.c (vms_bfd_link_hide_symbol): Likewise.
877         (alpha_vms_bfd_link_hide_symbol): Likewise.
878         * xsym.c (bfd_sym_bfd_link_hide_symbol): Likewise.
879         * coff64-rs6000.c (rs6000_xcoff64_vec): Add
880         _bfd_generic_link_hide_symbol.
881         (rs6000_xcoff64_aix_vec): Likewise.
882         * elflink.c (bfd_elf_record_link_assignment): Don't make forced
883         local symbol dynamic.
884         (_bfd_elf_link_hide_symbol): New function.
885         * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
886         check root.ldscript_def.
887         * targets.c (bfd_target): Add _bfd_link_hide_symbol.
888         (BFD_JUMP_TABLE_LINK): Add NAME##_bfd_link_hide_symbol.
889         * bfd-in2.h: Regenerated.
890         * libbfd.h: Likewise.
891
892 2018-05-21  H.J. Lu  <hongjiu.lu@intel.com>
893
894         PR binutils/23199
895         * elf.c (setup_group): Mark section in a section group with
896         SHF_GROUP.
897
898 2018-05-18  H.J. Lu  <hongjiu.lu@intel.com>
899
900         PR ld/23194
901         * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
902         set eh->local_ref to 1 if a symbol is versioned and there is a
903         version script.
904
905 2018-05-18  Kito Cheng  <kito.cheng@gmail.com>
906
907         * elfnn-riscv.c (_bfd_riscv_elf_merge_private_bfd_data): Handle
908         EF_RISCV_RVE.
909
910 2018-05-18  Jim Wilson  <jimw@sifive.com>
911
912         * elfnn-riscv.c (allocate_dynrelocs): Discard dynamic relocations if
913         UNDEFWEAK_NO_DYNAMIC_RELOC is true.
914         (riscv_elf_relocate_section): Don't generate dynamic relocation if
915         UNDEFWEAK_NO_DYNAMIC_RELOC is true.
916         (riscv_elf_finish_dynamic_symbol): Likewise.
917
918 2018-05-18  John Darrington  <john@darrington.wattle.id.au>
919
920         * Makefile.am: Add s12z files.
921         * Makefile.in: Regenerate.
922         * archures.c: Add bfd_s12z_arch.
923         * bfd-in.h: Add exports of bfd_putb24 and bfd_putl24.
924         * bfd-in2.h: Regenerate.
925         * config.bfd: Add s12z target.
926         * configure.ac: Add s12z target.
927         * configure: Regenerate.
928         * cpu-s12z.c: New file.
929         * elf32-s12z.c: New file.
930         * libbfd.c (bfd_putb24): New function.
931         (bfd_putl24): New function.
932         * libbfd.h: Regenerate.
933         * reloc.c: Add s12z relocations.
934         (bfd_get_reloc_size): Handle size 5 relocs.
935         * targets.c: Add s12z_elf32_vec.
936
937 2018-05-18  H.J. Lu  <hongjiu.lu@intel.com>
938
939         PR ld/23189
940         * elf32-i386.c (elf_i386_relocate_section): Handle R_386_GOT32X
941         like R_386_GOT32.
942         * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
943         set eh->local_ref to 1 for linker defined symbols.
944
945 2018-05-18  Alan Modra  <amodra@gmail.com>
946
947         PR 23199
948         * elf.c (setup_group): Formatting.  Check that SHT_GROUP entries
949         don't point at other SHT_GROUP sections.  Set shdr corresponding
950         to invalid entry, to NULL rather than section 0.  Identify
951         SHT_GROUP section index when reporting an error.  Cope with NULL
952         shdr pointer.
953
954 2018-05-18  Alan Modra  <amodra@gmail.com>
955
956         * libbfd-in.h (ATTRIBUTE_HIDDEN): Define and use throughout.
957         * configure.ac (HAVE_HIDDEN): Check compiler support for hidden
958         visibility.
959         * libbfd.h: Regenerate.
960         * configure: Regenerate.
961         * config.in: Regenerate.
962
963 2018-05-18  Alan Modra  <amodra@gmail.com>
964
965         * libbfd-in.h: Add include guard.
966         * libcoff-in.h: Likewise.
967         * doc/Makefile.am (libbfd.h, libcoff.h): Append another #endif.
968         * doc/Makefile.in: Regenerate.
969         * libbfd.h: Regenerate.
970         * libcoff.h: Regenerate.
971
972 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
973
974         * elf32-nds32.c (nds32_convert_32_to_16): Preset `insn_type'.
975
976 2018-05-16  Alan Modra  <amodra@gmail.com>
977
978         PR 22458
979         * format.c (struct bfd_preserve): Add section_id.
980         (bfd_preserve_save, bfd_preserve_restore): Save and restore
981         _bfd_section_id.
982         (bfd_reinit): Set _bfd_section_id.
983         (bfd_check_format_matches): Put all matches of any priority into
984         matching_vector.  Save initial section id and start each attempted
985         match at that section id.
986         * libbfd-in.h (_bfd_section_id): Declare.
987         * section.c (_bfd_section_id): Rename from section_id and make
988         global.  Adjust uses.
989         (bfd_get_next_section_id): Delete.
990         * elf64-ppc.c (ppc64_elf_setup_section_lists): Replace use of
991         bfd_get_section_id with _bfd_section_id.
992         * libbfd.h: Regenerate.
993         * bfd-in2.h: Regenerate.
994
995 2018-05-15  Christophe Guillon  <christophe.guillon@st.com>
996
997         * coffcode.h (coff_bigobj_swap_aux_in): Make sure that all fields
998         of the aux structure are initialised.
999
1000 2018-05-15  Francois H. Theron  <francois.theron@netronome.com>
1001
1002         * targets.c: Wrap nfp_elf64_vec in BFD64 ifdef.
1003
1004 2018-05-15  Nick Clifton  <nickc@redhat.com>
1005
1006         * po/pt.po: New Portuguese translation.
1007         * configure.ac (ALL_LINGUAS): Add pt.
1008         * configure: Regenerate.
1009
1010 2018-05-14  H.J. Lu  <hongjiu.lu@intel.com>
1011
1012         PR ld/23169
1013         * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Don't issue
1014         an error on IFUNC pointer defined in PDE.
1015         * elf32-i386.c (elf_i386_finish_dynamic_symbol): Call
1016         _bfd_x86_elf_link_fixup_ifunc_symbol.
1017         * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
1018         * elfxx-x86.c (_bfd_x86_elf_link_fixup_ifunc_symbol): New
1019         function.
1020         * elfxx-x86.h (_bfd_x86_elf_link_fixup_ifunc_symbol): New.
1021
1022 2018-05-14  H.J. Lu  <hongjiu.lu@intel.com>
1023
1024         PR ld/23162
1025         * elfxx-x86.c (elf_x86_linker_defined): New function.
1026         (_bfd_x86_elf_link_check_relocs): Use it to mark __bss_start,
1027         _end and _edata locally defined within executables.
1028
1029 2018-05-12  Alan Modra  <amodra@gmail.com>
1030
1031         PR 20659
1032         * elf.c (rewrite_elf_program_header): Use segment_mark only for
1033         PT_LOAD headers.  Delete first_matching_lma and first_suggested_lma.
1034         Instead make matching_lma and suggested_lma pointers to the
1035         sections.  Align section vma and lma calculated from segment.
1036         Don't clear includes_phdrs or includes_filehdr based on p_paddr
1037         test.  Try to handle alignment padding before first section by
1038         adjusting new segment lma down.  Adjust PT_PHDR map p_paddr.
1039
1040 2018-05-09  Dimitar Dimitrov  <dimitar@dinux.eu>
1041
1042         * elf32-pru.c (pru_elf32_do_ldi32_relocate): Make LDI32 relocation
1043         conformant to TI ABI.
1044         (pru_elf32_relax_section): Likewise.
1045         (pru_elf_relax_delete_bytes): Fix offsets for new LDI32 code.
1046         * elf32-pru.c (pru_elf32_do_ldi32_relocate): Ignore addend.
1047         (pru_elf32_pmem_relocate): Trap - should not get here.
1048         (pru_elf32_relocate_section): Add support for REL relocations.
1049         (elf_info_to_howto_rel): Enable REL.
1050         (elf_backend_may_use_rel_p): Likewise.
1051         (elf_backend_may_use_rela_p): Likewise.
1052         (elf_backend_default_use_rela_p): Likewise.
1053
1054 2018-05-09  Alan Modra  <amodra@gmail.com>
1055
1056         PR 23148
1057         * peXXigen.c (pe_print_edata): Correct minimum size.
1058
1059 2018-05-09  Alan Modra  <amodra@gmail.com>
1060
1061         PR 23147
1062         * peXXigen.c (pe_print_idata): Bound check hint_addr.
1063
1064 2018-05-08  Nick Clifton  <nickc@redhat.com>
1065
1066         PR 22809
1067         * elf.c (bfd_elf_get_str_section): Check for an excessively large
1068         string section.
1069         * elf-attrs.c (_bfd_elf_parse_attributes): Issue an error if the
1070         attribute section is larger than the size of the file.
1071
1072 2018-05-07  Alan Modra  <amodra@gmail.com>
1073
1074         * cofflink.c (_bfd_coff_link_input_bfd): Use memcmp rather than
1075         strncmp when checking for ".bf" special symbol.
1076         * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Make pe_required_section_flags
1077         section name a char array, remove sentinal known_sections entry,
1078         and adjust loop over known_sections to suit.  Use memcmp rather
1079         than strncmp.
1080
1081 2018-05-04  Alan Modra  <amodra@gmail.com>
1082
1083         * elf-linux-core.h (struct elf_external_linux_prpsinfo32_ugid32),
1084         (struct elf_external_linux_prpsinfo32_ugid16),
1085         (struct elf_external_linux_prpsinfo64_ugid32),
1086         (struct elf_external_linux_prpsinfo64_ugid16): Add ATTRIBUTE_NONSTRING
1087         to pr_fname and pr_psargs fields.  Remove GCC diagnostic pragmas.
1088         Move comment to..
1089         * elf.c (elfcore_write_prpsinfo): ..here.  Indent nested preprocessor
1090         directives.
1091         * elf32-arm.c (elf32_arm_nabi_write_core_note): Add ATTRIBUTE_NONSTRING
1092         to data.
1093         * elf32-ppc.c (ppc_elf_write_core_note): Likewise.
1094         * elf32-s390.c (elf_s390_write_core_note): Likewise.
1095         * elf64-s390.c (elf_s390_write_core_note): Likewise.
1096         * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewise.
1097         * elf64-x86-64.c (elf_x86_64_write_core_note): Add GCC diagnostic
1098         pragmas.
1099         * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Use strnlen to avoid
1100         false positive gcc-8 warning.
1101         * cofflink.c (_bfd_coff_link_input_bfd): Likewise.
1102
1103 2018-05-04  Tulio Magno Quites Machado Filho  <tuliom@linux.ibm.com>
1104
1105         * elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Fix the order
1106         of arguments when warning about different long double types.
1107
1108 2018-05-03  Simon Atanasyan  <simon@atanasyan.com>
1109
1110         * elf32-mips.c: (elf32_mips_fixup_symbol): New function.
1111         (elf_backend_fixup_symbol): New macro.
1112         * elfxx-mips.c: (mips_elf_output_extsym): Discard _gp_disp
1113         handling.
1114         (_bfd_mips_elf_finish_dynamic_symbol): Likewise.
1115
1116 2018-04-30  Francois H. Theron <francois.theron@netronome.com>
1117
1118         * Makefile.am: Added NFP files to build.
1119         * archures.c: Added bfd_arch_nfp
1120         * config.bfd: Added NFP support.
1121         * configure.ac: Added NFP support.
1122         * cpu-nfp.c: New, for NFP support.
1123         * elf-bfd.h: Added elf_section_info()
1124         * elf64-nfp.c: New, for NFP support.
1125         * po/SRC-POTFILES.in: Added NFP source files.
1126         * targets.c: Added nfp_elf64_vec
1127         * bfd-in2.h: Regenerate.
1128         * Makefile.in: Regenerate.
1129         * configure: Regenerate.
1130
1131 2018-04-27  Alan Modra  <amodra@gmail.com>
1132
1133         * bfd-in2.h: Regenerate.
1134         * libbfd.h: Regenerate.
1135
1136 2018-04-27  Alan Modra  <amodra@gmail.com>
1137
1138         PR 23123
1139         PR 22374
1140         * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't drop plt
1141         relocs for ifuncs.
1142         * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Comment fixes.
1143
1144 2018-04-26  Pedro Alves  <palves@redhat.com>
1145
1146         * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't consider
1147         ifunc and non-ifunc symbols duplicates.
1148
1149 2018-04-25  Christophe Lyon  <christophe.lyon@st.com>
1150         Mickaël Guêné  <mickael.guene@st.com>
1151
1152         * elf32-arm.c (elf32_arm_fdpic_thumb_plt_entry): New.
1153         (elf32_arm_plt_needs_thumb_stub_p): Handle thumb-only case.
1154         (elf32_arm_populate_plt_entry): Likewise.
1155         (elf32_arm_output_plt_map_1): Likewise.
1156         (elf32_arm_output_arch_local_syms): Likewise.
1157
1158 2018-04-25  Christophe Lyon  <christophe.lyon@st.com>
1159         Mickaël Guêné  <mickael.guene@st.com>
1160
1161         * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Handle
1162         _GLOBAL_OFFSET_TABLE_ in FDPIC mode.
1163
1164 2018-04-25  Christophe Lyon  <christophe.lyon@st.com>
1165         Mickaël Guêné  <mickael.guene@st.com>
1166
1167         * elf32-arm.c (bfd_elf32_arm_set_target_params): Handle FDPIC case
1168         for R_ARM_TARGET2.
1169
1170 2018-04-25  Christophe Lyon  <christophe.lyon@st.com>
1171         Mickaël Guêné  <mickael.guene@st.com>
1172
1173         * elf32-arm.c (DEFAULT_STACK_SIZE): New.
1174         (elf32_arm_always_size_sections): Create stack segment.
1175
1176 2018-04-25  Christophe Lyon  <christophe.lyon@st.com>
1177         Mickaël Guêné  <mickael.guene@st.com>
1178
1179         * bfd-in2.h (BFD_RELOC_ARM_TLS_GD32_FDPIC)
1180         (BFD_RELOC_ARM_TLS_LDM32_FDPIC, BFD_RELOC_ARM_TLS_IE32_FDPIC): New
1181         relocations.
1182         * elf32-arm.c (elf32_arm_howto_table_2): Add R_ARM_TLS_GD32_FDPIC,
1183         R_ARM_TLS_LDM32_FDPIC, R_ARM_TLS_IE32_FDPIC relocations.
1184         (elf32_arm_reloc_map): Add R_ARM_TLS_GD32_FDPIC,
1185         R_ARM_TLS_LDM32_FDPIC, R_ARM_TLS_IE32_FDPIC.
1186         (struct elf32_arm_link_hash_table): Update comment.
1187         (elf32_arm_final_link_relocate): Handle TLS FDPIC relocations.
1188         (IS_ARM_TLS_RELOC): Likewise.
1189         (elf32_arm_check_relocs): Likewise.
1190         (allocate_dynrelocs_for_symbol): Likewise.
1191         (elf32_arm_size_dynamic_sections): Update comment.
1192         * reloc.c: Add BFD_RELOC_ARM_TLS_GD32_FDPIC,
1193         BFD_RELOC_ARM_TLS_LDM32_FDPIC, BFD_RELOC_ARM_TLS_IE32_FDPIC.
1194
1195 2018-04-25  Christophe Lyon  <christophe.lyon@st.com>
1196         Mickaël Guêné  <mickael.guene@st.com>
1197
1198         * elf32-arm.c (elf32_arm_fdpic_plt_entry): New.
1199         (elf32_arm_create_dynamic_sections): Handle FDPIC.
1200         (elf32_arm_allocate_plt_entry): Likewise.
1201         (elf32_arm_populate_plt_entry): Likewise.
1202         (elf32_arm_output_plt_map_1): Likewise.
1203
1204 2018-04-25  Christophe Lyon  <christophe.lyon@st.com>
1205         Mickaël Guêné  <mickael.guene@st.com>
1206
1207         * elf32-arm.c (struct fdpic_local): New.
1208         (elf_arm_obj_tdata): Add local_fdpic_cnts field.
1209         (elf32_arm_local_fdpic_cnts): New.
1210         (struct fdpic_global): New.
1211         (elf32_arm_link_hash_entry): Add fdpic_cnts field.
1212         (elf32_arm_link_hash_table): Add srofixup field.
1213         (arm_elf_add_rofixup): New.
1214         (arm_elf_fill_funcdesc): New.
1215         (elf32_arm_link_hash_newfunc): Handle fdpic_cnts.
1216         (elf32_arm_allocate_local_sym_info): Likewise.
1217         (create_got_section): Create .rofixup section.
1218         (elf32_arm_copy_indirect_symbol): Handle fdpic_cnts.
1219         (bfd_elf32_arm_set_target_params): Handle FDPIC.
1220         (elf32_arm_final_link_relocate): Likewise.
1221         (elf32_arm_check_relocs): Likewise.
1222         (allocate_dynrelocs_for_symbol): Likewise.
1223         (elf32_arm_size_dynamic_sections): Likewise.
1224         (elf32_arm_finish_dynamic_sections): Likewise.
1225         (elf32_arm_output_arch_local_syms): Likewise.
1226         (elf32_arm_fdpic_omit_section_dynsym): New.
1227
1228 2018-04-25  Christophe Lyon  <christophe.lyon@st.com>
1229         Mickaël Guêné  <mickael.guene@st.com>
1230
1231         * bfd-in2.c (BFD_RELOC_ARM_GOTFUNCDESC)
1232         (BFD_RELOC_ARM_GOTOFFFUNCDESC, BFD_RELOC_ARM_FUNCDESC)
1233         (BFD_RELOC_ARM_FUNCDESC_VALUE): New.
1234         * elf32-arm.c (elf32_arm_howto_table_2): Add R_ARM_GOTFUNCDESC,
1235         R_ARM_GOTOFFFUNCDESC, R_ARM_FUNCDESC, R_ARM_FUNCDESC_VALUE.
1236         (elf32_arm_howto_from_type): Take new members of
1237         elf32_arm_howto_table_2 into account.
1238         (elf32_arm_reloc_map): Add BFD_RELOC_ARM_GOTFUNCDESC,
1239         BFD_RELOC_ARM_GOTOFFFUNCDESC, BFD_RELOC_ARM_FUNCDESC,
1240         BFD_RELOC_ARM_FUNCDESC_VALUE.
1241         * reloc.c: Add BFD_RELOC_ARM_GOTFUNCDESC,
1242         BFD_RELOC_ARM_GOTOFFFUNCDESC, BFD_RELOC_ARM_FUNCDESC,
1243         BFD_RELOC_ARM_FUNCDESC_VALUE.
1244
1245 2018-04-25  Christophe Lyon  <christophe.lyon@st.com>
1246         Mickaël Guêné  <mickael.guene@st.com>
1247
1248         * elf32-arm.c (elf32_arm_print_private_bfd_data): Support
1249         EF_ARM_PIC and ELFOSABI_ARM_FDPIC.
1250         (elf32_arm_post_process_headers): Support ELFOSABI_ARM_FDPIC.
1251         (ELF_OSABI): Define to ELFOSABI_ARM_FDPIC.
1252
1253 2018-04-25  Christophe Lyon  <christophe.lyon@st.com>
1254         Mickaël Guêné  <mickael.guene@st.com>
1255
1256         * config.bfd (arm*-*-linux-*): Add arm_elf32_fdpic_be_vec and
1257         arm_elf32_fdpic_le_vec to targ_selvecs. Accept
1258         arm*-*-uclinuxfdpiceabi.
1259         * configure.ac: Add support for arm_elf32_fdpic_be_vec and
1260         arm_elf32_fdpic_le_vec.
1261         * configure: Regenerate.
1262         * elf32-arm.c (struct elf32_arm_link_hash_table): Add fdpic_p.
1263         (elf32_arm_link_hash_table_create): Initialize fdpic_p.
1264         (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME, TARGET_BIG_SYM)
1265         (TARGET_BIG_NAME, elf_match_priority): Define for FDPIC targets.
1266         (elf32_arm_fdpic_link_hash_table_create): New.
1267         * targets.c (_bfd_target_vector): Add arm_elf32_fdpic_be_vec and
1268         arm_elf32_fdpic_le_vec.
1269
1270 2018-04-25  Alan Modra  <amodra@gmail.com>
1271
1272         * elf-linux-core.h: Disable gcc-8 string truncation warning.
1273         * elf.c (elfcore_write_prpsinfo): Likewise.
1274
1275 2018-04-25  Alan Modra  <amodra@gmail.com>
1276
1277         * Makefile.am: Remove arm-aout and arm-coff support.
1278         * config.bfd: Likewise.
1279         * configure.ac: Likewise.
1280         * targets.c: Likewise.
1281         * aout-arm.c: Delete.
1282         * armnetbsd.c: Delete.
1283         * riscix.c: Delete.
1284         * Makefile.in: Regenerate.
1285         * configure: Regenerate.
1286         * po/SRC-POTFILES.in: Regenerate.
1287
1288 2018-04-24  Nick Clifton  <nickc@redhat.com>
1289
1290         PR 23113
1291         * elf.c (ignore_section_sym): Check for the output_section pointer
1292         being NULL before dereferencing it.
1293
1294         PR 23110
1295         * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Check for
1296         a negative PE_DEBUG_DATA size before iterating over the debug data.
1297
1298 2018-04-23  Alan Modra  <amodra@gmail.com>
1299
1300         * elf-linux-core.h: Revert last change.
1301         * elf.c: Likewise.
1302
1303 2018-04-23  Nick Clifton  <nickc@redhat.com>
1304
1305         PR 23056
1306         * aoutx.h (aout_get_external_symbols): Allocate an extra byte at
1307         the end of the string table, and zero it.
1308
1309 2018-04-23  Alan Modra  <amodra@gmail.com>
1310
1311         * elf-linux-core.h (swap_linux_prpsinfo32_ugid32_out): Disable
1312         gcc-8 string truncation warning.
1313         (swap_linux_prpsinfo32_ugid16_out): Likewise.
1314         (swap_linux_prpsinfo64_ugid32_out): Likewise.
1315         (swap_linux_prpsinfo64_ugid16_out): Likewise.
1316         * elf.c (elfcore_write_prpsinfo): Likewise.
1317
1318 2018-04-23  Nick Clifton  <nickc@redhat.com>
1319
1320         PR 23056
1321         * aoutx.h (aout_get_external_symbols): Allocate an extra byte at
1322         the end of the string table, and zero it.
1323
1324 2018-04-20  Alan Modra  <amodra@gmail.com>
1325
1326         PR 22978
1327         * elf32-hppa.c (got_relocs_needed): Add extra param to special
1328         case both dtprel and tprel relocs.
1329         (allocate_dynrelocs): Adjust conditions for got relocs.
1330         (elf32_hppa_relocate_section): Likewise for local sym got relocs.
1331         Emit dynamic relocs on TLS GOT entries for shared libraries,
1332         not when pic.  Omit dynamic reloc on dtprel entry when local,
1333         and on tprel entry when local and executable.
1334
1335 2018-04-19  Alan Modra  <amodra@gmail.com>
1336
1337         PR 22537
1338         * elf32-hppa.c (elf32_hppa_size_stubs): Init "destination" to -1.
1339         (hppa_type_of_stub): Don't return a long branch stub for
1340         symbols other than those defined statically.
1341
1342 2018-04-19  Alan Modra  <amodra@gmail.com>
1343
1344         * Makefile.am: Revert 2018-04-18 coff-mips changes.
1345         * config.bfd: Add back mips_ecoff_le_vec and mips_ecoff_be_vec
1346         to selvecs for mips targets change 2018-04-18.
1347         * configure.ac: Reinstate mips_ecoff_le_vec, mips_ecoff_be_vec
1348         and  mips_ecoff_bele_vec.
1349         * targets.c: Likewise.
1350         * coff-mips.c: Resurrect.
1351         * Makefile.in: Regenerate.
1352         * configure: Regenerate.
1353         * po/SRC-POTFILES.in: Regenerate.
1354
1355 2018-04-18  Alan Modra  <amodra@gmail.com>
1356
1357         * Makefile.am: Remove mips aout and coff support.
1358         * config.bfd: Likewise.
1359         * configure.ac: Likewise.
1360         * targets.c: Likewise.
1361         * coff-mips.c: Delete
1362         * mipsbsd.c: Delete
1363         * pe-mips.c: Delete
1364         * pei-mips.c: Delete
1365         * Makefile.in: Regenerate.
1366         * configure: Regenerate.
1367         * po/SRC-POTFILES.in: Regenerate.
1368
1369 2018-04-17  H.J. Lu  <hongjiu.lu@intel.com>
1370
1371         * elf32-i386.c (elf32_bed): Define before including
1372         "elf32-target.h".
1373         * elf64-x86-64.c (elf64_bed): Define before including
1374         "elf64-target.h".
1375         (elf32_bed): Define before including "elf32-target.h".
1376
1377 2018-04-17  H.J. Lu  <hongjiu.lu@intel.com>
1378
1379         PR ld/23055
1380         * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Use a
1381         normal input file with compatible relocation.
1382
1383 2018-04-18  Alan Modra  <amodra@gmail.com>
1384
1385         * Makefile.am: Remove support for assorted i386 aout and coff targets.
1386         * config.bfd: Likewise.
1387         * configure.ac: Likewise.
1388         * doc/bfdint.texi: Likewise.
1389         * targets.c: Likewise.
1390         * freebsd.h: Delete.
1391         * i386dynix.c: Delete.
1392         * i386freebsd.c: Delete.
1393         * i386linux.c: Delete.
1394         * i386mach3.c: Delete.
1395         * i386netbsd.c: Delete.
1396         * i386os9k.c: Delete.
1397         * Makefile.in: Regenerate.
1398         * configure: Regenerate.
1399         * po/SRC-POTFILES.in: Regenerate.
1400
1401 2018-04-17 Andrew Sadek  <andrew.sadek.se@gmail.com>
1402
1403         Microblaze Target: PIC data text relative
1404
1405         * bfd/reloc.c (2 new BFD relocations):
1406         BFD_RELOC_MICROBLAZE_64_TEXTPCREL &
1407         BFD_RELOC_MICROBLAZE_64_TEXTPCREL
1408         * bfd/bfd-in2.h: Regenerate
1409         * bfd/libbfd.h: Regenerate
1410         * bfd/elf32-microblaze.c (Handle new relocs): define 'HOWTO' of 3
1411         new relocs and handle them in both relocate and relax functions.
1412         (microblaze_elf_reloc_type_lookup): add mapping between for new
1413         bfd relocs.
1414         (microblaze_elf_relocate_section): Handle new relocs in case of
1415         elf relocation.
1416         (microblaze_elf_relax_section): Handle new relocs for elf relaxation.
1417
1418 2018-04-17  Nick Clifton  <nickc@redhat.com>
1419
1420         PR 23055
1421         * aoutx.h (find_nearest_line): Check that the symbol name exists
1422         and is long enough, before attempting to see if it is for a .o
1423         file.
1424         * hash.c (bfd_hash_hash): Add an assertion that the string is not
1425         NULL.
1426         * linker.c (bfd_link_hash_lookup): Fail if the table or string are
1427         NULL.
1428         (_bfd_generic_link_add_archive_symbols): Fail if an archive entry
1429         has no name.
1430
1431         PR 23065
1432         * dwarf2.c (concat_filename): Check for a NULL table pointer.
1433
1434 2018-04-16  Nick Clifton  <nickc@redhat.com>
1435
1436         PR 23061
1437         * coffgen.c (coff_pointerize_aux): Check for an out of range
1438         fixup.
1439
1440 2018-04-16  Alan Modra  <amodra@gmail.com>
1441
1442         * Makefile.am: Remove arm-epoc-pe support.
1443         * coff-arm.c: Likewise.
1444         * config.bfd: Likewise.
1445         * configure.ac: Likewise.
1446         * targets.c: Likewise.
1447         * epoc-pe-arm.c: Delete.
1448         * epoc-pei-arm.c: Delete.
1449         * Makefile.in: Regenerate.
1450         * configure: Regenerate.
1451         * po/SRC-POTFILES.in: Regenerate.
1452
1453 2018-04-16  Alan Modra  <amodra@gmail.com>
1454
1455         * Makefile.am: Remove sparc-aout and sparc-coff support.
1456         * config.bfd: Likewise.
1457         * configure.ac: Likewise.
1458         * targets.c: Likewise.
1459         * aout-sparcle.c: Delete.
1460         * aoutf1.h: Delete.
1461         * cf-sparclynx.c: Delete.
1462         * coff-sparc.c: Delete.
1463         * demo64.c: Delete.
1464         * sparclinux.c: Delete.
1465         * sparclynx.c: Delete.
1466         * sparcnetbsd.c: Delete.
1467         * sunos.c: Delete.
1468         * Makefile.in: Regenerate.
1469         * configure: Regenerate.
1470         * po/SRC-POTFILES.in: Regenerate.
1471
1472 2018-04-16  Alan Modra  <amodra@gmail.com>
1473
1474         * Makefile.am: Remove m68k-aout and m68k-coff support.
1475         * aoutf1.h: Likewise.
1476         * aoutx.h: Likewise.
1477         * archive.c: Likewise.
1478         * bfd-in.h: Likewise.
1479         * bfd.c: Likewise.
1480         * coffcode.h: Likewise.
1481         * coffswap.h: Likewise.
1482         * config.bfd: Likewise.
1483         * configure.ac: Likewise.
1484         * configure.host: Likewise.
1485         * doc/bfd.texinfo: Likewise.
1486         * doc/bfdint.texi: Likewise.
1487         * freebsd.h: Likewise.
1488         * gen-aout.c: Likewise.
1489         * hpux-core.c: Likewise.
1490         * libaout.h: Likewise.
1491         * libbfd-in.h: Likewise.
1492         * pdp11.c: Likewise.
1493         * peicode.h: Likewise.
1494         * riscix.c: Likewise.
1495         * targets.c: Likewise.
1496         * aout0.c: Delete.
1497         * coff-apollo.c: Delete.
1498         * coff-aux.c: Delete.
1499         * coff-m68k.c: Delete.
1500         * coff-svm68k.c: Delete.
1501         * coff-u68k.c: Delete.
1502         * hosts/delta68.h: Delete.
1503         * hosts/hp300bsd.h: Delete.
1504         * hosts/m68kaux.h: Delete.
1505         * hosts/news.h: Delete.
1506         * hp300bsd.c: Delete.
1507         * hp300hpux.c: Delete.
1508         * liboasys.h: Delete.
1509         * m68k4knetbsd.c: Delete.
1510         * m68klinux.c: Delete.
1511         * m68knetbsd.c: Delete.
1512         * oasys.c: Delete.
1513         * versados.c: Delete.
1514         * Makefile.in: Regenerate.
1515         * bfd-in2.h: Regenerate.
1516         * configure: Regenerate.
1517         * libbfd.h: Regenerate.
1518         * po/SRC-POTFILES.in: Regenerate.
1519
1520 2018-04-16  Alan Modra  <amodra@gmail.com>
1521
1522         * Makefile.am: Remove sh5 and sh64 support.
1523         * archures.c: Likewise.
1524         * config.bfd: Likewise.
1525         * configure.ac: Likewise.
1526         * cpu-sh.c: Likewise.
1527         * elf32-sh-relocs.h: Likewise.
1528         * elf32-sh.c: Likewise.
1529         * targets.c: Likewise.
1530         * elf32-sh64-com.c: Delete.
1531         * elf32-sh64.c: Delete.
1532         * elf32-sh64.h: Delete.
1533         * elf64-sh64.c: Delete.
1534         * Makefile.in: Regenerate.
1535         * bfd-in2.h: Regenerate.
1536         * configure: Regenerate.
1537         * po/SRC-POTFILES.in: Regenerate.
1538
1539 2018-04-16  Alan Modra  <amodra@gmail.com>
1540
1541         * Makefile.am: Remove sh-symbianelf support.
1542         * config.bfd: Likewise.
1543         * configure.ac: Likewise.
1544         * targets.c: Likewise.
1545         * elf32-sh-symbian.c: Delete.
1546         * Makefile.in: Regenerate.
1547         * configure: Regenerate.
1548         * po/SRC-POTFILES.in: Regenerate.
1549
1550 2018-04-16  Alan Modra  <amodra@gmail.com>
1551
1552         * Makefile.am: Remove vax-bsd and vax-ultrix support.
1553         * config.bfd: Likewise.
1554         * configure.ac: Likewise.
1555         * targets.c: Likewise.
1556         * vaxbsd.c: Delete.
1557         * Makefile.in: Regenerate.
1558         * configure: Regenerate.
1559         * po/SRC-POTFILES.in: Regenerate.
1560
1561 2018-04-16  Alan Modra  <amodra@gmail.com>
1562
1563         * Makefile.am: Remove w65 support.
1564         * archures.c: Likewise.
1565         * coffcode.h: Likewise.
1566         * config.bfd: Likewise.
1567         * configure.ac: Likewise.
1568         * targets.c: Likewise.
1569         * coff-w65.c: Delete.
1570         * cpu-w65.c: Delete.
1571         * Makefile.in: Regenerate.
1572         * bfd-in2.h: Regenerate.
1573         * configure: Regenerate.
1574         * po/SRC-POTFILES.in: Regenerate.
1575
1576 2018-04-16  Alan Modra  <amodra@gmail.com>
1577
1578         * Makefile.am: Remove we32k support.
1579         * archures.c: Likewise.
1580         * coffcode.h: Likewise.
1581         * config.bfd: Likewise.
1582         * configure.ac: Likewise.
1583         * targets.c: Likewise.
1584         * coff-we32k.c: Delete.
1585         * cpu-we32k.c: Delete.
1586         * Makefile.in: Regenerate.
1587         * bfd-in2.h: Regenerate.
1588         * configure: Regenerate.
1589         * po/SRC-POTFILES.in: Regenerate.
1590
1591 2018-04-16  Alan Modra  <amodra@gmail.com>
1592
1593         * Makefile.am: Remove m88k support.
1594         * aoutx.h: Likewise.
1595         * archures.c: Likewise.
1596         * coffcode.h: Likewise.
1597         * coffswap.h: Likewise.
1598         * config.bfd: Likewise.
1599         * configure.ac: Likewise.
1600         * cpu-ns32k.c: Likewise.
1601         * elf32-nds32.c: Likewise.
1602         * mach-o.c: Likewise.
1603         * netbsd-core.c: Likewise.
1604         * reloc.c: Likewise.
1605         * targets.c: Likewise.
1606         * coff-m88k.c: Delete.
1607         * cpu-m88k.c: Delete.
1608         * elf32-m88k.c: Delete.
1609         * hosts/m88kmach3.h: Delete.
1610         * m88kmach3.c: Delete.
1611         * m88kopenbsd.c: Delete.
1612         * Makefile.in: Regenerate.
1613         * bfd-in2.h: Regenerate.
1614         * configure: Regenerate.
1615         * po/SRC-POTFILES.in: Regenerate.
1616
1617 2018-04-16  Alan Modra  <amodra@gmail.com>
1618
1619         * Makefile.am: Remove i370 support.
1620         * archures.c: Likewise.
1621         * config.bfd: Likewise.
1622         * configure.ac: Likewise.
1623         * targets.c: Likewise.
1624         * cpu-i370.c: Delete.
1625         * elf32-i370.c: Delete.
1626         * Makefile.in: Regenerate.
1627         * bfd-in2.h: Regenerate.
1628         * configure: Regenerate.
1629         * po/SRC-POTFILES.in: Regenerate.
1630
1631 2018-04-16  Alan Modra  <amodra@gmail.com>
1632
1633         * Makefile.am: Remove h8500 support.
1634         * archures.c: Likewise.
1635         * coffcode.h: Likewise.
1636         * config.bfd: Likewise.
1637         * configure.ac: Likewise.
1638         * targets.c: Likewise.
1639         * coff-h8500.c: Delete.
1640         * cpu-h8500.c: Delete.
1641         * Makefile.in: Regenerate.
1642         * bfd-in2.h: Regenerate.
1643         * configure: Regenerate.
1644         * po/SRC-POTFILES.in: Regenerate.
1645
1646 2018-04-16  Alan Modra  <amodra@gmail.com>
1647
1648         * Makefile.am: Remove h8300-coff support.
1649         * coffcode.h: Likewise.
1650         * config.bfd: Likewise.
1651         * configure.ac: Likewise.
1652         * reloc16.c: Likewise.
1653         * targets.c: Likewise.
1654         * coff-h8300.c: Delete.
1655         * Makefile.in: Regenerate.
1656         * configure: Regenerate.
1657         * po/SRC-POTFILES.in: Regenerate.
1658
1659 2018-04-16  Alan Modra  <amodra@gmail.com>
1660
1661         * Makefile.am: Remove IEEE 695 support.
1662         * archures.c: Likewise.
1663         * bfd.c: Likewise.
1664         * config.bfd: Likewise.
1665         * configure.ac: Likewise.
1666         * doc/bfd.texinfo: Likewise.
1667         * doc/bfdint.texi: Likewise.
1668         * doc/bfdsumm.texi: Likewise.
1669         * section.c: Likewise.
1670         * targets.c: Likewise.
1671         * ieee.c: Delete.
1672         * libieee.h: Delete.
1673         * Makefile.in: Regenerate.
1674         * bfd-in2.h: Regenerate.
1675         * configure: Regenerate.
1676         * po/SRC-POTFILES.in: Regenerate.
1677
1678 2018-04-16  Alan Modra  <amodra@gmail.com>
1679
1680         * config.bfd: Remove tandem support.
1681
1682 2018-04-16  Alan Modra  <amodra@gmail.com>
1683
1684         * Makefile.am: Remove newsos3 support.
1685         * aoutx.h: Likewise.
1686         * config.bfd: Likewise.
1687         * configure.ac: Likewise.
1688         * targets.c: Likewise.
1689         * newsos3.c: Delete.
1690         * Makefile.in: Regenerate.
1691         * configure: Regenerate.
1692         * po/SRC-POTFILES.in: Regenerate.
1693
1694 2018-04-16  Alan Modra  <amodra@gmail.com>
1695
1696         * Makefile.am: Remove netware support.
1697         * bfd-in.h: Likewise.
1698         * bfd.c: Likewise.
1699         * config.bfd: Likewise.
1700         * configure.ac: Likewise.
1701         * doc/bfdint.texi: Likewise.
1702         * ecoff.c: Likewise.
1703         * targets.c: Likewise.
1704         * libnlm.h: Delete.
1705         * nlm-target.h: Delete.
1706         * nlm.c: Delete.
1707         * nlm32-alpha.c: Delete.
1708         * nlm32-i386.c: Delete.
1709         * nlm32-ppc.c: Delete.
1710         * nlm32-sparc.c: Delete.
1711         * nlm32.c: Delete.
1712         * nlm64.c: Delete.
1713         * nlmcode.h: Delete.
1714         * nlmswap.h: Delete.
1715         * Makefile.in: Regenerate.
1716         * bfd-in2.h: Regenerate.
1717         * configure: Regenerate.
1718         * po/SRC-POTFILES.in: Regenerate.
1719
1720 2018-04-16  Alan Modra  <amodra@gmail.com>
1721
1722         * archures.c: Remove tahoe support.
1723         * config.bfd: Likewise.
1724         * configure.ac: Likewise.
1725         * hosts/tahoe.h: Delete.
1726         * bfd-in2.h: Regenerate.
1727         * configure: Regenerate.
1728
1729 2018-04-14  Alan Modra  <amodra@gmail.com>
1730
1731         * elf-bfd.h (struct elf_backend_data): Add relropagesize.
1732         * elfxx-target.h (ELF_RELROPAGESIZE): Provide default and
1733         sanity test.
1734         (elfNN_bed): Init relropagesize.
1735         * bfd.c (bfd_emul_get_commonpagesize): Add boolean param to
1736         select relropagesize.
1737         * elf32-ppc.c (ELF_COMMONPAGESIZE): Define as 0x1000.
1738         (ELF_RELROPAGESIZE): Define as ELF_MAXPAGESIZE.
1739         (ELF_MINPAGESIZE): Don't define.
1740         * elf64-ppc.c (ELF_COMMONPAGESIZE): Define as 0x1000.
1741         (ELF_RELROPAGESIZE): Define as ELF_MAXPAGESIZE.
1742         * bfd-in2.h: Regenerate.
1743
1744 2018-04-14  Alan Modra  <amodra@gmail.com>
1745
1746         * elf32-ppc.c (ELF_MAXPAGESIZE, ELF_COMMONPAGESIZE): Don't depend
1747         on __QNXTARGET__ define.
1748
1749 2018-04-14  Alan Modra  <amodra@gmail.com>
1750
1751         * config.bfd: Add powerpc-*-lynxos* and powerpc-*-windiss*
1752         to obsolete list.
1753
1754 2018-04-11  Alan Modra  <amodra@gmail.com>
1755
1756         * aout-adobe.c: Delete.
1757         * bout.c: Delete.
1758         * coff-i860.c: Delete.
1759         * coff-i960.c: Delete.
1760         * cpu-i860.c: Delete.
1761         * cpu-i960.c: Delete.
1762         * elf32-i860.c: Delete.
1763         * elf32-i960.c: Delete.
1764         * hosts/i860mach3.h: Delete.
1765         * Makefile.am: Remove i860, i960, bout, and adobe support.
1766         * archures.c: Remove i860 and i960 support.
1767         * coffcode.h: Likewise.
1768         * reloc.c: Likewise.
1769         * aoutx.h: Comment updates.
1770         * archive.c: Remove BOUT and i960 support.
1771         * bfd.c: Remove BOUT support.
1772         * coffswap.h: Remove i960 support.
1773         * config.bfd: Remove i860, i960 and adobe targets.
1774         * configure.ac: Remove adode, bout, i860, i960, icoff targets.
1775         * targets.c: Likewise.
1776         * ieee.c: Remove i960 support.
1777         * mach-o.c: Remove i860 support.
1778         * Makefile.in: Regenerate.
1779         * bfd-in2.h: Regenerate.
1780         * configure: Regenerate.
1781         * libbfd.h: Regenerate.
1782         * po/SRC-POTFILES.in: Regenerate.
1783
1784 2018-04-09  Maciej W. Rozycki  <macro@mips.com>
1785
1786         * elf64-mips.c (mips_elf64_write_rel): Handle a NULL BFD pointer
1787         in the BFD symbol referred by the relocation.
1788         (mips_elf64_write_rela): Likewise.
1789
1790 2018-04-09  Maciej W. Rozycki  <macro@mips.com>
1791
1792         * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Issue an
1793         error for out-of-range `r_sym' values.
1794
1795 2018-04-09  Alan Modra  <amodra@gmail.com>
1796
1797         * elf64-ppc.c (struct _ppc64_elf_section_data): Add has_pltcall field.
1798         (struct ppc_link_hash_table): Add can_convert_all_inline_plt.
1799         (ppc64_elf_check_relocs): Set has_pltcall.
1800         (ppc64_elf_adjust_dynamic_symbol): Discard some PLT entries.
1801         (ppc64_elf_inline_plt): New function.
1802         (ppc64_elf_size_dynamic_sections): Discard some PLT entries for locals.
1803         * elf64-ppc.h (ppc64_elf_inline_plt): Declare.
1804         * elf32-ppc.c (has_pltcall): Define.
1805         (struct ppc_elf_link_hash_table): Add can_convert_all_inline_plt.
1806         (ppc_elf_check_relocs): Set has_pltcall.
1807         (ppc_elf_inline_plt): New function.
1808         (ppc_elf_adjust_dynamic_symbol): Discard some PLT entries.
1809         (ppc_elf_size_dynamic_sections): Likewise.
1810         * elf32-ppc.h (ppc_elf_inline_plt): Declare.
1811
1812 2018-04-09  Alan Modra  <amodra@gmail.com>
1813
1814         * elf32-ppc.c (ppc_elf_howto_raw): Add PLTSEQ and PLTCALL howtos.
1815         (is_plt_seq_reloc): New function.
1816         (ppc_elf_check_relocs): Handle PLTSEQ and PLTCALL relocs.
1817         (ppc_elf_tls_optimize): Handle inline plt call sequence.
1818         (ppc_elf_relax_section): Handle PLTCALL reloc.
1819         (ppc_elf_relocate_section): Nop out inline plt call sequence when
1820         resolving locally.
1821         * elf64-ppc.c (ppc64_elf_howto_raw): Add R_PPC64_PLTSEQ and
1822         R_PPC64_PLTCALL entries.  Comment R_PPC64_TOCSAVE.
1823         (has_tls_get_addr_call): Correct comment.
1824         (is_branch_reloc): Add PLTCALL.
1825         (is_plt_seq_reloc): New function.
1826         (ppc64_elf_check_relocs): Handle PLT16_LO_DS reloc.  Set
1827         has_tls_reloc for R_PPC64_TLSGD and R_PPC64_TLSLD.  Create plt
1828         entry for R_PPC64_PLTCALL.
1829         (ppc64_elf_tls_optimize): Handle inline plt call sequence.
1830         (ppc_type_of_stub): Handle PLTCALL reloc.
1831         (toc_adjusting_stub_needed): Likewise.
1832         (ppc64_elf_relocate_section): Set "can_plt_call" for PLTCALL
1833         reloc insn.  Nop out inline plt call sequence when resolving
1834         locally.  Handle __tls_get_addr inline plt call optimization.
1835
1836 2018-04-09  Alan Modra  <amodra@gmail.com>
1837
1838         * elf64-ppc.c (LOCAL_PLT_ENTRY_SIZE): Define.
1839         (struct ppc_stub_hash_entry): Add symtype field.
1840         (PLT_KEEP): Define.
1841         (struct ppc_link_hash_table): Add pltlocal and relpltlocal.
1842         (create_linkage_sections): Create pltlocal and relpltlocal.
1843         (ppc64_elf_check_relocs): Allow PLT relocs on local symbols.
1844         Set PLT_KEEP.
1845         (ppc64_elf_adjust_dynamic_symbol): Keep PLT entries for inline calls.
1846         (allocate_dynrelocs): Allocate pltlocal and relpltlocal.
1847         (ppc64_elf_size_dynamic_sections): Size pltlocal and relpltlocal.
1848         Keep PLT entries for inline calls against locals.
1849         (ppc_build_one_stub): Use pltlocal as appropriate.
1850         (ppc_size_one_stub): Likewise.
1851         (ppc64_elf_size_stubs): Set symtype.
1852         (build_global_entry_stubs_and_plt): Init pltlocal and write
1853         relpltlocal for globals.
1854         (write_plt_relocs_for_local_syms): Likewise for local syms.
1855         (ppc64_elf_relocate_section): Support PLT for local syms.
1856         * elf32-ppc.c (PLT_KEEP): Define.
1857         (struct ppc_elf_link_hash_table): Add pltlocal and relpltlocal.
1858         (ppc_elf_create_glink): Create pltlocal and relpltlocal.
1859         (ppc_elf_check_relocs): Allow PLT relocs on local symbols.
1860         Set PLT_KEEP.  Adjust update_local_sym_info call.
1861         (ppc_elf_adjust_dynamic_symbol): Keep PLT entries for inline calls.
1862         (allocate_dynrelocs): Allocate pltlocal and relpltlocal.
1863         (ppc_elf_size_dynamic_sections): Size pltlocal and relpltlocal.
1864         (ppc_elf_relocate_section): Support PLT16 relocs for local syms.
1865         (write_global_sym_plt): Init pltlocal and write relpltlocal.
1866         (ppc_finish_symbols): Likewise for locals.
1867
1868 2018-04-09  Alan Modra  <amodra@gmail.com>
1869
1870         * elf64-ppc.c (ppc_build_one_stub): Move output of PLT relocs
1871         for local symbols to..
1872         (write_plt_relocs_for_local_syms): ..here.  New function.
1873         (ppc64_elf_finish_dynamic_symbol): Move output of PLT relocs for
1874         global symbols to..
1875         (build_global_entry_stubs_and_plt): ..here.  Rename from
1876         build_global_entry_stubs.
1877         (ppc64_elf_build_stubs): Always call build_global_entry_stubs_and_plt.
1878         Call write_plt_relocs_for_local_syms.
1879         * elf32-ppc.c (get_sym_h): New function.
1880         (ppc_elf_relax_section): Use get_sym_h.
1881         (ppc_elf_relocate_section): Move output of PLT relocs and glink
1882         stubs for local symbols to..
1883         (ppc_finish_symbols): ..here.  New function.
1884         (ppc_elf_finish_dynamic_symbol): Move output of PLT relocs for
1885         global syms to..
1886         (write_global_sym_plt): ..here.  New function.
1887         * elf32-ppc.h (ppc_elf_modify_segment_map): Delete attribute.
1888         (ppc_finish_symbols): Declare.
1889
1890 2018-04-09  Alan Modra  <amodra@gmail.com>
1891
1892         * elf32-ppc.c (ppc_elf_check_relocs): Handle PLT16 relocs.
1893         (ppc_elf_relocate_section): Likewise.
1894         * elf64-ppc.c (ppc64_elf_check_relocs): Handle PLT16_LO_DS.
1895         (ppc64_elf_relocate_section): Likewise.  Correct PLT16
1896         resolution to plt entry relative to toc pointer.
1897
1898 2018-04-09  Alan Modra  <amodra@gmail.com>
1899
1900         * elf64-ppc.c (TLS_TLS, TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL,
1901         TLS_TPRELGD, TLS_EXPLICIT):  Renumber.  Test TLS_TLS throughout
1902         file when other TLS flags are tested in a mask.
1903         (TLS_MARK, NON_GOT): Define.
1904         (PLT_IFUNC): Redefine, and test TLS_TLS throughout file as well.
1905         (update_local_sym_info): Don't create got entry when NON_GOT.
1906         (ppc64_elf_check_relocs): Pass NON_GOT with PLT_IFUNC.
1907         Set TLS_MARK.
1908         (get_tls_mask): Do toc lookup if tls_mask is just TLS_MARK.
1909         (ppc64_elf_relocate_section): Likewise.
1910         (ppc64_elf_tls_optimize): Don't attempt to optimize indirect
1911         __tls_get_addr calls lacking a marker reloc.
1912         * elf32-ppc.c (TLS_TLS, TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL,
1913         TLS_TPRELGD): Renumber.  Update comment.
1914         (TLS_MARK, NON_GOT): Define.
1915         (PLT_IFUNC): Redefine, and test TLS_TLS throughout file as well.
1916         (update_local_sym_info): Don't create got entry when NON_GOT.
1917         (ppc_elf_check_relocs): Pass NON_GOT with PLT_IFUNC.
1918         Set TLS_MARK.
1919         (ppc_elf_tls_optimize): Don't attempt to optimize indirect
1920         __tls_get_addr calls lacking a marker reloc.
1921
1922 2018-04-06  H.J. Lu  <hongjiu.lu@intel.com>
1923
1924         * elf64-x86-64.c (elf_x86_64_info_to_howto): Don't mask out
1925         R_X86_64_converted_reloc_bit.
1926
1927 2018-04-05  H.J. Lu  <hongjiu.lu@intel.com>
1928
1929         PR gas/22318
1930         * configure: Regenerated.
1931
1932 2018-04-05  Alan Modra  <amodra@gmail.com>
1933
1934         * elf-hppa.h (elf_hppa_info_to_howto): Init howto to NULL.
1935         (elf_hppa_info_to_howto_rel): Likewise.
1936
1937 2018-04-04  Maciej W. Rozycki  <macro@mips.com>
1938
1939         * elf-hppa.h (elf_hppa_info_to_howto): Also return
1940         unsuccessfully for unimplemented relocations.
1941         (elf_hppa_info_to_howto_rel): Likewise.
1942
1943 2018-04-04  Maciej W. Rozycki  <macro@mips.com>
1944
1945         * elf32-i860.c (lookup_howto): Add `abfd' parameter.  Set the
1946         `bfd_error_bad_value' error and call `_bfd_error_handler' on a
1947         howto lookup failure.
1948         (elf32_i860_reloc_type_lookup): Adjust `lookup_howto' call
1949         accordingly.
1950         (elf32_i860_info_to_howto_rela): Likewise.
1951         (elf32_i860_relocate_splitn): Likewise.
1952         (elf32_i860_relocate_pc16): Likewise.
1953         (elf32_i860_relocate_pc26): Likewise.
1954         (elf32_i860_relocate_section): Likewise.
1955
1956 2018-04-04  Maciej W. Rozycki  <macro@mips.com>
1957
1958         * elf32-visium.c (visium_info_to_howto_rela): Correct the range
1959         check for `visium_elf_howto_table' table access.
1960
1961 2018-04-04  Maciej W. Rozycki  <macro@mips.com>
1962
1963         * elf32-iq2000.c (iq2000_info_to_howto_rela): Correct the range
1964         check for `iq2000_elf_howto_table' table access.
1965
1966 2018-04-04  Maciej W. Rozycki  <macro@mips.com>
1967
1968         * elf32-frv.c (frv_info_to_howto_rela): Correct the range check
1969         for `elf32_frv_howto_table' table access.
1970
1971 2018-04-04  Maciej W. Rozycki  <macro@mips.com>
1972
1973         * elf32-mips.c (mips_elf32_rtype_to_howto): Also return
1974         unsuccessfully for placeholder howtos.
1975         * elf64-mips.c (mips_elf64_rtype_to_howto): Likewise.
1976         * elfn32-mips.c (mips_elf_n32_rtype_to_howto): Likewise.
1977
1978 2018-03-29  Maciej W. Rozycki  <macro@mips.com>
1979
1980         * elf32-mips.c (mips_info_to_howto_rel): Remove the calls to
1981         `_bfd_error_handler' and to set the `bfd_error_bad_value' error.
1982
1983 2018-03-28  Maciej W. Rozycki  <macro@mips.com>
1984
1985         * elf-hppa.h (elf_hppa_info_to_howto_rel): Remove
1986         ATTRIBUTE_UNUSED from `abfd'.
1987
1988 2018-03-28  Maciej W. Rozycki  <macro@mips.com>
1989
1990         * elf-hppa.h (elf_hppa_info_to_howto_rel): Correct
1991         `_bfd_error_handler' call formatting.
1992
1993 2018-03-28  Maciej W. Rozycki  <macro@mips.com>
1994
1995         * elf32-mips.c (mips_info_to_howto_rel): Call
1996         `mips_elf32_rtype_to_howto' directly rather than via
1997         `->elf_backend_mips_rtype_to_howto'.
1998
1999 2018-03-28  Renlin Li  <renlin.li@arm.com>
2000
2001         PR ld/22970
2002         * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Add cases for
2003         BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12,
2004         BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC,
2005         BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12,
2006         BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC,
2007         BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12,
2008         BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC,
2009         BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12,
2010         BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC.
2011         (elfNN_aarch64_final_link_relocate): Support new relocations.
2012         * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Support new
2013         relocations.
2014         (_bfd_aarch64_elf_resolve_relocation): Support new relocations.
2015
2016 2018-03-28  Renlin Li  <renlin.li@arm.com>
2017
2018         PR ld/22970
2019         * reloc.c: Add BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12
2020         BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12_NC,
2021         BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12,
2022         BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC,
2023         BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12,
2024         BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC,
2025         BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12,
2026         BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC,
2027         BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12,
2028         BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC.
2029         * elfnn-aarch64.c (elfNN_aarch64_howto_table): Add table entry for
2030         TLSLE_LDST16_TPREL_LO12,
2031         TLSLE_LDST16_TPREL_LO12_NC,
2032         TLSLE_LDST32_TPREL_LO12,
2033         TLSLE_LDST32_TPREL_LO12_NC,
2034         TLSLE_LDST64_TPREL_LO12,
2035         TLSLE_LDST64_TPREL_LO12_NC,
2036         TLSLE_LDST8_TPREL_LO12,
2037         TLSLE_LDST8_TPREL_LO12_NC.
2038         * bfd-in2.h: Regenerated.
2039         * libbfd.h: Regenerated.
2040
2041 2018-03-28  Eric Botcazou  <ebotcazou@adacore.com>
2042
2043         PR ld/22972
2044         * elfxx-sparc.c (struct _bfd_sparc_elf_link_hash_entry): Add new flag
2045         has_old_style_got_reloc.
2046         (_bfd_sparc_elf_check_relocs) <GOT relocations>: Set it for old-style
2047         relocations.  Fix a couple of long lines.
2048         (_bfd_sparc_elf_relocate_section) <R_SPARC_GOTDATA_OP>: Do not generate
2049         a R_SPARC_NONE for the GOT slot if the symbol is also subject to old-style
2050         GOT relocations.
2051
2052 2018-03-25  H.J. Lu  <hongjiu.lu@intel.com>
2053
2054         PR ld/23000
2055         * elf64-x86-64.c (elf_x86_64_finish_dynamic_sections): Add
2056         ENDBR64 to the TLSDESC PLT entry.
2057
2058 2018-03-21  Alan Modra  <amodra@gmail.com>
2059
2060         * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Trim uninteresting
2061         symbols.  Use size_t counts.  Delete redundant opd test.
2062
2063 2018-03-21  Alan Modra  <amodra@gmail.com>
2064
2065         * elf32-ppc.c (ppc_elf_tls_optimize): Delete locsyms.
2066
2067 2018-03-21  Alan Modra  <amodra@gmail.com>
2068
2069         * elf32-ppc.c (struct ppc_elf_link_hash_entry): Make tls_mask
2070         field unsigned.
2071         (update_local_sym_info): Likewise for local_got_tls_masks.
2072         (ppc_elf_tls_optimize): Likewise for lgot_masks.
2073
2074 2018-03-21  Alan Modra  <amodra@gmail.com>
2075
2076         * elf64-ppc.c (ppc_size_one_stub): Fix comment typo.
2077         (ppc64_elf_layout_multitoc): Allocate relocs for tprel as we
2078         do in size_dynamic_sections.
2079
2080 2018-03-21  Alan Modra  <amodra@gmail.com>
2081
2082         * elf64-ppc.c (ppc64_elf_relocate_section): Don't access rel[1]
2083         without first checking array bounds.
2084         * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
2085
2086 2018-03-20  H.J. Lu  <hongjiu.lu@intel.com>
2087
2088         PR ld/22983
2089         * elflink.c (bfd_elf_link_mark_dynamic_symbol): Set
2090         non_ir_ref_dynamic if a symbol is made dynamic by --dynamic-list.
2091
2092 2018-03-19  Nick Clifton  <nickc@redhat.com>
2093
2094         * po/es.po: Updated Spanish translation.
2095
2096 2018-03-15  Max Filippov  <jcmvbkbc@gmail.com>
2097
2098         * elf32-xtensa.c (xlate_map_entry): Change types of address
2099         fields from 'unsigned' to 'bfd_vma'.
2100         (xlate_offset_with_removed_text): Use struct xlate_map_entry as
2101         the key argument to bsearch. Allow offsets past the end of a
2102         section, use the last map entry for translation of such offsets.
2103
2104 2018-03-15  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
2105
2106         * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Removed.
2107         Not support the target feature.
2108         (nds32_elf_ex9_itb_base): Likewise.
2109         (nds32_elf_ex9_import_table): Likewise.
2110         (nds32_elf_ex9_finish): Likewise.
2111         (nds32_elf_ex9_reloc_jmp): Likewise.
2112         (nds32_elf_get_insn_with_reg): Likewise.
2113         (nds32_get_local_syms): Likewise.
2114         (nds32_elf_ex9_replace_instruction): Likewise.
2115         (nds32_elf_ifc_calc): Likewise.
2116         (nds32_elf_ifc_finish): Likewise.
2117         (nds32_elf_ifc_replace): Likewise.
2118         (nds32_elf_ifc_reloc): Likewise.
2119
2120 2018-03-14  Alan Modra  <amodra@gmail.com>
2121
2122         * elf64-ppc.c (sfpr_define): Adjust for stub_sec size having
2123         sfpr size added before defining alias symbols.
2124         (ppc64_elf_build_stubs): Add stub section padding before
2125         copying sfpr contents and defining save/restore alias symbols.
2126
2127 2018-03-14  H.J. Lu  <hongjiu.lu@intel.com>
2128
2129         PR ld/20882
2130         * elflink.c (elf_gc_mark_debug_section): Also check the local
2131         debug definition section.
2132
2133 2018-03-13  Nick Clifton  <nickc@redhat.com>
2134
2135         PR 22113
2136         * pei-x86_64.c (pex64_get_unwind_info): Change to a boolean
2137         function.  Add an end address parameter.  Check access of the data
2138         pointer to make sure that they do not extend beyond the end
2139         address.  Return FALSE if any check fails.  Add the end address
2140         pointer to the ui structure.
2141         (pex64_xdata_print_uwd_codes): Check accesses of the raw unwind
2142         codes to make sure that they do not extend beyond the end address
2143         pointer.  Print an error message and return immediately if any
2144         check fails.
2145
2146 2018-03-09  Nick Clifton  <nickc@redhat.com>
2147
2148         * elf64-s390.c (elf_s390_relocate_section): Move check for
2149         relocations against non-allocated sections to before the code that
2150         handles ifunc relocations.
2151         * elf32-s390.c (elf_s390_relocate_section): Likewise.
2152         * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Treat
2153         relocs against IFUNC symbols in non-allocated sections as relocs
2154         against FUNC symbols.
2155         * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
2156
2157 2018-03-08  H.J. Lu  <hongjiu.lu@intel.com>
2158
2159         PR ld/22929
2160         * elf32-i386.c (elf_i386_relocate_section): Treat relocation
2161         against IFUNC symbol in SHT_NOTE section without SHF_ALLOC as
2162         relocation against FUNC symbol.
2163         * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
2164
2165 2018-03-07  Renlin Li  <renlin.li@arm.com>
2166
2167         PR ld/20402
2168         * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Check absolute
2169         symbol, and don't emit relocation in specific case.
2170
2171 2018-03-07  Alan Modra  <amodra@gmail.com>
2172
2173         * elf64-mips.c (mips_elf64_rtype_to_howto): Return NULL on error.
2174         (mips_elf64_slurp_one_reloc_table): Pass on error.
2175
2176 2018-03-03  James Cowgill  <james.cowgill@mips.com>
2177             Maciej W. Rozycki  <macro@mips.com>
2178
2179         PR ld/21900
2180         * elfxx-mips.c (mips_elf_calculate_relocation): Only return
2181         after calling `undefined_symbol' hook if this is an error
2182         condition.  Assume the value of 0 for the symbol requested
2183         otherwise.
2184
2185 2018-03-02  Jim Wilson  <jimw@sifive.com>
2186
2187         PR 22903
2188         * elfnn-aarch64.c (_bfd_aarch64_resize_stubs): Add 8 bytes for branch
2189         and nop instead of 4.
2190         (elfNN_arch64_build_stubs): Add nop after branch.  Increase size by
2191         8 instead of 4.
2192
2193 2018-03-01  Jim Wilson  <jimw@sifive.com>
2194
2195         PR 22756
2196         * elfnn-riscv.c (riscv_relax_delete_bytes): When adjust st_size, use
2197         else if instead of if.
2198
2199 2018-03-01  Alan Modra  <amodra@gmail.com>
2200
2201         * elf32-ft32.c (ft32_info_to_howto_rela): Correct range test.
2202
2203 2018-02-28  Alan Modra  <amodra@gmail.com>
2204
2205         PR 22887
2206         * aoutx.h (swap_std_reloc_in): Correct r_index bound check.
2207
2208 2018-02-28  Nick Clifton  <nickc@redhat.com>
2209
2210         PR 22895
2211         PR 22893
2212         * dwarf2.c (read_n_bytes): Replace size parameter with dwarf_block
2213         pointer.  Drop unused abfd parameter.  Check the size of the block
2214         before initialising the data field.  Return the end pointer if the
2215         size is invalid.
2216         (read_attribute_value): Adjust invocations of read_n_bytes.
2217
2218         PR 22894
2219         * dwarf1.c (parse_die): Check the length of form blocks before
2220         advancing the data pointer.
2221
2222 2018-02-28  Alan Modra  <amodra@gmail.com>
2223
2224         PR 22887
2225         * aoutx.h (translate_symbol_table): Print an error message and set
2226         bfd_error on finding an invalid name string offset.
2227
2228 2018-02-27  H.J. Lu  <hongjiu.lu@intel.com>
2229
2230         * config.in: Regenerated.
2231         * configure: Likewise.
2232         * configure.ac: Add --enable-separate-code.
2233         (DEFAULT_LD_Z_SEPARATE_CODE): New AC_DEFINE_UNQUOTED.  Default
2234         to 1 for Linux/x86 targets,
2235         * elf64-x86-64.c (ELF_MAXPAGESIZE): Set to 0x1000 if
2236         DEFAULT_LD_Z_SEPARATE_CODE is 1.
2237
2238 2018-02-27  Nick Clifton  <nickc@redhat.com>
2239
2240         * aout-cris.c (swap_ext_reloc_out): Standadize error/warning
2241         message.
2242         * elf-hppa.h (elf_hppa_info_to_howto_rel): Likewise.
2243         * elf32-i386.c (elf_i386_reloc_type_lookup): Likewise.
2244         * elf32-xtensa.c (elf_xtensa_reloc_type_lookup): Likewise.
2245         * elf64-ppc.c (ppc64_elf_reloc_type_lookup): Likewise.
2246         * elf64-s390.c (elf_s390_reloc_type_lookup): Likewise.
2247         * elf64-sh64.c (sh_elf64_info_to_howto): Likewise.
2248         * elfxx-ia64.c (ia64_elf_reloc_type_lookup): Likewise.
2249         * elfxx-sparc.c (_bfd_sparc_elf_reloc_type_lookup): Likewise.
2250         * elfxx-tilegx.c (tilegx_reloc_type_lookup): Likewise.
2251
2252         PR 22875
2253         * elf-bfd.h (struct elf_backend_data): Change the return type of
2254         the elf_info_to_howto and elf_info_to_howto_rel function pointers
2255         to bfd_boolean.
2256         * elfcode.h (elf_slurp_reloc_table_from_section): Check the return
2257         value from the info_to_howto function and fail if that function
2258         failed.
2259         * elf32-h8300.c (elf32_h8_relocate_section): Check return value
2260         from the info_to_howto function.
2261         (elf32_h8_relax_section): Likewise.
2262         * elf32-lm32.c (lm32_elf_relocate_section): Likewise.
2263         * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise.
2264         * elf32-score.c (s3_bfd_score_elf_relocate_section): Likewise.
2265         * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
2266         * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
2267         * elf64-ia64-vms.c (elf64_ia64_relocate_section): Likewise.
2268         * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Likewise.
2269         * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
2270         * elfnn-ia64.c (elfNN_ia64_relocate_section): Likewise.
2271         * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
2272         (riscv_elf_relocate_section): Likewise.
2273         * elf-hppa.h (elf_hppa_info_to_howto): Change return type to
2274         bfd_boolean.  Issue an error message, set an error value and
2275         return FALSE if the reloc is not recognized.
2276         (elf_hppa_info_to_howto_rel): Likewise.
2277         * elf-m10200.c (mn10200_info_to_howto): Likewise.
2278         * elf-m10300.c (mn10300_info_to_howto): Likewise.
2279         * elf.c (_bfd_elf_no_info_to_howto): Likewise.
2280         * elf32-arc.c (arc_info_to_howto_rel): Likewise.
2281         * elf32-arm.c (elf32_arm_info_to_howto): Likewise.
2282         * elf32-avr.c (avr_info_to_howto_rela): Likewise.
2283         * elf32-bfin.c (bfin_info_to_howto): Likewise.
2284         * elf32-cr16.c (elf_cr16_info_to_howto): Likewise.
2285         * elf32-cr16c.c (elf_cr16c_info_to_howto): Likewise.
2286         * elf32-cris.c (elf_cr16c_info_to_howto_rel)
2287         (cris_info_to_howto_rela): Likewise.
2288         * elf32-crx.c (elf_crx_info_to_howto): Likewise.
2289         * elf32-d10v.c (d10v_info_to_howto_rel): Likewise.
2290         * elf32-d30v.c (d30v_info_to_howto_rel, d30v_info_to_howto_rela):
2291         Likewise.
2292         * elf32-dlx.c (dlx_rtype_to_howto, elf32_dlx_info_to_howto)
2293         (elf32_dlx_info_to_howto_rel): Likewise.
2294         * elf32-epiphany.c (epiphany_info_to_howto_rela): Likewise.
2295         * elf32-fr30.c (fr30_info_to_howto_rela): Likewise.
2296         * elf32-frv.c (frv_info_to_howto_rela)
2297         (frvfdpic_info_to_howto_rel): Likewise.
2298         * elf32-ft32.c (ft32_info_to_howto_rela): Likewise.
2299         * elf32-gen.c (elf_generic_info_to_howto)
2300         (elf_generic_info_to_howto_rel): Likewise.
2301         * elf32-h8300.c (elf32_h8_info_to_howto)
2302         (elf32_h8_info_to_howto_rel): Likewise.
2303         * elf32-i370.c (i370_elf_info_to_howto): Likewise.
2304         * elf32-i386.c (elf_i386_reloc_type_lookup)
2305         (elf_i386_rtype_to_howto, elf_i386_info_to_howto_rel): Likewise.
2306         * elf32-i860.c (lookup_howto, elf32_i860_info_to_howto_rela):
2307         Likewise.
2308         * elf32-i960.c (elf32_i960_info_to_howto_rel): Likewise.
2309         * elf32-ip2k.c (ip2k_info_to_howto_rela): Likewise.
2310         * elf32-iq2000.c (iq2000_info_to_howto_rela): Likewise.
2311         * elf32-lm32.c (lm32_info_to_howto_rela): Likewise.
2312         * elf32-m32c.c (m32c_info_to_howto_rela): Likewise.
2313         * elf32-m32r.c (m32r_info_to_howto_rel, m32r_info_to_howto):
2314         Likewise.
2315         * elf32-m68hc11.c (m68hc11_info_to_howto_rel): Likewise.
2316         * elf32-m68hc12.c (m68hc11_info_to_howto_rel): Likewise.
2317         * elf32-m68k.c (rtype_to_howto): Likewise.
2318         * elf32-mcore.c (mcore_elf_info_to_howto): Likewise.
2319         * elf32-mep.c (mep_info_to_howto_rela): Likewise.
2320         * elf32-metag.c (metag_info_to_howto_rela): Likewise.
2321         * elf32-microblaze.c (microblaze_elf_info_to_howto): Likewise.
2322         * elf32-mips.c (mips_info_to_howto_rel, mips_info_to_howto_rela):
2323         Likewise.
2324         * elf32-moxie.c (moxie_info_to_howto_rela): Likewise.
2325         * elf32-msp430.c (msp430_info_to_howto_rela): Likewise.
2326         * elf32-mt.c (mt_info_to_howto_rela): Likewise.
2327         * elf32-nds32.c (nds32_info_to_howto_rel, nds32_info_to_howto):
2328         Likewise.
2329         * elf32-nios2.c (nios2_elf32_info_to_howto): Likewise.
2330         * elf32-or1k.c (or1k_info_to_howto_rela): Likewise.
2331         * elf32-pj.c (pj_elf_info_to_howto): Likewise.
2332         * elf32-ppc.c (ppc_elf_info_to_howto): Likewise.
2333         * elf32-pru.c (pru_elf32_info_to_howto): Likewise.
2334         * elf32-rl78.c (rl78_info_to_howto_rela): Likewise.
2335         * elf32-rx.c (rx_info_to_howto_rela): Likewise.
2336         * elf32-s390.c (elf_s390_info_to_howto): Likewise.
2337         * elf32-score.c (s3_bfd_score_info_to_howto)
2338         (_bfd_score_info_to_howto): Likewise.
2339         * elf32-score7.c (s7_bfd_score_info_to_howto): Likewise.
2340         * elf32-sh.c (sh_elf_info_to_howto): Likewise.
2341         * elf32-spu.c (spu_elf_info_to_howto): Likewise.
2342         * elf32-tic6x.c (elf32_tic6x_info_to_howto)
2343         (elf32_tic6x_info_to_howto_rel): Likewise.
2344         * elf32-tilepro.c (tilepro_info_to_howto_rela): Likewise.
2345         * elf32-v850.c (v850_elf_info_to_howto_rel)
2346         (v850_elf_info_to_howto_rela, v800_elf_info_to_howto): Likewise.
2347         * elf32-vax.c (rtype_to_howto): Likewise.
2348         * elf32-visium.c (visium_info_to_howto_rela): Likewise.
2349         * elf32-wasm32.c (elf32_wasm32_rtype_to_howto)
2350         (elf32_wasm32_info_to_howto_rela): Likewise.
2351         * elf32-xc16x.c (elf32_xc16x_info_to_howto): Likewise.
2352         * elf32-xgate.c (xgate_info_to_howto_rel): Likewise.
2353         * elf32-xstormy16.c (xstormy16_info_to_howto_rela): Likewise.
2354         * elf32-xtensa.c (elf_xtensa_info_to_howto_rela): Likewise.
2355         * elf64-alpha.c (elf64_alpha_info_to_howto): Likewise.
2356         * elf64-gen.c (elf_generic_info_to_howto)
2357         (elf_generic_info_to_howto_rel): Likewise.
2358         * elf64-ia64-vms.c (elf64_ia64_info_to_howto): Likewise.
2359         * elf64-mips.c (mips_elf64_info_to_howto_rela): Likewise.
2360         * elf64-mmix.c (mmix_info_to_howto_rela): Likewise.
2361         * elf64-ppc.c (ppc64_elf_info_to_howto): Likewise.
2362         * elf64-s390.c (elf_s390_reloc_type_lookup): Likewise.
2363         * elf64-sh64.c (elf_s390_info_to_howto, sh_elf64_info_to_howto):
2364         Likewise.
2365         * elf64-x86-64.c (elf_x86_64_info_to_howto): Likewise.
2366         * elfn32-mips.c (mips_info_to_howto_rel, mips_info_to_howto_rela):
2367         Likewise.
2368         * elfnn-aarch64.c (elfNN_aarch64_info_to_howto): Likewise.
2369         * elfnn-ia64.c (elfNN_ia64_info_to_howto): Likewise.
2370         * elfnn-riscv.c (riscv_info_to_howto_rela): Likewise.
2371         * elfxx-ia64.c (ia64_elf_reloc_type_lookup): Likewise.
2372         * elfxx-sparc.c (_bfd_sparc_elf_info_to_howto): Likewise.
2373         * elfxx-tilegx.c (tilegx_info_to_howto_rela): Likewise.
2374         * elf32-score.h (s7_bfd_score_info_to_howto): Update prototype.
2375         * elfxx-sparc.h (_bfd_sparc_elf_info_to_howto): Update prototype.
2376         * elfxx-tilegx.h (tilegx_info_to_howto_rela): Update prototype.
2377         * elfxx-target.h (elf_info_to_howto, elf_info_to_howto_rel):
2378         Default to NULL.
2379
2380 2018-02-26  Jim Wilson  <jimw@sifive.com>
2381             Stephan Schreiber <info@fs-driver.org>
2382
2383         PR 15904
2384         * elfnn-ia64.c (elfNN_ia64_relax_section): After ia64_elf_relax_brl
2385         call, set changed_contents and changed_relocs.  Likewise after
2386         successful ia64_elf_relax_br call.
2387
2388 2018-02-26  Alan Modra  <amodra@gmail.com>
2389
2390         * elf.c (assign_file_positions_except_relocs): Don't segfault
2391         when actual number of phdrs is less than allocated.  Delete
2392         outdated comment.  Formatting.
2393
2394 2018-02-26  Alan Modra  <amodra@gmail.com>
2395
2396         * elf-m10300.c, * elf-s390-common.c, * elf32-arc.c, * elf32-cris.c,
2397         * elf32-dlx.c, * elf32-frv.c, * elf32-i370.c, * elf32-lm32.c,
2398         * elf32-m32r.c, * elf32-m68hc1x.c, * elf32-m68k.c,
2399         * elf32-microblaze.c, * elf32-msp430.c, * elf32-nds32.c,
2400         * elf32-nios2.c, * elf32-or1k.c, * elf32-rl78.c, * elf32-rx.c,
2401         * elf32-score.c, * elf32-score7.c, * elf32-sh-symbian.c,
2402         * elf32-sh.c, * elf32-spu.c, * elf32-v850.c, * elf32-xtensa.c,
2403         * elf64-alpha.c, * elf64-ia64-vms.c, * elf64-mmix.c,
2404         * elf64-sh64.c, * elf64-sparc.c, * elfnn-ia64.c, * elfxx-tilegx.c,
2405         * mmo.c, * osf-core.c, * srec.c, * vms-alpha.c: Standardize
2406         error/warning messages.
2407
2408 2018-02-26  Alan Modra  <amodra@gmail.com>
2409
2410         * archive.c, * bfd.c, * linker.c, * reloc.c, * stabs.c,
2411         * syms.c: Standardize error/warning messages.
2412
2413 2018-02-26  Alan Modra  <amodra@gmail.com>
2414
2415         * aout-adobe.c, * aout-cris.c, * i386linux.c, * m68klinux.c,
2416         * sparclinux.c, * coff-alpha.c, * coff-arm.c, * coff-mcore.c,
2417         * coffcode.h, * coffgen.c, * cofflink.c, * ecoff.c, * pe-mips.c,
2418         * peXXigen.c, * peicode.h: Standardize error/warning messages.
2419
2420 2018-02-26  Alan Modra  <amodra@gmail.com>
2421
2422         * elf32-arm.c, * elfnn-aarch64.c: Standardize error/warning messages.
2423
2424 2018-02-26  Alan Modra  <amodra@gmail.com>
2425
2426         * elfxx-mips.c: Standardize error/warning messages.
2427
2428 2018-02-26  Alan Modra  <amodra@gmail.com>
2429
2430         * dwarf2.c, * elf-attrs.c, * elf-eh-frame.c, * elf.c, * elf32-gen.c,
2431         * elflink.c: Standardize error/warning messages.  Replace use of
2432         linker callback einfo with _bfd_error_handler when possible.
2433
2434 2018-02-26  Alan Modra  <amodra@gmail.com>
2435
2436         * aoutx.h, * coff-alpha.c, * coff-i860.c, * coff-m68k.c,
2437         * coff-mcore.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c,
2438         * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-w65.c,
2439         * elf-bfd.h, * elf-m10300.c, * elf.c, * elf32-avr.c, * elf32-bfin.c,
2440         * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c,
2441         * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c,
2442         * elf32-fr30.c, * elf32-frv.c, * elf32-i370.c, * elf32-i386.c,
2443         * elf32-i960.c, * elf32-ip2k.c, * elf32-iq2000.c, * elf32-lm32.c,
2444         * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c,
2445         * elf32-m68k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c,
2446         * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c,
2447         * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-or1k.c,
2448         * elf32-pj.c, * elf32-ppc.c, * elf32-rl78.c, * elf32-rx.c,
2449         * elf32-s390.c, * elf32-sh.c, * elf32-spu.c, * elf32-tic6x.c,
2450         * elf32-v850.c, * elf32-vax.c, * elf32-visium.c, * elf32-wasm32.c,
2451         * elf32-xgate.c, * elf32-xtensa.c, * elf64-alpha.c,
2452         * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c,
2453         * elf64-ppc.c, * elf64-s390.c, * elf64-sparc.c, * elf64-x86-64.c,
2454         * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c,
2455         * elfnn-riscv.c, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-riscv.h,
2456         * elfxx-sparc.c, * elfxx-sparc.h, * reloc.c: Standardize
2457         unrecognized/unsupported reloc message.
2458
2459 2018-02-26  Alan Modra  <amodra@gmail.com>
2460
2461         * elf32-ppc.c: Standardize error/warning messages.  Use
2462         _bfd_error_handler rather than einfo when einfo features not used.
2463         * elf64-ppc.c: Likewise.
2464
2465 2018-02-23  Alan Modra  <amodra@gmail.com>
2466
2467         PR 22881
2468         * elf.c (assign_file_positions_for_non_load_sections): Remove RELRO
2469         segment if no matching LOAD segment.
2470
2471 2018-02-23  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
2472
2473         * elf32-nds32.h: Define mask for ict_model.
2474
2475 2018-02-20  Jason Duerstock  <jason.duerstock@gmail.com>
2476
2477         * elfnn-ia64.c (elf_backend_can_gc_sections): Enable.
2478
2479 2018-02-19  Maciej W. Rozycki  <macro@mips.com>
2480
2481         Revert
2482         2018-01-12  Vlad Ivanov  <vlad@ivanov.email>
2483
2484         * elfxx-mips.c (_bfd_mips_elf_final_link): Notify user when
2485         .reginfo section has wrong size.
2486
2487 2018-02-19  Maciej W. Rozycki  <macro@mips.com>
2488
2489         * elfxx-mips.c (_bfd_mips_elf_always_size_sections): Set
2490         SEC_FIXED_SIZE and SEC_HAS_CONTENTS flags for `.reginfo' and
2491         `.MIPS.abiflags' sections.
2492         (_bfd_mips_elf_final_link): Avoid reading beyond `.reginfo'
2493         section's end.
2494
2495 2018-02-19  Maciej W. Rozycki  <macro@mips.com>
2496
2497         * section.c (SEC_FIXED_SIZE): New macro.
2498         * bfd-in2.h: Regenerate.
2499
2500 2018-02-19  Maciej W. Rozycki  <macro@mips.com>
2501
2502         * section.c (SEC_HAS_GOT_REF): Remove macro.
2503         * bfd-in2.h: Regenerate.
2504
2505 2018-02-19  Alan Modra  <amodra@gmail.com>
2506
2507         * elf-attrs.c (_bfd_elf_parse_attributes): Correct _bfd_error_handler
2508         arguments.
2509         * elfxx-mips.c (_bfd_mips_elf_final_link): Likewise.
2510         * elfnn-riscv.c (_bfd_riscv_relax_align): Likewise.
2511         (_bfd_riscv_relax_pc): Likewise and fix typos.
2512         * libbfd-in.h (_bfd_error_handler): Add attribute printf.
2513         * libbfd.h: Regenerate.
2514
2515 2018-02-19  Alan Modra  <amodra@gmail.com>
2516
2517         * dwarf2.c (read_section): Don't use 'll' format modifier.
2518         (find_abstract_instance): Likewise.
2519         * elfcore.h (elf_core_file_p): Likewise.
2520
2521 2018-02-19  Alan Modra  <amodra@gmail.com>
2522
2523         * bfd-in.h: Include inttypes.h or if not available define
2524         PRId64, PRIu64 and PRIx64.
2525         * bfd.c (_bfd_doprnt, _bfd_doprnt_scan): Remove support for L
2526         modifier to print bfd_vma.
2527         * coff-arm.c, * coff-mcore.c, * coff-ppc.c, * coff-rs6000.c,
2528         * coff-sh.c, * coff-tic80.c, * coffcode.h, * coffgen.c, * cofflink.c,
2529         * compress.c, * dwarf2.c, * elf-m10300.c, * elf.c, * elf32-arc.c,
2530         * elf32-arm.c, * elf32-bfin.c, * elf32-cris.c, * elf32-hppa.c,
2531         * elf32-i386.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32r.c,
2532         * elf32-m68k.c, * elf32-metag.c, * elf32-nds32.c, * elf32-nios2.c,
2533         * elf32-ppc.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c,
2534         * elf32-score7.c, * elf32-sh.c, * elf32-sh64.c, * elf32-spu.c,
2535         * elf32-tic6x.c, * elf32-tilepro.c, * elf32-v850.c, * elf32-vax.c,
2536         * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c,
2537         * elf64-mmix.c, * elf64-s390.c, * elf64-sh64.c, * elf64-x86-64.c,
2538         * elfcode.h, * elfcore.h, * elflink.c, * elfnn-aarch64.c,
2539         * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-mips.c, * elfxx-sparc.c,
2540         * elfxx-tilegx.c, * ieee.c, * ihex.c, * mach-o.c, * merge.c, * mmo.c,
2541         * peXXigen.c, * xcofflink.c: Replace use of Lx modifier with PRIx64,
2542         and cast input to uint64_t, and similarly for Ld and Lu.
2543         * bfd-in2.h: Regenerate.
2544
2545 2018-02-19  Alan Modra  <amodra@gmail.com>
2546
2547         * elf32-arm.c, * elf32-hppa.c, * elf32-lm32.c, * elf32-m32r.c,
2548         * elf32-metag.c, * elf32-nds32.c, * elf32-or1k.c, * elf32-ppc.c,
2549         * elf32-s390.c, * elf32-sh.c, * elf32-tic6x.c, * elf32-tilepro.c,
2550         * elf64-ppc.c, * elf64-s390.c, * elflink.c, * elfnn-aarch64.c,
2551         * elfnn-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c,
2552         * reloc.c: Replace use of %R and %T in format strings passed to
2553         einfo and friends by %pR and %pT.
2554
2555 2018-02-19  Alan Modra  <amodra@gmail.com>
2556
2557         * bfd.c (_bfd_doprnt, _bfd_doprnt_scan): Handle %pA and %pB in place
2558         of %A and %B.
2559         * aout-adobe.c: Update all messages using %A and %B.
2560         * aout-cris.c: Likewise.
2561         * aoutx.h: Likewise.
2562         * archive.c: Likewise.
2563         * binary.c: Likewise.
2564         * cache.c: Likewise.
2565         * coff-alpha.c: Likewise.
2566         * coff-arm.c: Likewise.
2567         * coff-i860.c: Likewise.
2568         * coff-mcore.c: Likewise.
2569         * coff-ppc.c: Likewise.
2570         * coff-rs6000.c: Likewise.
2571         * coff-sh.c: Likewise.
2572         * coff-tic4x.c: Likewise.
2573         * coff-tic54x.c: Likewise.
2574         * coff-tic80.c: Likewise.
2575         * coff64-rs6000.c: Likewise.
2576         * coffcode.h: Likewise.
2577         * coffgen.c: Likewise.
2578         * cofflink.c: Likewise.
2579         * coffswap.h: Likewise.
2580         * compress.c: Likewise.
2581         * cpu-arm.c: Likewise.
2582         * ecoff.c: Likewise.
2583         * elf-attrs.c: Likewise.
2584         * elf-eh-frame.c: Likewise.
2585         * elf-ifunc.c: Likewise.
2586         * elf-m10300.c: Likewise.
2587         * elf-properties.c: Likewise.
2588         * elf-s390-common.c: Likewise.
2589         * elf.c: Likewise.
2590         * elf32-arc.c: Likewise.
2591         * elf32-arm.c: Likewise.
2592         * elf32-avr.c: Likewise.
2593         * elf32-bfin.c: Likewise.
2594         * elf32-cr16.c: Likewise.
2595         * elf32-cr16c.c: Likewise.
2596         * elf32-cris.c: Likewise.
2597         * elf32-crx.c: Likewise.
2598         * elf32-d10v.c: Likewise.
2599         * elf32-d30v.c: Likewise.
2600         * elf32-epiphany.c: Likewise.
2601         * elf32-fr30.c: Likewise.
2602         * elf32-frv.c: Likewise.
2603         * elf32-gen.c: Likewise.
2604         * elf32-hppa.c: Likewise.
2605         * elf32-i370.c: Likewise.
2606         * elf32-i386.c: Likewise.
2607         * elf32-i960.c: Likewise.
2608         * elf32-ip2k.c: Likewise.
2609         * elf32-iq2000.c: Likewise.
2610         * elf32-lm32.c: Likewise.
2611         * elf32-m32c.c: Likewise.
2612         * elf32-m32r.c: Likewise.
2613         * elf32-m68hc11.c: Likewise.
2614         * elf32-m68hc12.c: Likewise.
2615         * elf32-m68hc1x.c: Likewise.
2616         * elf32-m68k.c: Likewise.
2617         * elf32-mcore.c: Likewise.
2618         * elf32-mep.c: Likewise.
2619         * elf32-metag.c: Likewise.
2620         * elf32-microblaze.c: Likewise.
2621         * elf32-moxie.c: Likewise.
2622         * elf32-msp430.c: Likewise.
2623         * elf32-mt.c: Likewise.
2624         * elf32-nds32.c: Likewise.
2625         * elf32-nios2.c: Likewise.
2626         * elf32-or1k.c: Likewise.
2627         * elf32-pj.c: Likewise.
2628         * elf32-ppc.c: Likewise.
2629         * elf32-rl78.c: Likewise.
2630         * elf32-rx.c: Likewise.
2631         * elf32-s390.c: Likewise.
2632         * elf32-score.c: Likewise.
2633         * elf32-score7.c: Likewise.
2634         * elf32-sh-symbian.c: Likewise.
2635         * elf32-sh.c: Likewise.
2636         * elf32-sh64.c: Likewise.
2637         * elf32-sparc.c: Likewise.
2638         * elf32-spu.c: Likewise.
2639         * elf32-tic6x.c: Likewise.
2640         * elf32-tilepro.c: Likewise.
2641         * elf32-v850.c: Likewise.
2642         * elf32-vax.c: Likewise.
2643         * elf32-visium.c: Likewise.
2644         * elf32-wasm32.c: Likewise.
2645         * elf32-xgate.c: Likewise.
2646         * elf32-xtensa.c: Likewise.
2647         * elf64-alpha.c: Likewise.
2648         * elf64-gen.c: Likewise.
2649         * elf64-hppa.c: Likewise.
2650         * elf64-ia64-vms.c: Likewise.
2651         * elf64-mmix.c: Likewise.
2652         * elf64-ppc.c: Likewise.
2653         * elf64-s390.c: Likewise.
2654         * elf64-sh64.c: Likewise.
2655         * elf64-sparc.c: Likewise.
2656         * elf64-x86-64.c: Likewise.
2657         * elfcode.h: Likewise.
2658         * elfcore.h: Likewise.
2659         * elflink.c: Likewise.
2660         * elfnn-aarch64.c: Likewise.
2661         * elfnn-ia64.c: Likewise.
2662         * elfnn-riscv.c: Likewise.
2663         * elfxx-mips.c: Likewise.
2664         * elfxx-sparc.c: Likewise.
2665         * elfxx-tilegx.c: Likewise.
2666         * elfxx-x86.c: Likewise.
2667         * hpux-core.c: Likewise.
2668         * ieee.c: Likewise.
2669         * ihex.c: Likewise.
2670         * libbfd.c: Likewise.
2671         * linker.c: Likewise.
2672         * mach-o.c: Likewise.
2673         * merge.c: Likewise.
2674         * mmo.c: Likewise.
2675         * oasys.c: Likewise.
2676         * pdp11.c: Likewise.
2677         * pe-mips.c: Likewise.
2678         * peXXigen.c: Likewise.
2679         * peicode.h: Likewise.
2680         * reloc.c: Likewise.
2681         * rs6000-core.c: Likewise.
2682         * srec.c: Likewise.
2683         * stabs.c: Likewise.
2684         * vms-alpha.c: Likewise.
2685         * xcofflink.c: Likewise.
2686
2687 2018-02-19  Alan Modra  <amodra@gmail.com>
2688
2689         PR 22845
2690         * elf.c (IS_TBSS): Define.
2691         (_bfd_elf_map_sections_to_segments): Use IS_TBSS.
2692         (assign_file_positions_for_non_load_sections): Revert last change.
2693         Properly calculate load segment limits to compare against relro limits.
2694
2695 2018-02-17  Alan Modra  <amodra@gmail.com>
2696
2697         PR 22845
2698         * elf.c (assign_file_positions_for_non_load_sections): Ignore
2699         degenerate zero size PT_LOAD segments when finding one overlapping
2700         the PT_GNU_RELRO segment.
2701
2702 2018-02-16  Alan Modra  <amodra@gmail.com>
2703
2704         * libbfd.c (_bfd_bool_bfd_false_error): Rename from bfd_false.
2705         (_bfd_bool_bfd_true): Rename from bfd_true.
2706         (_bfd_ptr_bfd_null_error): Rename from bfd_nullvoidptr.
2707         (_bfd_int_bfd_0): Rename from bfd_0.
2708         (_bfd_uint_bfd_0): Rename from bfd_0u.
2709         (_bfd_long_bfd_0): Rename from bfd_0l.
2710         (_bfd_long_bfd_n1_error): Rename from _bfd_n1.
2711         (_bfd_void_bfd): Rename from bfd_void.
2712         (_bfd_bool_bfd_false, _bfd_bool_bfd_asymbol_false),
2713         (_bfd_bool_bfd_link_false_error),
2714         (_bfd_bool_bfd_link_true, _bfd_bool_bfd_bfd_true),
2715         (_bfd_bool_bfd_uint_true, _bfd_bool_bfd_ptr_true),
2716         (_bfd_bool_bfd_asection_bfd_asection_true),
2717         (_bfd_bool_bfd_asymbol_bfd_asymbol_true),
2718         (_bfd_void_bfd_link, _bfd_void_bfd_asection): New functions.
2719         * archive.c (_bfd_noarchive_get_elt_at_index),
2720         (_bfd_noarchive_openr_next_archived_file),
2721         (_bfd_noarchive_construct_extended_name_table),
2722         (_bfd_noarchive_write_ar_hdr, _bfd_noarchive_truncate_arname),
2723         (_bfd_noarchive_write_armap): New functions.
2724         * archures.c (_bfd_nowrite_set_arch_mach): New function.
2725         * coff-alpha.c (alpha_ecoff_swap_coff_aux_in),
2726         (alpha_ecoff_swap_coff_sym_in, alpha_ecoff_swap_coff_lineno_in),
2727         (alpha_ecoff_swap_coff_aux_out, alpha_ecoff_swap_coff_sym_out),
2728         (alpha_ecoff_swap_coff_lineno_out),
2729         (alpha_ecoff_swap_coff_reloc_out): New functions.
2730         * coff-mips.c (mips_ecoff_swap_coff_aux_in),
2731         (mips_ecoff_swap_coff_sym_in, mips_ecoff_swap_coff_lineno_in),
2732         (mips_ecoff_swap_coff_aux_out, mips_ecoff_swap_coff_sym_out),
2733         (mips_ecoff_swap_coff_lineno_out),
2734         (mips_ecoff_swap_coff_reloc_out): New functions.
2735         * coffcode.h (coff_set_alignment_hook): Replace define with
2736         new function.
2737         (symname_in_debug_hook): Likewise.
2738         * ecoff.c (_bfd_ecoff_set_alignment_hook): New function.
2739         * elfxx-target.h (elf_backend_allow_non_load_phdr): Default to 0.
2740         * elf.c (assign_file_positions_except_relocs): Test
2741         elf_backend_allow_non_load_phdr for NULL.
2742         * elflink.c (_bfd_elf_omit_section_dynsym_default): Rename from
2743         _bfd_elf_link_omit_section_dynsym.  Update uses.
2744         (_bfd_elf_omit_section_dynsym_all): New function.
2745         * elf-bfd.h (_bfd_elf_link_omit_section_dynsym): Delete.
2746         (_bfd_elf_omit_section_dynsym_default): Declare.
2747         (_bfd_elf_omit_section_dynsym_all): Declare.
2748         * linker.c (_bfd_nolink_sizeof_headers, _bfd_nolink_bfd_relax_section),
2749         (_bfd_nolink_bfd_get_relocated_section_contents),
2750         (_bfd_nolink_bfd_lookup_section_flags),
2751         (_bfd_nolink_bfd_is_group_section, _bfd_nolink_bfd_discard_group),
2752         (_bfd_nolink_bfd_link_hash_table_create),
2753         (_bfd_nolink_bfd_link_just_syms),
2754         (_bfd_nolink_bfd_copy_link_hash_symbol_type),
2755         (_bfd_nolink_bfd_link_split_section),
2756         (_bfd_nolink_section_already_linked),
2757         (_bfd_nolink_bfd_define_common_symbol),
2758         (_bfd_nolink_bfd_define_start_stop): New functions.
2759         * reloc.c (_bfd_norelocs_bfd_reloc_type_lookup),
2760         (_bfd_norelocs_bfd_reloc_name_lookup),
2761         (_bfd_nodynamic_canonicalize_dynamic_reloc): New functions.
2762         * section.c (_bfd_nowrite_set_section_contents): New function.
2763         * syms.c (_bfd_nosymbols_canonicalize_symtab),
2764         (_bfd_nosymbols_print_symbol, _bfd_nosymbols_get_symbol_info),
2765         (_bfd_nosymbols_get_symbol_version_string),
2766         (_bfd_nosymbols_bfd_is_local_label_name),
2767         (_bfd_nosymbols_get_lineno, _bfd_nosymbols_find_nearest_line),
2768         (_bfd_nosymbols_find_line, _bfd_nosymbols_find_inliner_info),
2769         (_bfd_nosymbols_bfd_make_debug_symbol),
2770         ( _bfd_nosymbols_read_minisymbols),
2771         ( _bfd_nosymbols_minisymbol_to_symbol),
2772         (_bfd_nodynamic_get_synthetic_symtab): New functions.
2773         * libbfd-in.h: Declare new functions.  Update existing defines,
2774         removing casts.
2775         * aix386-core.c: Update to use new hooks.  Formatting.
2776         * aout-adobe.c: Likewise.
2777         * aout-arm.c: Likewise.
2778         * aout-target.h: Likewise.
2779         * aout-tic30.c: Likewise.
2780         * aoutf1.h: Likewise.
2781         * binary.c: Likewise.
2782         * bout.c: Likewise.
2783         * cisco-core.c: Likewise.
2784         * coff-alpha.c: Likewise.
2785         * coff-i386.c: Likewise.
2786         * coff-i860.c: Likewise.
2787         * coff-i960.c: Likewise.
2788         * coff-ia64.c: Likewise.
2789         * coff-mips.c: Likewise.
2790         * coff-ppc.c: Likewise.
2791         * coff-rs6000.c: Likewise.
2792         * coff-sh.c: Likewise.
2793         * coff-tic30.c: Likewise.
2794         * coff-tic54x.c: Likewise.
2795         * coff-x86_64.c: Likewise.
2796         * coff64-rs6000.c: Likewise.
2797         * coffcode.h: Likewise.
2798         * elf-m10300.c: Likewise.
2799         * elf32-cr16.c: Likewise.
2800         * elf32-lm32.c: Likewise.
2801         * elf32-m32r.c: Likewise.
2802         * elf32-metag.c: Likewise.
2803         * elf32-score.c: Likewise.
2804         * elf32-score7.c: Likewise.
2805         * elf32-tilepro.c: Likewise.
2806         * elf32-xstormy16.c: Likewise.
2807         * elf32-xtensa.c: Likewise.
2808         * elf64-alpha.c: Likewise.
2809         * elf64-hppa.c: Likewise.
2810         * elf64-ia64-vms.c: Likewise.
2811         * elf64-mmix.c: Likewise.
2812         * elf64-sh64.c: Likewise.
2813         * elfnn-ia64.c: Likewise.
2814         * elfxx-sparc.c: Likewise.
2815         * elfxx-target.h: Likewise.
2816         * elfxx-tilegx.c: Likewise.
2817         * elfxx-x86.h: Likewise.
2818         * hp300hpux.c: Likewise.
2819         * hppabsd-core.c: Likewise.
2820         * hpux-core.c: Likewise.
2821         * i386msdos.c: Likewise.
2822         * i386os9k.c: Likewise.
2823         * ieee.c: Likewise.
2824         * ihex.c: Likewise.
2825         * irix-core.c: Likewise.
2826         * libaout.h: Likewise.
2827         * libecoff.h: Likewise.
2828         * mach-o-target.c: Likewise.
2829         * mach-o.c: Likewise.
2830         * mipsbsd.c: Likewise.
2831         * mmo.c: Likewise.
2832         * netbsd-core.c: Likewise.
2833         * nlm-target.h: Likewise.
2834         * oasys.c: Likewise.
2835         * osf-core.c: Likewise.
2836         * pdp11.c: Likewise.
2837         * pe-mips.c: Likewise.
2838         * pe-x86_64.c: Likewise.
2839         * pef.c: Likewise.
2840         * plugin.c: Likewise.
2841         * ppcboot.c: Likewise.
2842         * ptrace-core.c: Likewise.
2843         * sco5-core.c: Likewise.
2844         * som.c: Likewise.
2845         * sparclynx.c: Likewise.
2846         * srec.c: Likewise.
2847         * tekhex.c: Likewise.
2848         * trad-core.c: Likewise.
2849         * verilog.c: Likewise.
2850         * versados.c: Likewise.
2851         * vms-alpha.c: Likewise.
2852         * vms-lib.c: Likewise.
2853         * wasm-module.c: Likewise.
2854         * xsym.c: Likewise.
2855         * libbfd.h: Regenerate.
2856
2857 2018-02-15  Jim Wilson  <jimw@sifive.com>
2858
2859         * elfnn-riscv.c (_bfd_riscv_relax_section): Ifdef out check to ignore
2860         symbols whose section address is zero.
2861
2862         * elfnn-riscv.c (riscv_elf_relocate_section): Use bfd_reloc_dangerous
2863         when pcrel_lo reloc has an addend.  Use reloc_dangerous callback for
2864         bfd_reloc_dangerous.  Use einfo instead of warning callback for errors.
2865         Add %X%P to error messages.
2866
2867 2018-02-15  Eric Botcazou  <ebotcazou@adacore.com>
2868
2869         PR ld/22832
2870         * elfxx-sparc.c (_bfd_sparc_elf_check_relocs) <R_SPARC_TLS_GD_CALL>:
2871         Pass FALSE instead of TRUE as 'create' argument to bfd_link_hash_lookup
2872         and assert that the result of the call is not NULL.
2873
2874 2018-02-14  Nick Clifton  <nickc@redhat.com>
2875
2876         PR 22823
2877         Revert previous delta.  Add extra casts to avoid compile time
2878         warnings instead.
2879         * libbfd-in.h (_bfd_generic_bfd_copy_private_bfd_data): Add extra
2880         cast to avoid warning from gcc v8 compiler.
2881         (_bfd_generic_bfd_merge_private_bfd_data): Likewise.
2882         (_bfd_generic_bfd_set_private_flags): Likewise.
2883         (_bfd_generic_bfd_copy_private_section_data): Likewise.
2884         (_bfd_generic_bfd_copy_private_symbol_data): Likewise.
2885         (_bfd_generic_bfd_copy_private_header_data): Likewise.
2886         (_bfd_generic_bfd_print_private_bfd_data): Likewise.
2887         (_bfd_noarchive_construct_extended_name_table): Likewise.
2888         (_bfd_noarchive_truncate_arname): Likewise.
2889         (_bfd_noarchive_write_ar_hdr): Likewise.
2890         (_bfd_noarchive_get_elt_at_index): Likewise.
2891         (_bfd_nosymbols_canonicalize_symtab): Likewise.
2892         (_bfd_nosymbols_print_symbol): Likewise.
2893         (_bfd_nosymbols_get_symbol_info): Likewise.
2894         (_bfd_nosymbols_get_symbol_version_string): Likewise.
2895         (_bfd_nosymbols_bfd_is_local_label_name): Likewise.
2896         (_bfd_nosymbols_bfd_is_target_special_symbol): Likewise.
2897         (_bfd_nosymbols_get_lineno): Likewise.
2898         (_bfd_nosymbols_find_nearest_line): Likewise.
2899         (_bfd_nosymbols_find_line): Likewise.
2900         (_bfd_nosymbols_find_inliner_info): Likewise.
2901         (_bfd_nosymbols_bfd_make_debug_symbol): Likewise.
2902         (_bfd_nosymbols_read_minisymbols): Likewise.
2903         (_bfd_nosymbols_minisymbol_to_symbol): Likewise.
2904         (_bfd_norelocs_bfd_reloc_type_lookup): Likewise.
2905         (_bfd_norelocs_bfd_reloc_name_lookup): Likewise.
2906         (_bfd_nowrite_set_arch_mach): Likewise.
2907         (_bfd_nowrite_set_section_contents): Likewise.
2908         (_bfd_nolink_sizeof_headers): Likewise.
2909         (_bfd_nolink_bfd_get_relocated_section_contents): Likewise.
2910         (_bfd_nolink_bfd_relax_section): Likewise.
2911         (_bfd_nolink_bfd_gc_sections): Likewise.
2912         (_bfd_nolink_bfd_lookup_section_flags): Likewise.
2913         (_bfd_nolink_bfd_merge_sections): Likewise.
2914         (_bfd_nolink_bfd_is_group_section): Likewise.
2915         (_bfd_nolink_bfd_discard_group): Likewise.
2916         (_bfd_nolink_bfd_link_hash_table_create): Likewise.
2917         (_bfd_nolink_bfd_link_add_symbols): Likewise.
2918         (_bfd_nolink_bfd_link_just_syms): Likewise.
2919         (_bfd_nolink_bfd_copy_link_hash_symbol_type): Likewise.
2920         (_bfd_nolink_bfd_final_link): Likewise.
2921         (_bfd_nolink_bfd_link_split_section): Likewise.
2922         (_bfd_nolink_section_already_linked): Likewise.
2923         (_bfd_nolink_bfd_define_common_symbol): Likewise.
2924         (_bfd_nolink_bfd_define_start_stop): Likewise.
2925         (_bfd_nodynamic_canonicalize_dynamic_symtab): Likewise.
2926         (_bfd_nodynamic_get_synthetic_symtab): Likewise.
2927         (_bfd_nodynamic_get_dynamic_reloc_upper_bound _bfd_): Likewise.
2928         (_bfd_nodynamic_canonicalize_dynamic_reloc): Likewise.
2929         * libbfd.c (bfd_false_any): Delete.
2930         (bfd_true_any, bfd_nullvoidptr_any, bfd_0_any): Delete.
2931         (bfd_0u_any, bfd_0l_any, _bfd_n1_any, bfd_void_any): Delete.
2932         * libbfd.h (extern): Regenerate
2933         * aout-target.h (MY_bfd_is_target_special_symbol): Add extra
2934         cast to avoid warning from gcc v8 compiler.
2935         * aout-tic30.c (tic30_aout_set_arch_mach): Likewise.
2936         * binary.c (binary_get_symbol_info): Likewise.
2937         * coff-alpha.c (alpha_ecoff_backend_data): Likewise.
2938         * coff-mips.c (mips_ecoff_backend_data): Likewise.
2939         * coffcode.h (coff_set_alignment_hook): Likewise.
2940         (symname_in_debug_hook): Likewise.
2941         (bfd_coff_backend_data bigobj_swap_table): Likewise.
2942         * elf-m10300.c (elf_backend_omit_section_dynsym): Likewise.
2943         * elf32-cr16.c (elf_backend_omit_section_dynsym): Likewise.
2944         * elf32-lm32.c (elf_backend_omit_section_dynsym): Likewise.
2945         * elf32-m32r.c (elf_backend_omit_section_dynsym): Likewise.
2946         * elf32-metag.c (elf_backend_omit_section_dynsym): Likewise.
2947         * elf32-score.c (elf_backend_omit_section_dynsym): Likewise.
2948         * elf32-score7.c (elf_backend_omit_section_dynsym): Likewise.
2949         * elf32-xstormy16.c (elf_backend_omit_section_dynsym): Likewise.
2950         * elf32-xtensa.c (elf_backend_omit_section_dynsym): Likewise.
2951         * elf64-alpha.c (elf_backend_omit_section_dynsym): Likewise.
2952         * elf64-hppa.c (elf_backend_omit_section_dynsym): Likewise.
2953         * elf64-ia64-vms.c (elf_backend_omit_section_dynsym): Likewise.
2954         * elf64-mmix.c (elf_backend_omit_section_dynsym): Likewise.
2955         * elf64-sh64.c (elf_backend_omit_section_dynsym): Likewise.
2956         * elfnn-ia64.c (elf_backend_omit_section_dynsym): Likewise.
2957         * elfxx-target.h (bfd_elfNN_bfd_debug_info_accumulate): Likewise.
2958         (bfd_elfNN_bfd_make_debug_symbol): Likewise.
2959         (bfd_elfNN_bfd_merge_private_bfd_data): Likewise.
2960         (bfd_elfNN_bfd_set_private_flags): Likewise.
2961         (bfd_elfNN_bfd_is_target_special_symbol): Likewise.
2962         (elf_backend_init_index_section): Likewise.
2963         (elf_backend_allow_non_load_phdr): Likewise.
2964         * elfxx-x86.h (elf_backend_omit_section_dynsym): Likewise.
2965         * i386msdos.c (msdos_bfd_is_target_special_symbol): Likewise.
2966         * ieee.c (ieee_construct_extended_name_table): Likewise.
2967         (ieee_write_armap): Likewise.
2968         (ieee_write_ar_hdr): Likewise.
2969         (ieee_bfd_is_target_special_symbol): Likewise.
2970         * ihex.c (ihex_canonicalize_symtab): Likewise.
2971         (ihex_bfd_is_target_special_symbol): Likewise.
2972         * libaout.h (aout_32_bfd_is_target_special_symbol): Likewise.
2973         * libecoff.h (_bfd_ecoff_bfd_is_target_special_symbol): Likewise.
2974         (_bfd_ecoff_set_alignment_hook): Likewise.
2975         * mach-o-target.c (bfd_mach_o_bfd_is_target_special_symbol): Likewise.
2976         * mmo.c (mmo_bfd_is_target_special_symbol): Likewise.
2977         * nlm-target.h (nlm_bfd_is_target_special_symbol): Likewise.
2978         * oasys.c (oasys_construct_extended_name_table): Likewise.
2979         (oasys_write_armap): Likewise.
2980         (oasys_write_ar_hdr): Likewise.
2981         (oasys_bfd_is_target_special_symbol): Likewise.
2982         * pef.c (bfd_pef_bfd_is_target_special_symbol): Likewise.
2983         * plugin.c (bfd_plugin_bfd_is_target_special_symbol): Likewise.
2984         * ppcboot.c (ppcboot_bfd_is_target_special_symbol): Likewise.
2985         * som.c (som_bfd_is_target_special_symbol): Likewise.
2986         * srec.c (srec_bfd_is_target_special_symbol): Likewise.
2987         * tekhex.c (tekhex_bfd_is_target_special_symbol): Likewise.
2988         * verilog.c (verilog_bfd_is_target_special_symbol): Likewise.
2989         * versados.c (versados_bfd_is_target_special_symbol): Likewise.
2990         (versados_bfd_reloc_name_lookup): Likewise.
2991         * vms-alpha.c (vms_bfd_is_target_special_symbol): Likewise.
2992         (vms_bfd_define_start_stop): Likewise.
2993         (alpha_vms_bfd_is_target_special_symbol): Likewise.
2994         * wasm-module.c (wasm_bfd_is_target_special_symbol): Likewise.
2995         * xsym.c (bfd_sym_bfd_is_target_special_symbol): Likewise.
2996
2997 2018-02-14  H.J. Lu  <hongjiu.lu@intel.com>
2998
2999         PR ld/22842
3000         * elf32-i386.c (elf_i386_check_relocs): Pass FALSE for non
3001         PC-relative PLT to NEED_DYNAMIC_RELOCATION_P.
3002         * elf64-x86-64.c (elf_x86_64_check_relocs): Create PLT for
3003         R_X86_64_PC32 reloc against dynamic function in data section.
3004         Pass TRUE for PC-relative PLT to NEED_DYNAMIC_RELOCATION_P.
3005         (elf_x86_64_relocate_section): Use PLT for R_X86_64_PC32 reloc
3006         against dynamic function in data section.
3007         * elfxx-x86.c (elf_x86_allocate_dynrelocs): Use PLT in PIE as
3008         function address only if pcrel_plt is true.
3009         (_bfd_x86_elf_link_hash_table_create): Set pcrel_plt.
3010         * elfxx-x86.h (NEED_DYNAMIC_RELOCATION_P): Add PCREL_PLT for
3011         PC-relative PLT.  If PLT is PC-relative, don't generate dynamic
3012         PC-relative relocation against a function definition in data
3013         secton in PIE.  Remove the obsolete comments.
3014         (elf_x86_link_hash_table): Add pcrel_plt.
3015
3016 2018-02-13  H.J. Lu  <hongjiu.lu@intel.com>
3017
3018         * elfxx-x86.c (elf_x86_allocate_dynrelocs): Check bfd_link_dll,
3019         instead of bfd_link_pic, for building shared library.
3020
3021 2018-02-13  H.J. Lu  <hongjiu.lu@intel.com>
3022
3023         PR gas/22791
3024         * elf64-x86-64.c (is_32bit_relative_branch): Removed.
3025         (elf_x86_64_relocate_section): Check PIC relocations in PIE.
3026         Remove is_32bit_relative_branch usage.  Disallow PC32 reloc
3027         against protected function in shared object.
3028
3029 2018-02-13  Sergei Trofimovich  <slyfox@inbox.ru>
3030
3031         PR 22828
3032         * po/ru.po: Fix typo in Russian translation.
3033
3034 2018-02-13  Maciej W. Rozycki  <macro@mips.com>
3035
3036         * wasm-module.c (wasm_scan_name_function_section): Rename
3037         `index' local variable to `idx'.
3038
3039 2018-02-13  Nick Clifton  <nickc@redhat.com>
3040
3041         PR 22823
3042         Fix compile time warnings generated by gcc version 8.
3043         * libbfd-in.h: Remove extraneous text from prototypes.
3044         Add prototypes for bfd_false_any, bfd_true_any,
3045         bfd_nullvoidptr_any, bfd_0_any, bfd_0u_any, bfd_0l_any,
3046         bfd_n1_any, bfd_void_any.
3047         (_bfd_generic_bfd_copy_private_bfd_data): Use vararg based dummy
3048         function.
3049         (_bfd_generic_bfd_merge_private_bfd_data): Likewise.
3050         (_bfd_generic_bfd_set_private_flags): Likewise.
3051         (_bfd_generic_bfd_copy_private_section_data): Likewise.
3052         (_bfd_generic_bfd_copy_private_symbol_data): Likewise.
3053         (_bfd_generic_bfd_copy_private_header_data): Likewise.
3054         (_bfd_generic_bfd_print_private_bfd_data): Likewise.
3055         (_bfd_noarchive_construct_extended_name_table): Likewise.
3056         (_bfd_noarchive_truncate_arname): Likewise.
3057         (_bfd_noarchive_write_ar_hdr): Likewise.
3058         (_bfd_noarchive_get_elt_at_index): Likewise.
3059         (_bfd_nosymbols_canonicalize_symtab): Likewise.
3060         (_bfd_nosymbols_print_symbol): Likewise.
3061         (_bfd_nosymbols_get_symbol_info): Likewise.
3062         (_bfd_nosymbols_get_symbol_version_string): Likewise.
3063         (_bfd_nosymbols_bfd_is_local_label_name): Likewise.
3064         (_bfd_nosymbols_bfd_is_target_special_symbol): Likewise.
3065         (_bfd_nosymbols_get_lineno): Likewise.
3066         (_bfd_nosymbols_find_nearest_line): Likewise.
3067         (_bfd_nosymbols_find_line): Likewise.
3068         (_bfd_nosymbols_find_inliner_info): Likewise.
3069         (_bfd_nosymbols_bfd_make_debug_symbol): Likewise.
3070         (_bfd_nosymbols_read_minisymbols): Likewise.
3071         (_bfd_nosymbols_minisymbol_to_symbol): Likewise.
3072         (_bfd_norelocs_bfd_reloc_type_lookup): Likewise.
3073         (_bfd_norelocs_bfd_reloc_name_lookup): Likewise.
3074         (_bfd_nowrite_set_arch_mach): Likewise.
3075         (_bfd_nowrite_set_section_contents): Likewise.
3076         (_bfd_nolink_sizeof_headers): Likewise.
3077         (_bfd_nolink_bfd_get_relocated_section_contents): Likewise.
3078         (_bfd_nolink_bfd_relax_section): Likewise.
3079         (_bfd_nolink_bfd_gc_sections): Likewise.
3080         (_bfd_nolink_bfd_lookup_section_flags): Likewise.
3081         (_bfd_nolink_bfd_merge_sections): Likewise.
3082         (_bfd_nolink_bfd_is_group_section): Likewise.
3083         (_bfd_nolink_bfd_discard_group): Likewise.
3084         (_bfd_nolink_bfd_link_hash_table_create): Likewise.
3085         (_bfd_nolink_bfd_link_add_symbols): Likewise.
3086         (_bfd_nolink_bfd_link_just_syms): Likewise.
3087         (_bfd_nolink_bfd_copy_link_hash_symbol_type): Likewise.
3088         (_bfd_nolink_bfd_final_link): Likewise.
3089         (_bfd_nolink_bfd_link_split_section): Likewise.
3090         (_bfd_nolink_section_already_linked): Likewise.
3091         (_bfd_nolink_bfd_define_common_symbol): Likewise.
3092         (_bfd_nolink_bfd_define_start_stop): Likewise.
3093         (_bfd_nodynamic_canonicalize_dynamic_symtab): Likewise.
3094         (_bfd_nodynamic_get_synthetic_symtab): Likewise.
3095         (_bfd_nodynamic_get_dynamic_reloc_upper_bound _bfd_): Likewise.
3096         (_bfd_nodynamic_canonicalize_dynamic_reloc): Likewise.
3097         * libbfd.c (bfd_false_any): New function.  Like bfd_false but
3098         accepts one or more arguments.
3099         (bfd_true_any): Likewise.
3100         (bfd_nullvoidptr_any): Likewise.
3101         (bfd_0_any): Likewise.
3102         (bfd_0u_any): Likewise.
3103         (bfd_0l_any): Likewise.
3104         (_bfd_n1_any): Likewise.
3105         (bfd_void_any): Likewise.
3106         * libbfd.h (extern): Regenerate
3107         * aout-target.h (MY_bfd_is_target_special_symbol): Use vararg
3108         based dummy function.
3109         * aout-tic30.c (tic30_aout_set_arch_mach): Likewise.
3110         * binary.c (binary_get_symbol_info): Likewise.
3111         * coff-alpha.c (alpha_ecoff_backend_data): Likewise.
3112         * coff-mips.c (mips_ecoff_backend_data): Likewise.
3113         * coffcode.h (coff_set_alignment_hook): Likewise.
3114         (symname_in_debug_hook): Likewise.
3115         (bfd_coff_backend_data bigobj_swap_table): Likewise.
3116         * elf-m10300.c (elf_backend_omit_section_dynsym): Likewise.
3117         * elf32-cr16.c (elf_backend_omit_section_dynsym): Likewise.
3118         * elf32-lm32.c (elf_backend_omit_section_dynsym): Likewise.
3119         * elf32-m32r.c (elf_backend_omit_section_dynsym): Likewise.
3120         * elf32-metag.c (elf_backend_omit_section_dynsym): Likewise.
3121         * elf32-score.c (elf_backend_omit_section_dynsym): Likewise.
3122         * elf32-score7.c (elf_backend_omit_section_dynsym): Likewise.
3123         * elf32-xstormy16.c (elf_backend_omit_section_dynsym): Likewise.
3124         * elf32-xtensa.c (elf_backend_omit_section_dynsym): Likewise.
3125         * elf64-alpha.c (elf_backend_omit_section_dynsym): Likewise.
3126         * elf64-hppa.c (elf_backend_omit_section_dynsym): Likewise.
3127         * elf64-ia64-vms.c (elf_backend_omit_section_dynsym): Likewise.
3128         * elf64-mmix.c (elf_backend_omit_section_dynsym): Likewise.
3129         * elf64-sh64.c (elf_backend_omit_section_dynsym): Likewise.
3130         * elfnn-ia64.c (elf_backend_omit_section_dynsym): Likewise.
3131         * elfxx-target.h (bfd_elfNN_bfd_debug_info_accumulate): Likewise.
3132         (bfd_elfNN_bfd_make_debug_symbol): Likewise.
3133         (bfd_elfNN_bfd_merge_private_bfd_data): Likewise.
3134         (bfd_elfNN_bfd_set_private_flags): Likewise.
3135         (bfd_elfNN_bfd_is_target_special_symbol): Likewise.
3136         (elf_backend_init_index_section): Likewise.
3137         (elf_backend_allow_non_load_phdr): Likewise.
3138         * elfxx-x86.h (elf_backend_omit_section_dynsym): Likewise.
3139         * i386msdos.c (msdos_bfd_is_target_special_symbol): Likewise.
3140         * ieee.c (ieee_construct_extended_name_table): Likewise.
3141         (ieee_write_armap): Likewise.
3142         (ieee_write_ar_hdr): Likewise.
3143         (ieee_bfd_is_target_special_symbol): Likewise.
3144         * ihex.c (ihex_canonicalize_symtab): Likewise.
3145         (ihex_bfd_is_target_special_symbol): Likewise.
3146         * libaout.h (aout_32_bfd_is_target_special_symbol): Likewise.
3147         * libecoff.h (_bfd_ecoff_bfd_is_target_special_symbol): Likewise.
3148         (_bfd_ecoff_set_alignment_hook): Likewise.
3149         * mach-o-target.c (bfd_mach_o_bfd_is_target_special_symbol): Likewise.
3150         * mmo.c (mmo_bfd_is_target_special_symbol): Likewise.
3151         * nlm-target.h (nlm_bfd_is_target_special_symbol): Likewise.
3152         * oasys.c (oasys_construct_extended_name_table): Likewise.
3153         (oasys_write_armap): Likewise.
3154         (oasys_write_ar_hdr): Likewise.
3155         (oasys_bfd_is_target_special_symbol): Likewise.
3156         * pef.c (bfd_pef_bfd_is_target_special_symbol): Likewise.
3157         * plugin.c (bfd_plugin_bfd_is_target_special_symbol): Likewise.
3158         * ppcboot.c (ppcboot_bfd_is_target_special_symbol): Likewise.
3159         * som.c (som_bfd_is_target_special_symbol): Likewise.
3160         * srec.c (srec_bfd_is_target_special_symbol): Likewise.
3161         * tekhex.c (tekhex_bfd_is_target_special_symbol): Likewise.
3162         * verilog.c (verilog_bfd_is_target_special_symbol): Likewise.
3163         * versados.c (versados_bfd_is_target_special_symbol): Likewise.
3164         (versados_bfd_reloc_name_lookup): Likewise.
3165         * vms-alpha.c (vms_bfd_is_target_special_symbol): Likewise.
3166         (vms_bfd_define_start_stop): Likewise.
3167         (alpha_vms_bfd_is_target_special_symbol): Likewise.
3168         * wasm-module.c (wasm_bfd_is_target_special_symbol): Likewise.
3169         * xsym.c (bfd_sym_bfd_is_target_special_symbol): Likewise.
3170         * elf32-arc.c (get_replace_function): Assign replacement function
3171         to func pointer.
3172         * elf32-i370.c (i370_noop): Update prototype.
3173
3174 2018-02-13  Alan Modra  <amodra@gmail.com>
3175
3176         PR 22836
3177         * elf.c (_bfd_elf_fixup_group_sections): Account for removed
3178         relocation sections.  If size reduces to just the flag word,
3179         remove that too and mark with SEC_EXCLUDE.
3180         * elflink.c (bfd_elf_final_link): Strip empty group sections.
3181
3182 2018-02-13  Alan Modra  <amodra@gmail.com>
3183
3184         PR 22829
3185         * elf.c (assign_file_positions_for_non_load_sections): Rewrite
3186         PT_GNU_RELRO setup.
3187
3188 2018-02-12  Zebediah Figura  <z.figura12@gmail.com>
3189
3190         * i386msdos.c (msdos_mkobject); New function.
3191         (msdos_object_p): New function.
3192         (i386_msdos_vec): Use msdos_object_p as the check_format
3193         function.
3194         * peicode.h: Rename external_PEI_DOS_hdr, DOSMAGIC, and
3195         NT_SIGNATURE to external_DOS_hdr, IMAGE_DOS_SIGNATURE, and
3196         IMAGE_NT_SIGNATURE.
3197         * peXXigen.c: Likewise.
3198         * coff-ia64.c: Likewise.
3199
3200 2018-02-12  Nick Clifton  <nickc@redhat.com>
3201
3202         * elf32-nds32.c (nds32_elf_relax_longjump3): Remove redundant
3203         assignment.
3204         * elf32-arc.c (elf_arc_relocate_section): Likewise.
3205
3206 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
3207
3208         * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Reorder conditions.
3209         (sparc_elf_append_rela): Assert that there is enough room in section.
3210         (_bfd_sparc_elf_copy_indirect_symbol): Fix formatting.
3211         (_bfd_sparc_elf_adjust_dynamic_symbol): Minor tweak.
3212         (allocate_dynrelocs): Remove outdated comments and reorder conditions.
3213         For a symbol subject to a GOT relocation, reserve a slot in the
3214         relocation section if the symbol isn't dynamic and we are in PIC mode.
3215         (_bfd_sparc_elf_relocate_section) <R_SPARC_GOTDATA_OP>: If relocation
3216         is relaxed and a slot was reserved, generate a R_SPARC_NONE relocation.
3217         <R_SPARC_GOTDATA_OP_HIX22>: Adjust comments.
3218         <R_SPARC_PC10>: Reorder conditions.  Remove always-false assertion.
3219         (_bfd_sparc_elf_finish_dynamic_symbol): Rename local_undefweak into
3220         resolved_to_zero.  Do not generate a dynamic GOT relocation for an
3221         undefined weak symbol with non-default visibility.  Remove superfluous
3222         'else' and fix formatting.
3223
3224 2018-02-09  H.J. Lu  <hongjiu.lu@intel.com>
3225
3226         * elf32-i386.c (elf_i386_get_synthetic_symtab): Also handle
3227         is_solaris.
3228         (i386_elf32_sol2_vec): Don't declare.
3229         (elf_i386_link_setup_gnu_properties): Also handle is_solaris.
3230         Don't set need_global_offset_table.
3231         (elf_i386_solaris_arch_bed): New.
3232         (elf_backend_arch_data): Set to elf_i386_solaris_arch_bed for
3233         Solaris.
3234         * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Check
3235         target_os != is_nacl instead of target_os == is_normal.
3236         (x86_64_elf64_sol2_vec): Don't declare.
3237         (elf_x86_64_link_setup_gnu_properties): Check target_os !=
3238         is_nacl instead of target_os == is_normal.  Don't set
3239         need_global_offset_table.
3240         (elf_x86_64_solaris_arch_bed): New.
3241         (elf_backend_arch_data): Set to elf_x86_64_solaris_arch_bed for
3242         Solaris.
3243         * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Keep
3244         _GLOBAL_OFFSET_TABLE_ for Solaris.
3245         (_bfd_x86_elf_link_setup_gnu_properties): Don't copy
3246         need_global_offset_table.
3247         * elfxx-x86.h (elf_x86_target_os): Add is_solaris.
3248         (elf_x86_link_hash_table): Remove need_global_offset_table.
3249         (elf_x86_init_table): Likewise.
3250
3251 2018-02-08  H.J. Lu  <hongjiu.lu@intel.com>
3252
3253         * elf32-i386.c (elf32_i386_copy_solaris_special_section_fields):
3254         Remove prototype.
3255         (i386_elf32_sol2_vec): Declared.
3256         (elf_i386_link_setup_gnu_properties): Set
3257         need_global_offset_table with info->output_bfd->xvec.
3258         * elf64-x86-64.c (elf64_x86_64_copy_solaris_special_section_fields):
3259         Remove prototype.
3260         (x86_64_elf64_sol2_vec): Declared.
3261         (elf_x86_64_link_setup_gnu_properties): Set
3262         need_global_offset_table with info->output_bfd->xvec.
3263
3264 2018-02-08  H.J. Lu  <hongjiu.lu@intel.com>
3265
3266         * elf32-i386.c (elf32_i386_copy_solaris_special_section_fields):
3267         New prototype.
3268         (elf_i386_link_setup_gnu_properties): Set need_global_offset_table
3269         for Solaris.
3270         * elf64-x86-64.c (elf64_x86_64_copy_solaris_special_section_fields):
3271         New prototype.
3272         (elf_x86_64_link_setup_gnu_properties): Set
3273         need_global_offset_table for Solaris.
3274         * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Keep the
3275         unused _GLOBAL_OFFSET_TABLE_ for Solaris.
3276         (_bfd_x86_elf_link_setup_gnu_properties): Copy
3277         need_global_offset_table.
3278         * elfxx-x86.h (elf_x86_link_hash_table): Add
3279         need_global_offset_table.
3280         (elf_x86_init_table): Likewise.
3281
3282 2018-02-08  Jim Wilson  <jimw@sifive.com>
3283
3284         * elfnn-riscv.c (riscv_elf_relocate_section): Add comment for previous
3285         change.
3286
3287 2018-02-08  Nick Clifton  <nickc@redhat.com>
3288
3289         PR 22788
3290         * elf.c (elf_parse_notes): Reject notes with excessuively large
3291         alignments.
3292
3293 2018-02-07  Alan Modra  <amodra@gmail.com>
3294
3295         Revert 2018-01-17  Alan Modra  <amodra@gmail.com>
3296         * elf32-ppc.c: Remove speculation barrier support.
3297         * elf32-ppc.h: Likewise.
3298         * elf64-ppc.c: Likewise.
3299         * elf64-ppc.h: Likewise.
3300
3301 2018-02-06  Jim Wilson  <jimw@sifive.com>
3302
3303         * elfnn-riscv.c (riscv_elf_relocate_section): Return TRUE if used
3304         callback to report an error.
3305
3306 2018-02-06  Eric Botcazou  <ebotcazou@adacore.com>
3307
3308         PR ld/22263
3309         * elfxx-sparc.c (sparc_elf_tls_transition): Turn call to bfd_link_pic
3310         into call to !bfd_link_executable and tidy up.
3311         (_bfd_sparc_elf_check_relocs): Fix formatting and tidy up.
3312         <R_SPARC_TLS_LE_HIX22>: Turn call to bfd_link_pic into call to
3313         !bfd_link_executable.
3314         <R_SPARC_TLS_IE_HI22>: Likewise.
3315         <GOT relocations>: Remove useless code, tidy and merge related blocks.
3316         <R_SPARC_TLS_GD_CALL>: Turn call to bfd_link_pic into call to
3317         !bfd_link_executable.
3318         <R_SPARC_WPLT30>: Tidy up.
3319         (_bfd_sparc_elf_gc_mark_hook): Turn call to bfd_link_pic into call to
3320         !bfd_link_executable.
3321         (allocate_dynrelocs): Likewise.
3322         (_bfd_sparc_elf_relocate_section): Fix formatting and tidy up.
3323         <R_SPARC_TLS_GD_HI22>: Merge into...
3324         <R_SPARC_TLS_GD_LO10>: ...this.  Adjust 4th argument in call to
3325         sparc_elf_tls_transition and remove redundant code.
3326         <R_SPARC_TLS_LDM_HI22>: Turn call to bfd_link_pic into call to
3327         !bfd_link_executable.
3328         <R_SPARC_TLS_LDO_HIX22>: Likewise.
3329         <R_SPARC_TLS_LE_HIX22>: Likewise.  Tidy up.
3330         <R_SPARC_TLS_LDM_CALL>: Likewise.
3331         <R_SPARC_TLS_GD_CALL>: Likewise.  Tidy up.
3332         <R_SPARC_TLS_GD_ADD>: Likewise.
3333         <R_SPARC_TLS_LDM_ADD>: Likewise.
3334         <R_SPARC_TLS_LDO_ADD>: Likewise.
3335         <R_SPARC_TLS_IE_LD>: Likewise.
3336
3337 2018-02-06  MiloÅ¡ Stojanović  <milos.stojanovic@rt-rk.com>
3338
3339         PR 22789
3340         * elfxx-mips.c (_bfd_mips_elf_find_nearest_line): If the dwarf
3341         functions failed to find the function name, try the generic elf
3342         find function instead.
3343
3344 2018-02-06  Sergio Durigan Junior  <sergiodj@redhat.com>
3345
3346         * coff-rs6000.c (xcoff_write_archive_contents_old): Use
3347         'memcpy' instead of 'strncpy' when writing the magic number.
3348
3349 2018-02-06  Nick Clifton  <nickc@redhat.com>
3350
3351         PR 22794
3352         * opncls.c (bfd_get_debug_link_info_1): Check the size of the
3353         section before attempting to read it in.
3354         (bfd_get_alt_debug_link_info): Likewise.
3355
3356 2018-02-06  Paul Carroll  <pcarroll@codesourcery.com>
3357
3358         * bfd/dwarf2.c (find_abstract_name): Modified to return file and
3359         line information in addition to name, if they can be found.
3360
3361 2018-02-05  Renlin Li  <renlin.li@arm.com>
3362
3363         PR ld/22764
3364         * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Relax the
3365         R_AARCH64_ABS32 and R_AARCH64_ABS16 for absolute symbol. Apply the
3366         check for writeable section as well.
3367
3368 2018-02-05  H.J. Lu  <hongjiu.lu@intel.com>
3369
3370         PR ld/22782
3371         * elf32-i386.c (elf_i386_check_relocs): Set got_referenced if
3372         _GLOBAL_OFFSET_TABLE_ is referenced or GOT is needed to resolve
3373         undefined weak symbol to 0.
3374         * elf64-x86-64.c (elf_x86_64_check_relocs): Set got_referenced
3375         if _GLOBAL_OFFSET_TABLE_ is referenced.
3376         * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Check
3377         got_referenced instead of ref_regular_nonweak.  Remove the
3378         unused _GLOBAL_OFFSET_TABLE_ from symbol table.
3379         * elfxx-x86.h (elf_x86_link_hash_table): Add got_referenced.
3380
3381 2018-02-05  Maciej W. Rozycki  <macro@mips.com>
3382
3383         * elfnn-riscv.c (_bfd_riscv_relax_pc): Use `memset' to
3384         initialize `hi_reloc'.
3385
3386 2018-02-05  Maciej W. Rozycki  <macro@mips.com>
3387
3388         * elfxx-mips.c (_bfd_mips_elf_section_processing): For
3389         SHT_MIPS_REGINFO sections don't assert the correct size and
3390         report an error instead.
3391
3392 2018-02-05  Maciej W. Rozycki  <macro@mips.com>
3393
3394         * elf.c (_bfd_elf_write_object_contents): Propagate a failure
3395         status from `->elf_backend_section_processing'.
3396
3397 2018-02-02  Jim Wilson  <jimw@sifive.com>
3398
3399         PR ld/22756
3400         * elfnn-riscv.c (riscv_relax_delete_bytes): New parameter link_info.
3401         If link_info->wrap_hash, check for a duplicate symbol and ignore.
3402         (_bfd_riscv_relax_call, bfd_riscv_relax_lui, _bfd_riscv_relax_tls_le):
3403         Pass new argument to riscv_relax_delete_bytes.
3404         (_bfd_riscv_relax_align, _bfd_riscv_relax_delete): Likewise.  Remove
3405         ATTRIBUTE_UNUSED from link_info parameter.
3406
3407 2018-02-02  Alan Modra  <amodra@gmail.com>
3408
3409         * elf64-ppc.c (ppc64_elf_relocate_section): Don't relocate nops
3410         emitted for toc sequence optimization.  Set and use "howto" later.
3411
3412 2018-02-01  Simon Marchi  <simon.marchi@ericsson.com>
3413
3414         * elf64-ppc.c (ppc64_elf_archive_symbol_lookup): Avoid pointer
3415         arithmetic on NULL pointer.
3416         * elflink.c (_bfd_elf_archive_symbol_lookup,
3417         elf_link_add_archive_symbols): Likewise.
3418
3419 2018-01-31  Michael Matz  <matz@suse.de>
3420
3421         * elflink.c (bfd_elf_define_start_stop): Fix check of
3422         def_dynamic.
3423
3424 2018-01-31  H.J. Lu  <hongjiu.lu@intel.com>
3425
3426         PR ld/21964
3427         * elflink.c (bfd_elf_define_start_stop): Check if __start and
3428         __stop symbols are referenced by shared objects.
3429
3430 2018-01-30  Alan Modra  <amodra@gmail.com>
3431
3432         PR 22758
3433         * elf.c (_bfd_elf_map_sections_to_segments): Don't start a new
3434         segment when demand paged with lma on the same page.  Test this
3435         before load/non-load, executable/non-executable,
3436         writable/non-writable tests and simplify.  Delete bogus relro
3437         condition in writable/non-writable test.  Delete outdated
3438         comment.  Formatting.
3439
3440 2018-01-30  Alan Modra  <amodra@gmail.com>
3441
3442         * elflink.c (bfd_elf_define_start_stop): Make __start and __stop
3443         symbols dynamic.
3444
3445 2018-01-29  Alan Modra  <amodra@gmail.com>
3446
3447         PR 22741
3448         * coffgen.c (coff_pointerize_aux): Ensure auxent tagndx is in
3449         range before converting to a symbol table pointer.
3450
3451 2018-01-27  Nick Clifton  <nickc@redhat.com>
3452
3453         * po/ru.po: Updated Russian translation.
3454
3455 2018-01-26  Alan Modra  <amodra@gmail.com>
3456
3457         * elflink.c (bfd_elf_define_start_stop): Override symbols when
3458         they are defined dynamically.
3459
3460 2018-01-26  Alan Modra  <amodra@gmail.com>
3461
3462         * elf64-ppc.c (ppc64_elf_size_stubs): Iterate sizing when
3463         .branch_lt changes size.
3464
3465 2018-01-25  Alan Modra  <amodra@gmail.com>
3466
3467         PR 22746
3468         * elfcode.h (elf_object_p): Avoid integer overflow.
3469
3470 2018-01-25  Eric Botcazou  <ebotcazou@adacore.com>
3471
3472         PR ld/22727
3473         * elfxx-sparc.c (_bfd_sparc_elf_check_relocs) <R_SPARC_TLS_GD_CALL>:
3474         Do a mere lookup of the __tls_get_addr symbol instead of adding it.
3475
3476         Revert
3477         2017-10-19  H.J. Lu  <hongjiu.lu@intel.com>
3478
3479         PR ld/22263
3480         * elfxx-sparc.c (sparc_elf_tls_transition): Replace
3481         bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
3482         bfd_link_executable for TLS check.
3483         (_bfd_sparc_elf_check_relocs): Likewise.
3484         (allocate_dynrelocs): Likewise.
3485         (_bfd_sparc_elf_relocate_section): Likewise.
3486
3487 2018-01-24  Renlin Li  <renlin.li@arm.com>
3488
3489         * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Add support for
3490         BFD_RELOC_AARCH64_MOVW_PREL_G0, BFD_RELOC_AARCH64_MOVW_PREL_G0_NC,
3491         BFD_RELOC_AARCH64_MOVW_PREL_G1, BFD_RELOC_AARCH64_MOVW_PREL_G1_NC,
3492         BFD_RELOC_AARCH64_MOVW_PREL_G2, BFD_RELOC_AARCH64_MOVW_PREL_G2_NC,
3493         BFD_RELOC_AARCH64_MOVW_PREL_G3.
3494         * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
3495         (_bfd_aarch64_elf_resolve_relocation): Likewise.
3496
3497 2018-01-24  Renlin Li  <renlin.li@arm.com>
3498
3499         * reloc.c: Add BFD_RELOC_AARCH64_MOVW_PREL_G0,
3500         BFD_RELOC_AARCH64_MOVW_PREL_G0_NC, BFD_RELOC_AARCH64_MOVW_PREL_G1,
3501         BFD_RELOC_AARCH64_MOVW_PREL_G1_NC, BFD_RELOC_AARCH64_MOVW_PREL_G2,
3502         BFD_RELOC_AARCH64_MOVW_PREL_G2_NC, BFD_RELOC_AARCH64_MOVW_PREL_G3.
3503         * elfnn-aarch64.c (elfNN_aarch64_howto_table): Add entries for
3504         BFD_RELOC_AARCH64_MOVW_PREL_G0, BFD_RELOC_AARCH64_MOVW_PREL_G0_NC,
3505         BFD_RELOC_AARCH64_MOVW_PREL_G1, BFD_RELOC_AARCH64_MOVW_PREL_G1_NC,
3506         BFD_RELOC_AARCH64_MOVW_PREL_G2, BFD_RELOC_AARCH64_MOVW_PREL_G2_NC,
3507         BFD_RELOC_AARCH64_MOVW_PREL_G3.
3508         * bfd-in2.h: Regenerate.
3509         * libbfd.h: Regenerate.
3510
3511 2018-01-23  Maciej W. Rozycki  <macro@mips.com>
3512
3513         * elfxx-mips.c (_bfd_mips_elf_final_link): Update a stale
3514         `mips_elf32_section_processing' comment reference.
3515
3516 2018-01-20  H.J. Lu  <hongjiu.lu@intel.com>
3517
3518         PR ld/22721
3519         * elfxx-x86.c (_bfd_x86_elf_link_check_relocs): Check the
3520         versioned __tls_get_addr symbol.
3521
3522 2018-01-19  Nick Clifton  <nickc@redhat.com>
3523
3524         * po/fr.po: Updated French translation.
3525
3526 2018-01-18  Alan Modra  <amodra@gmail.com>
3527
3528         * elf32-ppc.c (ppc_elf_create_glink): Correct alignment of .glink.
3529         * elf64-ppc.c (ppc64_elf_size_stubs): Handle negative plt_stub_align.
3530         (ppc64_elf_build_stubs): Likewise.
3531
3532 2018-01-17  Nick Clifton  <nickc@redhat.com>
3533
3534         * po/ru.po: Updated Russian translation.
3535         * po/uk/po: Updated Ukranian translation.
3536
3537 2018-01-17  Alan Modra  <amodra@gmail.com>
3538
3539         * elf64-ppc.c (ppc64_elf_build_stubs): Silence gcc warning.
3540
3541 2018-01-17  Alan Modra  <amodra@gmail.com>
3542
3543         * elf32-ppc.c (GLINK_ENTRY_SIZE): Handle speculation barrier.
3544         (CRSETEQ, BEQCTRM): Define.
3545         (is_nonpic_glink_stub): Don't check bctr.
3546         (ppc_elf_link_hash_table_create): Init new ppc_elf_params field.
3547         (ppc_elf_relax_section): Size speculation barrier.
3548         (output_bctr): New function.
3549         (write_glink_stub): Use output_bctr.
3550         (ppc_elf_relocate_section): Use output_bctr for long branch stub.
3551         (ppc_elf_finish_dynamic_symbol): Likewise.
3552         (ppc_elf_finish_dynamic_sections): Use output_bctr.
3553         * elf32-ppc.h (struct ppc_elf_params): Add speculate_indirect_jumps.
3554         * elf64-ppc.c (CRSETEQ, BEQCTRM, BEQCTRLM): Define.
3555         (GLINK_PLTRESOLVE_SIZE): Size speculation barrier.
3556         (size_global_entry_stubs): Handle speculation barrier sizing.
3557         (plt_stub_size): Likewise.
3558         (output_bctr): New function.
3559         (build_plt_stub, build_tls_get_addr_stub): Output speculation
3560         barrier.
3561         (ppc_build_one_stub): Likewise for ppc_stub_plt_branch.
3562         (ppc_size_one_stub): Size speculation barrier in ppc_stub_plt_branch.
3563         (build_global_entry_stubs): Output speculation barrier.
3564         (ppc64_elf_build_stubs): Likewise in __glink_PLTresolve stub.
3565         * elf64-ppc.h (struct ppc64_elf_params): Add speculate_indirect_jumps.
3566
3567 2018-01-17  Alan Modra  <amodra@gmail.com>
3568
3569         * elf32-ppc.c (GLINK_ENTRY_SIZE): Add parameters, handle
3570         __tls_get_addr_opt, and alignment sizing.
3571         (TLS_GET_ADDR_GLINK_SIZE): Delete.
3572         (is_nonpic_glink_stub): Don't use GLINK_ENTRY_SIZE.
3573         (ppc_elf_get_synthetic_symtab): Recognize stubs spaced at 4, 6,
3574         or 8 insns.
3575         (ppc_elf_link_hash_table_create): Init new ppc_elf_params field.
3576         (allocate_dynrelocs): Use new GLINK_ENTRY_SIZE.
3577         (ppc_elf_size_dynamic_sections): Likewise.  Size branch table
3578         by PLT reloc count.
3579         (write_glink_stub): Handle __tls_get_addr_opt stub.
3580         Pad out to size given by GLINK_ENTRY_SIZE.
3581         (ppc_elf_relocate_section): Adjust write_glink_stub call.
3582         (ppc_elf_finish_dynamic_symbol): Likewise.
3583         (ppc_elf_finish_dynamic_sections): Write PLTresolve without using
3584         insn array since so many need rewriting.
3585         * elf32-ppc.h (struct ppc_elf_params): Add plt_stub_align.
3586         * elf64-ppc.c (GLINK_PLTRESOLVE_SIZE): Rename from
3587         GLINK_CALL_STUB_SIZE.  Add htab param and evaluate to size without
3588         nops.  Adjust all uses.
3589         (ppc64_elf_get_synthetic_symtab): Don't use GLINK_CALL_STUB_SIZE
3590         in glink_vma calculation.
3591         (struct ppc_link_hash_table): Add global_entry section pointer.
3592         (create_linkage_sections): Create separate section for global
3593         entry stubs.
3594         (PPC_LO, PPC_HI, PPC_HA): Move earlier.
3595         (size_global_entry_stubs): Handle sizing for aligned stubs.
3596         (ppc64_elf_size_dynamic_sections): Handle global_entry alloc,
3597         and don't stash end of glink branch table in rawsize.
3598         (ppc_build_one_stub): Rewrite stub size calculations.
3599         (build_global_entry_stubs): Use new section.
3600         (ppc64_elf_build_stubs): Don't pad __glink_PLTresolve with nops.
3601         Build lazy link stubs out to end of section.  Build global entry
3602         stubs in new section.
3603
3604 2018-01-15  Nick Clifton  <nickc@redhat.com>
3605
3606         * po/uk.po: Updated Ukranian translation.
3607
3608 2018-01-13  Nick Clifton  <nickc@redhat.com>
3609
3610         * po/bfd.pot: Regenerated.
3611
3612 2018-01-13  Nick Clifton  <nickc@redhat.com>
3613
3614         * version.m4: Bump version to 2.30.51
3615         * configure: Regenerate.
3616
3617 2018-01-13  Nick Clifton  <nickc@redhat.com>
3618
3619         2.30 branch created.
3620
3621 2018-01-12  Jens Widell  <jl@opera.com>
3622
3623         * elf.c (setup_group): Optimize search for group by remembering
3624         last found group and restarting search at that index.
3625         * elf-bfd.h (struct elf_obj_tdata): Add group_search_offset field.
3626
3627 2018-01-12  Gunther Nikl  <gnikl@users.sourceforge.net>
3628
3629         * aoutx.h (aout_link_check_ar_symbols): Remove default and handle
3630         bfd_link_common_skip_none in switch.
3631
3632 2018-01-12  Alan Modra  <amodra@gmail.com>
3633
3634         PR ld/22649
3635         * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Ignore dynamic
3636         references on forced local symbols.
3637
3638 2018-01-12  Vlad Ivanov  <vlad@ivanov.email>
3639
3640         * elfxx-mips.c (_bfd_mips_elf_final_link): Notify user when
3641         .reginfo section has wrong size.
3642
3643 2018-01-11  H.J. Lu  <hongjiu.lu@intel.com>
3644
3645         PR ld/22393
3646         * elf.c (_bfd_elf_map_sections_to_segments): When generating
3647         separate code and read-only data LOAD segments, create a new
3648         LOAD segment if the previous section contains text and the
3649         current section doesn't or vice versa.  Don't put a writable
3650         section in a read-only segment if there is a RELRO segment.
3651
3652 2018-01-11  H.J. Lu  <hongjiu.lu@intel.com>
3653
3654         PR ld/22649
3655         * elflink.c (bfd_elf_gc_mark_dynamic_ref_symbol): Ignore dynamic
3656         references on forced local symbols.
3657
3658 2018-01-11  H.J. Lu  <hongjiu.lu@intel.com>
3659
3660         PR ld/22677
3661         * elflink.c (bfd_elf_gc_sections): Keep all PREINIT_ARRAY,
3662         INIT_ARRAY as well as FINI_ARRAY sections for ld -r --gc-section.
3663
3664 2018-01-09  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
3665
3666         PR 22662
3667         * elf32-nds32.c (nds32_elf_relax_loadstore): Fix a typographical error.
3668
3669 2018-01-03  John Baldwin  <jhb@FreeBSD.org>
3670
3671         * elf.c (elfcore_grok_freebsd_note): Handle
3672         NT_FREEBSD_PROCSTAT_PROC, NT_FREEBSD_PROCSTAT_FILES, and
3673         NT_FREEBSD_PROCSTAT_VMMAP.
3674
3675 2018-01-03  Alan Modra  <amodra@gmail.com>
3676
3677         Update year range in copyright notice of all files.
3678
3679 For older changes see ChangeLog-2017
3680 \f
3681 Copyright (C) 2018 Free Software Foundation, Inc.
3682
3683 Copying and distribution of this file, with or without modification,
3684 are permitted in any medium without royalty provided the copyright
3685 notice and this notice are preserved.
3686
3687 Local Variables:
3688 mode: change-log
3689 left-margin: 8
3690 fill-column: 74
3691 version-control: never
3692 End: