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