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