afabbc0f56aa5964ff7947ceace4625c1b9b3c99
[binutils-gdb.git] / bfd / ChangeLog
1 2022-07-29 Nick Clifton <nickc@redhat.com>
2
3 PR 29424
4 * dwarf2.c (read_attribute_value): Handle DW_FORM_rnglistx and
5 DW_FORM_loclistx.
6
7 2022-07-26 Nick Clifton <nickc@redhat.com>
8
9 * elfnn-loongarch.c (loongarch_elf_relocate_section): Fix
10 indentation.
11
12 2022-07-08 Nick Clifton <nickc@redhat.com>
13
14 * 2.39 branch created.
15
16 2022-05-19 Yvan Roux <yvan.roux@foss.st.com>
17
18 PR 25713
19 * bfdio.c (_bfd_real_fopen): Delete ccs string.
20
21 2022-04-27 John Baldwin <jhb@FreeBSD.org>
22
23 * elf.c (elfcore_grok_freebsd_note): Handle NT_ARM_TLS notes.
24
25 2022-04-25 Nick Clifton <nickc@redhat.com>
26
27 PR 29072
28 * elflink.c (bfd_elf_size_dynamic_sections): Display a note to the
29 user that the current ehaviour of creating an executable stack
30 because of a missing .note.GNU-stack section is deprecated and
31 will be changed in a future release.
32
33 2022-04-20 Clément Chigot <clement.chigot@atos.net>
34
35 * coff-rs6000.c (xcoff_reloc_type_noop): Add info argument.
36 (xcoff_reloc_type_fail): Likewise.
37 (xcoff_reloc_type_pos): Likewise.
38 (xcoff_reloc_type_neg): Likewise.
39 (xcoff_reloc_type_rel): Likewise.
40 (xcoff_reloc_type_toc): Likewise.
41 (xcoff_reloc_type_ba): Likewise.
42 (xcoff_reloc_type_crel): Likewise.
43 (xcoff_reloc_type_tls): Likewise.
44 (xcoff_reloc_type_br): Add stub handler.
45 (xcoff_ppc_relocate_section): Add info to
46 xcoff_calculate_relocation.
47 (xcoff_stub_indirect_call_code): New constant.
48 (xcoff_stub_shared_call_code): Likewise.
49 (bfd_xcoff_backend_data): Add stub code fields.
50 (bfd_pmac_xcoff_backend_data): Likewise.
51 * coff64-rs6000.c (xcoff64_reloc_type_br): Add stub handler.
52 (xcoff64_ppc_relocate_section): Add info to
53 xcoff64_calculate_relocation.
54 (xcoff64_stub_indirect_call_code): New constant.
55 (xcoff64_stub_shared_call_code): Likewise.
56 (bfd_xcoff_backend_data): Add stub code fields.
57 (bfd_xcoff_aix5_backend_data): Likewise.
58 * libxcoff.h (struct xcoff_backend_data_rec): Add stub fields.
59 (bfd_xcoff_stub_indirect_call_code): New define.
60 (bfd_xcoff_stub_indirect_call_size): New define.
61 (bfd_xcoff_stub_shared_call_code): New define.
62 (bfd_xcoff_stub_shared_call_size): New define.
63 (xcoff_reloc_function): Add info argument.
64 (enum xcoff_stub_type): New enum.
65 (struct xcoff_stub_hash_entry): New structure.
66 * xcofflink.c (struct xcoff_link_hash_table): Add stub hash
67 table and params fields.
68 (xcoff_stub_hash_entry): New define.
69 (xcoff_stub_hash_lookup): New define.
70 (stub_hash_newfunc): New function.
71 (_bfd_xcoff_bfd_link_hash_table_free): Free the new stub hash
72 table.
73 (_bfd_xcoff_bfd_link_hash_table_create): Create the new stub
74 hash table.
75 (xcoff_link_add_symbols): Save rawsize for XTY_SD.
76 (bfd_xcoff_link_init): New function.
77 (xcoff_stub_csect_name): New function.
78 (xcoff_stub_get_csect_in_range): New function.
79 (xcoff_stub_name): New function.
80 (bfd_xcoff_get_stub_entry): New function.
81 (bfd_xcoff_type_of_stub): New function.
82 (xcoff_add_stub): New function.
83 (xcoff_build_one_stub): New function.
84 (bfd_xcoff_size_stubs): New function.
85 (bfd_xcoff_build_stubs): New function.
86 (xcoff_stub_create_relocations): New function.
87 (xcoff_link_input_bfd): Adapt relocations to stub.
88 (xcoff_write_global_symbol): Adapt to new TOC entries generated
89 for stubs.
90 (_bfd_xcoff_bfd_final_link): Handle stub file.
91 * xcofflink.h (struct bfd_xcoff_link_params): New structure.
92
93 2022-04-20 Clément Chigot <clement.chigot@atos.net>
94
95 * coff-rs6000.c (_bfd_xcoff_put_ldsymbol_name): Write len in
96 ldinfo->strings instead of directly in the output_bfd.
97 * coff64-rs6000.c (_bfd_xcoff64_put_ldsymbol_name): Likewise.
98 * xcofflink.c (struct xcoff_link_hash_table): Remove ldrel_count
99 field. Add ldinfo field.
100 (xcoff_mark_symbol): Adjust to new ldinfo field.
101 (xcoff_mark): Likewise.
102 (bfd_xcoff_link_count_reloc): Likewise.
103 (xcoff_build_loader_section): Split into two functions: one that
104 build the loader section (this function) and one that only size
105 it...
106 (xcoff_size_loader_section): ... (this function).
107 (bfd_xcoff_size_dynamic_sections): Adapt to new ldinfo field.
108 Move the part where the dynamic sections are build to ...
109 (bfd_xcoff_build_dynamic_sections): ... this function.
110 * xcofflink.h: Add bfd_xcoff_build_dynamic_sections prototype.
111
112 2022-04-13 Alexander von Gluck IV <kallisti5@unixzen.com>
113
114 * config.bfd (x86-haiku): Add i386_pei_vec as a selectable format.
115
116 2022-04-08 Nick Clifton <nickc@redhat.com>
117
118 PR 29038
119 * coffgen.c (coff_find_nearest_line_with_names): Fix typo
120 retrieving saved bias.
121
122 2022-04-07 Mark Harmstone <mark@harmstone.com>
123
124 * coff-i386.c (in_reloc_p): Add R_SECTION.
125 (howto_table): Add R_SECTION.
126 (coff_pe_i386_relocation_section): Add support for R_SECTION.
127 (coff_i386_reloc_type_lookup): Add support for
128 BFD_RELOC_16_SECCIDX.
129 * coff-x86_64.c (in_reloc_p): Add R_SECTION.
130 (howto_table): Add R_SECTION.
131 (coff_pe_amd64_relocation_section): Add support for R_SECTION.
132 (coff_amd64_reloc_type_lookup): Add support for
133 BFD_RELOC_16_SECCIDX.
134 * reloc.c: Add BFD_RELOC_16_SECIDX.
135 * bfd-in2.h: Regenerate.
136 * libbfd.h: Regenerate.
137
138 2022-04-01 John Baldwin <jhb@FreeBSD.org>
139
140 * elf-bfd.h (elfcore_write_x86_segbases): New.
141 * elf.c (elfcore_grok_freebsd_note): Add pseudosections for
142 NT_FREEBSD_X86_SEGBASES register notes.
143 (elfcore_write_x86_segbases): New.
144 (elfcore_write_register_note): Write NT_FREEBSD_X86_SEGBASES
145 register notes.
146
147 2022-04-01 John Baldwin <jhb@FreeBSD.org>
148
149 * elf.c (elfcore_grok_freebsd_note): Remove checks for namesz.
150
151 2022-03-22 Steiner H Gunderson <steinar+sourceware@gunderson.no>
152
153 * dwarf2.c (_bfd_dwarf2_find_nearest_line): if a function name is
154 found, but no line number info, then return a result of 2.
155
156 2022-03-21 Steiner H Gunderson <steinar+sourceware@gunderson.no>
157
158 PR 28978
159 * dwarf2.c (scan_unit_for_symbols): When performing second pass,
160 check to see if the function or variable being processed is the
161 same as the previous one.
162
163 2022-03-18 Viorel Preoteasa <viorel.preoteasa@gmail.com>
164
165 PR 28924
166 * elf32-arm.c (THM_MAX_FWD_BRANCH_OFFSET): Fix definition.
167 (THM2_MAX_FWD_BRANCH_OFFSET): Likewise.
168
169 2022-03-16 Simon Marchi <simon.marchi@efficios.com>
170
171 * Makefile.am (ALL_MACHINES, ALL_MACHINES_CFILES):
172 Add cpu-amdgcn.c.
173 (BFD64_BACKENDS): Add elf64-amdgcn.lo.
174 (BFD64_BACKENDS_CFILES): Add elf64-amdgcn.c.
175 * Makefile.in: Re-generate.
176 * cpu-amdgcn.c: New.
177 * elf64-amdgcn.c: New.
178 * archures.c (bfd_architecture): Add bfd_arch_amdgcn and related
179 mach defines.
180 (bfd_amdgcn_arch): New.
181 (bfd_archures_list): Add bfd_amdgcn_arch.
182 * bfd-in2.h: Re-generate.
183 * config.bfd: Handle amdgcn* target.
184 * configure.ac: Handle amdgcn_elf64_le_vec.
185 * configure: Re-generate.
186 * elf-bfd.h (elf_target_id): Add AMDGCN_ELF_DATA.
187 * targets.c (amdgcn_elf64_le_vec): New.
188 (_bfd_target_vector): Add amdgcn_elf64_le_vec.
189
190 2022-03-01 Torbjörn Svensson <torbjorn.svensson@st.com>
191 Fred Eisele <fredrick.eisele@gmail.com>
192
193 PR 25713
194 * bfdio.c (_bfd_real_fopen): Fix typo.
195
196 2022-03-01 Nick Clifton <nickc@redhat.com>
197
198 PR 28848
199 * elf32-arm.c (elf32_arm_merge_eabi_attributes): If the first
200 input bfd has a Tag_ABI_HardFP_use set to 3 but does not also have
201 TAG_FP_arch set then reset the TAG_ABI_HardFP_use.
202
203 2022-02-28 Torbjörn Svensson <torbjorn.svensson@st.com>
204 Fred Eisele <fredrick.eisele@gmail.com>
205
206 PR 25713
207 * bfdio.c (_bfd_real_fopen): Fix handling of paths longer than 260
208 characters on Windows hosts.
209
210 2022-02-28 Nick Clifton <nickc@redhat.com>
211
212 PR 28886
213 * config.bfd: Update error message for obsolete configurations.
214
215 2022-02-17 Nick Clifton <nickc@redhat.com>
216
217 * po/sr.po: Updated Serbian translation.
218
219 2022-02-16 Fangrui Song <maskray@google.com>
220 Nick Clifton <nickc@redhat.com>
221
222 PR ld/28841
223 * bfd-in2.h (struct bfd_section): Add type.
224 (discarded_section): Add field.
225 * elf.c (elf_fake_sections): Handle bfd_section::type.
226 * section.c (BFD_FAKE_SECTION): Add field.
227 * mri.c (mri_draw_tree): Update function call.
228
229 2022-02-11 Michael Forney <mforney@mforney.org>
230
231 * bfd.c (bfd_set_gp_value): Remove return with expression
232 in void function.
233
234 2022-02-09 Nick Clifton <nickc@redhat.com>
235
236 * config.bfd: Move pending obsolesence targets into the definitely
237 obsolete list.
238
239 2022-02-02 Nick Clifton <nickc@redhat.com>
240
241 PR 28834
242 * dwarf2.c (read_section): Change the heuristic that checks for
243 overlarge dwarf debug info sections.
244
245 2022-02-02 Stafford Horne <shorne@gmail.com>
246
247 PR 28735
248 * elf32-or1k.c (or1k_elf_got16_no_overflow_howto): Define.
249 (or1k_elf_relocate_section): Use new howto instead of trying to
250 mask out relocation bits.
251
252 2022-01-24 Roland McGrath <mcgrathr@google.com>
253
254 * doc/local.mk (%D%/bfdver.texi): Add mkdir command.
255
256 2022-01-24 Nick Clifton <nickc@redhat.com>
257
258 * po/fr.po: Updated French translation.
259 * po/ro.po: Updated Romanian translation.
260 * po/uk.po: Updated Ukranian translation.
261
262 2022-01-22 Nick Clifton <nickc@redhat.com>
263
264 * version.m4: Change to 2.38.50.
265 * configure: Regenerate.
266 * po/bfd.pot: Regenerate.
267
268 2022-01-22 Nick Clifton <nickc@redhat.com>
269
270 * 2.38 release branch created.
271
272 2022-01-17 Nick Clifton <nickc@redhat.com>
273
274 * Makefile.in: Regenerate.
275 * configure: Regenerate.
276 * doc/Makefile.in: Regenerate.
277 * po/bfd.pot: Regenerate.
278
279 2021-12-15 Nikita Popov <npv1310@gmail.com>
280
281 PR 28687
282 * dwarf1.c (parse_die): Fix undefined behaviour in range tests.
283
284 2021-11-17 Nick Clifton <nickc@redhat.com>
285
286 PR 28452
287 * elf.c (assign_file_positions_for_non_load_sections): Replace
288 assertion with a warning message.
289
290 2021-10-19 Nick Clifton <nickc@redhat.com>
291
292 * linker.c (_bfd_generic_link_add_one_symbol): Test for a NULL
293 name before checking to see if the symbol is __gnu_lto_slim.
294 * archive.c (_bfd_compute_and_write_armap): Likewise.
295
296 2021-09-27 Nick Alcock <nick.alcock@oracle.com>
297
298 * configure: Regenerate.
299
300 2021-09-15 Andrew Burgess <andrew.burgess@embecosm.com>
301
302 * archures.c (bfd_arch_list): Use 'char *' instead of 'char **'
303 when calculating space for a string list.
304
305 2021-09-014 Cupertino Miranda <cmiranda@synopsys.com>
306 Claudiu Zissulescu <claziss@synopsys.com>
307
308 * arc-got.h (arc_static_sym_data): New structure.
309 (get_static_sym_data): New function.
310 (relocate_fix_got_relocs_for_got_info): Move the computation fo
311 symbol value and section to above introduced function, and use
312 this new function.
313
314 2021-09-07 Luis Machado <luis.machado@linaro.org>
315
316 Revert: [AArch64] MTE corefile support
317
318 2021-05-21 Luis Machado <luis.machado@linaro.org>
319
320 * elf.c (elfcore_make_memtag_note_section): New function.
321 (elfcore_grok_note): Handle NT_MEMTAG note types.
322
323 2021-09-07 Nick Clifton <nickc@redhat.com>
324
325 PR 28305
326 * elf32-xtensa.c (elf_xtensa_do_reloc): Add check for put of range
327 reloc.
328
329 PR 28303
330 * elfxx-riscv.c (riscv_elf_add_sub_reloc): Add check for out of
331 range relocs.
332
333 2021-08-10 Nick Clifton <nickc@redhat.com>
334
335 * po/sr.po: Updated Serbian translation.
336
337 2021-07-18 Nick Clifton <nickc@redhat.com>
338
339 * config.bfd: Move pending obsoletion targets to obsolete list.
340
341 2021-07-16 Giulio Benetti <giulio.benetti@benettiengineering.com>
342
343 * elf32-or1k.c (or1k_elf_relocate_section): Use a separate entry
344 in switch case R_OR1K_INSN_REL_26 where we need to check for
345 !SYMBOL_CALLS_LOCAL() instead of !SYMBOL_REFERENCES_LOCAL().
346
347 2021-07-14 Clément Chigot <clement.chigot@atos.net>
348
349 * libxcoff.h (struct xcoff_dwsect_name): Add DWARF name.
350 * coff-rs6000.c (xcoff_dwsect_names): Update.
351 * coffcode.h (sec_to_styp_flags): Likewise.
352 (coff_new_section_hook): Likewise.
353
354 2021-07-10 Alan Modra <amodra@gmail.com>
355
356 * dwarf2.c (read_address): Remove accidental commit.
357 (read_ranges): Compare offset rather than pointers.
358
359 2021-07-08 Nick Clifton <nickc@redhat.com>
360
361 * po/pt.po: Updated Portuguese translation.
362
363 2021-07-07 Nick Clifton <nickc@redhat.com>
364
365 * elfcode.h (elf_swap_symbol_out): Revert accidental change that
366 removed an abort if the shndx pointer is NULL.
367
368 2021-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
369
370 * sysdep.h [!ENABLE_NLS]: Prevent inclusion of <libintl.h> on
371 Solaris.
372
373 2021-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
374
375 * configure.ac: Check for strnlen declaration.
376 * configure, config.in: Regenerate.
377
378 2021-07-07 Nick Clifton <nickc@redhat.com>
379
380 PR 28051
381 * coff-rs6000.c (xcoff_reloc_type_tls): Reformat error messages in
382 order to fix problems when translating.
383 * cofflink.c (_bfd_coff_write_global_sym): Likewise.
384 * elfnn-aarch64.c (_bfd_aarch64_erratum_843419_branch_to_stub):
385 Likewise.
386 * po/bfd.pot: Regenerate.
387
388 2021-07-06 Michael Matz <matz@suse.de>
389
390 PR ld/28021
391 * elfnn-riscv.c (riscv_relax_delete_bytes): Check for any
392 versioning.
393
394 2021-07-06 Alan Modra <amodra@gmail.com>
395
396 PR 28055
397 * elf64-bpf.c (bpf_elf_generic_reloc): Add missing ATTRIBUTE_UNUSED.
398
399 2021-07-05 Alan Modra <amodra@gmail.com>
400
401 PR 28055
402 * elf64-bpf.c (bpf_elf_generic_reloc): Use correct bfd for bfd_put
403 and bfd_put_32 calls. Correct section limit checks.
404
405 2021-07-03 Nick Clifton <nickc@redhat.com>
406
407 * version.m4: Update version number.
408 * configure: Regenerate.
409 * po/opcodes.pot: Regenerate.
410
411 2021-07-03 Nick Clifton <nickc@redhat.com>
412
413 * 2.37 release branch created.
414
415 2021-07-02 Nick Clifton <nickc@redhat.com>
416
417 PR 28046
418 * dwarf2.c (read_ranges): Check that range_ptr does not exceed
419 range_end.
420
421 2021-06-30 YunQiang Su <yunqiang.su@cipunited.com>
422
423 PR mips/28009
424 * bfd/elfxx-mips.c (_bfd_mips_elf_section_from_shdr,
425 _bfd_mips_elf_fake_sections): Mark LTO debug info as
426 SHT_MIPS_DWARF.
427
428 2021-06-29 Nick Clifton <nickc@redhat.com>
429
430 * config.bfd (obsolete configurations): Add netbsdpe.
431
432 2021-06-22 Nelson Chu <nelson.chu@sifive.com>
433
434 * elfnn-riscv.c (riscv_pcrel_hi_reloc): Added field to store
435 the original relocation type, in case the type is converted to
436 R_RISCV_HI20.
437 (riscv_pcrel_lo_reloc): Removed unused name field.
438 (riscv_pcrel_relocs): Added comments.
439 (riscv_zero_pcrel_hi_reloc): Removed unused input_bfd.
440 (riscv_record_pcrel_hi_reloc): Updated.
441 (riscv_record_pcrel_lo_reloc): Likewise.
442 (riscv_resolve_pcrel_lo_relocs): Likewise. Check the original
443 type of auipc, to make sure the %pcrel_lo without any addends.
444 Otherwise, report dangerous relocation error.
445 (riscv_elf_relocate_section): Updated above functions are changed.
446 For R_RISCV_GOT_HI20, report dangerous relocation error when addend
447 isn't zero.
448
449 2021-06-19 H.J. Lu <hongjiu.lu@intel.com>
450
451 PR ld/27998
452 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Count PLT for GOTOFF
453 relocation against IFUNC symbols.
454 (_bfd_x86_elf_adjust_dynamic_symbol): Likewise.
455
456 2021-06-19 H.J. Lu <hongjiu.lu@intel.com>
457
458 * elflink.c (bfd_elf_final_link): Correct DT_TEXTREL warning in
459 PDE.
460
461 2021-06-18 H.J. Lu <hongjiu.lu@intel.com>
462
463 * elf-properties.c (_bfd_elf_parse_gnu_properties): Handle
464 GNU_PROPERTY_UINT32_AND_LO, GNU_PROPERTY_UINT32_AND_HI,
465 GNU_PROPERTY_UINT32_OR_LO and GNU_PROPERTY_UINT32_OR_HI.
466 (elf_merge_gnu_properties): Likewise.
467
468 2021-06-11 Alan Modra <amodra@gmail.com>
469
470 PR 27952
471 * elf-bfd.h (struct elf_obj_tdata): Add is_pie.
472 * elflink.c (elf_link_add_object_symbols): Set is_pie.
473
474 2021-06-09 Nick Clifton <nickc@redhat.com>
475
476 PR 27666
477 * config.bfd: Do not add the sparc_elf32_vec or sparc_elf64_vec
478 vectors to Sparc Solaris2 targets.
479
480 2021-06-08 Michael Matz <matz@suse.de>
481
482 * elf.c (bfd_section_from_shdr): Set has_secondary_relocs flag.
483 (_bfd_elf_slurp_secondary_reloc_section): Use it for early-out.
484
485 2021-06-07 Jan Beulich <jbeulich@suse.com>
486
487 * dwarf2.c (read_ranges, read_rnglists): Add u suffix to constant.
488
489 2021-06-02 Alan Modra <amodra@gmail.com>
490
491 * elf-attrs.c (_bfd_elf_parse_attributes): Break out of loop if
492 subsection length is too small to cover tag and length field.
493
494 2021-05-31 Nelson Chu <nelson.chu@sifive.com>
495 Lifang Xia <lifang_xia@c-sky.com>
496
497 PR 27566
498 * elfnn-riscv.c (struct riscv_elf_link_hash_table): New integer pointer
499 to monitor the data segment phase.
500 (bfd_elfNN_riscv_set_data_segment_info): New function called by
501 after_allocation, to set the data_segment_phase from expld.dataseg.
502 (_bfd_riscv_relax_section): Don't relax when data_segment_phase is
503 exp_seg_relro_adjust (0x4).
504 * elfxx-riscv.h (bfd_elf32_riscv_set_data_segment_info): New extern.
505 (bfd_elf64_riscv_set_data_segment_info): Likewise
506
507 2021-05-28 H.J. Lu <hongjiu.lu@intel.com>
508
509 PR ld/27905
510 * elf32-i386.c: Don't include "libiberty.h".
511 (elf_howto_table): Revert commits a7664973b24 and 50c95a739c9.
512 (elf_i386_rtype_to_howto): Revert commit 50c95a739c9.
513 (elf_i386_info_to_howto_rel): Likewise.
514 (elf_i386_tls_transition): Likewise.
515 (elf_i386_relocate_section): Likewise.
516 * elf64-x86-64.c (x86_64_elf_howto_table): Revert commits
517 a7664973b24 and 50c95a739c9.
518 (elf_x86_64_rtype_to_howto): Revert commit 50c95a739c9.
519 * elfxx-x86.c (_bfd_x86_elf_parse_gnu_properties): Likewise.
520 * elfxx-x86.h (elf_x86_obj_tdata): Likewise.
521 (elf_x86_has_code16): Likewise.
522
523 2021-05-26 H.J. Lu <hongjiu.lu@intel.com>
524
525 PR ld/27905
526 * elf32-i386.c: Include "libiberty.h".
527 (elf_howto_table): Add 16-bit R_386_PC16 entry.
528 (elf_i386_rtype_to_howto): Add a BFD argument. Use 16-bit
529 R_386_PC16 if input has 16-bit mode instructions.
530 (elf_i386_info_to_howto_rel): Update elf_i386_rtype_to_howto
531 call.
532 (elf_i386_tls_transition): Likewise.
533 (elf_i386_relocate_section): Likewise.
534 * elf64-x86-64.c (x86_64_elf_howto_table): Add 16-bit
535 R_X86_64_PC16 entry.
536 (elf_x86_64_rtype_to_howto): Use 16-bit R_X86_64_PC16 if input
537 has 16-bit mode instructions.
538 * elfxx-x86.c (_bfd_x86_elf_parse_gnu_properties): Set
539 elf_x86_has_code16 if relocatable input is marked with
540 GNU_PROPERTY_X86_FEATURE_2_CODE16.
541 * elfxx-x86.h (elf_x86_obj_tdata): Add has_code16.
542 (elf_x86_has_code16): New.
543
544 2021-05-26 Nelson Chu <nelson.chu@sifive.com>
545
546 * elfxx-riscv.h (check_unknown_prefixed_ext): New bool.
547 * elfxx-riscv.c (riscv_parse_prefixed_ext): Do not check the
548 prefixed extension name if check_unknown_prefixed_ext is false.
549 * elfnn-riscv.c (riscv_merge_arch_attr_info): Set
550 check_unknown_prefixed_ext to false for linker.
551
552 2021-05-25 Nick Clifton <nickc@redhat.com>
553
554 * elf32-arn.c (struct elf_arm_obj_tdata): Add num_entries field.
555 (elf32_arm_num_entries): New macro.
556 (elf32_arm_allocate_local_sym_info): Initialise the new field.
557 Allocate arrays individually so that buffer overruns can be
558 detected by memory checkers.
559 (elf32_arm_create_local_iplt): Check num_entries.
560 (elf32_arm_get_plt_info): Likewise.
561 (elf32_arm_final_link_relocate): Likewise.
562 (elf32_arm_check_relocs): Likewise.
563 (elf32_arm_size_dynamic_sections): Likewise.
564 (elf32_arm_output_arch_local_syms): Likewise.
565
566 2021-05-25 Nick Clifton <nickc@redhat.com>
567
568 * elf32-arm.c: Fix formatting.
569
570 2021-05-25 Alan Modra <amodra@gmail.com>
571
572 * elf-attrs.c (elf_attr_strdup): New function.
573 (_bfd_elf_attr_strdup): Use it here.
574 (elf_add_obj_attr_string): New function, extracted from..
575 (bfd_elf_add_obj_attr_string): ..here.
576 (elf_add_obj_attr_int_string): New function, extracted from..
577 (bfd_elf_add_obj_attr_int_string): ..here.
578 (_bfd_elf_parse_attributes): Don't allocate an extra byte for a
579 string terminator. Instead ensure parsing doesn't go past
580 end of sub-section. Use size_t variables for lengths.
581
582 2021-05-22 Alan Modra <amodra@gmail.com>
583
584 * libbfd.c (_bfd_safe_read_leb128): Remove length_return parameter.
585 Replace data pointer with pointer to pointer. Increment pointer
586 over bytes read.
587 * libbfd-in.h (_bfd_safe_read_leb128): Update prototype.
588 * elf-attrs.c (_bfd_elf_parse_attributes): Adjust to suit. Be
589 careful not to increment data pointer past end. Remove now
590 redundant pr17512 check.
591 * wasm-module.c (READ_LEB128): Adjust to suit changes to
592 _bfd_safe_read_leb128.
593 * dwarf2.c (read_n_bytes): New inline function, old one renamed to..
594 (read_blk): ..this. Allocate and return block. Increment bfd_byte**
595 arg.
596 (read_3_bytes): New function.
597 (read_1_byte, read_1_signed_byte, read_2_bytes, read_4_bytes),
598 (read_8_bytes, read_string, read_indirect_string),
599 (read_indirect_line_string, read_alt_indirect_string): Take a
600 byte_byte** arg which is incremented over bytes read. Remove any
601 bytes_read return. Rewrite limit checks to compare lengths
602 rather than pointers.
603 (read_abbrevs, read_attribute_value, read_formatted_entries),
604 (decode_line_info, find_abstract_instance, read_ranges),
605 (read_rnglists, scan_unit_for_symbols, parse_comp_unit),
606 (stash_comp_unit): Adjust to suit. Rewrite limit checks to
607 compare lengths rather than pointers.
608 * libbfd.h: Regenerate.
609
610 2021-05-21 Luis Machado <luis.machado@linaro.org>
611
612 * elf.c (elfcore_make_memtag_note_section): New function.
613 (elfcore_grok_note): Handle NT_MEMTAG note types.
614
615 2021-05-20 Andrew Burgess <andrew.burgess@embecosm.com>
616
617 * section.c (bfd_get_section_by_name): Return NULL if name is
618 NULL.
619 (bfd_get_section_by_name_if): Likewise.
620 * dwarf2.c (read_section): Remove unneeded NULL check.
621 (find_debug_info): Likewise.
622
623 2021-05-19 Nick Clifton <nickc@redhat.com>
624
625 * plugin.c (bfd_plugin_open_input): Inform the user if the limit
626 on the number of open files is reached. If possible, try to
627 increase this limit before failing.
628
629 2021-05-14 Nelson Chu <nelson.chu@sifive.com>
630
631 * elfnn-riscv.c (riscv_resolve_pcrel_lo_relocs): Check the values
632 of %pcrel_hi, before and after adding the addend. Make sure the
633 value won't be changed, otherwise, report dangerous error.
634
635 2021-05-13 Nelson Chu <nelson.chu@sifive.com>
636
637 * elfxx-riscv.c (check_implicit_always): The check_func, always add
638 the implicit subset without checking.
639 (check_implicit_for_i): The check_func for i, only add zicsr and
640 zifencei when the version of i less than 2.1.
641 (struct riscv_implicit_subset): Record the subsets and their
642 corresponding implicit subsets.
643 (riscv_implicit_subsets): Table records all implicit informations.
644 (riscv_parse_add_implicit_subsets): Updated and add implicit subsets
645 according to riscv_implicit_subsets. Remove the redundant codes.
646
647 2021-05-13 Alan Modra <amodra@gmail.com>
648
649 PR 27858
650 * elf32-sh.c (sh_elf_info_to_howto): Correct check for last valid
651 reloc howto.
652
653 2021-05-12 Luis Machado <luis.machado@linaro.org>
654
655 * elf-bfd.h (elfcore_write_aarch_mte): New prototype.
656 * elf.c (elfcore_grok_aarch_mte, elfcore_write_aarch_mte): New
657 functions.
658 (elfcore_grok_note): Handle notes of type NT_ARM_TAGGED_ADDR_CTRL.
659 (elfcore_write_register_note): Handle MTE notes.
660
661 2021-05-11 Alan Modra <amodra@gmail.com>
662
663 PR 27844
664 * pdp11.c (aout_get_external_symbols): Clear first four bytes of
665 strings array, not just the first byte.
666 * aoutx.h (aout_get_external_symbols): Likewise.
667
668 2021-05-10 H.J. Lu <hongjiu.lu@intel.com>
669
670 PR binutils/27839
671 * simple.c (bfd_simple_get_relocated_section_contents): Remove
672 strayed fprintf.
673
674 2021-05-10 Nick Clifton <nickc@redhat.com>
675
676 PR 27839
677 * simple.c (simple_dummy_add_to_set): New function.
678 (simple_dummy_constructor): New function.
679 (simple_dummy_multiple_common): New function.
680 (bfd_simple_get_relocated_section_contents): Zero out the
681 callbacks structure, and then set the add_to_set, constructor and
682 multiple_common fields.
683
684 2021-05-10 Dimitar Dimitrov <dimitar@dinux.eu>
685
686 * elf32-pru.c (elf_backend_can_gc_sections): Define as 1.
687
688 2021-05-08 Mike Frysinger <vapier@gentoo.org>
689
690 * doc/Makefile.am (html-local, bfd/index.html): New targets.
691 * doc/Makefile.in: Regenerate.
692
693 2021-05-08 Mike Frysinger <vapier@gentoo.org>
694
695 * doc/Makefile.am (AM_MAKEINFOFLAGS): Define.
696 * doc/Makefile.in: Regenerate.
697
698 2021-05-07 Clément Chigot <clement.chigot@atos.net>
699
700 * coff-rs6000.c (xcoff_dwsect_names): Add new DWARF
701 sections.
702 * coffgen.c (coff_pointerize_aux): Handle C_DWARF.
703 (coff_print_symbol): Likewise.
704 * libxcoff.h (XCOFF_DWSECT_NBR_NAMES): Update.
705
706 2021-05-07 Jan Beulich <jbeulich@suse.com>
707
708 * elf64-x86-64.c (x86_64_elf_howto_table): Set src_mask fields
709 to zero.
710
711 2021-05-07 Alan Modra <amodra@gmail.com>
712
713 * bfd-in2.h: Regenerate.
714 * libbfd.h: Regenerate.
715
716 2021-05-06 Stafford Horne <shorne@gmail.com>
717
718 PR 27746
719 * elf32-or1k.c (PLT_ENTRY_SIZE_LARGE, PLT_MAX_INSN_COUNT,
720 OR1K_ADD, OR1K_ORI): New macros to help with plt creation.
721 (elf_or1k_link_hash_table): New field plt_count.
722 (elf_or1k_link_hash_entry): New field plt_index.
723 (elf_or1k_plt_entry_size): New function.
724 (or1k_write_plt_entry): Update to support variable size PLTs.
725 (or1k_elf_finish_dynamic_sections): Use new or1k_write_plt_entry
726 API.
727 (or1k_elf_finish_dynamic_symbol): Update to write large PLTs
728 when needed.
729 (allocate_dynrelocs): Use elf_or1k_plt_entry_size to account for
730 PLT size.
731
732 2021-05-06 Stafford Horne <shorne@gmail.com>
733
734 PR 21464
735 * elf32-or1k.c (or1k_elf_relocate_section): Relax R_OR1K_GOT16
736 overflow check if we have R_OR1K_GOT_AHI16 followed by
737 R_OR1K_GOT16.
738
739 2021-05-06 Stafford Horne <shorne@gmail.com>
740
741 PR 21464
742 * bfd-in2.h: Add BFD_RELOC_OR1K_GOT_AHI16 relocation.
743 * elf32-or1k.c (or1k_elf_howto_table, or1k_reloc_map): Likewise.
744 (or1k_final_link_relocate, or1k_elf_relocate_section,
745 or1k_elf_check_relocs): Likewise.
746 * libbfd.h (bfd_reloc_code_real_names): Likewise.
747 * reloc.c: Likewise.
748
749 2021-05-06 Stafford Horne <shorne@gmail.com>
750
751 PR 27624
752 * elf32-or1k.c (or1k_elf_adjust_dynamic_symbol): Change
753 condition used to cleanup plt entries to cleanup forced local
754 entries.
755
756 2021-05-05 H.J. Lu <hongjiu.lu@intel.com>
757
758 PR ld/27825
759 * elflink.c (elf_link_output_symstrtab): Always append ".COUNT"
760 to local symbols.
761
762 2021-05-05 Alan Modra <amodra@gmail.com>
763
764 * vms-lib.c (vms_traverse_index): Account for vms_kbn size when
765 sanity checking keylen.
766
767 2021-05-04 Nick Clifton <nickc@redhat.com>
768
769 * libbfd.c (bfd_malloc): Provide some documenation. Treat a size
770 of 0 as 1.
771 (bfd_realloc): Likewise.
772 (bfd_zmalloc): Likewise.
773 (bfd_realloc_or_free): Provide some documentation. Treat a size
774 of 0 as a request to free.
775 * libbfd-in.h (bfd_realloc): Remove prototype.
776 (bfd_realloc_or_free): Remove prototype.
777 (bfd_zmalloc): Remove prototype.
778 * libbfd.h: Regenerate.
779
780 2021-05-03 Jan Beulich <jbeulich@suse.com>
781
782 * elf32-i386.c (elf_howto_table): Switch all 32-bit relocs to
783 complain_overflow_dont.
784 * elf64-x86-64.c (x86_64_elf_howto_table): Switch all 64-bit
785 relocs to complain_overflow_dont.
786
787 2021-05-03 Alan Modra <amodra@gmail.com>
788
789 * elf32-ppc.c (allocate_dynrelocs): Keep dyn_relocs for undefweak
790 symbols when -z dynamic-undefined-weak or when there are no
791 dynamic relocs in read-only sections and -z nodynamic-undefined-weak
792 is not given.
793 * elf64-ppc.c (allocate_dynrelocs): Likewise.
794
795 2021-05-03 Alan Modra <amodra@gmail.com>
796
797 * elf32-ppc.c (allocate_dynrelocs): Call ensure_undef_dynamic for
798 weak undefined symols that only appear on PLT relocs.
799 * elf64-ppc.c (allocate_dynrelocs): Likewise.
800
801 2021-05-03 Alan Modra <amodra@gmail.com>
802
803 PR 27755
804 * elf32-ppc.c (ppc_elf_inline_plt): Do increment rel in loop.
805
806 2021-05-03 Alan Modra <amodra@gmail.com>
807
808 * elf32-csky.c (is_mapping_symbol_name): New function.
809 (csky_elf_is_target_special_symbol): Likewise.
810 (csky_elf_maybe_function_sym): Likewise.
811 (bfd_elf32_bfd_is_target_special_symbol): Define.
812 (elf_backend_maybe_function_sym): Define.
813
814 2021-04-30 Nick Clifton <nickc@redhat.com>
815
816 PR 27801
817 * mach-o.c (bfd_mach_o_core_fetch_environment): Use bfd_get_32 to
818 read 32-bit value.
819
820 2021-04-30 Nick Clifton <nickc@redhat.com>
821
822 PR 27799
823 * elf32-xtensa.c (elf_xtensa_grok_prstatus): Check for core notes
824 that are too small.
825
826 2021-04-30 Nick Clifton <nickc@redhat.com>
827
828 PR 27797
829 * libbfd.c (bfd_realloc_or_free): Do not free a pointer than has
830 been realloc'ed to size 0.
831
832 2021-04-30 Nick Clifton <nickc@redhat.com>
833
834 PR 27795
835 * coff-rs6000.c (_bfd_xcoff_read_ar_hdr): Check for invalid name
836 lengths.
837
838 2021-04-29 Nick Clifton <nickc@redhat.com>
839
840 PR 27793
841 * som.c (som_slurp_symbol_table): Assign symbols without any scope
842 to the undefined section.
843 (som_decode_symclass): Check for a missing symbol section.
844 * syms.c (bfd_decode_symclass): Likewise.
845
846 2021-04-29 Nick Clifton <nickc@redhat.com>
847
848 PR 27792
849 * som.c (som_slurp_string_table): Place a terminating NUL byte at
850 the end of the table.
851 (som_slurp_symbol_table): Check for an over-large offset into the
852 string string table.
853
854 2021-04-28 Nick Clifton <nickc@redhat.com>
855
856 * elf.c (_bfd_elf_maybe_function_sym): Do not accept annobin
857 symbols as potential function symbols.
858 * elfnn-aarch64.c (elfNN_aarch64_maybe_function_sym): Likewise.
859 * elf64-ppc.c (ppc64_elf_maybe_function_sym): Likewise.
860 * elf32-arm.c (elf32_arm_maybe_function_sym): Likewise.
861
862 2021-04-26 Mike Frysinger <vapier@gentoo.org>
863
864 * elf-bfd.h: Include stdlib.h.
865
866 2021-04-26 Jan Beulich <jbeulich@suse.com>
867
868 * elf32-i386.c (elf_howto_table): Switch R_386_PC16 to
869 complain_overflow_signed.
870 * elf64-x86-64.c (x86_64_elf_howto_table): Switch R_X86_64_PC16
871 to complain_overflow_signed.
872
873 2021-04-23 Eric Botcazou <ebotcazou@adacore.com>
874
875 * elf.c (special_sections_p): Add .persistent.bss.
876
877 2021-04-23 Jan Beulich <jbeulich@suse.com>
878
879 * elf32-i386.c (elf_howto_table): R_386_TLS_DESC_CALL has zero
880 size field.
881 * elf64-x86-64.c (x86_64_elf_howto_table): R_X86_64_TLSDESC_CALL
882 has zero size field.
883
884 2021-04-22 Clément Chigot <clement.chigot@atos.net>
885
886 * hash.c (struct bfd_strtab_hash): Remove xcoff field.
887 Add length_field_size field.
888 (_bfd_stringtab_init): Change prototype.
889 Adapt to new length_field_size.
890 (_bfd_xcoff_stringtab_init): Likewise.
891 (_bfd_stringtab_add): Likewise.
892 (_bfd_stringtab_emit): Likewise.
893 * libbfd-in.h (_bfd_xcoff_stringtab_init):
894 Change prototype.
895 * libbfd.h: Regenerate.
896 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create):
897 Call _bfd_xcoff_stringtab_init with isxcoff64 value.
898
899 2021-04-22 Clément Chigot <clement.chigot@atos.net>
900
901 * coff-rs6000.c (_bfd_xcoff_swap_aux_in): Add errors for
902 unsupported storage class or auxialiry entries.
903 Improve and adapt to new aux structures.
904 Add C_DWARF support.
905 (_bfd_xcoff_swap_aux_out): Likewise.
906 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Likewise.
907 (_bfd_xcoff64_swap_aux_out): Likewise.
908
909 2021-04-21 Eli Zaretskii <eliz@gnu.org>
910
911 PR 27760
912 * peXXigen.c (_bfd_XX_print_private_bfd_data_common): Add display
913 of IMAGE_FILE_REMOVABLE_RUN_FROM_SWAP,
914 IMAGE_FILE_NET_RUN_FROM_SWAP and IMAGE_FILE_UP_SYSTEM_ONLY flags.
915 Decode the contents of the DllCharacteristics field.
916
917 2021-04-21 Nick Clifton <nickc@redhat.com>
918
919 PR 27759
920 * srec.c (srec_read_section): Replace assertions with error
921 returns.
922
923 2021-04-20 Clément Chigot <clement.chigot@atos.net>
924
925 PR binutils/21700
926 * reloc.c (BFD_RELOC_PPC_NEG): New relocation.
927 * bfd-in2.h: Regenerate.
928 * libbfd.h: Regenerate.
929 * coff-rs6000.c (_bfd_xcoff_reloc_type_lookup): Add
930 BFD_RELOC_PPC_NEG handler.
931 (xcoff_reloc_type_neg): Correctly substract addend.
932 * coff64-rs6000.c (xcoff64_howto_table): Add R_NEG_32
933 howto.
934 (xcoff64_rtype2howto): Add handler for R_NEG_32.
935 (xcoff64_reloc_type_lookup): Add BFD_RELOC_PPC_NEG handler.
936 * xcofflink.c (xcoff_need_ldrel_p): Check output section
937 for R_POS-like relocations. New argument added.
938 (xcoff_mark): Adapt to new xcoff_need_ldrel_p argument.
939 (xcoff_link_input_bfd): Likewise.
940
941 2021-04-16 Alan Modra <amodra@gmail.com>
942
943 PR 27567
944 * coffcode.h (styp_to_sec_flags): Use an unsigned long styp_flags.
945 (coff_write_object_contents): Pass bfd to COFF_ENCODE_ALIGNMENT,
946 ignore alignment checks when return is false. Formatting.
947
948 2021-04-15 Nelson Chu <nelson.chu@sifive.com>
949
950 PR27584
951 * elfnn-riscv.c (riscv_elf_is_target_special_symbol): Added to
952 omit local and empty symbols since they usually generated to
953 mark the auipc instructions.
954
955 2021-04-15 Lifang Xia<lifang_xia@c-sky.com>
956
957 * elf32-csky.c (csky_elf_howto_table)
958 <R_CKCORE_PCREL_IMM16BY2>: Set special_function to
959 bfd_elf_generic_reloc.
960 <R_CKCORE_PCREL_IMM16BY4>: Likewise.
961 <R_CKCORE_PCREL_IMM10BY4>: Likewise.
962 <R_CKCORE_PCREL_IMM18BY2>: Likewise.
963 <R_CKCORE_PCREL_FLRW_IMM8BY4>: Likewise.
964
965 2021-04-14 H.J. Lu <hongjiu.lu@intel.com>
966
967 PR binutils/27708
968 * elf.c (assign_file_positions_for_non_load_sections): Set
969 p_memsz to p_filesz for the loadable PT_NOTE segment.
970
971 2021-04-14 Frederic Cambus <fred@statdns.com>
972
973 * elf.c (elfcore_grok_netbsd_note): Remove unneeded #ifdef
974 checks for NT_NETBSDCORE_AUXV and NT_NETBSDCORE_LWPSTATUS.
975
976 2021-04-14 Alan Modra <amodra@gmail.com>
977
978 PR 27631
979 * elf32-metag.c (elf_metag_relocate_section): Don't use &hh->elf
980 when hh might be NULL, test for NULL first.
981
982 2021-04-14 Alan Modra <amodra@gmail.com>
983
984 PR 27630
985 * elf32-arm.c (elf32_arm_size_stubs): Don't use &hash->root when
986 hash might be NULL, cast instead.
987
988 2021-04-13 Clément Chigot <clement.chigot@atos.net>
989
990 * xcofflink.c (xcoff_link_check_ar_symbols): Update esym earlier.
991
992 2021-04-13 Nelson Chu <nelson.chu@sifive.com>
993
994 * elfnn-riscv.c (riscv_version_mismatch): Do not report the warning
995 when the version of input or output is RISCV_UNKNOWN_VERSION, since
996 the extension is added implicitly.
997 * elfxx-riscv.c: Updated the obsolete comments.
998 (RISCV_UNKNOWN_VERSION): Moved to elfxx-riscv.h.
999 * elfxx-riscv.h (RISCV_UNKNOWN_VERSION): Added.
1000
1001 2021-04-12 Alan Modra <amodra@gmail.com>
1002
1003 * elf-bfd.h (ENABLE_CHECKING): Define.
1004 (elf_link_hash_lookup): Abort if wrong type of hash table.
1005 * configure.ac (--enable-checking): Add support.
1006 * config.in: Regenerate.
1007 * configure: Regenerate.
1008
1009 2021-04-12 Alan Modra <amodra@gmail.com>
1010
1011 * elf-bfd.h (is_elf_hash_table): Convert macro to inline function.
1012 (elf_link_hash_lookup, elf_link_hash_traverse): Likewise.
1013 (elf_hash_table, elf_hash_table_id): Likewise.
1014 * elf32-arm.c (elf32_arm_setup_section_lists): Delete redundant
1015 is_elf_hash_table check.
1016 * elf32-csky.c (elf32_csky_setup_section_lists): Likewise.
1017 * elf32-hppa.c (clobber_millicode_symbols): Correct param types.
1018 * elf64-alpha.c (elf64_alpha_output_extsym): Likewise.
1019 * elfnn-ia64.c (elfNN_ia64_global_dyn_info_free: Likewise.
1020 (elfNN_ia64_global_dyn_sym_thunk: Likewise.
1021 * elf64-ia64-vms.c (elf64_ia64_global_dyn_info_free): Likewise.
1022 (elf64_ia64_global_dyn_sym_thunk): Likewise.
1023 (elf64_vms_link_add_object_symbols): Pass base type of hash table
1024 to is_elf_hash_table.
1025 * elflink.c (_bfd_elf_dynamic_symbol_p): Likewise.
1026 (_bfd_elf_symbol_refs_local_p, _bfd_elf_add_dynamic_entry): Likewise.
1027 (_bfd_elf_strip_zero_sized_dynamic_sections): Likewise.
1028 (_bfd_elf_link_check_relocs, elf_link_add_object_symbols): Likewise.
1029 (bfd_elf_final_link): Likewise.
1030 * elfnn-aarch64.c (elfNN_aarch64_setup_section_lists): Likewise.
1031 * elf64-ppc.c (ppc64_elf_set_toc): Likewise. Use bfd_link_hash_lookup.
1032
1033 2021-04-12 Alan Modra <amodra@gmail.com>
1034
1035 * elf-bfd.h (struct elf_backend_data): Return bfd_link_hash_entry*
1036 from elf_backend_archive_symbol_lookup.
1037 (_bfd_elf_archive_symbol_lookup): Return bfd_link_hash_entry*.
1038 * elf64-ppc.c (ppc64_elf_archive_symbol_lookup): Likewise. Check
1039 we have a ppc_hash_table before accessing ppc_link_hash_entry
1040 fields.
1041 * elflink.c (_bfd_elf_archive_symbol_lookup): Return
1042 bfd_link_hash_entry*.
1043 (elf_link_add_archive_symbols): Adjust to suit.
1044
1045 2021-04-12 Nelson Chu <nelson.chu@sifive.com>
1046
1047 * elfxx-riscv.c (riscv_parse_std_ext): Fixed the wrong versions of
1048 i-ext when expanding g-ext.
1049
1050 2021-04-12 Nelson Chu <nelson.chu@sifive.com>
1051
1052 * elfxx-riscv.c (riscv_ext_dont_care_version): Removed.
1053 (riscv_parse_add_subset): Always add the implicit extensions, even if
1054 their versions are RISCV_UNKNOWN_VERSION.
1055 (riscv_parse_std_ext): Delay to add i-ext as the implicit extension
1056 in the riscv_parse_add_implicit_subsets. Besides, add g-ext as the
1057 implicit extension after it has been expanded.
1058 (riscv_parse_add_implicit_subsets): Updated.
1059
1060 2021-04-12 Nelson Chu <nelson.chu@sifive.com>
1061
1062 * elfxx-riscv.c (riscv_std_z_ext_strtab): Moved forward.
1063 (riscv_std_s_ext_strtab): Likewise.
1064 (riscv_std_h_ext_strtab): Likewise.
1065 (riscv_std_zxm_ext_strtab): Added for the zxm prefix.
1066 (enum riscv_prefix_ext_class): Moved forward and renamed from
1067 riscv_isa_ext_class. Reorder them according to the parsing order,
1068 since the enum values are used to check the orders in the
1069 riscv_compare_subsets.
1070 (struct riscv_parse_prefix_config): Moved forward and renamed from
1071 riscv_parse_config_t. Also removed the ext_valid_p field, the
1072 related functions are replaced by riscv_valid_prefixed_ext.
1073 (parse_config): Moved forward and updated. The more letters of the
1074 prefix string, the more forward it must be defined. Otherwise, we
1075 will get the wrong mapping when using strncmp in riscv_get_prefix_class.
1076 (riscv_get_prefix_class): Moved forward. Support to parse the
1077 multi-letter prefix, like zxm.
1078 (riscv_known_prefixed_ext): New function, check if the prefixed
1079 extension is supported according to the right riscv_std_*_ext_strtab.
1080 (riscv_valid_prefixed_ext): New function, used to replace the
1081 riscv_ext_*_valid_p functions.
1082 (riscv_init_ext_order): Do not set the values for prefix keywords
1083 since they may have multiple letters for now.
1084 (riscv_compare_subsets): Set the order values of prefix keywords
1085 to negative numbers according to the riscv_prefix_ext_class.
1086 (riscv_parse_std_ext): Call riscv_get_prefix_class to see if we
1087 have parsed the prefixed extensions.
1088 (riscv_parse_prefixed_ext): Updated and removed the parameter config.
1089 Report error when the prefix is unknown.
1090 (riscv_parse_subset): Do not parse the prefixed extensions according
1091 to the orders in the parse_config. Remove the confused message and
1092 let riscv_parse_prefixed_ext to report the details.
1093 * elfxx-riscv.h (enum riscv_isa_ext_class): Moved to elfxx-riscv.c.
1094 (riscv_get_prefix_class): Removed to static.
1095
1096 2021-04-08 Mike Frysinger <vapier@gentoo.org>
1097
1098 * configure.ac (ACX_BUGURL): Use https://.
1099 * configure.com (COPY_TEXT): Likewise.
1100 * configure: Regenerate.
1101
1102 2021-04-05 Alan Modra <amodra@gmail.com>
1103
1104 * configure.ac: Don't check for long long or long double type.
1105 Don't check for alloca.h, limits.h, stddef.h, stdlib.h, string.h,
1106 strings.h, time.h, wchar.h, wctype.h or sys/time.h. Don't check
1107 for strtoull, free, malloc, realloc, getenv, strstr, snprintf,
1108 vsnprintf, strlen or setitimer. Sort AC_CHECK_DECLS.
1109 (AC_ISC_POSIX): Don't invoke.
1110 (AC_HEADER_TIME, AC_HEADER_DIRENT, ACX_HEADER_STRING): Likewise.
1111 * sysdep.h: Remove many HAVE_*_H checks and fallback declarations.
1112 Do test HAVE_SYS_TYPES_H. Don't include sys/time.h. Reorder
1113 header order as per automake AC_INCLUDES_DEFAULT.
1114 * bfd-in.h: Include inttypes.h unconditionally.
1115 * bfd.c (_bfd_doprnt, _bfd_doprnt_scan): Assume long long and
1116 long double are available.
1117 (bfd_scan_vma): Assume long long and strtoull are available.
1118 * elflink.c: Include limits.h unconditionally.
1119 * elfnn-riscv.c: Likewise.
1120 * wasm-module.c: Likewise.
1121 * hpux-core.c: Include dirent.h unconditionally.
1122 * trad-core.c: Likewise.
1123 * hosts/x86-64linux.h: Include stdlib.h unconditionally.
1124 * peXXigen.c: Remove HAVE_WCHAR_H and HAVE_WCTYPE_H checks.
1125 * elf32-m68hc1x.c: Don't include alloca-conf.h.
1126 * elf64-hppa.c: Likewise.
1127 * som.c: Likewise.
1128 * wasm-module.c: Likewise.
1129 * xsym.c: Likewise.
1130 * bfd-in2.h: Regenerate.
1131 * config.in: Regenerate.
1132 * configure: Regenerate.
1133
1134 2021-04-01 Tamar Christina <tamar.christina@arm.com>
1135
1136 PR ld/26659
1137 * cofflink.c (_bfd_coff_generic_relocate_section): Ignore overflow.
1138
1139 2021-04-01 Martin Liska <mliska@suse.cz>
1140
1141 * ecoff.c (strneq): Remove strneq and use startswith.
1142 (_bfd_ecoff_slurp_armap): Likewise.
1143
1144 2021-04-01 Martin Liska <mliska@suse.cz>
1145
1146 * elf-bfd.h (bfd_section_is_ctf): Use startswith function.
1147 * elf.c (_bfd_elf_make_section_from_shdr): Likewise.
1148 (elf_get_reloc_section): Likewise.
1149 * elf32-arc.c (elf_arc_size_dynamic_sections): Likewise.
1150 * elf32-m32r.c (m32r_elf_section_flags): Likewise.
1151 * elf32-microblaze.c (microblaze_elf_size_dynamic_sections): Likewise.
1152 * elf32-nds32.c (nds32_elf_size_dynamic_sections): Likewise.
1153 (nds32_elf_relocate_section): Likewise.
1154 (nds32_elf_action_discarded): Likewise.
1155 (nds32_elf_check_relocs): Likewise.
1156 (nds32_elf_section_flags): Likewise.
1157 * elf32-or1k.c (or1k_elf_check_relocs): Likewise.
1158 * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
1159 * elf32-rx.c (rx_table_find): Likewise.
1160 (rx_table_map): Likewise.
1161 * elf32-spu.c (spu_elf_backend_symbol_processing): Likewise.
1162 (spu_elf_find_overlays): Likewise.
1163 (needs_ovl_stub): Likewise.
1164 (allocate_spuear_stubs): Likewise.
1165 (build_spuear_stubs): Likewise.
1166 (mark_overlay_section): Likewise.
1167 (spu_elf_auto_overlay): Likewise.
1168 (spu_elf_output_symbol_hook): Likewise.
1169 * elf32-tilepro.c (tilepro_elf_size_dynamic_sections): Likewise.
1170 * elf32-xtensa.c (xtensa_property_section_name): Likewise.
1171 * elf64-ppc.c (ppc64_elf_section_flags): Likewise.
1172 (ppc64_elf_relocate_section): Likewise.
1173 * elflink.c (resolve_section): Likewise.
1174 (UNARY_OP): Likewise.
1175 (BINARY_OP_HEAD): Likewise.
1176 (elf_link_input_bfd): Likewise.
1177 * elfnn-riscv.c (riscv_elf_size_dynamic_sections): Likewise.
1178 * elfxx-riscv.c (riscv_parse_subset): Likewise.
1179 * elfxx-tilegx.c (tilegx_elf_size_dynamic_sections): Likewise.
1180 * opncls.c (get_build_id): Likewise.
1181
1182 2021-03-31 Alan Modra <amodra@gmail.com>
1183
1184 PR 27671
1185 * bfd-in.h: Don't poison FALSE or TRUE.
1186 * bfd-in2.h: Regenerate.
1187
1188 2021-03-31 Alan Modra <amodra@gmail.com>
1189
1190 * sysdep.h: POISON_BFD_BOOLEAN: Define.
1191 * aix5ppc-core.c, * aout-cris.c, * aout-ns32k.c, * aout-target.h,
1192 * aoutx.h, * arc-got.h, * archive.c, * archive64.c, * archures.c,
1193 * bfd-in.h, * bfd.c, * bfdwin.c, * binary.c, * cache.c,
1194 * coff-alpha.c, * coff-arm.c, * coff-arm.h, * coff-bfd.c,
1195 * coff-bfd.h, * coff-go32.c, * coff-i386.c, * coff-ia64.c,
1196 * coff-mcore.c, * coff-mips.c, * coff-rs6000.c, * coff-sh.c,
1197 * coff-stgo32.c, * coff-tic30.c, * coff-tic4x.c, * coff-tic54x.c,
1198 * coff-x86_64.c, * coff-z80.c, * coff-z8k.c, * coff64-rs6000.c,
1199 * coffcode.h, * coffgen.c, * cofflink.c, * compress.c,
1200 * corefile.c, * cpu-aarch64.c, * cpu-aarch64.h, * cpu-alpha.c,
1201 * cpu-arc.c, * cpu-arm.c, * cpu-arm.h, * cpu-avr.c, * cpu-bfin.c,
1202 * cpu-bpf.c, * cpu-cr16.c, * cpu-cris.c, * cpu-crx.c,
1203 * cpu-csky.c, * cpu-d10v.c, * cpu-d30v.c, * cpu-dlx.c,
1204 * cpu-epiphany.c, * cpu-fr30.c, * cpu-frv.c, * cpu-ft32.c,
1205 * cpu-h8300.c, * cpu-hppa.c, * cpu-i386.c, * cpu-ia64.c,
1206 * cpu-iamcu.c, * cpu-ip2k.c, * cpu-iq2000.c, * cpu-k1om.c,
1207 * cpu-l1om.c, * cpu-lm32.c, * cpu-m10200.c, * cpu-m10300.c,
1208 * cpu-m32c.c, * cpu-m32r.c, * cpu-m68hc11.c, * cpu-m68hc12.c,
1209 * cpu-m68k.c, * cpu-m9s12x.c, * cpu-m9s12xg.c, * cpu-mcore.c,
1210 * cpu-mep.c, * cpu-metag.c, * cpu-microblaze.c, * cpu-mips.c,
1211 * cpu-mmix.c, * cpu-moxie.c, * cpu-msp430.c, * cpu-mt.c,
1212 * cpu-nds32.c, * cpu-nfp.c, * cpu-nios2.c, * cpu-ns32k.c,
1213 * cpu-or1k.c, * cpu-pdp11.c, * cpu-pj.c, * cpu-powerpc.c,
1214 * cpu-pru.c, * cpu-riscv.c, * cpu-rl78.c, * cpu-rs6000.c,
1215 * cpu-rx.c, * cpu-s12z.c, * cpu-s390.c, * cpu-score.c,
1216 * cpu-sh.c, * cpu-sparc.c, * cpu-spu.c, * cpu-tic30.c,
1217 * cpu-tic4x.c, * cpu-tic54x.c, * cpu-tic6x.c, * cpu-tilegx.c,
1218 * cpu-tilepro.c, * cpu-v850.c, * cpu-v850_rh850.c, * cpu-vax.c,
1219 * cpu-visium.c, * cpu-wasm32.c, * cpu-xc16x.c, * cpu-xgate.c,
1220 * cpu-xstormy16.c, * cpu-xtensa.c, * cpu-z80.c, * cpu-z8k.c,
1221 * dwarf1.c, * dwarf2.c, * ecoff-bfd.h, * ecoff.c, * ecofflink.c,
1222 * elf-attrs.c, * elf-bfd.h, * elf-eh-frame.c, * elf-hppa.h,
1223 * elf-ifunc.c, * elf-m10200.c, * elf-m10300.c, * elf-nacl.c,
1224 * elf-nacl.h, * elf-properties.c, * elf-s390-common.c,
1225 * elf-s390.h, * elf-strtab.c, * elf-vxworks.c, * elf-vxworks.h,
1226 * elf.c, * elf32-am33lin.c, * elf32-arc.c, * elf32-arm.c,
1227 * elf32-arm.h, * elf32-avr.c, * elf32-avr.h, * elf32-bfin.c,
1228 * elf32-bfin.h, * elf32-cr16.c, * elf32-cr16.h, * elf32-cris.c,
1229 * elf32-crx.c, * elf32-csky.c, * elf32-csky.h, * elf32-d10v.c,
1230 * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c,
1231 * elf32-fr30.c, * elf32-frv.c, * elf32-ft32.c, * elf32-gen.c,
1232 * elf32-h8300.c, * elf32-hppa.c, * elf32-hppa.h, * elf32-i386.c,
1233 * elf32-ip2k.c, * elf32-iq2000.c, * elf32-lm32.c, * elf32-m32c.c,
1234 * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c,
1235 * elf32-m68hc1x.c, * elf32-m68hc1x.h, * elf32-m68k.c,
1236 * elf32-m68k.h, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c,
1237 * elf32-metag.h, * elf32-microblaze.c, * elf32-mips.c,
1238 * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c,
1239 * elf32-nios2.c, * elf32-nios2.h, * elf32-or1k.c, * elf32-pj.c,
1240 * elf32-ppc.c, * elf32-ppc.h, * elf32-pru.c, * elf32-rl78.c,
1241 * elf32-rx.c, * elf32-s12z.c, * elf32-s390.c, * elf32-score.c,
1242 * elf32-score.h, * elf32-score7.c, * elf32-sh-relocs.h,
1243 * elf32-sh.c, * elf32-sparc.c, * elf32-spu.c, * elf32-spu.h,
1244 * elf32-tic6x.c, * elf32-tic6x.h, * elf32-tilegx.c,
1245 * elf32-tilepro.c, * elf32-v850.c, * elf32-v850.h,
1246 * elf32-vax.c, * elf32-visium.c, * elf32-wasm32.c,
1247 * elf32-xc16x.c, * elf32-xgate.c, * elf32-xstormy16.c,
1248 * elf32-xtensa.c, * elf32-z80.c, * elf64-alpha.c, * elf64-bpf.c,
1249 * elf64-gen.c, * elf64-hppa.c, * elf64-ia64-vms.c,
1250 * elf64-mips.c, * elf64-mmix.c, * elf64-nfp.c, * elf64-ppc.c,
1251 * elf64-ppc.h, * elf64-s390.c, * elf64-sparc.c,
1252 * elf64-tilegx.c, * elf64-x86-64.c, * elfcode.h,
1253 * elfcore.h, * elflink.c, * elfn32-mips.c, * elfnn-aarch64.c,
1254 * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-aarch64.c,
1255 * elfxx-aarch64.h, * elfxx-ia64.c, * elfxx-ia64.h,
1256 * elfxx-mips.c, * elfxx-mips.h, * elfxx-riscv.c, * elfxx-riscv.h,
1257 * elfxx-sparc.c, * elfxx-sparc.h, * elfxx-target.h,
1258 * elfxx-tilegx.c, * elfxx-tilegx.h, * elfxx-x86.c, * elfxx-x86.h,
1259 * format.c, * genlink.h, * hash.c, * i386aout.c, * i386lynx.c,
1260 * i386msdos.c, * ihex.c, * libaout.h, * libbfd-in.h,
1261 * libbfd.c, * libcoff-in.h, * libecoff.h, * libpei.h,
1262 * libxcoff.h, * linker.c, * mach-o-aarch64.c, * mach-o-arm.c,
1263 * mach-o-i386.c, * mach-o-x86-64.c, * mach-o.c, * mach-o.h,
1264 * merge.c, * mmo.c, * netbsd.h, * opncls.c, * pc532-mach.c,
1265 * pdp11.c, * pe-arm.c, * pe-i386.c, * pe-mcore.c, * pe-sh.c,
1266 * pe-x86_64.c, * peXXigen.c, * pef.c, * pei-arm.c, * pei-i386.c,
1267 * pei-ia64.c, * pei-mcore.c, * pei-sh.c, * pei-x86_64.c,
1268 * peicode.h, * plugin.c, * plugin.h, * ppcboot.c, * reloc.c,
1269 * reloc16.c, * rs6000-core.c, * section.c, * simple.c, * som.c,
1270 * som.h, * srec.c, * stabs.c, * syms.c, * targets.c, * tekhex.c,
1271 * verilog.c, * vms-alpha.c, * vms-lib.c, * vms-misc.c, * vms.h,
1272 * wasm-module.c, * xcofflink.c, * xcofflink.h, * xsym.c,
1273 * xsym.h: Replace bfd_boolean with bool, FALSE with false, and
1274 TRUE with true throughout.
1275 * bfd-in2.h: Regenerate.
1276 * libbfd.h: Regenerate.
1277 * libcoff.h: Regenerate.
1278
1279 2021-03-31 Alan Modra <amodra@gmail.com>
1280
1281 * bfd-in.h: Include stdbool.h.
1282 (bfd_boolean): Define as bool
1283 * bfd-in2.h: Regenerate.
1284
1285 2021-03-31 Alan Modra <amodra@gmail.com>
1286
1287 * .gitignore: Delete bfd_stdint.h entry.
1288 * Makefile.am (bfdinclude_HEADERS): Delete bfd_stdint.h.
1289 (BUILD_HFILES, LOCAL_H_DEPS): Likewise.
1290 * bfd-in.h: Include stdint.h in place of bfd_stdint.h.
1291 * configure.ac: Don't invoke GCC_HEADER_STDINT.
1292 * configure.com: Don't create bfd_stdint.h.
1293 * Makefile.in: Regenerate.
1294 * aclocal.m4: Regenerate.
1295 * bfd-in2.h: Regenerate.
1296 * config.in: Regenerate.
1297 * configure: Regenerate.
1298 * doc/Makefile.in: Regenerate.
1299 * po/BLD-POTFILES.in: Regenerate.
1300
1301 2021-03-31 Alan Modra <amodra@gmail.com>
1302
1303 * bfd-in.h: Include string.h.
1304 (LITMEMCPY, LITSTRCPY): Delete.
1305 * bfd-in2.h: Regenerate.
1306
1307 2021-03-30 Alan Modra <amodra@gmail.com>
1308
1309 * elflink.c (elf_link_add_object_symbols): Don't set h->indx
1310 unless is_elf_hash_table.
1311
1312 2021-03-29 Alan Modra <amodra@gmail.com>
1313
1314 * aoutx.h (aout_link_write_symbols): Don't cast boolean expression
1315 to bfd_boolean.
1316 * elf32-or1k.c (or1k_set_got_and_rela_sizes): Dont compare booleans
1317 against FALSE.
1318 * elf32-arc.c (name_for_global_symbol): Don't compare boolean to TRUE.
1319 (is_reloc_PC_relative): Don't use "boolean_condition ? TRUE : FALSE".
1320 (is_reloc_SDA_relative, is_reloc_for_GOT): Likewise.
1321 (is_reloc_for_PLT, is_reloc_for_TLS): Likewise.
1322 * elf32-arm.c (stm32l4xx_need_create_replacing_stub): Likewise.
1323 * elf32-nds32.c (insert_nds32_elf_blank): Likewise.
1324 * elf32-rx.c (rx_set_section_contents): Likewise.
1325 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
1326 * elfxx-mips.c (_bfd_mips_elf_ignore_undef_symbol): Likewise.
1327 * mach-o.c (bfd_mach_o_read_command): Likewise.
1328 * targets.c (bfd_get_target_info): Likewise.
1329
1330 2021-03-29 Alan Modra <amodra@gmail.com>
1331
1332 * coff-z80.c (z80_is_local_label_name): Return bfd_boolean.
1333 * elf32-z80.c (z80_is_local_label_name): Likewise.
1334 * elf32-spu.c (spu_elf_modify_headers): Likewise.
1335 * elf32-nds32.h (struct elf_nds32_link_hash_table <hyper_relax>):
1336 Change type to int.
1337 * vms-lib.c (_bfd_vms_lib_write_archive_contents): Correct test
1338 for error return from vms_write_data_block.
1339
1340 2021-03-29 Alan Modra <amodra@gmail.com>
1341
1342 * elf32-i386.c (elf_i386_finish_local_dynamic_symbol): Return int.
1343 * elf64-ia64-vms.c (elf64_ia64_local_dyn_info_free): Likewise.
1344 (elf64_ia64_local_dyn_sym_thunk): Likewise.
1345 * elf64-x86-64.c (elf_x86_64_finish_local_dynamic_symbol): Likewise.
1346 * elfnn-aarch64.c (elfNN_aarch64_allocate_local_ifunc_dynrelocs),
1347 (elfNN_aarch64_finish_local_dynamic_symbol): Likewise.
1348 * elfnn-ia64.c (elfNN_ia64_local_dyn_info_free): Likewise.
1349 (elfNN_ia64_local_dyn_sym_thunk): Likewise.
1350 * elfnn-riscv.c (allocate_local_ifunc_dynrelocs): Likewise.
1351 (riscv_pcrel_reloc_eq): Likewise.
1352 (riscv_elf_finish_local_dynamic_symbol): Likewise.
1353 * elfxx-sparc.c (allocate_local_dynrelocs): Likewise.
1354 (finish_local_dynamic_symbol): Likewise.
1355 * elfxx-x86.c (elf_x86_allocate_local_dynreloc): Likewise.
1356 * elfxx-mips.c (mips_elf_resolve_got_page_ref): Likewise.
1357 (mips_elf_count_got_symbols): Change return type to bfd_boolean.
1358
1359 2021-03-29 Alan Modra <amodra@gmail.com>
1360
1361 * elflink.c (elf_link_output_symstrtab): Make flinfo parameter
1362 a void pointer.
1363 (bfd_elf_final_link): Delete out_sym_func typedef and don't cast
1364 elf_link_output_symstrtab when calling output_arch_syms and
1365 output_arch_local_syms.
1366 * elf-bfd.h (struct elf_backend_data <elf_backend_output_arch_syms,
1367 elf_backend_output_arch_local_syms>): Change return type of func
1368 arg to match elf_link_output_symstrtab.
1369 * elf-vxworks.h (elf_vxworks_link_output_symbol_hook): Correct
1370 return type.
1371 * elf32-nds32.c (nds32_elf_output_symbol_hook): Correct return type.
1372 (nds32_elf_output_arch_syms): Correct func return type.
1373
1374 2021-03-29 Alan Modra <amodra@gmail.com>
1375
1376 * elf-m10200.c (mn10200_elf_relocate_section): Return int.
1377 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
1378 * elf32-arc.c (elf_arc_relocate_section): Likewise.
1379 * elf32-arm.c (elf32_arm_relocate_section): Likewise.
1380 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
1381 * elf32-bfin.c (bfin_relocate_section): Likewise.
1382 (bfinfdpic_relocate_section): Likewise.
1383 * elf32-cr16.c (elf32_cr16_relocate_section): Likewise.
1384 * elf32-cris.c (cris_elf_relocate_section): Likewise.
1385 * elf32-crx.c (elf32_crx_relocate_section): Likewise.
1386 * elf32-csky.c (csky_elf_relocate_section): Likewise.
1387 * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
1388 * elf32-epiphany.c (epiphany_elf_relocate_section): Likewise.
1389 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
1390 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
1391 * elf32-ft32.c (ft32_elf_relocate_section): Likewise.
1392 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
1393 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
1394 * elf32-i386.c (elf_i386_relocate_section): Likewise.
1395 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
1396 * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise.
1397 * elf32-lm32.c (lm32_elf_relocate_section): Likewise.
1398 * elf32-m32c.c (m32c_elf_relocate_section): Likewise.
1399 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
1400 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise.
1401 * elf32-m68hc1x.h (elf32_m68hc11_relocate_section): Likewise.
1402 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
1403 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
1404 * elf32-mep.c (mep_elf_relocate_section): Likewise.
1405 * elf32-metag.c (elf_metag_relocate_section): Likewise.
1406 * elf32-microblaze.c (microblaze_elf_relocate_section): Likewise.
1407 * elf32-moxie.c (moxie_elf_relocate_section): Likewise.
1408 * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
1409 * elf32-mt.c (mt_elf_relocate_section): Likewise.
1410 * elf32-nds32.c (nds32_elf_relocate_section): Likewise.
1411 * elf32-nios2.c (nios2_elf32_relocate_section): Likewise.
1412 * elf32-or1k.c (or1k_elf_relocate_section): Likewise.
1413 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1414 * elf32-pru.c (pru_elf32_relocate_section): Likewise.
1415 * elf32-rl78.c (rl78_elf_relocate_section): Likewise.
1416 * elf32-rx.c (rx_elf_relocate_section): Likewise.
1417 * elf32-s390.c (elf_s390_relocate_section): Likewise.
1418 * elf32-score.c (s3_bfd_score_elf_relocate_section): Likewise.
1419 (_bfd_score_elf_relocate_section): Likewise.
1420 * elf32-score.h (s7_bfd_score_elf_relocate_section): Likewise.
1421 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
1422 * elf32-sh.c (sh_elf_relocate_section): Likewise.
1423 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
1424 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
1425 * elf32-v850.c (v850_elf_relocate_section): Likewise.
1426 * elf32-vax.c (elf_vax_relocate_section): Likewise.
1427 * elf32-visium.c (visium_elf_relocate_section): Likewise.
1428 * elf32-xc16x.c (elf32_xc16x_relocate_section): Likewise.
1429 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
1430 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
1431 * elf32-z80.c (z80_elf_relocate_section): Likewise.
1432 * elf64-alpha.c (elf64_alpha_relocate_section_r): Likewise.
1433 (elf64_alpha_relocate_section): Likewise.
1434 * elf64-bpf.c (bpf_elf_relocate_section): Likewise.
1435 * elf64-hppa.c (elf64_hppa_relocate_section): Likewise.
1436 * elf64-ia64-vms.c (elf64_ia64_relocate_section): Likewise.
1437 * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
1438 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1439 * elf64-s390.c (elf_s390_relocate_section): Likewise.
1440 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1441 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Likewise.
1442 * elfnn-ia64.c (elfNN_ia64_relocate_section): Likewise.
1443 * elfnn-riscv.c (riscv_elf_relocate_section): Likewise.
1444 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise.
1445 * elfxx-mips.h (_bfd_mips_elf_relocate_section): Likewise.
1446 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
1447 * elfxx-sparc.h (_bfd_sparc_elf_relocate_section): Likewise.
1448 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
1449 * elfxx-tilegx.h (tilegx_elf_relocate_section): Likewise.
1450
1451 2021-03-26 Keith Seitz <keiths@redhat.com>
1452
1453 * elfcore.h (_bfd_elf_core_find_build_id): Seek file
1454 offset of program headers after calling elf_read_notes.
1455
1456 2021-03-23 Jan Beulich <jbeulich@suse.com>
1457
1458 * dwarf2.c (read_indexed_string): Rename index to idx.
1459
1460 2021-03-22 Martin Liska <mliska@suse.cz>
1461
1462 * bfd-in.h (startswith): Add startswith function.
1463 (CONST_STRNEQ): Remove.
1464 * bfd-in2.h (startswith): Regenerate with make headers.
1465 * archive.c (bfd_slurp_armap): Replace usage of CONST_STRNEQ with startswith.
1466 (_bfd_slurp_extended_name_table): Likewise.
1467 * archive64.c (_bfd_archive_64_bit_slurp_armap): Likewise.
1468 * bfd.c (bfd_get_sign_extend_vma): Likewise.
1469 (bfd_convert_section_size): Likewise.
1470 (bfd_convert_section_contents): Likewise.
1471 * coff-stgo32.c (go32exe_create_stub): Likewise.
1472 (go32exe_check_format): Likewise.
1473 * coffcode.h (styp_to_sec_flags): Likewise.
1474 (GNU_DEBUGALTLINK): Likewise.
1475 * coffgen.c (_bfd_coff_section_already_linked): Likewise.
1476 (coff_gc_sweep): Likewise.
1477 (bfd_coff_gc_sections): Likewise.
1478 * cofflink.c (coff_link_add_symbols): Likewise.
1479 (process_embedded_commands): Likewise.
1480 * compress.c (bfd_is_section_compressed_with_header): Likewise.
1481 (bfd_init_section_decompress_status): Likewise.
1482 * dwarf2.c (find_debug_info): Likewise.
1483 (place_sections): Likewise.
1484 * ecoff.c (_bfd_ecoff_slurp_armap): Likewise.
1485 * elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Likewise.
1486 * elf.c (_bfd_elf_make_section_from_shdr): Likewise.
1487 (assign_section_numbers): Likewise.
1488 (elfcore_grok_win32pstatus): Likewise.
1489 * elf32-arm.c (cmse_scan): Likewise.
1490 (elf32_arm_gc_mark_extra_sections): Likewise.
1491 (elf32_arm_size_dynamic_sections): Likewise.
1492 (is_arm_elf_unwind_section_name): Likewise.
1493 * elf32-bfin.c (bfin_size_dynamic_sections): Likewise.
1494 * elf32-cr16.c (_bfd_cr16_elf_size_dynamic_sections): Likewise.
1495 * elf32-cris.c (elf_cris_size_dynamic_sections): Likewise.
1496 * elf32-csky.c (csky_elf_size_dynamic_sections): Likewise.
1497 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
1498 * elf32-iq2000.c (iq2000_elf_check_relocs): Likewise.
1499 * elf32-lm32.c (lm32_elf_size_dynamic_sections): Likewise.
1500 * elf32-m32r.c (m32r_elf_size_dynamic_sections): Likewise.
1501 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
1502 * elf32-metag.c (elf_metag_size_dynamic_sections): Likewise.
1503 * elf32-msp430.c (msp430_elf_relax_delete_bytes): Likewise.
1504 * elf32-nios2.c (nios2_elf32_size_dynamic_sections): Likewise.
1505 * elf32-or1k.c (or1k_elf_size_dynamic_sections): Likewise.
1506 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
1507 * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
1508 * elf32-score.c (s3_bfd_score_elf_size_dynamic_sections): Likewise.
1509 * elf32-score7.c (s7_bfd_score_elf_size_dynamic_sections): Likewise.
1510 * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
1511 * elf32-tic6x.c (is_tic6x_elf_unwind_section_name): Likewise.
1512 (elf32_tic6x_size_dynamic_sections): Likewise.
1513 * elf32-vax.c (elf_vax_size_dynamic_sections): Likewise.
1514 * elf32-xtensa.c (elf_xtensa_size_dynamic_sections): Likewise.
1515 (xtensa_is_insntable_section): Likewise.
1516 (xtensa_is_littable_section): Likewise.
1517 (xtensa_is_proptable_section): Likewise.
1518 (xtensa_property_section_name): Likewise.
1519 (xtensa_callback_required_dependence): Likewise.
1520 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Likewise.
1521 * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
1522 * elf64-ia64-vms.c (is_unwind_section_name): Likewise.
1523 (get_reloc_section): Likewise.
1524 (elf64_ia64_size_dynamic_sections): Likewise.
1525 (elf64_ia64_object_p): Likewise.
1526 * elf64-mmix.c (mmix_elf_add_symbol_hook): Likewise.
1527 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Likewise.
1528 * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
1529 * elflink.c (elf_link_add_object_symbols): Likewise.
1530 (_bfd_elf_gc_mark_extra_sections): Likewise.
1531 (bfd_elf_parse_eh_frame_entries): Likewise.
1532 (_bfd_elf_section_already_linked): Likewise.
1533 * elfnn-aarch64.c (elfNN_aarch64_size_dynamic_sections): Likewise.
1534 * elfnn-ia64.c (is_unwind_section_name): Likewise.
1535 (elfNN_ia64_size_dynamic_sections): Likewise.
1536 (elfNN_ia64_object_p): Likewise.
1537 * elfxx-mips.c (FN_STUB_P): Likewise.
1538 (CALL_STUB_P): Likewise.
1539 (CALL_FP_STUB_P): Likewise.
1540 (_bfd_mips_elf_section_from_shdr): Likewise.
1541 (_bfd_mips_elf_fake_sections): Likewise.
1542 (_bfd_mips_elf_size_dynamic_sections): Likewise.
1543 (_bfd_mips_final_write_processing): Likewise.
1544 (_bfd_mips_elf_final_link): Likewise.
1545 * elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections): Likewise.
1546 * elfxx-x86.c (elf_i386_is_reloc_section): Likewise.
1547 (elf_x86_64_is_reloc_section): Likewise.
1548 * hpux-core.c (thread_section_p): Likewise.
1549 * libcoff.h (bfd_pei_p): Likewise.
1550 * linker.c (REAL): Likewise.
1551 (unwrap_hash_lookup): Likewise.
1552 (_bfd_generic_link_add_one_symbol): Likewise.
1553 * mmo.c (mmo_internal_write_section): Likewise.
1554 * osf-core.c (osf_core_core_file_p): Likewise.
1555 * pef.c (bfd_pef_print_symbol): Likewise.
1556 * pei-x86_64.c (pex64_print_all_pdata_sections): Likewise.
1557 * som.c (som_slurp_symbol_table): Likewise.
1558 (som_slurp_armap): Likewise.
1559 * wasm-module.c (wasm_compute_custom_section_file_position): Likewise.
1560
1561 2021-03-22 Jan Beulich <jbeulich@suse.com>
1562
1563 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Add missing
1564 language translation wrapping to _bfd_error_handler()
1565 invocations.
1566
1567 2021-03-21 Alan Modra <amodra@gmail.com>
1568
1569 * bfd-in.h (startswith): New inline.
1570 (CONST_STRNEQ): Use startswith.
1571 * bfd-in2.h: Regenerate.
1572
1573 2021-03-20 Alan Modra <amodra@gmail.com>
1574
1575 PR 27590
1576 * elf.c (_bfd_elf_make_section_from_shdr): Remove SHF_EXCLUDE
1577 test for .gnu.debuglto*.
1578
1579 2021-03-18 H.J. Lu <hongjiu.lu@intel.com>
1580
1581 PR ld/27590
1582 * elf.c (_bfd_elf_make_section_from_shdr): Treat
1583 .gnu.debuglto_.debug_ section as debugging section unless it is
1584 marked with SHF_EXCLUDE.
1585 * elflink.c (elf_create_symbuf): Revert commit 994b2513281.
1586 (bfd_elf_match_symbols_in_sections): Ignore section symbols when
1587 matching non-debugging sections or linkonce section with comdat
1588 section.
1589
1590 2021-03-18 H.J. Lu <hongjiu.lu@intel.com>
1591
1592 PR ld/27587
1593 * dwarf2.c (read_attribute_value): Check version >= 3 for
1594 DW_FORM_ref_addr.
1595
1596 2021-03-16 Nick Clifton <nickc@redhat.com>
1597
1598 * peXXigen.c (_bfd_XXi_swap_aux_out): Avoid potential buffer
1599 overrun by using sizeof of the destination x_fname field as the
1600 limit for a memcpy.
1601
1602 2021-03-16 Kuan-Lin Chen <kuanlinchentw@gmail.com>
1603
1604 * elfxx-riscv.c (riscv_std_z_ext_strtab): Add zba, zbb and zbc.
1605
1606 2021-03-12 Clément Chigot <clement.chigot@atos.net>
1607
1608 * reloc.c (BFD_RELOC_PPC_TLS_LE, BFD_RELOC_PPC_TLS_IE,
1609 BFD_RELOC_PPC_TLS_M, BFD_RELOC_PPC_TLS_ML, BFD_RELOC_PPC64_TLS_GD,
1610 BFD_RELOC_PPC64_TLS_LD, BFD_RELOC_PPC64_TLS_LE,
1611 BFD_RELOC_PPC64_TLS_IE, BFD_RELOC_PPC64_TLS_M,
1612 BFD_RELOC_PPC64_TLS_ML): New relocations.
1613 * bfd-in2.h: Regenerate.
1614 * libbfd.h: Regenerate.
1615 * coff-rs6000.c (xcoff_calculate_relocation): Call
1616 xcoff_reloc_type_tls for TLS relocations.
1617 (xcoff_howto_table): Implement TLS relocations.
1618 (_bfd_xcoff_reloc_type_lookup): Add cases TLS relocations.
1619 (xcoff_reloc_type_tls): New function.
1620 * coff64-rs6000.c (xcoff_calculate_relocation): Likewise.
1621 (xcoff_howto_table): Likewise.
1622 (_bfd_xcoff_reloc_type_lookup): Likewise.
1623 * coffcode.h (sec_to_styp_flags): Handle TLS sections.
1624 (styp_to_sec_flags): Likewise.
1625 (coff_compute_section_file_positions): Avoid file offset
1626 optimisation for .data when the previous section is .tdata.
1627 (coff_write_object_contents): Handle TLS sections.
1628 * coffswap.h (coff_swap_aouthdr_out): Add support for
1629 new fields in aouthdr.
1630 * libxcoff.h (xcoff_reloc_type_tls): Add prototype.
1631 * xcofflink.c (xcoff_link_add_symbols): Handle XMC_UL.
1632 (xcoff_need_ldrel_p): Add cases for TLS relocations.
1633 (xcoff_create_ldrel): Add l_symndx for TLS sections.
1634
1635 2021-03-12 Clément Chigot <clement.chigot@atos.net>
1636
1637 * reloc.c (BFD_RELOC_PPC_TOC16_HI, BFD_RELOC_PPC_TOC16_LO):
1638 New relocations.
1639 * bfd-in2.h: Regenerate.
1640 * libbfd.h: Regenerate.
1641 * coff-rs6000.c (xcoff_calculate_relocation): Call
1642 xcoff_reloc_type_toc for R_TOCU and R_TOCL.
1643 (xcoff_howto_table): Remove src_mask for TOC relocations.
1644 Add R_TOCU and R_TOCL howtos.
1645 (_bfd_xcoff_reloc_type_lookup): Add cases for
1646 BFD_RELOC_PPC_TOC16_HI and BFD_RELOC_PPC_TOC16_LO.
1647 (xcoff_reloc_type_toc): Compute the whole offset.
1648 Implement R_TOCU and R_TOCL.
1649 * coff64-rs6000.c (xcoff64_calculate_relocation):
1650 Likewise.
1651 (xcoff64_howto_table): Likewise.
1652 (xcoff64_reloc_type_lookup): Likewise.
1653
1654 2021-03-12 Clément Chigot <clement.chigot@atos.net>
1655
1656 * coff-rs6000.c (xcoff_calculate_relocation): Correct and
1657 add new relocations.
1658 (xcoff_howto_table): Likewise.
1659 (xcoff_rtype2howto): Increase r_type maximum value.
1660 (xcoff_ppc_relocate_section): Reuse predefined HOWTOs instead
1661 of create a new one from scratch. Enable only some relocations
1662 to have a changing r_size.
1663 * coff64-rs6000.c (xcoff64_calculate_relocation): Likewise.
1664 (xcoff64_howto_table): Likewise.
1665 (xcoff64_rtype2howto): Likewise.
1666 (xcoff64_ppc_relocate_section): Likewise.
1667 * libxcoff.h (XCOFF_MAX_CALCULATE_RELOCATION): Fix value.
1668
1669 2021-03-12 Clément Chigot <clement.chigot@atos.net>
1670
1671 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Move.
1672
1673 2021-03-12 Clément Chigot <clement.chigot@atos.net>
1674
1675 * coff64-rs6000.c (xcoff64_write_object_contents): Remove.
1676 * coffcode.h (coff_write_object_contents): Add bfd_mach_ppc_620
1677 support for o_cputype field. Avoid creating an empty a.out header
1678 for XCOFF64.
1679
1680 2021-03-12 Clément Chigot <clement.chigot@atos.net>
1681
1682 * coff64-rs6000.c (xcoff64_create_csect_from_smclas): Add
1683 missing smclass.
1684
1685 2021-03-11 Nelson Chu <nelson.chu@sifive.com>
1686
1687 * elfnn-riscv.c (riscv_elf_link_hash_table): New boolean
1688 restart_relax, used to check if we need to run the whole
1689 relaxations from relax pass 0 to 2 again.
1690 (riscv_elf_link_hash_table_create): Init restart_relax to FALSE.
1691 (_bfd_riscv_relax_align): Remove obsolete sec_flg0 set.
1692 (_bfd_riscv_relax_delete): Set again to TRUE if we do delete the code.
1693 (bfd_elfNN_riscv_restart_relax_sections): New function. Called by
1694 after_allocation to check if we need to run the whole relaxations again.
1695 (_bfd_riscv_relax_section): We will only enter into the relax pass 3
1696 when the restart_relax is FALSE; At last set restart_relax to TRUE if
1697 again is TRUE, too.
1698 * elfxx-riscv.h (bfd_elf32_riscv_restart_relax_sections): Declaration.
1699 (bfd_elf64_riscv_restart_relax_sections): Likewise.
1700
1701 2021-03-10 Jan Beulich <jbeulich@suse.com>
1702
1703 * cofflink.c (_bfd_coff_write_global_sym): Range-check symbol
1704 offset.
1705
1706 2021-03-10 Alan Modra <amodra@gmail.com>
1707 Jan Beulich <jbeulich@suse.com>
1708
1709 * elf.c (bfd_elf_generic_reloc): Make references between debug
1710 sections use section relative values.
1711
1712 2021-03-09 Jan Beulich <jbeulich@suse.com>
1713
1714 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Diagnose out of range RVA.
1715
1716 2021-03-05 H.J. Lu <hongjiu.lu@intel.com>
1717
1718 PR ld/27425
1719 PR ld/27432
1720 * bfd.c (_bfd_get_link_info): New function.
1721 * elf-bfd.h (output_elf_obj_tdata): Add link_info.
1722 (elf_link_info): New.
1723 * libbfd-in.h (_bfd_get_link_info): New prototype.
1724 * coff-x86_64.c (coff_amd64_reloc): Also subtract __ImageBase for
1725 R_AMD64_IMAGEBASE when generating x86-64 ELF executable.
1726 * pe-x86_64.c: Include "coff/internal.h" and "libcoff.h".
1727 (pex64_link_add_symbols): New function.
1728 (coff_bfd_link_add_symbols): New macro.
1729 * libbfd.h: Regenerated.
1730
1731 2021-03-05 Craig Blackmore <craig.blackmore@embecosm.com>
1732 Andrew Burgess <andrew.burgess@embecosm.com>
1733
1734 * elf-bfd.h (elfcore_write_riscv_csr): Declare.
1735 * elf.c (elfcore_grok_riscv_csr): New function.
1736 (elfcore_grok_note): Handle NT_RISCV_CSR.
1737 (elfcore_write_riscv_csr): New function.
1738 (elfcore_write_register_note): Handle '.reg-riscv-csr'.
1739
1740 2021-03-05 Craig Blackmore <craig.blackmore@embecosm.com>
1741 Andrew Burgess <andrew.burgess@embecosm.com>
1742
1743 * elfnn-riscv.c (PRPSINFO_PR_FNAME_LENGTH): Define.
1744 (PRPSINFO_PR_PSARGS_LENGTH): Define.
1745 (riscv_write_core_note): New function.
1746 (riscv_elf_grok_psinfo): Make use of two new length defines.
1747 (elf_backend_write_core_note): Define.
1748
1749 2021-03-05 Craig Blackmore <craig.blackmore@embecosm.com>
1750 Andrew Burgess <andrew.burgess@embecosm.com>
1751
1752 * elf-bfd.h (elfcore_write_gdb_tdesc): Declare new function.
1753 * elf.c (elfcore_grok_gdb_tdesc): New function.
1754 (elfcore_grok_note): Handle NT_GDB_TDESC.
1755 (elfcore_write_gdb_tdesc): New function.
1756 (elfcore_write_register_note): Handle NT_GDB_TDESC.
1757
1758 2021-03-05 Nick Clifton <nickc@redhat.com>
1759
1760 PR 27521
1761 * dwarf2.c (is_str_attr): Add DW_FORM_strx* forms.
1762 (read_indexed_string): Placeholder function.
1763 (read_attribute_value): Handle DW_FORM_strx* and DW_FORM_addrx*
1764 forms.
1765
1766 2021-03-05 Alan Modra <amodra@gmail.com>
1767
1768 * reloc.c (bfd_perform_relocation): Revert 2021-01-12 and
1769 2020-09-16 changes.
1770 * coff-x86_64.c (coff_amd64_reloc): Do more or less the same
1771 adjustments here instead. Separate pc-relative adjustments
1772 from symbol related adjustments. Tidy comments and formatting.
1773
1774 2021-03-04 Jan Beulich <jbeulich@suse.com>
1775
1776 * coffcode.h (sec_to_styp_flags): Don't set IMAGE_SCN_LNK_* in
1777 final PE images.
1778
1779 2021-03-04 Alan Modra <amodra@gmail.com>
1780
1781 * rs6000-core.c (rs6000coff_core_p): Correct prototype.
1782
1783 2021-03-03 Alan Modra <amodra@gmail.com>
1784
1785 PR 27500
1786 * elflink.c (_bfd_elf_gc_mark_rsec): Do special start/stop
1787 processing not when start/stop symbol section is unmarked but
1788 on first time a start/stop symbol is processed.
1789
1790 2021-03-03 Alan Modra <amodra@gmail.com>
1791
1792 * reloc.c: Include x86_64.h rather than internal.h.
1793
1794 2021-03-02 Nick Clifton <nickc@redhat.com>
1795
1796 PR 27484
1797 * dwarf2.c (scan_unit_for_symbols): Scan twice, once to accumulate
1798 function and variable tags and a second time to resolve their
1799 attributes.
1800
1801 2021-03-02 Nick Alcock <nick.alcock@oracle.com>
1802
1803 * elf-strtab.c (_bfd_elf_strtab_str): Skip strings with zero refcount.
1804
1805 2021-03-02 Alan Modra <amodra@gmail.com>
1806
1807 PR 27451
1808 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Ignore synthesized
1809 linker defined start/stop symbols when start_stop_gc.
1810
1811 2021-03-02 Alan Modra <amodra@gmail.com>
1812
1813 * elf64-ppc.c (ppc64_elf_relocate_section): Don't optimise got
1814 indirect to pc-relative or toc-relative for undefined symbols.
1815
1816 2021-03-01 Alan Modra <amodra@gmail.com>
1817 Fangrui Song <maskray@google.com>
1818
1819 * elflink.c (_bfd_elf_gc_mark_rsec): Ignore synthesized linker
1820 defined start/stop symbols when start_stop_gc.
1821 (bfd_elf_gc_mark_dynamic_ref_symbol): Likewise.
1822 (bfd_elf_define_start_stop): Don't modify ldscript_def syms.
1823 * linker.c (bfd_generic_define_start_stop): Likewise.
1824
1825 2021-02-25 Alan Modra <amodra@gmail.com>
1826
1827 PR 27441
1828 * elf-bfd.h (struct elf_link_hash_entry): Add ref_ir_nonweak.
1829 * elflink.c (elf_link_add_object_symbols): Set ref_ir_nonweak and
1830 use when deciding an as-needed library should be loaded instead
1831 of using the binding of the library definition.
1832
1833 2021-02-24 Alan Modra <amodra@gmail.com>
1834
1835 PR 27459
1836 * coff-stgo32.c (go32exe_check_format): Sanity check size of
1837 header to avoid a buffer overflow.
1838
1839 2021-02-22 Alan Modra <amodra@gmail.com>
1840
1841 * coff-rs6000.c (_bfd_xcoff_reloc_type_lookup): Remove BFD_RELOC_16.
1842 * coff64-rs6000.c (xcoff64_reloc_type_lookup): Likewise.
1843
1844 2021-02-19 Nelson Chu <nelson.chu@sifive.com>
1845
1846 PR 27158
1847 * elfnn-riscv.c (perform_relocation): Updated encoding macros.
1848 (_bfd_riscv_relax_call): Likewise.
1849 (_bfd_riscv_relax_lui): Likewise.
1850 * elfxx-riscv.c (howto_table): Likewise.
1851
1852 2021-02-18 Nelson Chu <nelson.chu@sifive.com>
1853
1854 * Makefile.am: Added cpu-riscv.h.
1855 * Makefile.in: Regenerated.
1856 * po/SRC-POTFILES.in: Regenerated.
1857 * cpu-riscv.h: Added to support spec versions controlling.
1858 Also added extern arrays and functions for cpu-riscv.c.
1859 (enum riscv_spec_class): Define all spec classes here uniformly.
1860 (struct riscv_spec): Added for all specs.
1861 (RISCV_GET_SPEC_CLASS): Added to reduce repeated code.
1862 (RISCV_GET_SPEC_NAME): Likewise.
1863 (RISCV_GET_ISA_SPEC_CLASS): Added to get ISA spec class.
1864 (RISCV_GET_PRIV_SPEC_CLASS): Added to get privileged spec class.
1865 (RISCV_GET_PRIV_SPEC_NAME): Added to get privileged spec name.
1866 * cpu-riscv.c (struct priv_spec_t): Replaced with struct riscv_spec.
1867 (riscv_get_priv_spec_class): Replaced with RISCV_GET_PRIV_SPEC_CLASS.
1868 (riscv_get_priv_spec_name): Replaced with RISCV_GET_PRIV_SPEC_NAME.
1869 (riscv_priv_specs): Moved below.
1870 (riscv_get_priv_spec_class_from_numbers): Likewise, updated.
1871 (riscv_isa_specs): Moved from include/opcode/riscv.h.
1872 * elfnn-riscv.c: Included cpu-riscv.h.
1873 (riscv_merge_attributes): Initialize in_priv_spec and out_priv_spec.
1874 * elfxx-riscv.c: Included cpu-riscv.h and opcode/riscv.h.
1875 (RISCV_UNKNOWN_VERSION): Moved from include/opcode/riscv.h.
1876 * elfxx-riscv.h: Removed extern functions to cpu-riscv.h.
1877
1878 2021-02-17 Alan Modra <amodra@gmail.com>
1879
1880 * wasm-module.c: Guard include of limits.h.
1881 (CHAR_BIT): Provide backup define.
1882 (wasm_read_leb128): Use CHAR_BIT to size "result" in bits.
1883 Correct signed overflow checking.
1884
1885 2021-02-17 Nelson Chu <nelson.chu@sifive.com>
1886
1887 PR 27200
1888 * elfnn-riscv.c (_bfd_riscv_elf_merge_private_bfd_data): Delay
1889 copying the elf flags from input BFD to output BFD, until we have
1890 checked if the input BFD has no code section or not. Also fix the
1891 problem that we only check the first section rather than the entire
1892 sections for input BFD.
1893
1894 2021-02-16 Alan Modra <amodra@gmail.com>
1895
1896 * libbfd.c (_bfd_read_unsigned_leb128): Avoid excessive shift.
1897 (_bfd_safe_read_leb128, _bfd_read_signed_leb128): Likewise.
1898
1899 2021-02-15 Jan Beulich <jbeulich@suse.com>
1900
1901 * doc/Makefile.am: Replace "cp -p" by "$(LN_S)".
1902 * doc/Makefile.in: Re-generate.
1903
1904 2021-02-15 Alan Modra <amodra@gmail.com>
1905
1906 * elf32-nds32.c (nds32_get_section_contents): Replace
1907 bfd_malloc_and_get_section with bfd_get_full_section_contents.
1908 (nds32_elf_relax_delete_blanks): Init contents.
1909 (nds32_elf_relax_section, nds32_relax_fp_as_gp): Likewise.
1910
1911 2021-02-15 Alan Modra <amodra@gmail.com>
1912
1913 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Use
1914 bfd_get_full_section_contents.
1915
1916 2021-02-14 Alan Modra <amodra@gmail.com>
1917
1918 * elfxx-mips.c (_bfd_elf_mips_get_relocated_section_contents): Apply
1919 all fixes to bfd_generic_get_relocated_section_contents since this
1920 function was split out.
1921
1922 2021-02-11 Alan Modra <amodra@gmail.com>
1923
1924 * config.bfd: Remove ia64 from obsolete list.
1925
1926 2021-02-11 Alan Modra <amodra@gmail.com>
1927
1928 PR ld/22269
1929 * elfnn-ia64.c: Revert 2017-10-14 git commit db41f6eb5234.
1930
1931 2021-02-11 Alan Modra <amodra@gmail.com>
1932
1933 PR 27294
1934 * elf32-avr.c (avr_elf32_load_records_from_section): Use
1935 bfd_malloc_and_get_section. Use bfd_byte* vars and remove then
1936 unnecessary casts.
1937
1938 2021-02-11 Alan Modra <amodra@gmail.com>
1939
1940 PR 27291
1941 * section.c (bfd_get_section_contents): Avoid possible overflow
1942 when range checking offset and count.
1943 (bfd_set_section_contents): Likewise.
1944
1945 2021-02-03 Nick Alcock <nick.alcock@oracle.com>
1946
1947 * configure.ac (SHARED_LIBADD): Remove explicit -lintl population in
1948 favour of LIBINTL.
1949 * configure: Regenerated.
1950
1951 2021-02-09 Alan Modra <amodra@gmail.com>
1952
1953 * config.bfd (arm*-*-symbianelf*): Move from obsolete to removed.
1954 * configure.ac: Delete symbian entries.
1955 * elf-bfd.h (enum elf_target_os): Delete is_symbian.
1956 * elf32-arm.c: Remove symbian support. Formatting.
1957 * targets.c: Delete symbian entries.
1958 * configure: Regenerate.
1959
1960 2021-02-04 H.J. Lu <hongjiu.lu@intel.com>
1961
1962 PR ld/19609
1963 * elf64-x86-64.c (elf_x86_64_relocate_section): Provide more
1964 info when failed to convert GOTPCREL relocation.
1965
1966 2021-02-04 Nelson Chu <nelson.chu@sifive.com>
1967
1968 * elfxx-riscv.c (riscv_parse_prefixed_ext): Removed zb*.
1969
1970 2021-02-04 Alan Modra <amodra@gmail.com>
1971
1972 PR 27311
1973 * elflink.c (elf_link_add_object_symbols): Don't pull in as-needed
1974 libraries for IR references on pass over libraries after LTO
1975 recompilation.
1976
1977 2021-02-03 Alan Modra <amodra@gmail.com>
1978
1979 PR 27311
1980 * elflink.c (_bfd_elf_add_default_symbol): Revert last two changes.
1981 (elf_link_add_object_symbols): Here too. Don't pull in as-needed
1982 libraries when H is an indirect symbol after calling
1983 _bfd_elf_add_default_symbol.
1984
1985 2021-02-03 Alan Modra <amodra@gmail.com>
1986
1987 PR 27311
1988 * elflink.c (_bfd_elf_add_default_symbol): Clear override when
1989 undecorated symbol will have a different version.
1990
1991 2021-02-02 Alan Modra <amodra@gmail.com>
1992
1993 PR 27311
1994 * elflink.c (_bfd_elf_add_default_symbol): Add override parameter.
1995 Use when handling default versioned symbol. Rename existing
1996 override variable to nondef_override and use for non-default
1997 versioned symbol.
1998 (elf_link_add_object_symbols): Adjust call to suit. Don't
1999 pull in as-needed libraries when override is set.
2000
2001 2021-02-01 Emery Hemingway <ehmry@posteo.net>
2002
2003 * config.bfd: Add *-*-genode* as a target for AArch64 and x86.
2004
2005 2021-02-01 Egor Vishnyakov <lenvampir@yandex.ru>
2006
2007 PR 27254
2008 * elf32-rl78.c (rl78_elf_relocate_section): Fix calculation of
2009 offset for the R_RL78_RH_SADDR relocation.
2010
2011 2021-01-29 Alan Modra <amodra@gmail.com>
2012
2013 PR 27271
2014 * elflink.c (bfd_elf_link_record_dynamic_symbol): Don't segfault
2015 on symbols defined in absolute or other special sections.
2016
2017 2021-01-28 Alan Modra <amodra@gmail.com>
2018
2019 PR 27259
2020 * elflink.c (_bfd_elf_gc_mark_extra_sections): Use linker_mark to
2021 prevent endless looping of linked-to sections.
2022
2023 2020-12-17 Mihails Strasuns <mihails.strasuns@intel.com>
2024
2025 * bfd-elf.h (elfcore_write_file_note): New function.
2026 * elf.c (elfcore_write_file_note): New function.
2027
2028 2021-01-26 Alan Modra <amodra@gmail.com>
2029
2030 * elf32-ft32.c (ft32_reloc_type_lookup): Don't miss ft32_reloc_map[0].
2031
2032 2021-01-24 H.J. Lu <hongjiu.lu@intel.com>
2033
2034 PR binutils/27231
2035 * dwarf2.c (read_rnglists): Ignore empty range when parsing line
2036 number tables.
2037
2038 2021-01-23 H.J. Lu <hongjiu.lu@intel.com>
2039
2040 PR binutils/27231
2041 * dwarf2.c (read_rnglists): Advance rngs_ptr after
2042 _bfd_safe_read_leb128 when parsing DW_RLE_offset_pair.
2043
2044 2021-01-20 Alan Modra <amodra@gmail.com>
2045
2046 * elf32-ppc.c: Delete outdated comment.
2047 (TARGET_KEEP_UNUSED_SECTION_SYMBOLS): Define.
2048 * elf64-ppc.c (TARGET_KEEP_UNUSED_SECTION_SYMBOLS): Define.
2049
2050 2021-01-20 Alan Modra <amodra@gmail.com>
2051
2052 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't assume
2053 section symbols are present.
2054
2055 2021-01-19 Alan Modra <amodra@gmail.com>
2056
2057 * elf64-ppc.c (elf_hash_entry): New inline function. Use
2058 throughout to replace casts.
2059 (branch_reloc_hash_match): Remove const from params.
2060 (use_local_plt): New function.
2061 (allocate_dynrelocs, ppc_build_one_stub, ppc_size_one_stub),
2062 (build_global_entry_stubs_and_plt, ppc64_elf_relocate_section):
2063 Use use_local_plt.
2064 * elf32-ppc.c (use_local_plt): New function.
2065 (allocate_dynrelocs, ppc_elf_relocate_section),
2066 (write_global_sym_plt): Use use_local_plt.
2067
2068 2021-01-17 H.J. Lu <hongjiu.lu@intel.com>
2069
2070 PR ld/27193
2071 * elflink.c (elf_create_symbuf): Also ignore section symbols.
2072
2073 2021-01-16 H.J. Lu <hongjiu.lu@intel.com>
2074
2075 PR ld/23169
2076 * elfxx-x86.c (_bfd_x86_elf_link_fixup_ifunc_symbol): Don't
2077 check pointer_equality_needed.
2078
2079 2021-01-15 H.J. Lu <hongjiu.lu@intel.com>
2080
2081 * elf-linker-x86.h (elf_linker_x86_params): Add
2082 report_relative_reloc.
2083 * elf32-i386.c (elf_i386_relocate_section): Call
2084 _bfd_x86_elf_link_report_relative_reloc to report relative
2085 relocations for -z report-relative-reloc.
2086 (elf_i386_finish_dynamic_symbol): Likewse.
2087 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewse.
2088 (elf_x86_64_finish_dynamic_symbol): Likewse.
2089 * elfxx-x86.c (_bfd_x86_elf_link_report_relative_reloc): New
2090 function.
2091 * elfxx-x86.h (_bfd_x86_elf_link_report_relative_reloc): New
2092 prototype.
2093
2094 2021-01-16 Alan Modra <amodra@gmail.com>
2095
2096 * compress.c (decompress_contents): Tidy inflateEnd result test.
2097
2098 2021-01-16 Alan Modra <amodra@gmail.com>
2099
2100 PR 26002
2101 * elflink.c (elf_link_output_extsym): Use version 1 in
2102 .gnu.version for undefined unversioned symbols.
2103
2104 2021-01-15 Nelson Chu <nelson.chu@sifive.com>
2105
2106 * elfnn-riscv.c (riscv_relax_delete_bytes): Fixed the indent that
2107 caused the by previous commit accidentally.
2108
2109 2021-01-15 Nelson Chu <nelson.chu@sifive.com>
2110
2111 * elfnn-riscv.c: Indent, labels and GNU coding standards tidy,
2112 also aligned the code.
2113
2114 2021-01-15 Nelson Chu <nelson.chu@sifive.com>
2115
2116 * elfnn-riscv.c (riscv_merge_attributes): Fix typos of messages.
2117
2118 2021-01-15 Nelson Chu <nelson.chu@sifive.com>
2119
2120 * elfnn-riscv.c: Comments tidy and improvement.
2121 * elfxx-riscv.c: Likewise.
2122 * elfxx-riscv.h: Likewise.
2123
2124 2021-01-14 H.J. Lu <hongjiu.lu@intel.com>
2125
2126 PR ld/26688
2127 * elf32-bfin.c (bfinfdpic_relocate_section): Skip non SEC_ALLOC
2128 section for R_BFIN_FUNCDESC.
2129
2130 2021-01-14 Nick Clifton <nickc@redhat.com>
2131
2132 * elf.c (elfcore_grok_win32pstatus): Check for a note type of 0.
2133
2134 2021-01-13 Alan Modra <amodra@gmail.com>
2135
2136 * Makefile.in: Regenerate.
2137 * doc/Makefile.in: Regenerate.
2138
2139 2021-01-13 Alan Modra <amodra@gmail.com>
2140
2141 PR 27160
2142 * section.c (struct bfd_section): Remove pattern field.
2143 (BFD_FAKE_SECTION): Adjust to suit.
2144 * bfd-in2.h: Regenerate.
2145 * elflink.c (compare_link_order, elf_fixup_link_order): Delete.
2146 (bfd_elf_final_link): Don't call elf_fixup_link_order.
2147
2148 2021-01-12 H.J. Lu <hongjiu.lu@intel.com>
2149
2150 PR binutils/26792
2151 * configure.ac: Use GNU_MAKE_JOBSERVER.
2152 * aclocal.m4: Regenerated.
2153 * configure: Likewise.
2154
2155 2021-01-12 H.J. Lu <hongjiu.lu@intel.com>
2156
2157 PR ld/27171
2158 * reloc.c (bfd_perform_relocation): Adjust R_AMD64_DIR64 and
2159 R_AMD64_DIR32 relocations for PE/x86-64 inputs.
2160
2161 2021-01-11 H.J. Lu <hongjiu.lu@intel.com>
2162
2163 PR ld/27173
2164 * configure: Regenerated.
2165
2166 2021-01-11 Nick Clifton <nickc@redhat.com>
2167
2168 * po/fr.po: Updated French translation.
2169 * po/pt.po: Updated Portuguese translation.
2170 * po/sr.po: Updated Serbian translation.
2171 * po/uk.po: Updated Ukranian translation.
2172
2173 2021-01-09 H.J. Lu <hongjiu.lu@intel.com>
2174
2175 * configure: Regenerated.
2176
2177 2021-01-09 H.J. Lu <hongjiu.lu@intel.com>
2178
2179 PR ld/27166
2180 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Handle
2181 -z lam-u48 and -z lam-u57.
2182
2183 2021-01-09 Nick Clifton <nickc@redhat.com>
2184
2185 * version.m4: Change to 2.36.50.
2186 * configure: Regenerate.
2187 * po/bfd.pot: Regenerate.
2188
2189 2021-01-09 Nick Clifton <nickc@redhat.com>
2190
2191 * 2.36 release branch crated.
2192
2193 2021-01-08 H.J. Lu <hongjiu.lu@intel.com>
2194
2195 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Also set
2196 LAM_U57 when setting LAM_U48.
2197
2198 2021-01-08 H.J. Lu <hongjiu.lu@intel.com>
2199
2200 PR ld/26256
2201 PR ld/27160
2202 * elflink.c (elf_fixup_link_order): Verify that fixing up
2203 SHF_LINK_ORDER doesn't increase the output section size.
2204
2205 2021-01-09 Alan Modra <amodra@gmail.com>
2206
2207 * configure: Regenerate.
2208
2209 2021-01-07 Samuel Thibault <samuel.thibault@gnu.org>
2210
2211 * configure: Regenerate.
2212
2213 2021-01-07 H.J. Lu <hongjiu.lu@intel.com>
2214
2215 PR 27109
2216 * aix386-core.c (core_aix386_vec): Initialize
2217 keep_unused_section_symbol to TARGET_KEEP_UNUSED_SECTION_SYMBOLS.
2218 * aout-target.h (MY (vec)): Likewise.
2219 * binary.c (binary_vec): Likewise.
2220 * cisco-core.c (core_cisco_be_vec): Likewise.
2221 (core_cisco_le_vec): Likewise.
2222 * coff-alpha.c (alpha_ecoff_le_vec): Likewise.
2223 * coff-i386.c (TARGET_SYM): Likewise.
2224 (TARGET_SYM_BIG): Likewise.
2225 * coff-ia64.c (TARGET_SYM): Likewise.
2226 * coff-mips.c (mips_ecoff_le_vec): Likewise.
2227 (mips_ecoff_be_vec): Likewise.
2228 (mips_ecoff_bele_vec): Likewise.
2229 * coff-rs6000.c (rs6000_xcoff_vec): Likewise.
2230 (powerpc_xcoff_vec): Likewise.
2231 * coff-sh.c (sh_coff_small_vec): Likewise.
2232 (sh_coff_small_le_vec): Likewise.
2233 * coff-tic30.c (tic30_coff_vec): Likewise.
2234 * coff-tic54x.c (tic54x_coff0_vec): Likewise.
2235 (tic54x_coff0_beh_vec): Likewise.
2236 (tic54x_coff1_vec): Likewise.
2237 (tic54x_coff1_beh_vec): Likewise.
2238 (tic54x_coff2_vec): Likewise.
2239 (tic54x_coff2_beh_vec): Likewise.
2240 * coff-x86_64.c (TARGET_SYM): Likewise.
2241 (TARGET_SYM_BIG): Likewise.
2242 * coff64-rs6000.c (rs6000_xcoff64_vec): Likewise.
2243 (rs6000_xcoff64_aix_vec): Likewise.
2244 * coffcode.h (CREATE_BIG_COFF_TARGET_VEC): Likewise.
2245 (CREATE_BIGHDR_COFF_TARGET_VEC): Likewise.
2246 (CREATE_LITTLE_COFF_TARGET_VEC): Likewise.
2247 * elfxx-target.h (TARGET_BIG_SYM): Likewise.
2248 (TARGET_LITTLE_SYM): Likewise.
2249 * hppabsd-core.c (core_hppabsd_vec): Likewise.
2250 * hpux-core.c (core_hpux_vec): Likewise.
2251 * i386msdos.c (i386_msdos_vec): Likewise.
2252 * ihex.c (ihex_vec): Likewise.
2253 * irix-core.c (core_irix_vec): Likewise.
2254 * mach-o-target.c (TARGET_NAME): Likewise.
2255 * mmo.c (mmix_mmo_vec): Likewise.
2256 * netbsd-core.c (core_netbsd_vec): Likewise.
2257 * osf-core.c (core_osf_vec): Likewise.
2258 * pdp11.c (MY (vec)): Likewise.
2259 * pef.c (pef_vec): Likewise.
2260 (pef_xlib_vec): Likewise.
2261 * plugin.c (plugin_vec): Likewise.
2262 * ppcboot.c (powerpc_boot_vec): Likewise.
2263 * ptrace-core.c (core_ptrace_vec): Likewise.
2264 * sco5-core.c (core_sco5_vec): Likewise.
2265 * som.c (hppa_som_vec): Likewise.
2266 * srec.c (srec_vec): Likewise.
2267 (symbolsrec_vec): Likewise.
2268 * tekhex.c (tekhex_vec): Likewise.
2269 * trad-core.c (core_trad_vec): Likewise.
2270 * verilog.c (verilog_vec): Likewise.
2271 * vms-alpha.c (alpha_vms_vec): Likewise.
2272 * vms-lib.c (alpha_vms_lib_txt_vec): Likewise.
2273 * wasm-module.c (wasm_vec): Likewise.
2274 * xsym.c (sym_vec): Likewise.
2275 * elf.c (ignore_section_sym): Return TRUE if BSF_SECTION_SYM_USED
2276 isn't set.
2277 (elf_map_symbols): Don't include ignored section symbols.
2278 * elfcode.h (elf_slurp_symbol_table): Also set
2279 BSF_SECTION_SYM_USED on STT_SECTION symbols.
2280 * elflink.c (bfd_elf_final_link): Generated section symbols only
2281 when emitting relocations or reqired.
2282 * elfxx-x86.h (TARGET_KEEP_UNUSED_SECTION_SYMBOLS): New.
2283 * syms.c (BSF_SECTION_SYM_USED): New.
2284 * targets.c (TARGET_KEEP_UNUSED_SECTION_SYMBOLS): New.
2285 (bfd_target): Add keep_unused_section_symbols.
2286 (bfd_keep_unused_section_symbols): New.
2287 * bfd-in2.h: Regenerated.
2288
2289 2021-01-07 Nick Clifton <nickc@redhat.com>
2290
2291 PR 25713
2292 * bfdio.c (_bfd_real_fopen): For Win32 convert relative paths to
2293 absolute paths and check to see if they are longer than MAX_PATH.
2294
2295 2021-01-07 Philipp Tomsich <prt@gnu.org>
2296
2297 * elfxx-riscv.c (riscv_std_z_ext_strtab): Added zihintpause.
2298
2299 2021-01-07 Claire Xenia Wolf <claire@symbioticeda.com>
2300 Jim Wilson <jimw@sifive.com>
2301 Andrew Waterman <andrew@sifive.com>
2302 Maxim Blinov <maxim.blinov@embecosm.com>
2303 Kito Cheng <kito.cheng@sifive.com>
2304 Nelson Chu <nelson.chu@sifive.com>
2305
2306 * elfxx-riscv.c (riscv_std_z_ext_strtab): Added zba, zbb and zbc.
2307
2308 2021-01-06 H.J. Lu <hongjiu.lu@intel.com>
2309
2310 * elf32-bfin.c (bfin_check_relocs): Check bfd_link_hash_indirect.
2311 (bfinfdpic_check_relocs): Likewise.
2312
2313 2021-01-06 Alan Modra <amodra@gmail.com>
2314
2315 * elf32-score.c (s3_bfd_score_info_to_howto): Report an error
2316 on unknown r_type.
2317 * elf32-score7.c (s7_bfd_score_info_to_howto): Likewise.
2318
2319 2021-01-06 Alan Modra <amodra@gmail.com>
2320
2321 * config.bfd (sparc-*-solaris2*): Add sparc_elf32_vec.
2322 (sparc64-*-solaris2*): Add sparc_elf64_vec and
2323 sparc_elf32_vec.
2324
2325 2021-01-06 Marcus Comstedt <marcus@mc.pp.se>
2326
2327 * config.bfd: Added targets riscv64be*-*-*, riscv32be*-*-* and
2328 riscvbe*-*-*. Also added riscv_elf[32|64]_be_vec.
2329 * configure.ac: Handle riscv_elf[32|64]_be_vec.
2330 * configure: Regenerate.
2331 * elfnn-riscv.c: Include <limits.h> and define CHAR_BIT for
2332 riscv_is_insn_reloc.
2333 (riscv_get_insn): RISC-V instructions are always little endian, but
2334 bfd_get may be used for big-endian, so add new riscv_get_insn to handle
2335 the insturctions.
2336 (riscv_put_insn): Likewsie.
2337 (riscv_is_insn_reloc): Check if we are relocaing an instruction.
2338 (perform_relocation): Call riscv_is_insn_reloc to decide if we should
2339 use riscv_[get|put]_insn or bfd_[get|put].
2340 (riscv_zero_pcrel_hi_reloc): Use riscv_[get|put]_insn, bfd_[get|put]l32
2341 or bfd_[get|put]l16 for code.
2342 (riscv_elf_relocate_section): Likewise.
2343 (riscv_elf_finish_dynamic_symbol): Likewise.
2344 (riscv_elf_finish_dynamic_sections): Likewise.
2345 (_bfd_riscv_relax_call): Likewise.
2346 (_bfd_riscv_relax_lui): Likewise.
2347 (_bfd_riscv_relax_align): Likewise.
2348 (_bfd_riscv_relax_pc): Likewise.
2349 (riscv_elf_object_p): Handled for big endian.
2350 (TARGET_BIG_SYM, TARGET_BIG_NAME): Defined.
2351 * targets.c: Add riscv_elf[32|64]_be_vec.
2352 (_bfd_target_vector): Likewise.
2353
2354 2021-01-05 Alan Modra <amodra@gmail.com>
2355
2356 * elflink.c (bfd_elf_link_record_dynamic_symbol): Handle no_export
2357 for relocatable executable.
2358
2359 2021-01-05 Alan Modra <amodra@gmail.com>
2360
2361 * vms-alpha.c (_bfd_vms_slurp_egsd): Read flags after size check.
2362
2363 2021-01-05 Nelson Chu <nelson.chu@sifive.com>
2364
2365 * elfnn-riscv.c (allocate_dynrelocs): When we are generating pde,
2366 make sure gp symbol is output as a dynamic symbol.
2367
2368 2021-01-04 H.J. Lu <hongjiu.lu@intel.com>
2369
2370 PR ld/26256
2371 * elflink.c (compare_link_order): Place unordered sections before
2372 ordered sections.
2373 (elf_fixup_link_order): Add a link info argument. Allow mixed
2374 ordered and unordered input sections for non-relocatable link.
2375 Sort the consecutive bfd_indirect_link_order sections with the
2376 same pattern. Change the offsets of the bfd_indirect_link_order
2377 sections only.
2378 (bfd_elf_final_link): Pass info to elf_fixup_link_order.
2379 * section.c (bfd_section): Add pattern.
2380 (BFD_FAKE_SECTION): Initialize pattern to NULL.
2381 * bfd-in2.h: Regenerated.
2382
2383 2021-01-04 Alexander Fedotov <alfedotov@gmail.com>
2384
2385 * elf32-arm.c (elf32_arm_print_private_bfd_data): Prefix hex value
2386 of private flags with 0x.
2387 * elfnn-aarch64.c (elfNN_aarch64_print_private_bfd_data): Likewise.
2388
2389 2021-01-04 Alan Modra <amodra@gmail.com>
2390
2391 PR 26822
2392 * elflink.c (elf_link_input_bfd): Use the file base name in
2393 linker generated STT_FILE symbols.
2394
2395 2021-01-04 Nelson Chu <nelson.chu@sifive.com>
2396
2397 * elfxx-riscv.c (riscv_compare_subsets): Removed static.
2398 * elfxx-riscv.h: Add declaration.
2399 * elfnn-riscv.c (riscv_merge_multi_letter_ext): Use
2400 riscv_compare_subsets to check the orders.
2401 (riscv_skip_prefix): Removed.
2402 (riscv_prefix_cmp): Removed.
2403
2404 2021-01-04 Alan Modra <amodra@gmail.com>
2405
2406 PR 26741
2407 * elfxx-riscv.c (riscv_parse_prefixed_ext): Free subset after
2408 calculating subset version length.
2409
2410 2021-01-01 Nicolas Boulenguez <nicolas@debian.org>
2411
2412 * xcofflink.c: Correct spelling in comments.
2413
2414 2021-01-01 Alan Modra <amodra@gmail.com>
2415
2416 Update year range in copyright notice of all files.
2417
2418 For older changes see ChangeLog-2020
2419 \f
2420 Copyright (C) 2021-2022 Free Software Foundation, Inc.
2421
2422 Copying and distribution of this file, with or without modification,
2423 are permitted in any medium without royalty provided the copyright
2424 notice and this notice are preserved.
2425
2426 Local Variables:
2427 mode: change-log
2428 left-margin: 8
2429 fill-column: 74
2430 version-control: never
2431 End: