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