Fix a bug recently introduced to the linker where it would complain about a section...
[external/binutils.git] / bfd / ChangeLog
1 2019-07-02  Nick Clifton  <nickc@redhat.com>
2
3         PR 24753
4         * compress.c (bfd_get_full_section_contents): Do not complain
5         about linker created sections that are larger than the file size.
6
7 2019-07-02  Christophe Lyon  <christophe.lyon@linaro.org>
8
9         * bfd/elf32-arm.c (CMSE_STUB_NAME): New define.
10         (elf32_arm_get_stub_entry): Do not try to emit long-branch stubs
11         for CMSE stubs.
12         (arm_dedicated_stub_output_section_name): Use CMSE_STUB_NAME.
13
14 2019-07-02  Srinath Parvathaneni  <srinath.parvathaneni@arm.com>
15
16         * elf32-arm.c (elf32_arm_gc_mark_extra_sections): Mark debug
17         sections when .text section contain secure entry functions
18         is marked.
19
20 2019-07-01  Nick Clifton  <nickc@redhat.com>
21
22         PR 23839
23         * elf32-arm.c (elf32_arm_update_relocs): Do not include the
24         section VMA in the offset used to update exidx relocs.
25
26 2019-06-28  Nick Clifton  <nickc@redhat.com>
27
28         PR 24708
29         * elf.c (_bfd_elf_slurp_version_tables): Check for an excessively
30         large version reference section.
31         * compress.c (bfd_get_full_section_contents): Check for an
32         uncompressed section whose size is larger than the file size.
33
34 2019-06-28  Alan Modra  <amodra@gmail.com>
35
36         * format.c (bfd_check_format_matches): Don't match plugin target
37         if another target matches.  Expand comment.
38         * targets.c (_bfd_target_vector): Move plugin_vec after all other
39         non-corefile targets, outside !SELECT_VECS.
40         * config.bfd: Don't handle targ=plugin here.
41         * configure.ac: Don't add plugin to enable_targets or handle in
42         target loop setting selvecs and other target vars.
43         * configure: Regenerate.
44
45 2019-06-26  Nick Clifton  <nickc@redhat.com>
46
47         PR 24703
48         * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add error
49         messages for failures.
50         * mach-o.c (bfd_mach_o_canonicalize_relocs): Set an bfd error code
51         if returning an error value.
52
53 2019-06-25  Jan Beulich  <jbeulich@suse.com>
54
55         * elf-properties.c (elf_find_and_remove_property): Rename last
56         parameter. Mention it in comment.
57
58 2019-06-24  Ilia Diachkov  <ilia.diachkov@optimitech.com>
59
60         * elfnn-riscv.c (_bfd_riscv_relax_lui): Delete early exit when
61         SEC_MERGE or SEC_CODE flags are set.
62         (_bfd_riscv_relax_section): New local symtype.  Set sym_sec and
63         symtype consistently.  Don't include sec_addr (sym_sec) in symval.
64         Add check for SEC_INFO_TYPE_MERGE and call _bfd_merged_section_offset.
65         Add sec_addr (sym_sec) after handling merge sections.
66
67 2019-06-24  H.J. Lu  <hongjiu.lu@intel.com>
68
69         PR ld/24721
70         * elf-properties.c (elf_merge_gnu_property_list): Remove the
71         property after reporting property removal.
72
73 2019-06-23  Alan Modra  <amodra@gmail.com>
74
75         PR 24704
76         * elf64-ppc.c (R_PPC64_GOT16_DS): Don't set has_gotrel.
77         (ppc64_elf_edit_toc): Don't remove R_PPC64_GOT16_DS got entries.
78         Reduce range of offsets allowed for other GOT relocs.
79
80 2019-06-23  Alan Modra  <amodra@gmail.com>
81
82         PR 24689
83         * elfcode.h (elf_object_p): Warning fix.
84
85 2019-06-21  Alan Modra  <amodra@gmail.com>
86
87         PR 24689
88         * elfcode.h (elf_object_p): Check type of e_shstrndx section.
89
90 2019-06-19  Alan Modra  <amodra@gmail.com>
91
92         PR 24697
93         * elf32-ppc.c (ppc_elf_relocate_section): Don't read insn for
94         R_PPC_EMB_RELSDA.  Mask low bit of R_PPC_EMB_SDA21 r_offset.
95
96 2019-06-19  Alan Modra  <amodra@gmail.com>
97
98         * elf64-ppc.c (ppc64_elf_inline_plt): Correct st_other test for
99         functions that require r2 valid to use local entry.
100         (ppc64_elf_size_stubs, ppc64_elf_relocate_section): Likewise.
101
102 2019-06-17  Szabolcs Nagy  <szabolcs.nagy@arm.com>
103
104         * elfnn-aarch64.c (elfNN_aarch64_allocate_local_dynrelocs): Remove.
105         (elfNN_aarch64_size_dynamic_sections): Remove loc_hash_table traversal
106         with elfNN_aarch64_allocate_local_dynrelocs.
107
108 2019-06-14  Szabolcs Nagy  <szabolcs.nagy@arm.com>
109
110         * elfnn-aarch64.c: Enable MOVW_PREL relocs for ELF32.
111
112 2019-06-14  Alan Modra  <amodra@gmail.com>
113
114         * Makefile.in: Regenerate.
115         * configure: Regenerate.
116
117 2019-06-14  Alan Modra  <amodra@gmail.com>
118
119         * elf64-ppc.c: Fix comments involving paddi.
120
121 2019-06-12  Adam Lackorzymski  <adam@os.inf.tu-dresden.de>
122
123         PR 24643
124         * elf32-arm.c (arm_elf_find_function): Fail if the symol table is
125         absent, or the bfd is not in the ELF formart.
126         * elfnn-aarch64.c (aarch64_elf_find_function): Likewise.
127
128 2019-06-10  Christos Zoulas  <christos@zoulas.com>
129
130         PR 24650
131         * elf.c (elfcore_make_auxv_note_section): New function.
132         (elfcore_grok_note): Use it.
133         (elfcore_grok_freebsd_note): Likewise.
134         (elfcore_grok_openbsd_note): Likewise.
135         (elfcore_grok_netbsd_note): Likewise.  Plus add support for
136         NT_NETBSDCORE_AUXV notes.
137
138 2019-06-06  Sudakshina Das  <sudi.das@arm.com>
139
140         * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties): Set
141         alignment of the new gnu property section.
142
143 2019-06-06  Sudakshina Das  <sudi.das@arm.com>
144
145         * bfd-in.h: Change comment.
146         * bfd-in2.h: Regenerate.
147         * elfnn-aarch64.c (elfNN_aarch64_merge_gnu_properties): Update warning.
148         * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties):
149         Likwise.
150
151 2019-05-28  Faraz Shahbazker  <fshahbazker@wavecomp.com>
152
153         * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_PCHI16>:
154         Remove overflow check.
155
156 2019-05-28  Alan Modra  <amodra@gmail.com>
157
158         PR 24596
159         * cofflink.c (coff_link_check_archive_element): Don't assume
160         element is a coff object file after calling add_archive_element.
161
162 2019-05-28  Alan Modra  <amodra@gmail.com>
163
164         PR 24596
165         * elf32-microblaze.c (microblaze_elf_finish_dynamic_sections): Don't
166         attempt to set sh_entsize for excluded PLT section.
167
168 2019-05-28  Alan Modra  <amodra@gmail.com>
169
170         PR 24596
171         * elf64-alpha.c (elf64_alpha_relocate_section): Don't attempt
172         to emit R_ALPHA_GOTTPREL in PIEs, for which no space is
173         allocated in alpha_dynamic_entries_for_reloc.
174
175 2019-05-28  Alan Modra  <amodra@gmail.com>
176
177         PR 24596
178         * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Don't segfault
179         on NULL output_section.
180         * elflink.c (elf_final_link_free): Don't free -1 symshndxbuf.
181
182 2019-05-28  Alan Modra  <amodra@gmail.com>
183
184         PR 24596
185         * elf32-m68k.c (elf_m68k_get_got_entry): Don't create a new
186         entry when MUST_FIND.  Abort when MUST_FIND not found.
187         (elf_m68k_get_bfd2got_entry): Likewise.
188         (elf_m68k_relocate_section): Remove now useless assert.
189
190 2019-05-28  Alan Modra  <amodra@gmail.com>
191
192         PR 24596
193         * elf64-hppa.c (elf64_hppa_finalize_dynreloc): Get the output bfd
194         from bfd_link_info, not an output section owner.
195         (elf64_hppa_finish_dynamic_symbol, elf64_hppa_finalize_opd): Likewise.
196         (elf_hppa_final_link_relocate): Likewise.
197
198 2019-05-28  Alan Modra  <amodra@gmail.com>
199
200         PR 24596
201         * aout-tic30.c (MY_bfd_final_link): Don't segfault on missing
202         create_object_symbols_section, obj_textsec, obj_datasec or
203         obj_bsssec.  Fix other errors in placement.
204         * config.bfd: Obsolete tic30-aout.
205
206 2019-05-28  Alan Modra  <amodra@gmail.com>
207
208         PR 24596
209         * dwarf2.c (save_section_vma, section_vma_same): Check for NULL
210         end of section list as well as section_count.
211         * xcofflink.c (xcoff_link_add_symbols): Fix temporarily changed
212         section list before returning error.
213
214 2019-05-27  Alan Modra  <amodra@gmail.com>
215
216         * elf.c (bfd_elf_set_group_contents): Exit on zero size section.
217
218 2019-05-27  Alan Modra  <amodra@gmail.com>
219
220         PR 24596
221         * linker.c (_bfd_generic_link_output_symbols): Heed BSF_KEEP.
222
223 2019-05-24  Szabolcs Nagy  <szabolcs.nagy@arm.com>
224
225         * elfnn-aarch64.c (elfNN_aarch64_merge_symbol_attribute): New function.
226         (struct elf_aarch64_link_hash_table): Add variant_pcs member.
227         (elfNN_aarch64_allocate_dynrelocs): Update variant_pcs.
228         (elfNN_aarch64_size_dynamic_sections): Add DT_AARCH64_VARIANT_PCS.
229         (elf_backend_merge_symbol_attribute): Define.
230
231 2019-05-24  Alan Modra  <amodra@gmail.com>
232
233         * po/SRC-POTFILES.in: Regenerate.
234
235 2019-05-24  Alan Modra  <amodra@gmail.com>
236
237         * elf64-ppc.c: Comment on powerxx _notoc stub variants.
238         (LI_R11_0, LIS_R11, ORI_R11_R11_0, SLDI_R11_R11_34): Define.
239         (PADDI_R12_PC, PLD_R12_PC, D34, HA34): Define.
240         (struct ppc_link_hash_table): Add powerxx_stubs.
241         (ppc64_elf_check_relocs): Set powerxx_stubs.
242         (build_powerxx_offset, size_powerxx_offset),
243         (num_relocs_for_powerxx_offset),
244         (emit_relocs_for_powerxx_offset): New functions.
245         (plt_stub_size): Size powerxx stubs.
246         (ppc_build_one_stub): Emit powerxx stubs.
247         (ppc_size_one_stub): Size powerxx stubs.  Omit .eh_frame for
248         powerxx stubs.
249
250 2019-05-24  Alan Modra  <amodra@gmail.com>
251
252         * elf64-ppc.c (ppc64_elf_check_relocs): Set has_gotrel for
253         R_PPC64_GOT_PCREL34.
254         (xlate_pcrel_opt): New function.
255         (ppc64_elf_edit_toc): Handle R_PPC64_GOT_PCREL34.
256         (ppc64_elf_relocate_section): Edit GOT indirect to GOT relative
257         for R_PPC64_GOT_PCREL34.  Implement R_PPC64_PCREL_OPT optimisation.
258
259 2019-05-24  Alan Modra  <amodra@gmail.com>
260
261         * reloc.c (BFD_RELOC_PPC64_D34, BFD_RELOC_PPC64_D34_LO),
262         (BFD_RELOC_PPC64_D34_HI30, BFD_RELOC_PPC64_D34_HA30),
263         (BFD_RELOC_PPC64_PCREL34, BFD_RELOC_PPC64_GOT_PCREL34),
264         (BFD_RELOC_PPC64_PLT_PCREL34),
265         (BFD_RELOC_PPC64_ADDR16_HIGHER34, BFD_RELOC_PPC64_ADDR16_HIGHERA34),
266         (BFD_RELOC_PPC64_ADDR16_HIGHEST34, BFD_RELOC_PPC64_ADDR16_HIGHESTA34),
267         (BFD_RELOC_PPC64_REL16_HIGHER34, BFD_RELOC_PPC64_REL16_HIGHERA34),
268         (BFD_RELOC_PPC64_REL16_HIGHEST34, BFD_RELOC_PPC64_REL16_HIGHESTA34),
269         (BFD_RELOC_PPC64_D28, BFD_RELOC_PPC64_PCREL28): New reloc enums.
270         * elf64-ppc.c (PNOP): Define.
271         (ppc64_elf_howto_raw): Add reloc howtos for new relocations.
272         (ppc64_elf_reloc_type_lookup): Translate new bfd reloc numbers.
273         (ppc64_elf_ha_reloc): Adjust addend for highera34 and highesta34
274         relocs.
275         (ppc64_elf_prefix_reloc): New function.
276         (struct ppc_link_hash_table): Add notoc_plt.
277         (is_branch_reloc): Add R_PPC64_PLTCALL_NOTOC.
278         (is_plt_seq_reloc): Add R_PPC64_PLT_PCREL34,
279         R_PPC64_PLT_PCREL34_NOTOC, and R_PPC64_PLTSEQ_NOTOC.
280         (ppc64_elf_check_relocs): Handle pcrel got and plt relocs.  Set
281         has_pltcall for section on seeing R_PPC64_PLTCALL_NOTOC.  Handle
282         possible need for dynamic relocs on non-pcrel powerxx relocs.
283         (dec_dynrel_count): Handle non-pcrel powerxx relocs.
284         (ppc64_elf_inline_plt): Handle R_PPC64_PLTCALL_NOTOC.
285         (toc_adjusting_stub_needed): Likewise.
286         (ppc64_elf_tls_optimize): Handle R_PPC64_PLTSEQ_NOTOC.
287         (ppc64_elf_relocate_section): Handle new powerxx relocs.
288         * bfd-in2.h: Regenerate.
289         * libbfd.h: Regenerate.
290
291 2019-05-23  Jose E. Marchesi  <jose.marchesi@oracle.com>
292
293         * config.bfd (targ_cpu): Process bpf-*-none only if BFD64.
294         * configure.ac: Set target_size=64 for bpf_elf64_le_vec and
295         bpf_elf64_be_vec.
296         * configure: Regenerate.
297
298 2019-05-23  Jose E. Marchesi  <jose.marchesi@oracle.com>
299
300         * configure: Regenerated.
301         * Makefile.am (ALL_MACHINES): Add cpu-bpf.lo.
302         (ALL_MACHINES_CFILES): Add cpu-bpf.c.
303         (BFD64_BACKENDS): Add elf64-bpf.lo.
304         (BFD64_BACKENDS_CFILES): Add elf64-bpf.c.
305         * Makefile.in (SOURCE_HFILES): Regenerate.
306         * config.bfd (targ_cpu): Handle bpf-*-* targets.
307         * cpu-bpf.c: New file.
308         * elf64-bpf.c: Likewise.
309         * targets.c (_bfd_target_vector): Add bpf_elf64_be_vec and
310         bpf_elf64_le_vec.
311         * archures.c: Define architecture bfd_arch_bpf and machine
312         bfd_arch_bpf.
313         * reloc.c: Define BFD relocations used by the BPF target.
314         * bfd-in2.h: Regenerated.
315         * libbfd.h: Likewise.
316
317 2019-05-22  Alan Modra  <amodra@gmail.com>
318
319         * elf32-arm.c (arm_allocate_glue_section_space): Clear section
320         contents.
321
322 2019-05-22  Alan Modra  <amodra@gmail.com>
323
324         * vms-alpha.c (_bfd_vms_write_etir): Don't attempt further
325         processing on "size error in section".
326
327 2019-05-22  Alan Modra  <amodra@gmail.com>
328
329         * som.c (som_bfd_free_cached_info): Call
330         _bfd_generic_close_and_cleanup.
331
332 2019-05-21  Faraz Shahbazker  <fshahbazker@wavecomp.com>
333
334         * elfxx-mips.c (_bfd_mips_elf_check_relocs): Generate error
335         for TLS_TPREL_HI16(/LO16) relocations in shared library.
336
337 2019-05-21  Faraz Shahbazker  <fshahbazker@wavecomp.com>
338
339         * elfxx-mips.c (_bfd_mips_elf_check_relocs): Add NULL pointer
340         checks.  Search the RELA table for n64 relocations.
341
342 2019-05-21  Matthew Fortune  <matthew.fortune@mips.com>
343             Faraz Shahbazker  <fshahbazker@wavecomp.com>
344
345         * elfxx-mips.c (LA25_BC): New macro.
346         (mips_elf_link_hash_table)<compact_branches>: New field.
347         (STUB_JALRC): New macro.
348         (mipsr6_o32_exec_plt0_entry_compact): New array.
349         (mipsr6_n32_exec_plt0_entry_compact): Likewise.
350         (mipsr6_n64_exec_plt0_entry_compact): Likewise.
351         (mipsr6_exec_plt_entry_compact): Likewise.
352         (mips_elf_create_la25_stub): Use BC instead of J for stubs
353         when compact_branches is true.
354         (_bfd_mips_elf_finish_dynamic_symbol): Choose the compact
355         PLT for MIPSR6 with compact_branches.  Do not reorder the
356         compact branches PLT.  Switch the lazy stub for MIPSR6
357         with compact_branches to use JALRC.
358         (mips_finish_exec_plt): Choose the compact PLT0 for MIPSR6
359         when compact_branches is true.
360         (_bfd_mips_elf_compact_branches): New function.
361         * elfxx-mips.h (_bfd_mips_elf_compact_branches): New prototype.
362
363 2019-05-21  Tamar Christina  <tamar.christina@arm.com>
364
365         PR ld/24373
366         * elfnn-aarch64.c (_bfd_aarch64_erratum_843419_branch_to_stub):
367         Fix print formatter.
368
369 2019-05-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
370
371         PR 24460
372         * elf32-arm.c (get_value_helper): Remove.
373         (elf32_arm_final_link_relocate): Fix branch future relocations.
374
375 2019-05-21  Tamar Christina  <tamar.christina@arm.com>
376
377         PR ld/24373
378         * bfd-in.h (enum erratum_84319_opts): New
379         (bfd_elf64_aarch64_set_options, bfd_elf32_aarch64_set_options): Change
380         int to enum erratum_84319_opts.
381         * bfd-in2.h: Regenerate.
382         * elfnn-aarch64.c (struct elf_aarch64_link_hash_table): Change
383         fix_erratum_843419 to use new enum, remove fix_erratum_843419_adr.
384         (_bfd_aarch64_add_stub_entry_after): Conditionally create erratum stub.
385         (aarch64_size_one_stub): Conditionally size erratum 843419 stubs.
386         (_bfd_aarch64_resize_stubs): Amend comment.
387         (elfNN_aarch64_size_stubs): Don't generate stubs when no workaround
388         requested.
389         (bfd_elfNN_aarch64_set_options): Use new fix_erratum_843419 enum.
390         (_bfd_aarch64_erratum_843419_branch_to_stub): Implement selection of
391         erratum workaround.
392         (clear_erratum_843419_entry): Update erratum conditional.
393
394 2019-05-21  Senthil Kumar Selvaraj  <senthilkumar.selvaraj@microchip.com>
395
396         PR ld/24571
397         * bfd/elf32-avr.c (elf32_avr_relax_section): Adjust range check
398         when computing distance_short_enough.
399
400 2019-05-21  Senthil Kumar Selvaraj  <senthilkumar.selvaraj@microchip.com>
401
402         PR ld/24564
403         * bfd/elf32-avr.c (avr_relative_distance_considering_wrap_around):
404         Wrap around even if distance equals avr_pc_wrap_around.
405
406 2019-05-20  Nick Clifton  <nickc@redhat.com>
407
408         * po/fr.po: Updated French translation.
409
410 2019-05-16  Andre Vieira  <andre.simoesdiasvieira@arm.com>
411
412         * elf32-arm.c (elf32_arm_merge_eabi_attributes): Add case for Tag_MVE_arch.
413
414 2019-05-16  Alan Modra  <amodra@gmail.com>
415
416         * elf32-arm.c (elf32_arm_write_section): Revert last change.
417
418 2019-05-15  Alan Modra  <amodra@gmail.com>
419
420         * elf32-arm.c (elf32_arm_write_section): Don't leave
421         error case of STM32L4XX_ERRATUM_BRANCH_TO_VENEER with
422         unitialised section contents.
423
424 2019-05-14  Jamey Hicks  <jamey.hicks@gmail.com>
425
426         PR 19921
427         * verilog.c: (VerilogDataWidth): New variable.
428         (verilog_write_record): Emit bytes in VerilogDataWidth bundles.
429
430 2019-05-08  Nick Clifton  <nickc@redhat.com>
431
432         PR 24523
433         * elf32-m68k.c (elf32_m68k_merge_private_bfd_data): Return TRUE
434         rather than FALSE if encountering a non-ELF file.
435
436 2019-05-06  Alan Modra  <amodra@gmail.com>
437
438         * elf32-pj.c (pj_elf_reloc): Don't report undefined weak as an error.
439
440 2019-05-06  Alan Modra  <amodra@gmail.com>
441
442         * reloc.c (BFD_RELOC_PPC64_TPREL16_HIGH, BFD_RELOC_PPC64_TPREL16_HIGHA),
443         (BFD_RELOC_PPC64_DTPREL16_HIGH, BFD_RELOC_PPC64_DTPREL16_HIGHA):
444         Sort before BFD_RELOC_PPC64_DTPREL16_HIGHESTA entry.
445         * libbfd.h: Regenerate.
446         * bfd-in2.h: Regenerate.
447
448 2019-05-04  Alan Modra  <amodra@gmail.com>
449
450         PR 24511
451         * syms.c (coff_section_type): Only allow '.', '$' and numeric
452         following the standard section names.
453         (bfd_decode_symclass): Prioritize section flag tests in
454         decode_section_type before name tests in coff_section_type.
455         * plugin.c (bfd_plugin_canonicalize_symtab): Init fake_section
456         and fake_common_section using BFD_FAKE_SECTION.  Use "fake" as
457         their names and choose standard .text section flags for
458         fake_section.
459
460 2019-05-02  Nick Clifton  <nickc@redhat.com>
461
462         PR 24493
463         * coffcode.h (styp_to_sec_flags): Treat .gnu.debuglink and
464         .gnu.debugaltlink sections as debugging sections.
465
466 2019-04-30  Alan Modra  <amodra@gmail.com>
467
468         * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add has_gotrel.
469         (struct _ppc64_elf_section_data): Likewise.
470         (ppc64_elf_check_relocs): Set above fields.
471         (ppc64_elf_edit_toc): Add a pass over GOT relocs.
472         (ppc64_elf_relocate_section): Edit GOT indirect to GOT relative
473         when possible.
474
475 2019-04-26  H.J. Lu  <hongjiu.lu@intel.com>
476
477         PR ld/24486
478         * elflink.c (elf_link_output_extsym): Don't complain undefined
479         weak dynamic reference.
480
481 2019-04-25  Sudakshina Das  <sudi.das@arm.com>
482
483         * elfnn-aarch64.c (PLT_BTI_ENTRY_SIZE): Remove.
484         (PLT_BTI_TLSDESC_ENTRY_SIZE): Remove.
485         (PLT_PAC_ENTRY_SIZE, PLT_BTI_PAC_ENTRY_SIZE): Remove.
486         (PLT_BTI_SMALL_ENTRY_SIZE, PLT_PAC_SMALL_ENTRY_SIZE): Update.
487         (elfNN_aarch64_small_plt0_pac_entry): Remove.
488         (elfNN_aarch64_small_plt0_bti_pac_entry): Remove.
489         (elfNN_aarch64_small_plt0_bti_entry): Update.
490         (elfNN_aarch64_small_plt_bti_entry): Update.
491         (elfNN_aarch64_small_plt_pac_entry): Update.
492         (elfNN_aarch64_tlsdesc_small_plt_bti_entry): Update.
493         (setup_plt_values): Setup new entries.
494         (elfNN_aarch64_finish_dynamic_sections): Remove size change.
495         (elfNN_aarch64_plt_sym_val): Likewise.
496
497 2019-04-22  Jim Wilson  <jimw@sifive.com>
498
499         * elfnn-riscv.c (PRSTATUS_SIZE) [ARCH_SIZE==32]: Change from 0 to 204.
500
501 2019-04-19  Alan Modra  <amodra@gmail.com>
502
503         * elf32-s12z.c (elf_backend_can_gc_sections): Don't define
504
505 2019-04-17  H.J. Lu  <hongjiu.lu@intel.com>
506
507         * elf64-x86-64.c (elf_x86_64_need_pic): Suggest -fPIE when not
508         building shared object.
509         * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Likewise.
510
511 2019-04-17  H.J. Lu  <hongjiu.lu@intel.com>
512
513         PR ld/24458
514         * elfxx-x86.h (SYMBOL_DEFINED_NON_SHARED_P): Also check x86
515         linker_def.
516
517 2019-04-15  Thomas Preud'homme  <thomas.preudhomme@arm.com>
518
519         * reloc.c (BFD_RELOC_ARM_T32_VLDR_VSTR_OFF_IMM): New internal
520         relocation.
521         * bfd-in2.h: Regenerate.
522         * libbfd.h: Likewise.
523
524 2019-04-15  Sudakshina Das  <sudi.das@arm.com>
525
526         * reloc.c (BFD_RELOC_ARM_THUMB_LOOP12): New.
527         * bfd-in2.h: Regenerated.
528         * libbfd.h: Regenerated.
529
530 2019-04-15  Sudakshina Das  <sudi.das@arm.com>
531
532         * reloc.c (BFD_RELOC_THUMB_PCREL_BFCSEL): New relocation.
533         * bfd-in2.h: Regenerated.
534         * libbfd.h: Likewise.
535
536 2019-04-15  Sudakshina Das  <sudi.das@arm.com>
537
538         * reloc.c (BFD_RELOC_ARM_THUMB_BF13): New.
539         * bfd-in2.h: Regenerated.
540         * libbfd.h: Regenerated.
541         * elf32-arm.c (elf32_arm_howto_table_1): New entry for R_ARM_THM_BF13.
542         (elf32_arm_reloc_map elf32_arm_reloc_map): Map BFD_RELOC_ARM_THUMB_BF13
543         and R_ARM_THM_BF12 together.
544         (elf32_arm_final_link_relocate): New switch case for R_ARM_THM_BF13.
545
546 2019-04-15  Sudakshina Das  <sudi.das@arm.com>
547
548         * reloc.c (BFD_RELOC_ARM_THUMB_BF19): New
549         * libbfd.h: Regenerated.
550         * bfd-in2.h: Regenerated.
551         * bfd-elf32-arm.c (elf32_arm_howto_table_1): New entry for R_ARM_THM_BF18.
552         (elf32_arm_reloc_map elf32_arm_reloc_map): Map BFD_RELOC_ARM_THUMB_BF19
553         and R_ARM_THM_BF18 together.
554         (elf32_arm_final_link_relocate): New switch case for R_ARM_THM_BF19.
555
556 2019-04-15  Sudakshina Das  <sudi.das@arm.com>
557
558         * reloc.c (BFD_RELOC_ARM_THUMB_BF17): New enum.
559         * bfd-in2.h: Regenerated.
560         * libbfd.h: Regenerated.
561         * bfd-elf32-arm.c (elf32_arm_howto_table_1): New entry for R_ARM_THM_BF16.
562         (elf32_arm_reloc_map elf32_arm_reloc_map): Map BFD_RELOC_ARM_THUMB_BF17
563         and R_ARM_THM_BF16 together.
564         (get_value_helper): New reloc helper.
565         (elf32_arm_final_link_relocate): New switch case for R_ARM_THM_BF16.
566
567 2019-04-15  Sudakshina Das  <sudi.das@arm.com>
568
569         * reloc.c (BFD_RELOC_THUMB_PCREL_BRANCH5): New enum.
570         * bfd-in2.h: Regenerate.
571         * libbfd.h: Regenerate.
572
573 2019-04-15  Thomas Preud'homme  <thomas.preudhomme@arm.com>
574
575         * archures.c (bfd_mach_arm_8_1M_MAIN): Define.
576         * bfd-in2.h: Regenerate.
577         * cpu-arm.c (arch_info_struct): Add entry for Armv8.1-M Mainline.
578         * elf32-arm.c (using_thumb_only): Return true for Armv8.1-M Mainline
579         and update assert.
580         (using_thumb2): Likewise.
581         (using_thumb2_bl): Update assert.
582         (arch_has_arm_nop): Likewise.
583         (bfd_arm_get_mach_from_attributes): Add case for Armv8.1-M Mainline.
584         (tag_cpu_arch_combine): Add logic for Armv8.1-M Mainline merging.
585
586 2019-04-11  H.J. Lu  <hongjiu.lu@intel.com>
587
588         * elf-linker-x86.h (elf_x86_cet_report): New.
589         (elf_linker_x86_params): Add cet_report.
590         * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Report
591         missing IBT and SHSTK properties if needed.
592
593 2019-04-11  H.J. Lu  <hongjiu.lu@intel.com>
594
595         PR ld/24436
596         * elf-m10300.c (mn10300_elf_check_relocs): Remove BFD_ASSERT of
597         "h != NULL".  Don't check "h != NULL" before calling.
598         bfd_elf_gc_record_vtentry.
599         * elf32-arm.c (elf32_arm_check_relocs): Likewise.
600         * elf32-bfin.c (bfin_check_relocs): Likewise.
601         * elf32-cris.c (cris_elf_check_relocs): Likewise.
602         * elf32-csky.c (csky_elf_check_relocs): Likewise.
603         * elf32-d10v.c (elf32_d10v_check_relocs): Likewise.
604         * elf32-dlx.c (elf32_dlx_check_relocs): Likewise.
605         * elf32-fr30.c (fr30_elf_check_relocs): Likewise.
606         * elf32-frv.c (elf32_frv_check_relocs): Likewise.
607         * elf32-hppa.c (elf32_hppa_check_relocs): Likewise.
608         * elf32-i386.c (elf_i386_check_relocs): Likewise.
609         * elf32-iq2000.c (iq2000_elf_check_relocs): Likewise.
610         * elf32-m32r.c (m32r_elf_check_relocs): Likewise.
611         * elf32-m68hc1x.c (elf32_m68hc11_check_relocs): Likewise.
612         * elf32-m68k.c (elf_m68k_check_relocs): Likewise.
613         * elf32-mcore.c (mcore_elf_check_relocs): Likewise.
614         * elf32-metag.c (elf_metag_check_relocs): Likewise.
615         * elf32-or1k.c (or1k_elf_check_relocs): Likewise.
616         * elf32-ppc.c (ppc_elf_check_relocs): Likewise.
617         * elf32-s390.c (elf_s390_check_relocs): Likewise.
618         * elf32-sh.c (sh_elf_check_relocs): Likewise.
619         * elf32-v850.c (v850_elf_check_relocs): Likewise.
620         * elf32-vax.c (elf_vax_check_relocs): Likewise.
621         * elf32-xstormy16.c (xstormy16_elf_check_relocs): Likewise.
622         * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
623         * elf64-mmix.c (mmix_elf_check_relocs): Likewise.
624         * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
625         * elf64-s390.c (elf_s390_check_relocs): Likewise.
626         * elf64-x86-64.c (elf_s390_check_relocs): Likewise.
627         * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
628         * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
629         * elflink.c (bfd_elf_gc_record_vtinherit): Check for corrupt
630         VTENTRY entry.
631
632 2019-04-11  Alan Modra  <amodra@gmail.com>
633
634         PR 24435
635         * elflink.c (elf_link_add_object_symbols): Don't read partial
636         dynamic entries from fuzzed objects.
637
638 2019-04-11  Tamar Christina  <tamar.christina@arm.com>
639
640         PR ld/24302
641         * elfnn-aarch64.c (elfNN_aarch64_size_dynamic_sections): Don't emit
642         DT_TLSDESC_GOT and DT_TLSDESC_PLT when DF_BIND_NOW.
643         (elfNN_aarch64_finish_dynamic_sections): Don't write PLT if DF_BIND_NOW.
644
645 2019-04-10  Michael Forney  <mforney@mforney.org>
646
647         PR 24427
648         * doc/chew.c (free_words): Correctly free "push_text" strings.
649
650 2019-04-08  H.J. Lu  <hongjiu.lu@intel.com>
651
652         * config.bfd: Remove i[3-7]86-*-kaos* and i[3-7]86-*-chaos targets.
653
654 2019-04-08  Alan Modra  <amodra@gmail.com>
655
656         * configure.ac (elfxx_x86): Define and use.
657         * configure: Regenerate.
658
659 2019-04-06  H.J. Lu  <hongjiu.lu@intel.com>
660
661         * elf-linker-x86.h: New file.
662         * elf32-i386.c (elf_i386_convert_load_reloc): Use htab->params
663         to get x86-specific linker options.
664         * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
665         (elf_x86_64_check_relocs): Likewise.
666         (elf_x86_64_relocate_section): Likewise.
667         (elf_x86_64_link_setup_gnu_properties): Likewise.
668         * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Likewise.
669         (_bfd_x86_elf_link_setup_gnu_properties): Likewise.
670         (_bfd_elf_linker_x86_set_options): New function.
671         * elfxx-x86.h: Include "elf-linker-x86.h".
672         (elf_x86_link_hash_table): Add params.
673
674 2019-04-03  Alan Modra  <amodra@gmail.com>
675
676         * coff-i386.c, * coff-x86_64.c, * coffgen.c, * dwarf2.c,
677         * elf-m10200.c, * elf.c, * elf32-arm.c, * elf32-bfin.c,
678         * elf32-csky.c, * elf32-m32r.c, * elf32-microblaze.c, * elf32-pru.c,
679         * elf32-rx.c, * elf32-xgate.c, * elf64-sparc.c, * elfnn-ia64.c,
680         * elfxx-riscv.c, * elfxx-sparc.c, * linker.c, * mach-o.c,
681         * pe-x86_64.c, * pei-x86_64.c, * plugin.c: Whitespace fixes.
682
683 2019-04-02  Jim Wilson  <jimw@sifive.com>
684
685         PR 24389
686         * elfnn-riscv.c (_bfd_riscv_elf_merge_private_bfd_data): Move read of
687         ELF header flags to after check for ELF object file.  Loop through
688         sections looking for code sections, if none, then skip ABI checks.
689
690 2019-03-30  Andrew Waterman  <andrew@sifive.com>
691
692         * elfnn-riscv.c (_bfd_riscv_relax_call): Only check ARCH_SIZE for
693         rd == X_RA case.
694
695 2019-03-29  Max Filippov  <jcmvbkbc@gmail.com>
696
697         * elf32-xtensa.c (shrink_dynamic_reloc_sections): Add
698         info->export_dynamic to the conditional.
699
700 2019-03-28  Alan Modra  <amodra@gmail.com>
701
702         PR 24392
703         * configure.ac: Invoke AC_CHECK_SIZEOF(int).
704         * configure: Regenerate.
705         * coffgen.c (coff_get_reloc_upper_bound): Replace gcc diagnostic
706         workaround with SIZEOF_LONG vs. SIZEOF_INT check.
707         * elf.c (_bfd_elf_get_reloc_upper_bound): Likewise.
708         * elf64-sparc.c (elf64_sparc_get_reloc_upper_bound): Likewise.
709         * mach-o.c (bfd_mach_o_get_reloc_upper_bound): Likewise.
710
711 2019-03-21  Jim Wilson  <jimw@sifive.com>
712
713         PR 24365
714         * elfnn-riscv.c (riscv_elf_relocate_section): For STT_SECTION check,
715         verify sym non-NULL before using.  Add identical check using h.
716
717 2019-03-21  Sudakshina Das  <sudi.das@arm.com>
718
719         * elf-bfd.h (struct elf_backend_data): Add argument to
720         merge_gnu_properties.
721         * elf-properties.c (elf_merge_gnu_properties): Add argument to
722         itself and while calling bed->merge_gnu_properties.
723         (elf_merge_gnu_property_list): Update the calls for
724         elf_merge_gnu_properties.
725         * elfnn-aarch64.c (elfNN_aarch64_merge_gnu_properties): Update handling
726         of --force-bti warning and add argument.
727         * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties): Add
728         warning.
729         * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Add argument.
730         * elfxx-x86.h (_bfd_x86_elf_merge_gnu_properties): Likewise in
731         declaration.
732
733 2019-03-20  Sudakshina Das  <sudi.das@arm.com>
734
735         * elfxx-aarch64.c (_bfd_aarch64_elf_link_fixup_gnu_properties): Define.
736         * elfxx-aarch64.h (_bfd_aarch64_elf_link_fixup_gnu_properties): Declare.
737         (elf_backend_fixup_gnu_properties): Define for AArch64.
738
739 2019-03-18  Alan Modra  <amodra@gmail.com>
740
741         PR 24355
742         * elf32-ppc.c (ppc_finish_symbols): Don't call write_glink_stub
743         for local iplt syms with ent->plt.offset == -1.  Remove ineffective
744         attempt at writing glink stubs only once.
745
746 2019-03-16  Alan Modra  <amodra@gmail.com>
747
748         PR 24337
749         * elf.c (_bfd_elf_rela_local_sym): Revert last change.
750         (_bfd_elf_rel_local_sym): Likewise.
751         * elflink.c (elf_link_input_bfd): Use bfd_und_section for
752         section of symbols with unrecognized shndx.
753
754 2019-03-15  H.J. Lu  <hongjiu.lu@intel.com>
755
756         PR ld/24267
757         * coffgen.c (_bfd_coff_section_already_linked): Skip discarded
758         section.
759         * cofflink.c (coff_link_add_symbols): Check for symbols defined
760         in discarded section.
761
762 2019-03-15  Alan Modra  <amodra@gmail.com>
763
764         PR 24339
765         * elflink.c (elf_link_add_object_symbols): Bail out on a local
766         symbol after globals if elf_bad_symtab is not set.
767
768 2019-03-15  Alan Modra  <amodra@gmail.com>
769
770         PR 24337
771         * elf.c (_bfd_elf_rela_local_sym): Don't segfault on NULL sec.
772         (_bfd_elf_rel_local_sym): Likewise.
773
774 2019-03-15  Alan Modra  <amodra@gmail.com>
775
776         PR 24336
777         * elflink.c (elf_link_read_relocs_from_section): Handle fuzzed
778         object files with sh_size not a multiple of sh_entsize.
779
780 2019-03-15  H.J. Lu  <hongjiu.lu@intel.com>
781
782         PR ld/24338
783         * elf64-x86-64.c (elf_x86_64_relocate_section): Check for corrupt
784         input with bad relocation.
785
786 22019-03-15  H.J. Lu  <hongjiu.lu@intel.com>
787
788         * elf64-x86-64.c (elf_x86_64_relocate_section): Re-indent.
789
790 2019-03-14  Nick Clifton  <nickc@redhat.com>
791
792         PR 24334
793         * dwarf2.c (struct dwarf2_debug): Add sec_vma_count field.
794         (save_section_vma): Initialise field to the number of entries in
795         the sec_vma table.
796         (section_vma_same): Check that the number of entries in the
797         sec_vma table matches the number of sections in the bfd.
798
799 2019-03-14  Nick Clifton  <nickc@redhat.com>
800
801         PR 24333
802         * elflink.c (_bfd_elf_add_default_symbol): Add a check for a NULL
803         section owner pointer when adding the default symbol.
804
805 2019-03-14  Nick Clifton  <nickc@redhat.com>
806
807         PR 24332
808         * elflink.c (elf_link_add_object_symbols): Add new local variable
809         extversym_end.  Initialise it to point to the end of the version
810         symbol table, if present.  Check it when initialising and updating
811         the ever pointer.
812
813 2019-03-13  Sudakshina Das  <sudi.das@arm.com>
814
815         * elfnn-aarch64.c (PLT_PAC_ENTRY_SIZE, PLT_PAC_SMALL_ENTRY_SIZE): New.
816         (PLT_BTI_PAC_ENTRY_SIZE, PLT_BTI_PAC_SMALL_ENTRY_SIZE): New.
817         (setup_plt_values): Account for PAC or PAC and BTI enabled PLTs.
818         (elfNN_aarch64_size_dynamic_sections): Add checks for PLT_BTI_PAC
819         and PLT_PAC_PLT.
820         (elfNN_aarch64_finish_dynamic_sections): Account for PLT_BTI_PAC.
821         (get_plt_type): Add case for DT_AARCH64_PAC_PLT.
822         (elfNN_aarch64_plt_sym_val): Add cases for PLT_BTI_PAC and PLT_PAC.
823
824 2019-03-13  Sudakshina Das  <sudi.das@arm.com>
825             Szabolcs Nagy  <szabolcs.nagy@arm.com>
826
827         * bfd-in.h (aarch64_plt_type, aarch64_enable_bti_type): New.
828         (aarch64_bti_pac_info): New.
829         (bfd_elf64_aarch64_set_options): Add aarch64_bti_pac_info argument.
830         (bfd_elf32_aarch64_set_options): Likewise.
831         * bfd-in2.h: Regenerate
832         * elfnn-aarch64.c (PLT_BTI_ENTRY_SIZE): New.
833         (PLT_BTI_SMALL_ENTRY_SIZE, PLT_BTI_TLSDESC_ENTRY_SIZE): New.
834         (elfNN_aarch64_small_plt0_bti_entry): New.
835         (elfNN_aarch64_small_plt_bti_entry): New.
836         (elfNN_aarch64_tlsdesc_small_plt_bti_entry): New.
837         (elf_aarch64_obj_tdata): Add no_bti_warn and plt_type fields.
838         (elf_aarch64_link_hash_table): Add plt0_entry, plt_entry and
839         tlsdesc_plt_entry_size fields.
840         (elfNN_aarch64_link_hash_table_create): Initialise the new fields.
841         (setup_plt_values): New helper function.
842         (bfd_elfNN_aarch64_set_options): Use new bp_info to set plt sizes and
843         bti enable type.
844         (elfNN_aarch64_allocate_dynrelocs): Use new size members instead of
845         fixed macros.
846         (elfNN_aarch64_size_dynamic_sections): Likewise and add checks.
847         (elfNN_aarch64_create_small_pltn_entry): Use new generic pointers
848         to plt stubs instead of fixed ones and update filling them according
849         to the need for bti.
850         (elfNN_aarch64_init_small_plt0_entry): Likewise.
851         (elfNN_aarch64_finish_dynamic_sections): Likewise.
852         (get_plt_type, elfNN_aarch64_get_synthetic_symtab): New.
853         (elfNN_aarch64_plt_sym_val): Update size accordingly.
854         (elfNN_aarch64_link_setup_gnu_properties): Set up plts if BTI GNU NOTE
855         is set.
856         (bfd_elfNN_get_synthetic_symtab): Define.
857         (elfNN_aarch64_merge_gnu_properties): Give out warning with --force-bti
858         and mising BTI NOTE SECTION.
859
860
861 2019-03-13  Sudakshina Das  <sudi.das@arm.com>
862
863         * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Exclude
864         linker created inputs from merge.
865         * elfnn-aarch64.c (struct elf_aarch64_obj_tdata): Add field for
866         GNU_PROPERTY_AARCH64_FEATURE_1_AND properties.
867         (elfNN_aarch64_link_setup_gnu_properties): New.
868         (elfNN_aarch64_merge_gnu_properties): New.
869         (elf_backend_setup_gnu_properties): Define for AArch64.
870         (elf_backend_merge_gnu_properties): Likewise.
871         * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties): Define.
872         (_bfd_aarch64_elf_parse_gnu_properties): Define.
873         (_bfd_aarch64_elf_merge_gnu_properties): Define.
874         * elfxx-aarch64.h (_bfd_aarch64_elf_link_setup_gnu_properties): Declare.
875         (_bfd_aarch64_elf_parse_gnu_properties): Declare.
876         (_bfd_aarch64_elf_merge_gnu_properties): Declare.
877         (elf_backend_parse_gnu_properties): Define for AArch64.
878
879 2019-03-13  H.J. Lu  <hongjiu.lu@intel.com>
880
881         PR ld/24322
882         * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Properly
883         merge GNU_PROPERTY_X86_FEATURE_1_[IBT|SHSTK].
884
885 2019-03-12  Alan Modra  <amodra@gmail.com>
886
887         * coffcode.h (buy_and_read): Delete unnecessary forward decl.  Add
888         nmemb parameter.  Use bfd_alloc2.
889         (coff_slurp_line_table): Use bfd_alloc2.  Update buy_and_read calls.
890         Delete assertion.
891         (coff_slurp_symbol_table): Use bfd_alloc2 and bfd_zalloc2.
892         (coff_slurp_reloc_table): Use bfd_alloc2.  Update buy_and_read calls.
893         * coffgen.c (coff_get_reloc_upper_bound): Ensure size calculation
894         doesn't overflow.
895         * elf.c (bfd_section_from_shdr): Use bfd_zalloc2.  Style fix.
896         (assign_section_numbers): Style fix.
897         (swap_out_syms): Use bfd_malloc2.
898         (_bfd_elf_get_reloc_upper_bound): Ensure size calculation doesn't
899         overflow.
900         (_bfd_elf_make_empty_symbol): Style fix.
901         (elfobj_grok_stapsdt_note_1): Formatting.
902         * elfcode.h (elf_object_p): Use bfd_alloc2.
903         (elf_write_relocs, elf_write_shdrs_and_ehdr): Likewise.
904         (elf_slurp_symbol_table): Use bfd_zalloc2.
905         (elf_slurp_reloc_table): Use bfd_alloc2.
906         (_bfd_elf_bfd_from_remote_memory): Use bfd_malloc2.
907         * elf64-sparc (elf64_sparc_get_reloc_upper_bound): Ensure
908         size calculation doesn't overflow.
909         (elf64_sparc_get_dynamic_reloc_upper_bound): Likewise.
910         * mach-o.c (bfd_mach_o_get_reloc_upper_bound): Likewise.
911         * pdp11.c (get_reloc_upper_bound): Copy aoutx.h version.
912
913 2019-03-08  Alan Modra  <amodra@gmail.com>
914
915         PR 24311
916         * merge.c (merge_strings): Return secinfo.  Don't pad section
917         to alignment here.
918         (_bfd_merge_sections): Pad section to alignment here, if input
919         sections contributing to merged output all pad to alignment.
920         Formatting.
921
922 2019-03-06  Nick Clifton  <nickc@redhat.com>
923
924         * dwarf2.c (_bfd_dwarf2_find_symbol_bias): Check for a NULL symbol
925         table pointer.
926         * coffgen.c (coff_find_nearest_line_with_names): Do not call
927         _bfd_dwarf2_find_symbol_bias if there is no symbol table available.
928
929 2019-03-01  Andreas Krebbel  <krebbel@linux.ibm.com>
930
931         This reverts commit 5a12586d44fa8d5dfc74cbca4f2f36a273a16335.
932         2019-01-14  Maamoun Tarsha  <maamountk@hotmail.com>
933
934         PR 20113
935         * elf32-s390.c (allocate_dynrelocs): Update comment.
936
937 2019-02-28  Tamar Christina  <tamar.christina@arm.com>
938
939         * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Correct CIE parse.
940
941 2019-02-28  Nick Clifton  <nickc@redhat.com>
942
943         PR 24273
944         * elf.c (bfd_elf_string_from_elf_section): Check for a string
945         section that is not NUL terminated.
946
947 2019-02-27  H.J. Lu  <hongjiu.lu@intel.com>
948
949         PR ld/24276
950         * elf64-x86-64.c (elf_x86_64_check_relocs): Skip symbol defined
951         by linker when checking copy reloc on protected symbol.
952
953 2019-02-24  Alan Modra  <amodra@gmail.com>
954
955         PR 24144
956         * pdp11.c (set_section_contents): Revert 2015-02-24 change.
957
958 2019-02-20  Eric Tsai  <erictsai@cadence.com>
959
960         * elf32-xtensa.c (is_resolvable_asm_expansion): Scan output
961         sections between the call site and call destination and adjust
962         call distance by the largest alignment.
963
964 2019-02-20  Alan Hayward  <alan.hayward@arm.com>
965
966         * elf-bfd.h (elfcore_write_aarch_pauth): Add declaration.
967         * elf.c (elfcore_grok_aarch_pauth): New function.
968         (elfcore_grok_note): Check for NT_ARM_PAC_MASK.
969         (elfcore_write_aarch_pauth): New function.
970         (elfcore_write_register_note): Check for AArch64 pauth section.
971
972 2019-02-20  Alan Modra  <amodra@gmail.com>
973
974         PR 24225
975         * elf32-nios2.c (nios2_elf32_relocate_section): Check asprintf
976         return value.
977
978 2019-02-20  Michael Roitzsch  <reactorcontrol@icloud.com>
979
980         * configure.ac (SHARED_LIBADD): Add -liberty -lintl for all
981         Darwin hosts, not just or1k.
982         * configure: Regenerate.
983
984 2019-02-20  Alan Modra  <amodra@gmail.com>
985
986         PR 24236
987         * archive64.c (_bfd_archive_64_bit_slurp_armap): Move code adding
988         sentinel NUL to string buffer nearer to loop where it is used.
989         Don't go past sentinel when scanning strings, and don't write
990         NUL again.
991         * archive.c (do_slurp_coff_armap): Simplify string handling to
992         archive64.c style.
993
994 2019-02-19  Alan Modra  <amodra@gmail.com>
995
996         PR 24235
997         * pei-x86_64.c (pex64_bfd_print_pdata_section): Correct checks
998         attempting to prevent read past end of section.
999
1000 2019-02-18  Alan Modra  <amodra@gmail.com>
1001
1002         PR 24225
1003         * elf32-nios2.c (nios2_elf32_relocate_section): Use asprintf and
1004         PRIx64 to generate warning messages.  Print local sym names too.
1005
1006 2019-02-09  Vineet Gupta  <vgupta@synopsys.com>
1007
1008         * elf32-arc (INIT_SYM_STRING): Delete.
1009         (FINI_SYM_STRING): Likewise.
1010         (init_str): Likewise.
1011         (fini_str): Likewise.
1012
1013 2019-02-08  Alan Modra  <amodra@gmail.com>
1014
1015         * elf32-ppc.c (ppc_elf_relocate_section): Add %X to "unsupported
1016         for bss-plt" warning to make it an error.
1017
1018 2019-02-07  Eric Botcazou  <ebotcazou@adacore.com>
1019
1020         PR ld/18841
1021         * elf32-sparc.c (elf32_sparc_reloc_type_class): Return
1022         reloc_class_ifunc for ifunc symbols.
1023         * elf64-sparc.c (elf64_sparc_reloc_type_class): Likewise.
1024
1025 2019-02-07  Eric Botcazou  <ebotcazou@adacore.com>
1026
1027         * elf32-visium.c (visium_elf_howto_parity_reloc): Minor tweak.
1028         <R_VISIUM_PC16>: Use explicit range test to detect an overflow.
1029
1030 2019-02-07  Nick Clifton  <nickc@redhat.com>
1031
1032         * config.bfd: Move the powerpc-lynxos and powerpc-windiss targets
1033         into the definitely obsolete list.
1034
1035 2019-02-05  H.J. Lu  <hongjiu.lu@intel.com>
1036
1037         PR ld/24151
1038         * elf64-x86-64.c (elf_x86_64_need_pic): Check
1039         SYMBOL_DEFINED_NON_SHARED_P instead of def_regular.
1040         (elf_x86_64_relocate_section): Move PIC check for PC-relative
1041         relocations to ...
1042         (elf_x86_64_check_relocs): Here.
1043         (elf_x86_64_finish_dynamic_symbol): Use SYMBOL_DEFINED_NON_SHARED_P
1044         to check if a symbol is defined in a non-shared object.
1045         * elfxx-x86.h (SYMBOL_DEFINED_NON_SHARED_P): New.
1046
1047 2019-01-21  Sergio Durigan Junior  <sergiodj@redhat.com>
1048
1049         * elf32-arm.c (elf32_arm_final_link_relocate): Use 'llabs' instead
1050         of 'labs' (and fix GCC warning).
1051
1052 2019-01-25  Nick Clifton  <nickc@redhat.com>
1053
1054         * po/ru.po: Updated Russian translation.
1055
1056 2019-01-23  Nick Clifton  <nickc@redhat.com>
1057
1058         * po/fr.po: Updated French translation.
1059
1060 2019-01-21  Nick Clifton  <nickc@redhat.com>
1061
1062         * po/pt.po: Updated Portuguese translation.
1063         * po/uk.po: Updated Ukranian translation.
1064
1065 2019-01-21  Yuri Chornoivan  <yurchor@ukr.net>
1066
1067         PR 24108
1068         * elf32-nds32.c (nds32_relocate_section): Add space between words
1069         in error message.
1070         * elfnn-riscv.c (riscv_version_mismatch): Fix spelling mistake in
1071         error message.
1072         (riscv_i_or_e_p): Likewise.
1073         (riscv_merge_arch_attr_info): Likewise.
1074
1075 2019-01-19  Nick Clifton  <nickc@redhat.com>
1076
1077         * version.m4: Reset to 2.32.51
1078         * configure: Regenerate.
1079         * po/bfd.pot: Regenerate.
1080
1081 2018-06-24  Nick Clifton  <nickc@redhat.com>
1082
1083         2.32 branch created.
1084
1085 2019-01-16  Kito Cheng  <kito@andestech.com>
1086
1087         * elf-attrs.c (vendor_obj_attr_size): Return 0 if size is 0 even
1088         for OBJ_ATTR_PROC.
1089
1090 2019-01-16  Kito Cheng  <kito@andestech.com>
1091             Nelson Chu  <nelson@andestech.com>
1092
1093         * elfnn-riscv.c (in_subsets): New.
1094         (out_subsets): Likewise.
1095         (merged_subsets): Likewise.
1096         (riscv_std_ext_p): Likewise.
1097         (riscv_non_std_ext_p): Likewise.
1098         (riscv_std_sv_ext_p): Likewise.
1099         (riscv_non_std_sv_ext_p): Likewise.
1100         (riscv_version_mismatch): Likewise.
1101         (riscv_i_or_e_p): Likewise.
1102         (riscv_merge_std_ext): Likewise.
1103         (riscv_merge_non_std_and_sv_ext): Likewise.
1104         (riscv_merge_arch_attr_info): Likewise.
1105         (riscv_merge_attributes): Likewise.
1106         (_bfd_riscv_elf_merge_private_bfd_data): Merge attribute.
1107
1108         * elfnn-riscv.c (riscv_elf_obj_attrs_arg_type): New.
1109         (elf_backend_obj_attrs_vendor): Define.
1110         (elf_backend_obj_attrs_section_type): Likewise.
1111         (elf_backend_obj_attrs_section): Likewise.
1112         (elf_backend_obj_attrs_arg_type): Define as
1113         riscv_elf_obj_attrs_arg_type.
1114         * elfxx-riscv.c (riscv_estimate_digit): New.
1115         (riscv_estimate_arch_strlen1): Likewise.
1116         (riscv_estimate_arch_strlen): Likewise.
1117         (riscv_arch_str1): Likewise.
1118         (riscv_arch_str): Likewise.
1119         * elfxx-riscv.h (riscv_arch_str): Declare.
1120
1121 2019-01-14  John Darrington <john@darrington.wattle.id.au>
1122
1123         * bfd-in2.h [BFD_RELOC_S12Z_OPR]: New reloc.
1124         * libbfd.h: regen.
1125         * elf32-s12z.c (eld_s12z_howto_table): R_S12Z_OPR takes non zero
1126         source field.  (md_apply_fix): Apply final fix
1127         to BFD_RELOC_S12Z_OPR.
1128         * reloc.c[BFD_RELOC_S12Z_OPR]: New reloc.
1129
1130 2019-01-14  Maamoun Tarsha  <maamountk@hotmail.com>
1131
1132         PR 20113
1133         * elf32-s390.c (allocate_dynrelocs): Update comment.
1134
1135 2019-01-09  Andrew Paprocki  <andrew@ishiboo.com>
1136
1137         * warning.m4: Adjust egrep pattern for non-GNU compilers.
1138         * configure: Regenerate.
1139
1140 2019-01-08  Alan Modra  <amodra@gmail.com>
1141
1142         PR 23699
1143         PR 24065
1144         * ihex.c (ihex_write_object_contents): Properly check 32-bit
1145         address range.
1146
1147 2019-01-05  Yoshinori Sato <ysato@users.sourceforge.jp>
1148
1149         * bfd/archures.c: Add bfd_mach_rx_v2 and bfd_mach_rx_v3.
1150         * bfd/bfd-in2.h: Regenerate.
1151         * bfd/cpu-rx.c (arch_info_struct): Add RXv2 and RXv3 entry.
1152         * bfd/elf32-rx.c (elf32_rx_machine): Add RXv2 and RXv3 support.
1153
1154 2019-01-04  Lifang Xia  <lifang_xia@c-sky.com>
1155
1156         * config.bfd (csky-*-elf* | csky-*-linux*): Modify the csky
1157         default target, little endian target is more suitable.
1158
1159 2019-01-04  Alan Modra  <amodra@gmail.com>
1160
1161         PR 24061
1162         PR 21786
1163         * coff-rs6000.c (GET_VALUE_IN_FIELD): Add base parameter and
1164         adjust all callers.
1165         (EQ_VALUE_IN_FIELD): Likewise.
1166         * coff64-rs6000.c (GET_VALUE_IN_FIELD): Likewise.
1167
1168 2019-01-01  Alan Modra  <amodra@gmail.com>
1169
1170         Update year range in copyright notice of all files.
1171
1172 For older changes see ChangeLog-2018
1173 \f
1174 Copyright (C) 2019 Free Software Foundation, Inc.
1175
1176 Copying and distribution of this file, with or without modification,
1177 are permitted in any medium without royalty provided the copyright
1178 notice and this notice are preserved.
1179
1180 Local Variables:
1181 mode: change-log
1182 left-margin: 8
1183 fill-column: 74
1184 version-control: never
1185 End: