3 * configure: Regenerate.
7 * archures.c (bfd_arch_list): Use 'char *' instead of 'char **'
8 when calculating space for a string list.
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
21 Revert: [AArch64] MTE corefile support
25 * elf.c (elfcore_make_memtag_note_section): New function.
26 (elfcore_grok_note): Handle NT_MEMTAG note types.
31 * elf32-xtensa.c (elf_xtensa_do_reloc): Add check for put of range
35 * elfxx-riscv.c (riscv_elf_add_sub_reloc): Add check for out of
40 * po/sr.po: Updated Serbian translation.
44 * config.bfd: Move pending obsoletion targets to obsolete list.
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().
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.
61 * dwarf2.c (read_address): Remove accidental commit.
62 (read_ranges): Compare offset rather than pointers.
66 * po/pt.po: Updated Portuguese translation.
70 * elfcode.h (elf_swap_symbol_out): Revert accidental change that
71 removed an abort if the shndx pointer is NULL.
75 * sysdep.h [!ENABLE_NLS]: Prevent inclusion of <libintl.h> on
80 * configure.ac: Check for strnlen declaration.
81 * configure, config.in: Regenerate.
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):
91 * po/bfd.pot: Regenerate.
96 * elfnn-riscv.c (riscv_relax_delete_bytes): Check for any
102 * elf64-bpf.c (bpf_elf_generic_reloc): Add missing ATTRIBUTE_UNUSED.
107 * elf64-bpf.c (bpf_elf_generic_reloc): Use correct bfd for bfd_put
108 and bfd_put_32 calls. Correct section limit checks.
112 * version.m4: Update version number.
113 * configure: Regenerate.
114 * po/opcodes.pot: Regenerate.
118 * 2.37 release branch created.
123 * dwarf2.c (read_ranges): Check that range_ptr does not exceed
129 * bfd/elfxx-mips.c (_bfd_mips_elf_section_from_shdr,
130 _bfd_mips_elf_fake_sections): Mark LTO debug info as
135 * config.bfd (obsolete configurations): Add netbsdpe.
139 * elfnn-riscv.c (riscv_pcrel_hi_reloc): Added field to store
140 the original relocation type, in case the type is converted to
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
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.
163 * elflink.c (bfd_elf_final_link): Correct DT_TEXTREL warning in
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.
176 * elf-bfd.h (struct elf_obj_tdata): Add is_pie.
177 * elflink.c (elf_link_add_object_symbols): Set is_pie.
182 * config.bfd: Do not add the sparc_elf32_vec or sparc_elf64_vec
183 vectors to Sparc Solaris2 targets.
187 * elf.c (bfd_section_from_shdr): Set has_secondary_relocs flag.
188 (_bfd_elf_slurp_secondary_reloc_section): Use it for early-out.
192 * dwarf2.c (read_ranges, read_rnglists): Add u suffix to constant.
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.
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
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.
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
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
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.
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.
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.
273 * elf32-arm.c: Fix formatting.
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.
289 * libbfd.c (_bfd_safe_read_leb128): Remove length_return parameter.
290 Replace data pointer with pointer to pointer. Increment pointer
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**
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.
317 * elf.c (elfcore_make_memtag_note_section): New function.
318 (elfcore_grok_note): Handle NT_MEMTAG note types.
322 * section.c (bfd_get_section_by_name): Return NULL if name is
324 (bfd_get_section_by_name_if): Likewise.
325 * dwarf2.c (read_section): Remove unneeded NULL check.
326 (find_debug_info): Likewise.
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.
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.
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.
355 * elf32-sh.c (sh_elf_info_to_howto): Correct check for last valid
360 * elf-bfd.h (elfcore_write_aarch_mte): New prototype.
361 * elf.c (elfcore_grok_aarch_mte, elfcore_write_aarch_mte): New
363 (elfcore_grok_note): Handle notes of type NT_ARM_TAGGED_ADDR_CTRL.
364 (elfcore_write_register_note): Handle MTE notes.
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.
376 * simple.c (bfd_simple_get_relocated_section_contents): Remove
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.
391 * elf32-pru.c (elf_backend_can_gc_sections): Define as 1.
395 * doc/Makefile.am (html-local, bfd/index.html): New targets.
396 * doc/Makefile.in: Regenerate.
400 * doc/Makefile.am (AM_MAKEINFOFLAGS): Define.
401 * doc/Makefile.in: Regenerate.
405 * coff-rs6000.c (xcoff_dwsect_names): Add new DWARF
407 * coffgen.c (coff_pointerize_aux): Handle C_DWARF.
408 (coff_print_symbol): Likewise.
409 * libxcoff.h (XCOFF_DWSECT_NBR_NAMES): Update.
413 * elf64-x86-64.c (x86_64_elf_howto_table): Set src_mask fields
418 * bfd-in2.h: Regenerate.
419 * libbfd.h: Regenerate.
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
432 (or1k_elf_finish_dynamic_symbol): Update to write large PLTs
434 (allocate_dynrelocs): Use elf_or1k_plt_entry_size to account for
440 * elf32-or1k.c (or1k_elf_relocate_section): Relax R_OR1K_GOT16
441 overflow check if we have R_OR1K_GOT_AHI16 followed by
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.
457 * elf32-or1k.c (or1k_elf_adjust_dynamic_symbol): Change
458 condition used to cleanup plt entries to cleanup forced local
464 * elflink.c (elf_link_output_symstrtab): Always append ".COUNT"
469 * vms-lib.c (vms_traverse_index): Account for vms_kbn size when
470 sanity checking keylen.
474 * libbfd.c (bfd_malloc): Provide some documenation. Treat a size
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.
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.
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
498 * elf64-ppc.c (allocate_dynrelocs): Likewise.
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.
509 * elf32-ppc.c (ppc_elf_inline_plt): Do increment rel in loop.
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.
522 * mach-o.c (bfd_mach_o_core_fetch_environment): Use bfd_get_32 to
528 * elf32-xtensa.c (elf_xtensa_grok_prstatus): Check for core notes
534 * libbfd.c (bfd_realloc_or_free): Do not free a pointer than has
535 been realloc'ed to size 0.
540 * coff-rs6000.c (_bfd_xcoff_read_ar_hdr): Check for invalid name
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.
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
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.
569 * elf-bfd.h: Include stdlib.h.
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.
580 * elf.c (special_sections_p): Add .persistent.bss.
584 * elf32-i386.c (elf_howto_table): R_386_TLS_DESC_CALL has zero
586 * elf64-x86-64.c (x86_64_elf_howto_table): R_X86_64_TLSDESC_CALL
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):
600 * libbfd.h: Regenerate.
601 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create):
602 Call _bfd_xcoff_stringtab_init with isxcoff64 value.
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.
610 (_bfd_xcoff_swap_aux_out): Likewise.
611 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Likewise.
612 (_bfd_xcoff64_swap_aux_out): Likewise.
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.
625 * srec.c (srec_read_section): Replace assertions with error
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
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.
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.
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.
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.
673 * elf.c (assign_file_positions_for_non_load_sections): Set
674 p_memsz to p_filesz for the loadable PT_NOTE segment.
678 * elf.c (elfcore_grok_netbsd_note): Remove unneeded #ifdef
679 checks for NT_NETBSDCORE_AUXV and NT_NETBSDCORE_LWPSTATUS.
684 * elf32-metag.c (elf_metag_relocate_section): Don't use &hh->elf
685 when hh might be NULL, test for NULL first.
690 * elf32-arm.c (elf32_arm_size_stubs): Don't use &hash->root when
691 hash might be NULL, cast instead.
695 * xcofflink.c (xcoff_link_check_ar_symbols): Update esym earlier.
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.
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.
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.
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
746 * elflink.c (_bfd_elf_archive_symbol_lookup): Return
747 bfd_link_hash_entry*.
748 (elf_link_add_archive_symbols): Adjust to suit.
752 * elfxx-riscv.c (riscv_parse_std_ext): Fixed the wrong versions of
753 i-ext when expanding g-ext.
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.
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.
803 * configure.ac (ACX_BUGURL): Use https://.
804 * configure.com (COPY_TEXT): Likewise.
805 * configure: Regenerate.
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.
833 * wasm-module.c: Likewise.
835 * bfd-in2.h: Regenerate.
836 * config.in: Regenerate.
837 * configure: Regenerate.
842 * cofflink.c (_bfd_coff_generic_relocate_section): Ignore overflow.
846 * ecoff.c (strneq): Remove strneq and use startswith.
847 (_bfd_ecoff_slurp_armap): Likewise.
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.
890 * bfd-in.h: Don't poison FALSE or TRUE.
891 * bfd-in2.h: Regenerate.
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.
986 * bfd-in.h: Include stdbool.h.
987 (bfd_boolean): Define as bool
988 * bfd-in2.h: Regenerate.
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.
1008 * bfd-in.h: Include string.h.
1009 (LITMEMCPY, LITSTRCPY): Delete.
1010 * bfd-in2.h: Regenerate.
1014 * elflink.c (elf_link_add_object_symbols): Don't set h->indx
1015 unless is_elf_hash_table.
1019 * aoutx.h (aout_link_write_symbols): Don't cast boolean expression
1021 * elf32-or1k.c (or1k_set_got_and_rela_sizes): Dont compare booleans
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.
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>):
1042 * vms-lib.c (_bfd_vms_lib_write_archive_contents): Correct test
1043 for error return from vms_write_data_block.
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.
1066 * elflink.c (elf_link_output_symstrtab): Make flinfo parameter
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
1076 * elf32-nds32.c (nds32_elf_output_symbol_hook): Correct return type.
1077 (nds32_elf_output_arch_syms): Correct func return type.
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.
1158 * elfcore.h (_bfd_elf_core_find_build_id): Seek file
1159 offset of program headers after calling elf_read_notes.
1163 * dwarf2.c (read_indexed_string): Rename index to idx.
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.
1268 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Add missing
1269 language translation wrapping to _bfd_error_handler()
1274 * bfd-in.h (startswith): New inline.
1275 (CONST_STRNEQ): Use startswith.
1276 * bfd-in2.h: Regenerate.
1281 * elf.c (_bfd_elf_make_section_from_shdr): Remove SHF_EXCLUDE
1282 test for .gnu.debuglto*.
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
1298 * dwarf2.c (read_attribute_value): Check version >= 3 for
1303 * peXXigen.c (_bfd_XXi_swap_aux_out): Avoid potential buffer
1304 overrun by using sizeof of the destination x_fname field as the
1309 * elfxx-riscv.c (riscv_std_z_ext_strtab): Add zba, zbb and zbc.
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.
1342 * reloc.c (BFD_RELOC_PPC_TOC16_HI, BFD_RELOC_PPC_TOC16_LO):
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):
1356 (xcoff64_howto_table): Likewise.
1357 (xcoff64_reloc_type_lookup): Likewise.
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.
1376 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Move.
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
1387 * coff64-rs6000.c (xcoff64_create_csect_from_smclas): Add
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
1403 * elfxx-riscv.h (bfd_elf32_riscv_restart_relax_sections): Declaration.
1404 (bfd_elf64_riscv_restart_relax_sections): Likewise.
1408 * cofflink.c (_bfd_coff_write_global_sym): Range-check symbol
1414 * elf.c (bfd_elf_generic_reloc): Make references between debug
1415 sections use section relative values.
1419 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Diagnose out of range RVA.
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.
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'.
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.
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.
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*
1473 * reloc.c (bfd_perform_relocation): Revert 2021-01-12 and
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.
1481 * coffcode.h (sec_to_styp_flags): Don't set IMAGE_SCN_LNK_* in
1486 * rs6000-core.c (rs6000coff_core_p): Correct prototype.
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.
1497 * reloc.c: Include x86_64.h rather than internal.h.
1502 * dwarf2.c (scan_unit_for_symbols): Scan twice, once to accumulate
1503 function and variable tags and a second time to resolve their
1508 * elf-strtab.c (_bfd_elf_strtab_str): Skip strings with zero refcount.
1513 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Ignore synthesized
1514 linker defined start/stop symbols when start_stop_gc.
1518 * elf64-ppc.c (ppc64_elf_relocate_section): Don't optimise got
1519 indirect to pc-relative or toc-relative for undefined symbols.
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.
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.
1541 * coff-stgo32.c (go32exe_check_format): Sanity check size of
1542 header to avoid a buffer overflow.
1546 * coff-rs6000.c (_bfd_xcoff_reloc_type_lookup): Remove BFD_RELOC_16.
1547 * coff64-rs6000.c (xcoff64_reloc_type_lookup): Likewise.
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.
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.
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.
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.
1601 * libbfd.c (_bfd_read_unsigned_leb128): Avoid excessive shift.
1602 (_bfd_safe_read_leb128, _bfd_read_signed_leb128): Likewise.
1606 * doc/Makefile.am: Replace "cp -p" by "$(LN_S)".
1607 * doc/Makefile.in: Re-generate.
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.
1618 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Use
1619 bfd_get_full_section_contents.
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.
1629 * config.bfd: Remove ia64 from obsolete list.
1634 * elfnn-ia64.c: Revert 2017-10-14 git commit db41f6eb5234.
1639 * elf32-avr.c (avr_elf32_load_records_from_section): Use
1640 bfd_malloc_and_get_section. Use bfd_byte* vars and remove then
1646 * section.c (bfd_get_section_contents): Avoid possible overflow
1647 when range checking offset and count.
1648 (bfd_set_section_contents): Likewise.
1652 * configure.ac (SHARED_LIBADD): Remove explicit -lintl population in
1654 * configure: Regenerated.
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.
1668 * elf64-x86-64.c (elf_x86_64_relocate_section): Provide more
1669 info when failed to convert GOTPCREL relocation.
1673 * elfxx-riscv.c (riscv_parse_prefixed_ext): Removed zb*.
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
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.
1693 * elflink.c (_bfd_elf_add_default_symbol): Clear override when
1694 undecorated symbol will have a different version.
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
1703 (elf_link_add_object_symbols): Adjust call to suit. Don't
1704 pull in as-needed libraries when override is set.
1708 * config.bfd: Add *-*-genode* as a target for AArch64 and x86.
1713 * elf32-rl78.c (rl78_elf_relocate_section): Fix calculation of
1714 offset for the R_RL78_RH_SADDR relocation.
1719 * elflink.c (bfd_elf_link_record_dynamic_symbol): Don't segfault
1720 on symbols defined in absolute or other special sections.
1725 * elflink.c (_bfd_elf_gc_mark_extra_sections): Use linker_mark to
1726 prevent endless looping of linked-to sections.
1730 * bfd-elf.h (elfcore_write_file_note): New function.
1731 * elf.c (elfcore_write_file_note): New function.
1735 * elf32-ft32.c (ft32_reloc_type_lookup): Don't miss ft32_reloc_map[0].
1740 * dwarf2.c (read_rnglists): Ignore empty range when parsing line
1746 * dwarf2.c (read_rnglists): Advance rngs_ptr after
1747 _bfd_safe_read_leb128 when parsing DW_RLE_offset_pair.
1751 * elf32-ppc.c: Delete outdated comment.
1752 (TARGET_KEEP_UNUSED_SECTION_SYMBOLS): Define.
1753 * elf64-ppc.c (TARGET_KEEP_UNUSED_SECTION_SYMBOLS): Define.
1757 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't assume
1758 section symbols are present.
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):
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.
1776 * elflink.c (elf_create_symbuf): Also ignore section symbols.
1781 * elfxx-x86.c (_bfd_x86_elf_link_fixup_ifunc_symbol): Don't
1782 check pointer_equality_needed.
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
1796 * elfxx-x86.h (_bfd_x86_elf_link_report_relative_reloc): New
1801 * compress.c (decompress_contents): Tidy inflateEnd result test.
1806 * elflink.c (elf_link_output_extsym): Use version 1 in
1807 .gnu.version for undefined unversioned symbols.
1811 * elfnn-riscv.c (riscv_relax_delete_bytes): Fixed the indent that
1812 caused the by previous commit accidentally.
1816 * elfnn-riscv.c: Indent, labels and GNU coding standards tidy,
1817 also aligned the code.
1821 * elfnn-riscv.c (riscv_merge_attributes): Fix typos of messages.
1825 * elfnn-riscv.c: Comments tidy and improvement.
1826 * elfxx-riscv.c: Likewise.
1827 * elfxx-riscv.h: Likewise.
1832 * elf32-bfin.c (bfinfdpic_relocate_section): Skip non SEC_ALLOC
1833 section for R_BFIN_FUNCDESC.
1837 * elf.c (elfcore_grok_win32pstatus): Check for a note type of 0.
1841 * Makefile.in: Regenerate.
1842 * doc/Makefile.in: Regenerate.
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.
1856 * configure.ac: Use GNU_MAKE_JOBSERVER.
1857 * aclocal.m4: Regenerated.
1858 * configure: Likewise.
1863 * reloc.c (bfd_perform_relocation): Adjust R_AMD64_DIR64 and
1864 R_AMD64_DIR32 relocations for PE/x86-64 inputs.
1869 * configure: Regenerated.
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.
1880 * configure: Regenerated.
1885 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Handle
1886 -z lam-u48 and -z lam-u57.
1890 * version.m4: Change to 2.36.50.
1891 * configure: Regenerate.
1892 * po/bfd.pot: Regenerate.
1896 * 2.36 release branch crated.
1900 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Also set
1901 LAM_U57 when setting LAM_U48.
1907 * elflink.c (elf_fixup_link_order): Verify that fixing up
1908 SHF_LINK_ORDER doesn't increase the output section size.
1912 * configure: Regenerate.
1916 * configure: Regenerate.
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
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.
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.
2002 * elfxx-riscv.c (riscv_std_z_ext_strtab): Added zihintpause.
2011 * elfxx-riscv.c (riscv_std_z_ext_strtab): Added zba, zbb and zbc.
2015 * elf32-bfin.c (bfin_check_relocs): Check bfd_link_hash_indirect.
2016 (bfinfdpic_check_relocs): Likewise.
2020 * elf32-score.c (s3_bfd_score_info_to_howto): Report an error
2022 * elf32-score7.c (s7_bfd_score_info_to_howto): Likewise.
2026 * config.bfd (sparc-*-solaris2*): Add sparc_elf32_vec.
2027 (sparc64-*-solaris2*): Add sparc_elf64_vec and
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
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.
2061 * elflink.c (bfd_elf_link_record_dynamic_symbol): Handle no_export
2062 for relocatable executable.
2066 * vms-alpha.c (_bfd_vms_slurp_egsd): Read flags after size check.
2070 * elfnn-riscv.c (allocate_dynrelocs): When we are generating pde,
2071 make sure gp symbol is output as a dynamic symbol.
2076 * elflink.c (compare_link_order): Place unordered sections before
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
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.
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.
2097 * elflink.c (elf_link_input_bfd): Use the file base name in
2098 linker generated STT_FILE symbols.
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.
2112 * elfxx-riscv.c (riscv_parse_prefixed_ext): Free subset after
2113 calculating subset version length.
2117 * xcofflink.c: Correct spelling in comments.
2121 Update year range in copyright notice of all files.
2123 For older changes see ChangeLog-2020
2125 Copyright (C) 2021 Free Software Foundation, Inc.
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.
2135 version-control: never