Automatic date update in version.in
[deliverable/binutils-gdb.git] / bfd / ChangeLog
index af2ddfa5e0cfe181c03c089b230a962e69f8e259..c81b97b11e074960ed4528e15be3989a4cb316f9 100644 (file)
-2019-12-29  Hannes Domani  <ssbssa@yahoo.de>
-           Alan Modra  <amodra@gmail.com>
-
-       PR 15350
-       * bfd.c (bfd_update_compression_header): Write zlib header for
-       formats other than ELF too.
-
-2019-12-26  Alan Modra  <amodra@gmail.com>
-
-       * som.c (setup_sections): Don't overflow space_strings_size.  Use
-       bfd_malloc2 to catch overflow of size calculation.
-       (som_prep_for_fixups): Use bfd_zalloc2 to catch overflow of size
-       calculation.
-       (som_build_and_write_symbol_table): Similarly use bfd_zmalloc2.
-       (som_slurp_symbol_table): Similarly use bfd_zmalloc2, bfd_malloc2,
-       and bfd_zalloc2.
-       (bfd_som_attach_aux_hdr): Use size_t vars for string length.
-       (som_bfd_count_ar_symbols): Use bfd_malloc2 to catch overflow of
-       size calculation.  Use size_t vars for length and catch overflow.
-       (som_slurp_armap): Use bfd_alloc2 to catch overflow of size
-       calculation.
-       (som_bfd_ar_write_symbol_stuff): Similarly use bfd_zmalloc2 and
-       bfd_malloc2.  Perform size calculations in bfd_size_type.
-
-2019-12-26  Hannes Domani  <ssbssa@yahoo.de>
-
-       * peicode.h (pe_bfd_read_buildid): Free data.
+2020-04-23  Anton Kolesov  <anton.kolesov@synopsys.com>
 
-2019-12-23  Alan Modra  <amodra@gmail.com>
+       * elf-bfd.h (elfcore_write_arc_v2): Add prototype.
+       * elf.c (elfcore_grok_arc_v2): New function.
+       (elfcore_grok_note): Call the new function to handle the corresponding
+       note.
+       (elfcore_write_arc_v2): New function.
+       (elfcore_write_register_note): Call the new function to handle the
+       corresponding pseudo-sections.
 
-       * vms-alpha.c (add_symbol): Add "max" parameter.  Error on string
-       length larger than max.
-       (_bfd_vms_slurp_egsd): Ensure record is at least large enough to
-       read string length byte, error if not.  Pass size to add_symbol.
-       (_bfd_vms_slurp_etir): Don't read past end of buffer when reading
-       type and length.  Allow read of last byte in buffer.
+2020-04-22  Max Filippov  <jcmvbkbc@gmail.com>
 
-2019-12-23  Alan Modra  <amodra@gmail.com>
-
-       * wasm-module.c (wasm_read_leb128): Don't allow oversize shifts.
-       Catch value overflow.  Sign extend only on terminating byte.
+       PR ld/25861
+       * bfd-in2.h: Regenerated.
+       * elf32-xtensa.c (elf_howto_table): New entries for
+       R_XTENSA_PDIFF{8,16,32} and R_XTENSA_NDIFF{8,16,32}.
+       (elf_xtensa_reloc_type_lookup, elf_xtensa_do_reloc)
+       (relax_section): Add cases for R_XTENSA_PDIFF{8,16,32} and
+       R_XTENSA_NDIFF{8,16,32}.
+       * libbfd.h (bfd_reloc_code_real_names): Add names for
+       BFD_RELOC_XTENSA_PDIFF{8,16,32} and
+       BFD_RELOC_XTENSA_NDIFF{8,16,32}.
+       * reloc.c: Add documentation for BFD_RELOC_XTENSA_PDIFF{8,16,32}
+       and BFD_RELOC_XTENSA_NDIFF{8,16,32}.
 
-2019-12-20  Alan Modra  <amodra@gmail.com>
+2020-04-21  Tamar Christina  <tamar.christina@arm.com>
 
-       * xtensa-isa.c (xtensa_insnbuf_from_chars): Avoid signed overflow.
+       PR binutils/24753
+       * compress.c (bfd_get_full_section_contents): Exclude sections with no
+       content.
 
-2019-12-20  Alan Modra  <amodra@gmail.com>
+2020-04-21  H.J. Lu  <hongjiu.lu@intel.com>
 
-       * libhppa.h (hppa_field_adjust, bfd_hppa_insn2fmt): Delete forward
-       declaration.  Move ATTRIBUTE_UNUSED to definition.
-       (sign_extend, low_sign_extend, sign_unext, low_sign_unext),
-       (re_assemble_3, re_assemble_12, re_assemble_14, re_assemble_16),
-       (re_assemble_17, re_assemble_21, re_assemble_22): Likewise.  Make
-       args and return value unsigned.  Use unsigned variables.
-       (hppa_rebuild_insn): Similarly.
+       PR ld/25849
+       * elf-bfd.h (elf_backend_data): Add
+       elf_backend_strip_zero_sized_dynamic_sections.
+       (_bfd_elf_strip_zero_sized_dynamic_sections): New prototype.
+       * elf64-alpha.c (elf_backend_strip_zero_sized_dynamic_sections):
+       New macro.
+       * elflink.c (_bfd_elf_strip_zero_sized_dynamic_sections): New
+       function.
+       * elfxx-target.h (elf_backend_strip_zero_sized_dynamic_sections):
+       New macro.
+       (elfNN_bed): Add elf_backend_strip_zero_sized_dynamic_sections.
 
-2019-12-20  Alan Modra  <amodra@gmail.com>
+2020-04-21  H.J. Lu  <hongjiu.lu@intel.com>
 
-       * format.c (bfd_check_format_matches): Free matching_vector when
-       not returning matching target strings.
+       * elf64-alpha.c (alpha_elf_reloc_entry): Replace reltext with
+       sec.
+       (elf64_alpha_check_relocs): Set sec instead of reltext.  Warn
+       DT_TEXTREL with -M.
+       (elf64_alpha_calc_dynrel_sizes): Warn DT_TEXTREL with -M.
 
-2019-12-20  Alan Modra  <amodra@gmail.com>
+2020-04-21  Nick Clifton  <nickc@redhat.com>
 
-       * coff-alpha.c (alpha_ecoff_read_ar_hdr): Free ar_hdr on error return.
+       * po/sr.po: Updated Serbian translation.
 
-2019-12-18  Alan Modra  <amodra@gmail.com>
+2020-04-21  Alan Modra  <amodra@gmail.com>
 
-       * coff-rs6000.c (_bfd_xcoff_slurp_armap): Don't overflow when
-       checking symbol count against section size.  Guard against strlen
-       running off end of buffer by allocating one more byte and zeroing.
-       * coff64-rs6000.c (xcoff64_slurp_armap): Likewise.
+       * elf32-sh.c (sh_elf_relocate_section): Remove STO_SH5_ISA32
+       processing.
 
-2019-12-18  Alan Modra  <amodra@gmail.com>
+2020-04-20  Stephen Casner  <casner@acm.org>
 
-       * elf32-ppc.c (ppc_elf_get_synthetic_symtab): Use size_t for vars.
-       * elf64-ppc.c (sym_exists_at): Use size_t for lo, hi and mid.
+       * pdp11.c (N_STAB): Modify value to avoid conflict with N_EXT
+       causing globals from linker script to be treated as debug symbols.
+       (translate_symbol_table): Don't sign-extend symbol values from 16
+       to 64 bits in nm output.
 
-2019-12-18  Alan Modra  <amodra@gmail.com>
+2020-04-20  Alan Modra  <amodra@gmail.com>
 
-       * elf-bfd.h (ELF_LOCAL_SYMBOL_HASH): Avoid signed overflow.
-       * elf32-hppa.c (final_link_relocate): Likewise.
-       * elf32-ppc.c (_bfd_elf_ppc_at_tls_transform): Likewise.
-       (_bfd_elf_ppc_at_tprel_transform, is_insn_ds_form): Likewise.
-       (is_insn_dq_form, ppc_elf_relocate_section): Likewise.
-       * elf64-ppc.c (ok_lo_toc_insn, ppc64_elf_edit_toc): Likewise.
-       (ppc64_elf_relocate_section): Likewise.
-       * elfxx-mips.c (mips_elf_perform_relocation): Likewise.
-       * netbsd.h (N_SET_FLAGS): Likewise.
+       * elf64-ppc.c (ppc64_elf_size_stubs): Strip relbrlt too.
 
-2019-12-17  Alan Modra  <amodra@gmail.com>
+2020-04-18  Alan Modra  <amodra@gmail.com>
 
-       * coff-tic80.c: Delete file.
-       * cpu-tic80.c: Delete file.
-       * archures.c: Remove tic80 support.
-       * coffcode.h: Likewise.
-       * coffswap.h: Likewise.
-       * targets.c: Likewise.
-       * config.bfd: Likewise.
-       * configure.ac: Likewise.
-       * Makefile.am: Likewise.
-       * Makefile.in: Regenerate.
+       * section.c (bfd_is_const_section): Correct test for special
+       sections.
        * bfd-in2.h: Regenerate.
-       * configure: Regenerate.
-       * po/SRC-POTFILES.in: Regenerate.
 
-2019-12-13  Alan Modra  <amodra@gmail.com>
+2020-04-17  Alan Modra  <amodra@gmail.com>
+
+       PR 25842
+       * elf.c (_bfd_elf_get_symbol_version_string): Don't segfault on
+       NULL nodename.
+
+2020-04-16  Nick Clifton  <nickc@redhat.com>
+
+       PR 25803
+       * elfxx-mips.c (_bfd_mips_elf_adjust_dynamic_symbol): Replace an
+       abort with a more helpful error message.
+
+2020-04-16  Alan Modra  <amodra@gmail.com>
+
+       PR 25827
+       * dwarf2.c (scan_unit_for_symbols): Wrap overlong lines.  Don't
+       strdup(0).
+
+2020-04-15  Fangrui Song <maskray@google.com>
+
+       PR binutils/24613
+       * coff-rs6000.c (xcoff_ppc_relocate_section): Change RM_GENERATE_ERROR
+       to RM_DIAGNOSE plus a check of warn_unresolved_syms.
+       * coff64-rs6000.c (xcoff_ppc_relocate_section): Likewise.
+       * elf-bfd.h (_bfd_elf_large_com_section): Likewise.
+       * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
+       * elf32-score.c (s3_bfd_score_elf_relocate_section): Likewise.
+       * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
+       * elf32-sh.c (sh_elf_relocate_section): Likewise.
+       * elf32-spu.c (spu_elf_relocate_section): Likewise.
+       * elf64-hppa.c (elf64_hppa_relocate_section): Likewise.
+       * elflink.c (elf_link_output_extsym): Likewise.
+       * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
+
+2020-04-15  Alan Modra  <amodra@gmail.com>
+
+       PR 25823
+       * peXXigen.c (_bfd_XXi_swap_sym_in <C_SECTION>): Don't use a
+       pointer into strings that may be freed for section name, always
+       allocate a new string.
+
+2020-04-14  Juan Manuel Guerrero  <juan.guerrero@gmx.de>
+            Jan W. Jagersma  <jwjagersma@gmail.com>
+
+       * coff-go32.c (COFF_GO32, IMAGE_SCN_LNK_NRELOC_OVFL)
+       (coff_SWAP_scnhdr_in, coff_SWAP_scnhdr_out): Define.
+       (_bfd_go32_swap_scnhdr_in, _bfd_go32_swap_scnhdr_out)
+       (_bfd_go32_mkobject): New functions.
+       * coff-stgo32.c (IMAGE_SCN_LNK_NRELOC_OVFL)
+       (coff_SWAP_scnhdr_in, coff_SWAP_scnhdr_out): Define.
+       (go32exe_mkobject): Call _bfd_go32_mkobject.
+       * coffcode.h (COFF_WITH_EXTENDED_RELOC_COUNTER): Define.
+       (coff_set_alignment_hook): Define function for COFF_GO32_EXE
+       and COFF_GO32.
+       (coff_write_relocs): Enable extended reloc counter code if
+       COFF_WITH_EXTENDED_RELOC_COUNTER is defined.  Test for obj_go32.
+       (coff_write_object_contents): Likewise.  Pad section headers
+       for COFF_GO32 and COFF_GO32EXE.  Use bfd_coff_swap_scnhdr_out
+       instead of coff_swap_scnhdr_out.
+       * cofflink.c (_bfd_coff_final_link): Test also for obj_go32 to
+       enable extended reloc counter.
+       * coffswap.h: (coff_swap_scnhdr_in, coff_swap_scnhdr_out):
+       Declare with ATTRIBUTE_UNUSED.
+       * libcoff-in.h: (struct coff_tdata): New field go32.
+       (obj_go32): Define.
+       * libcoff.h: Regenerate.
 
-       PR 25237
-       * elf.c: (assign_file_positions_for_load_sections): Attempt to
-       keep meaningless p_offset for PT_LOAD segments without file
-       contents within file size.
+2020-04-14  Fangrui Song  <maskray@google.com>
 
-2019-12-12  Alan Modra  <amodra@gmail.com>
+       PR gas/25768
+       * elf.c (assign_section_numbers): Always set .stab sh_entsize to
+       12.
 
-       * libbfd.c (bfd_get): Don't cast result of bfd_get_8.
-       * bfd-in2.h: Regenerate.
+2020-04-14  Stephen Casner  <casner@acm.org>
 
-2019-12-11  Alan Modra  <amodra@gmail.com>
+       PR ld/25677
+       * pdp11.c: Add implementation of --imagic option.
+       (adjust_o_magic): Fix objcopy --extract-symbol test.
+       * libaout.h (enum aout_magic): Add i_magic.
 
-       * elf32-rx.c (elf32_rx_relax_section): Avoid signed overflow.
-       * libaout.h (N_SET_INFO, N_SET_FLAGS): Likewise.
-       * netbsd.h (write_object_contents): Likewise.
-       * elf32-arm.c (bfd_elf32_arm_vfp11_erratum_scan): Likewise.
-       * libhppa.h (HPPA_R_CONSTANT): Don't signed extend with shifts.
-       (stm32l4xx_create_replacing_stub_vldm): Don't truncate high bits
-       with shifts.
-       * elf32-nds32.h (R_NDS32_RELAX_ENTRY_DISABLE_RELAX_FLAG): Define
-       using 1u shifted left.  Ditto for other macros.
-       * mmo.c (LOP): Make unsigned.
+2020-04-07  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
+           Nick Clifton  <nickc@redhat.com>
 
-2019-12-11  Alan Modra  <amodra@gmail.com>
+       * elf32-sparc.c (sparc_final_write_processing): Fix whitespace.
+       <0>: Ignore.
+       <default>: Error rather than abort.
 
-       * libbfd.c (bfd_get_8): Return a bfd_vma.
-       (bfd_get_signed_8): Return a bfd_signed_vma.
-       * bfd-in2.h: Regenerate.
+2020-04-03  H.J. Lu  <hongjiu.lu@intel.com>
 
-2019-12-11  Alan Modra  <amodra@gmail.com>
-
-       * xtensa-modules.c (Field_* functions): Don't mask using shifts.
-       (Operand_soffsetx4_decode, Operand_simm4_decode),
-       (Operand_simm8_decode, Operand_simm8x256_decode),
-       (Operand_simm12b_decode, Operand_label8_decode),
-       (Operand_label12_decode, Operand_soffset_decode),
-       (Operand_xt_wbr15_label_decode, Operand_xt_wbr18_label_decode): Don't
-       sign extend using shifts.
-       (Operand_immrx4_decode, Operand_uimm16x4_decode): Avoid UB in
-       constant.
-
-2019-12-11  Alan Modra  <amodra@gmail.com>
-
-       * cpu-ia64-opc.c (ext_imms_scaled): Avoid undefined left shift
-       of negative values by using unsigned vars.
-
-2019-12-07  Alan Modra  <amodra@gmail.com>
-
-       PR 25236
-       * elflink.c (_bfd_elf_link_assign_sym_version): Assign versions
-       for ELF_COMMON_DEF_P symbols.
-       (elf_link_output_extsym, _bfd_elf_add_default_symbol): Adjust to
-       suit.
-
-2019-12-05  Sandra Loosemore  <sandra@codesourcery.com>
-
-       Only give FDE encoding warnings if --eh-frame-hdr was specified.
-
-       * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Make
-       FDE encoding warning conditional.
-
-2019-12-05  Nick Clifton  <nickc@redhat.com>
-
-       PR 25029
-       * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Ignore empty sections
-       when computing the sizes stored in the headers.
-
-2019-12-03  Alan Modra  <amodra@gmail.com>
-
-       PR 25230
-       * dwarf2.c (struct dwarf2_debug_file): Add line_table and
-       abbrev_offsets.
-       (struct abbrev_offset_entry): New.
-       (hash_abbrev, eq_abbrev, del_abbrev): New functions.
-       (read_abbrevs): Check whether we have already read abbrevs at
-       given offset, and add new offset/abbrev to hash table.
-       (decode_line_info): Keep line table at offset zero in file struct.
-       Return this for a cu reusing the same dir/file list.
-       (find_abstract_instance): Find cu for DW_FORM_GNU_ref_alt.
-       (_bfd_dwarf2_slurp_debug_info): Create offset/abbrev hash tables.
-       (_bfd_dwarf2_cleanup_debug_info): Adjust deletion of lines and
-       abbrevs.
-
-2019-12-03  Alan Modra  <amodra@gmail.com>
-
-       PR 25230
-       * dwarf2.c (struct dwarf2_debug_file): New struct.
-       (struct dwarf2_debug): Delete fields now in dwarf2_debug_file.
-       Add f, alt fields.
-       (struct comp_unit): Add file field.
-       (read_indirect_string, read_indirect_line_string): Adjust to suit.
-       (read_alt_indirect_string, read_alt_indirect_ref): Likewise.
-       (read_debug_ranges, find_abstract_instance, read_rangelist): Likewise.
-       (_bfd_dwarf2_stash_syms, place_sections): Likewise.
-       (stash_maybe_update_info_hash_tablse): Likewise.
-       (stash_verify_info_hash_table): Likewise.
-       (_bfd_dwarf2_slurp_debug_info): Likewise.
-       (_bfd_dwarf2_find_symbol_bias): Likewise.
-       (_bfd_dwarf2_find_nearest_line): Likewise.
-       (_bfd_dwarf2_cleanup_debug_info): Likewise.
-       (read_abbrevs): Add file param and adjust.  Update calls.
-       (stash_comp_unit): Likewise.
-       (decode_line_info): Delete stash param and adjust.  Update calls.
-       (comp_unit_find_nearest_line): Likewise.
-       (comp_unit_maybe_decode_line_info): Likewise.
-       (comp_unit_find_line): Likewise.
-       (parse_comp_unit): Add file and info_ptr param and adjust.  Update
-       calls.
-
-2019-12-03  Alan Modra  <amodra@gmail.com>
-
-       * dwarf2.c (read_indirect_string): Don't duplicate offset check
-       done in read_section.
-       (read_indirect_line_string): Likewise.
-       (read_alt_indirect_string): Likewise.
-       (read_alt_indirect_ref): Likewise.
-       (read_abbrevs): Likewise.  Free memory on all failure paths.
-       Use correct unsigned type for pointer difference comparison.
-
-2019-12-03  Alan Modra  <amodra@gmail.com>
-
-       * dwarf2.c (struct dwarf2_debug): Update comments.  Remove sec
-       and sec_info_ptr.
-       (_bfd_dwarf2_slurp_debug_info): Don't set sec or sec_info_ptr.
-       (stash_comp_unit): Likewise.
-       (read_alt_indirect_ref): Return NULL not FALSE.
-
-2019-12-03  Alan Modra  <amodra@gmail.com>
-
-       * dwarf2.c (_bfd_dwarf2_find_nearest_line): Correct function comment.
-
-2019-11-27  Alan Modra  <amodra@gmail.com>
-
-       PR 23652
-       * dwarf2.c (_bfd_dwarf2_stash_syms): Break out of loop on finding
-       matching section.
-       (_bfd_dwarf2_find_nearest_line): Return an int, with value 2 when
-       returning info from the symbol table.  Do the _bfd_elf_find_function
-       search also when !found.  Call _bfd_dwarf2_stash_syms regardless of
-       symbols.
-       * elf64-alpha.c (elf64_alpha_find_nearest_line): Accept dwarf2
-       result of 1 only.
-       * elfxx-mips.c (_bfd_mips_elf_find_nearest_line): Likewise.
-       * libbfd-in.h (_bfd_dwarf2_find_nearest_line): Update prototype.
-       * libbfd.h: Regenerate.
+       PR ld/25767
+       * elf.c (_bfd_elf_fixup_group_sections): Remove zero-sized
+       relocation section from section group.
 
-2019-11-27  Alan Modra  <amodra@gmail.com>
-
-       PR 23652
-       * dwarf2.c (_bfd_dwarf2_stash_syms): New function.
-       (_bfd_dwarf2_find_nearest_line): Use it here, passing syms to
-       _bfd_elf_find_function.  Call _bfd_elf_find_function in cases
-       where _bfd_elf_find_nearest_line would do so.
-       * elf.c (_bfd_elf_find_nearest_line): Omit _bfd_elf_find_function
-       for dwarf2.
-       * elfxx-mips.c (_bfd_mips_elf_find_nearest_line): Similarly.  Tidy.
-       * elf32-arm.c (elf32_arm_maybe_function_sym): New function.
-       (elf_backend_maybe_function_sym): Define.
-       (arm_elf_find_function, elf32_arm_find_nearest_line): Delete.
-       (bfd_elf32_find_nearest_line): Don't define.
-       * elfnn-aarch64.c (elfNN_aarch64_maybe_function_sym): New function.
-       (elf_backend_maybe_function_sym): Define.
-       (aarch64_elf_find_function, elfNN_aarch64_find_nearest_line): Delete.
-       (bfd_elfNN_find_nearest_line): Don't define.
-
-2019-11-27  Alan Modra  <amodra@gmail.com>
-
-       * elf32-sh.c (sh_reloc): Use a bfd_vma insn.
-       (sh_reloc <R_SH_IND12W>): Divide calculated relocation value
-       by two before applying to insn.  Correct overflow test.
-       * coff-sh.c (sh_reloc): Likewise.
-
-2019-11-26  Nick Clifton  <nickc@redhat.com>
-
-       * elf32-sh.c (sh_elf_reloc): Use a signed_vma when checking for a
-       negative relocated value.
-       * coff-sh.c (sh_reloc): Likewise.
-
-2019-11-25  Alan Modra  <amodra@gmail.com>
-
-       * archures.c (bfd_octets_per_byte): Tail call
-       bfd_arch_mach_octets_per_byte.
-       * coff-arm.c (OCTETS_PER_BYTE): Define.
-       (coff_arm_reloc): Introduce new "octets" temp.  Use OCTETS_PER_BYTE
-       with section.  Correct "addr".  Remove ATTRIBUTE_UNUSED.
-       * coff-i386.c (coff_i386_reloc): Similarly.
-       * coff-mips.c (mips_reflo_reloc): Similarly.
-       * coff-x86_64.c (coff_amd64_reloc): Similarly.
-       * elf32-msp430.c (OCTETS_PER_BYTE): Define.
-       (rl78_sym_diff_handler): Use OCTETS_PER_BYTE, with section.
-       * elf32-nds32.c (nds32_elf_get_relocated_section_contents): Similarly.
-       * elf32-ppc.c (ppc_elf_addr16_ha_reloc): Similarly.
-       * elf32-pru.c (pru_elf32_do_ldi32_relocate): Similarly.
-       * elf32-s12z.c (opru18_reloc): Similarly.
-       * elf32-sh.c (sh_elf_reloc): Similarly.
-       * elf32-spu.c (spu_elf_rel9): Similarly.
-       * elf32-xtensa.c (bfd_elf_xtensa_reloc): Similarly.
-       * elf64-ppc.c (ppc64_elf_ha_reloc, ppc64_elf_brtaken_reloc),
-       (ppc64_elf_toc64_reloc): Similarly.
-       * bfd.c (bfd_get_section_limit): Pass section to bfd_octets_per_byte.
-       * cofflink.c (_bfd_coff_link_input_bfd),
-       (_bfd_coff_reloc_link_order): Likewise.
-       * elf.c (_bfd_elf_section_offset): Likewise.
-       * elflink.c (resolve_section, bfd_elf_perform_complex_relocation),
-       (elf_link_input_bfd, elf_reloc_link_order, elf_fixup_link_order),
-       (bfd_elf_final_link): Likewise.
-       * elf.c (_bfd_elf_make_section_from_shdr): Don't strncmp twice
-       to set SEC_ELF_OCTETS.
-       * reloc.c (bfd_perform_relocation): Tidy SEC_ELF_OCTETS special case.
-       (bfd_install_relocation): Likewise.
-       (_bfd_final_link_relocate): Don't recalculate octets.
-       * syms.c (_bfd_stab_section_find_nearest_line): Introduc new
-       "octets" temp.
-       * bfd-in2.h: Regenerate.
+2020-04-02  Jan W. Jagersma  <jwjagersma@gmail.com>
 
-2019-11-25  Christian Eggers  <ceggers@gmx.de>
-
-       * section.c (struct bfd_section): New flag SEC_ELF_OCTETS.
-       * archures.c (bfd_octets_per_byte): New parameter sec.
-       If section is not NULL and SEC_ELF_OCTETS is set, one octet es
-       returned [ELF targets only].
-       * bfd.c (bfd_get_section_limit): Provide section parameter to
-       bfd_octets_per_byte.
-       * bfd-in2.h: regenerate.
-       * binary.c (binary_set_section_contents): Move call to
-       bfd_octets_per_byte into section loop. Provide section parameter
-       to bfd_octets_per_byte.
-       * coff-arm.c (coff_arm_reloc): Provide section parameter
-       to bfd_octets_per_byte.
-       * coff-i386.c (coff_i386_reloc): likewise.
-       * coff-mips.c (mips_reflo_reloc): likewise.
-       * coff-x86_64.c (coff_amd64_reloc): likewise.
-       * cofflink.c (_bfd_coff_link_input_bfd): likewise.
-       (_bfd_coff_reloc_link_order): likewise.
-       * elf.c (_bfd_elf_section_offset): likewise.
-       (_bfd_elf_make_section_from_shdr): likewise.
-       Set SEC_ELF_OCTETS for sections with names .gnu.build.attributes,
-       .debug*, .zdebug* and .note.gnu*.
-       * elf32-msp430.c (rl78_sym_diff_handler): Provide section parameter
-       to bfd_octets_per_byte.
-       * elf32-nds.c (nds32_elf_get_relocated_section_contents): likewise.
-       * elf32-ppc.c (ppc_elf_addr16_ha_reloc): likewise.
-       * elf32-pru.c (pru_elf32_do_ldi32_relocate): likewise.
-       * elf32-s12z.c (opru18_reloc): likewise.
-       * elf32-sh.c (sh_elf_reloc): likewise.
-       * elf32-spu.c (spu_elf_rel9): likewise.
-       * elf32-xtensa.c (bfd_elf_xtensa_reloc): likewise
-       * elf64-ppc.c (ppc64_elf_brtaken_reloc): likewise.
-       (ppc64_elf_addr16_ha_reloc): likewise.
-       (ppc64_elf_toc64_reloc): likewise.
-       * elflink.c (bfd_elf_final_link): likewise.
-       (bfd_elf_perform_complex_relocation): likewise.
-       (elf_fixup_link_order): likewise.
-       (elf_link_input_bfd): likewise.
-       (elf_link_sort_relocs): likewise.
-       (elf_reloc_link_order): likewise.
-       (resolve_section): likewise.
-       * linker.c (_bfd_generic_reloc_link_order): likewise.
-       (bfd_generic_define_common_symbol): likewise.
-       (default_data_link_order): likewise.
-       (default_indirect_link_order): likewise.
-       * srec.c (srec_set_section_contents): likewise.
-       (srec_write_section): likewise.
-       * syms.c (_bfd_stab_section_find_nearest_line): likewise.
-       * reloc.c (_bfd_final_link_relocate): likewise.
-       (bfd_generic_get_relocated_section_contents): likewise.
-       (bfd_install_relocation): likewise.
-       For section which have SEC_ELF_OCTETS set, multiply output_base
-       and output_offset with bfd_octets_per_byte.
-       (bfd_perform_relocation): likewise.
-
-2019-11-21  Alan Modra  <amodra@gmail.com>
-
-       * elf32-arm.c (elf32_arm_size_stubs): Exclude dynamic library
-       BFDs that have not been loaded.
-
-2019-11-19  Alan Modra  <amodra@gmail.com>
-
-       PR 25197
-       * coffgen.c (coff_find_nearest_line_with_names): Check that C_FILE
-       u.syment.n_value does point at another C_FILE sym and not into
-       some auxent that happens to look like a C_FILE.  Properly check
-       for integer overflow and avoid possible pointer wrap-around.
-       Simplify pr17512 checks.
-
-2019-11-19  Alan Modra  <amodra@gmail.com>
-
-       PR 25200
-       * reloc.c (bfd_default_reloc_type_lookup): Don't BFD_FAIL.
-       * elf.c (_bfd_elf_validate_reloc): Don't segfault on NULL howto.
-
-2019-11-18  Alan Modra  <amodra@gmail.com>
-
-       * elf-bfd.h (struct elf_backend_data <elf_backend_init_file_header>):
-       Rename from elf_backend_post_process_headers.
-       (_bfd_elf_post_process_headers): Delete.
-       (_bfd_elf_init_file_header): Declare.
-       * elf.c (_bfd_elf_compute_section_file_positions): Call new function
-       in place of prep_headers and elf_backend_post_process_headers.
-       (_bfd_elf_init_file_header): Renamed from prep_headers with
-       updated args and made global.  Delete dead code.
-       (_bfd_elf_post_process_headers): Delete.
-       * elf32-arm.c (elf32_arm_init_file_header): Rename from
-       elf32_arm_post_process_headers and call _bfd_elf_init_file_header.
-       Return status.
-       (elf_backend_init_file_header): Define.
-       (elf_backend_post_process_headers): Don't define.
-       * elf32-i386.c (elf_i386_fbsd_init_file_header): Similarly.
-       * elf32-m68hc1x.c (elf32_m68hc11_init_file_header): Similarly.
-       * elf32-metag.c (elf_metag_init_file_header): Similarly.
-       * elf32-spu.c (spu_elf_init_file_header
-       * elf32-visium.c (visium_elf_init_file_header
-       * elf64-alpha.c (elf64_alpha_fbsd_init_file_header
-       * elf64-hppa.c (elf64_hppa_init_file_header
-       * elf64-ia64-vms.c (elf64_vms_init_file_header
-       * elfnn-aarch64.c (elfNN_aarch64_init_file_header
-       * elfnn-ia64.c (elfNN_hpux_init_file_header
-       * elfxx-mips.c (_bfd_mips_init_file_header
-       * elfxx-mips.h (_bfd_mips_post_process_headers): Delete.
-       (_bfd_mips_init_file_header): Declare.
-       (elf_backend_post_process_headers): Delete.
-       (elf_backend_init_file_header): Define.
-       * elfxx-target.h (elf_backend_post_process_headers): Delete.
-       (elf_backend_init_file_header): Define and use.
-       * elf32-m68hc12.c (elf_backend_init_file_header): Define.
-       (elf_backend_post_process_headers): Don't define.
-       * elf32-m68hc1x.h (elf32_m68hc11_post_process_headers): Delete.
-       (elf32_m68hc11_init_file_header): Declare.
-       * elf32-ppc.c (elf_backend_post_process_headers): Remove
-       unnecessary undef.
-
-2019-11-18  Alan Modra  <amodra@gmail.com>
-
-       * elf-bfd.h (struct elf_backend_data <elf_backend_modify_headers>):
-       Rename from elf_backend_modify_program_headers.
-       (_bfd_elf_modify_headers): Declare.
-       * elf.c (assign_file_positions_except_relocs): Set
-       elf_program_header_size.  Always call elf_backend_modify_headers.
-       Extract code modifying file header..
-       (_bfd_elf_modify_headers): ..to here.  New function.
-       * elf32-arm.c (elf_backend_modify_headers): Renamed from
-       elf_backend_modify_program_headers.
-       * elf32-i386.c: Similarly.
-       * elf64-x86-64.c: Similarly.
-       * elfxx-target.h: Similarly.  Default elf_backend_modify_headers
-       to _bfd_elf_modify_headers.
-       * elf-nacl.h (nacl_modify_headers): Rename from
-       nacl_modify_program_headers.
-       * elf-nacl.c (nacl_modify_headers): Rename from
-       nacl_modify_program_headers and call _bfd_elf_modify_headers.
-       * elf32-rx.c (elf32_rx_modify_headers): Similarly.
-       * elf32-spu.c (spu_elf_modify_headers): Similarly.
-       * elfnn-ia64.c (elfNN_ia64_modify_headers): Similarly.
-       * elf32-sh.c (elf_backend_modify_program_headers): Don't undef.
-
-2019-11-18  Alan Modra  <amodra@gmail.com>
-
-       PR 25196
-       * bfd.c (bfd_error_type): Add bfd_error_sorry.
-       (bfd_errmsgs): Likewise.
-       * elf.c (rewrite_elf_program_header): Don't abort on confused
-       lma/alignment.  Replace bfd_error_bad_value with bfd_error_sorry.
-       (_bfd_elf_validate_reloc): Use bfd_error_sorry.
-       (_bfd_elf_final_write_processing): Likewise.
+       * bfdio.c (bfd_bread, bfd_tell, bfd_seek, bfd_mmap): Always add
+       bfd->origin to file offset.
+       * bfdwin.c (bfd_get_file_window): Likewise.
+       * bfd.c: Clarify the use of the bfd->origin field.
        * bfd-in2.h: Regenerate.
-
-2019-11-12  Jim Wilson  <jimw@sifive.com>
-
-       PR 25181
-       * elfnn-riscv.c (_bfd_riscv_relax_call): Always add max_alignment to
-       foff.  If sym_sec->output_section and sec->output_section are the same
-       and not *ABS* then set max_alignment to that section's alignment.
-
-2019-11-07  Alan Modra  <amodra@gmail.com>
-
-       * cpu-cr16c.c: Delete.
-       * elf32-cr16c.c: Delete.
-       * Makefile.am,
-       * archures.c,
-       * config.bfd,
-       * configure.ac,
-       * reloc.c,
-       * targets.c: Remove cr16c support.
-       * Makefile.in,
-       * bfd-in2.h,
-       * configure,
-       * libbfd.h,
-       * po/SRC-POTFILES.in: Regenerate.
-
-2019-11-05  Tim Rühsen  <tim.ruehsen@gmx.de>
-
-       * doc/chew.c (add_to_definition): Use correct type when
-       calculating size of array reallocation.
-       (nextword): Always initialise the word return parameter.
-       (compile): Check return value of nextword().
-
-2019-10-30  Keith Seitz  <keiths@redhat.com>
-
-       * elf-bfd.h (elf_backend_data) <elf_backend_core_find_build_id>:
-       New field.
-       (_bfd_elf32_core_find_build_id, _bfd_elf64_core_find_build_id):
-       New functions.
-       (elf_read_notes): Add declaration.
-       * elf.c (elf_read_notes): Move elf-bfd.h.
-       (_bfd_elf_core_find_build_id): New function.
-       (bfd_section_from_phdr): Scan core file PT_LOAD segments for
-       build-id if none is known.
-       (elf_parse_notes): For core files, scan for notes.
-       * elfcore.h (elf_core_file_matches_executable_p): If both
-       BFDs have identical build-ids, then they match.
-       (_bfd_elf_core_find_build_id): New function.
-       * elfxx-target.h (elf_backend_core_find_build_id): Define.
-       (elfNN_bed): Add elf_backend_core_find_build_id.
-
-2019-10-29  Andrew Eikum  <aeikum@codeweavers.com>
-
-       * libcoff-in.h (struct pe_tdata): Add dos_message field.
+       * coff-i386.c: Don't include go32exe.h. Allow overriding
+       coff_write_object_contents via COFF_WRITE_CONTENTS.
+       * coff-stgo32.c (go32exe_cleanup, go32exe_mkobject)
+       (go32exe_write_object_contents): New functions.
+       (go32exe_temp_stub, go32exe_temp_stub_size): New static globals.
+       (COFF_WRITE_CONTENTS, GO32EXE_DEFAULT_STUB_SIZE): Define.
+       (create_go32_stub): Remove check for 2k size limit.  Read stub
+       from go32exe_temp_stub if present.
+       (go32_stubbed_coff_bfd_copy_private_bfd_data): Allocate and
+       copy variable-length stub.
+       (go32_check_format): Read stub to go32exe_temp_stub, set
+       origin, return go32exe_cleanup.
+       (adjust_filehdr_in_post, adjust_filehdr_out_pre)
+       (adjust_filehdr_out_post, adjust_scnhdr_in_post)
+       (adjust_scnhdr_out_pre, adjust_scnhdr_out_post)
+       (adjust_aux_in_post, adjust_aux_out_pre, adjust_aux_out_post):
+       Remove functions and their associated #defines.
+       * coffcode.h (coff_mkobject_hook): Remove stub copying code.
+       * libcoff-in.h: (struct coff_tdata): New field stub_size.
+       Rename field go32stub to stub.
        * libcoff.h: Regenerate.
-       * peXXigen.c (_bfd_XXi_only_swap_filehdr_out): Copy the
-       dos_message field rather than initialising it.
-       (_bfd_XX_bfd_copy_private_bfd_data_common): Copy the dos_message
-       field.
-       * peicode.h (pe_mkobject): Initialise the dos_message field.
-       (pe_mkobject_hook): Copy the dos_message field.
-       (pe_bfd_object_p): Copy the dos_message field.
-
-2019-10-25  Alan Modra  <amodra@gmail.com>
-
-       PR 4499
-       * elf-nacl.c (nacl_modify_segment_map): Set no_sort_lma for all
-       PT_LOAD segments.
-       * elf32-spu.c (spu_elf_modify_segment_map): Likewise on overlay
-       PT_LOAD segments.
-       * elf.c (elf_sort_segments): New function.
-       (assign_file_positions_except_relocs): Use shortcuts to elfheader
-       and elf_tdata.  Seek to e_phoff not sizeof_ehdr to write program
-       headers.  Move PT_PHDR check..
-       (assign_file_positions_for_non_load_sections): ..and code setting
-       PT_PHDR p_vaddr and p_paddr, and code setting __ehdr_start value..
-       (assign_file_positions_for_load_sections): ..to here.  Sort
-       PT_LOAD headers.  Delete header_pad code.  Use actual number of
-       headers rather than allocated in calculating size for program
-       headers.  Don't assume program headers follow ELF file header.
-       Simplify pt_load_count code.  Only set "off" for PT_LOAD or
-       PT_NOTE in cores.
-       (rewrite_elf_program_header): Set p_vaddr_offset for segments
-       that include file and program headers.
-       (copy_elf_program_header): Likewise, replacing header_size code.
-
-2019-10-21  Alan Modra  <amodra@gmail.com>
-
-       PR 452
-       * archive.c (normalize): Return file unchanged when
-       BFD_ARCHIVE_FULL_PATH.
-       (_bfd_construct_extended_name_table): Pass abfd, the output
-       bfd, to normalize.
-       (_bfd_archive_bsd44_construct_extended_name_table): Likewise.
-       * bfd.c (struct bfd): Make flags a full flagword.
-       (BFD_ARCHIVE_FULL_PATH): Define.
-       * bfd-in2.h: Regenerate.
-
-2019-10-20  John David Anglin  <danglin@gcc.gnu.org>
-
-       * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Provide 8-byte
-       minimum alignment for .plt section.
-
-2019-10-19  John David Anglin  <danglin@gcc.gnu.org>
-
-       * elf32-hppa.c: Revise import stub sequences.
-       (LONG_BRANCH_STUB_SIZE): Define.
-       (LONG_BRANCH_SHARED_STUB_SIZE): Define.
-       (IMPORT_STUB_SIZE): Define.
-       (IMPORT_SHARED_STUB_SIZE): Define.
-       (EXPORT_STUB_SIZE): Define.
-       (plt_stub): Revise to not use register %r22.
-       (LDO_R1_R22): Define.
-       (LDW_R22_R21): Define.
-       (LDW_R22_R19): Define.
-       (hppa_build_one_stub): Update stub generation and use new defines.
-       (hppa_size_one_stub): Likewise.
-
-2019-10-17  Nelson Chu  <nelson.chu@sifive.com>
-
-       * elfnn-riscv.c (riscv_elf_relocate_section): Report the error message
-       that user should recompile their code with `fPIC` when linking non-pic
-       code into shared library.
-
-       * elfnn-riscv.c (riscv_elf_relocate_section): Use asprintf to extend
-       the error message if needed, and then store the result into the
-       `msg_buf`.  Finally, remember to free the unused `msg_buf`.  All error
-       message for the dangerous relocation should be set before we call the
-       callback function.  If we miss the error message since linker runs out
-       of memory, we should set the default error message for the error.
-
-2019-10-16  Alan Modra  <amodra@gmail.com>
-
-       PR 13616
-       * cpu-powerpc.c (bfd_arch_ppc_nop_fill): New function, use it
-       for all ppc arch info.
-       * linker.c (default_data_link_order): Pass info->big_endian to
-       arch_info->fill function.
-
-2019-10-15  Alan Modra  <amodra@gmail.com>
-
-       * elf32-m68hc1x.c (reloc_warning): Add printf attribute.
-       (elf32_m68hc11_relocate_section): Don't use a variable for format
-       strings.  Delete some unnecessary xgettext:c-format comments.
-
-2019-10-15  Alan Modra  <amodra@gmail.com>
-
-       PR 24955
-       * elf32-arm.c (set_cmse_veneer_addr_from_implib): Use bfd_malloc
-       rather than xmalloc.
-       * elf32-m68hc1x.c (reloc_warning): New function.
-       (elf32_m68hc11_relocate_section): Use it here.  Cast bfd_vma values
-       corresponding to %lx in format strings.
-       * elf32-nds32.c (nds32_insertion_sort): Use a stack temporary.
+       * coff-stgo32.c (go32_check_format): Rename to...
+       (go32exe_check_format): ...this.
+       (go32_stubbed_coff_bfd_copy_private_bfd_data): Rename to...
+       (go32exe_copy_private_bfd_data): ...this.
+       (stub_bytes): Rename to...
+       (go32exe_default_stub): ...this.
+       (create_go32_stub): Rename to...
+       (go32exe_create_stub): ...this.
+       * coff-stgo32.c (go32exe_copy_private_bfd_data): Avoid realloc
+       when possible.
 
-2019-10-15  Alan Modra  <amodra@gmail.com>
+2020-04-01  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR ld/25749
+       PR ld/25754
+       * elf32-i386.c (elf_i386_convert_load_reloc): Convert load
+       relocation to R_386_32 for relocation against non-preemptible
+       absolute symbol.
+       (elf_i386_check_relocs): Call _bfd_elf_x86_valid_reloc_p.  Don't
+       allocate dynamic relocation for non-preemptible absolute symbol.
+       (elf_i386_relocate_section): Pass sec to
+       GENERATE_DYNAMIC_RELOCATION_P.
+       * elf64-x86-64.c (R_X86_64_converted_reloc_bit): Moved.
+       (elf_x86_64_convert_load_reloc): Covert load relocation to
+       R_X86_64_32S or R_X86_64_32 for relocation against non-preemptible
+       absolute symbol.  Don't convert to R_X86_64_32S nor R_X86_64_32
+       for non-preemptible absolute symbol if they overflow.
+       (elf_x86_64_check_relocs): Call _bfd_elf_x86_valid_reloc_p.  Set
+       tls_type for GOT slot to GOT_ABS for non-preemptible absolute
+       symbol.  Don't allocate dynamic relocation for non-preemptible
+       absolute symbol.
+       (elf_x86_64_relocate_section): Don't generate relative relocation
+       for GOTPCREL relocations aganst local absolute symbol.  Pass sec
+       to GENERATE_DYNAMIC_RELOCATION_P.
+       * elfxx-x86.c (elf_x86_allocate_dynrelocs): No dynamic relocation
+       against non-preemptible absolute symbol.
+       (_bfd_elf_x86_valid_reloc_p): New function.
+       (_bfd_x86_elf_size_dynamic_sections): No dynamic relocation for
+       GOT_ABS GOT slot.
+       * elfxx-x86.h (GENERATE_DYNAMIC_RELOCATION_P): Add an SEC
+       argument.  Don't generate dynamic relocation against
+       non-preemptible absolute symbol.
+       (ABS_SYMBOL_P): New.
+       (GENERATE_RELATIVE_RELOC_P): Don't generate relative relocation
+       against non-preemptible absolute symbol.
+       (GOT_ABS): New.
+       (R_X86_64_converted_reloc_bit): New.  Moved from elf64-x86-64.c.
+       (_bfd_elf_x86_valid_reloc_p): New.
+
+2020-04-01  Tamar Christina  <tamar.christina@arm.com>
+
+       PR ld/16017
+       * elf32-arm.c (elf32_arm_populate_plt_entry): Set LSB of the PLT0
+       address in the GOT if in thumb only mode.
+
+2020-04-01  Tamar Christina  <tamar.christina@arm.com>
+
+       * elf32-arm.c (elf32_thumb2_plt_entry): Fix PC-rel offset.
+
+2020-04-01  Hans-Peter Nilsson  <hp@bitrange.com>
+
+       * mmo.c (mmo_scan): Create .text section only when needed, not
+       from the start.
+
+2020-03-31  Alan Modra  <amodra@gmail.com>
+
+       * coff-alpha.c (alpha_ecoff_get_elt_at_filepos): Correct bfd_bread
+       return value check.
+
+2020-03-31  Alan Modra  <amodra@gmail.com>
+
+       * vms-alpha.c (image_write): Check bounds for sections without
+       contents too.  Error on non-zero write to section without
+       contents.
+       (_bfd_vms_slurp_etir): Check return of image_write* functions.
 
-       PR 25100
-       * elf64-ppc.c (sfpr_define): Delete dead code that triggered a warning.
+2020-03-31  Alan Modra  <amodra@gmail.com>
 
-2019-10-15  Alan Modra  <amodra@gmail.com>
+       * tekhex.c (pass_over): Check is_eof before reading buffer.
 
-       * bfd.c (bfd_check_compression_header): Check for powers of two
-       with x == (x & -x).
+2020-03-30  Nick Clifton  <nickc@redhat.com>
 
-2019-10-14  Alan Modra  <amodra@gmail.com>
+       PR binutils/pr25662
+       * libcoff-in.h (struct pe_tdata): Rename the insert_timestamp
+       field to timestamp and make it an integer.
+       * libcoff.h: Regenerate.
+       * peXXigen.c (_bfd_XXi_only_swap_filehdr_out): Test the timestamp
+       field in the pe_data structure rather than the insert_timestamp
+       field.
 
-       * syms.c (struct indexentry): Add idx field.
-       (cmpindexentry): Final sort on idx.
-       (_bfd_stab_section_find_nearest_line): Set idx.
+2020-03-30  Alan Modra  <amodra@gmail.com>
 
-2019-10-14  Alan Modra  <amodra@gmail.com>
+       PR 25745
+       * elf64-ppc.c (ppc64_elf_build_stubs): Use asprintf to form
+       statistics message.
 
-       * dwarf2.c (struct lookup_funcinfo): Add idx field.
-       (compare_lookup_funcinfos): Perform final sort on idx.
-       (build_lookup_funcinfo_table): Set idx.
-       (compare_sequences): Perform final sort on num_lines.
-       (build_line_info_table): Set num_lines and line_info_lookup earlier.
-       (sort_line_sequences): Set num_lines for sort.
+2020-03-26  Nick Clifton  <nickc@redhat.com>
 
-2019-10-14  Alan Modra  <amodra@gmail.com>
+       * cofflink.c (bfd_coff_get_internal_extra_pe_aouthdr): Delete.
+       * libbfd-in.h (bfd_coff_get_internal_extra_pe_aouthdr): Remove
+       prototype.
+       * libbfd.h: Regenerate.
 
-       * elflink.c (elf_sort_symbol): Sort on type and name as well.
-       (elf_link_add_object_symbols): Style fix.
+2020-03-26  Alan Modra  <amodra@gmail.com>
 
-2019-10-14  Alan Modra  <amodra@gmail.com>
+       * i386msdos.c (msdos_object_p): Catch -1 return from bfd_bread.
 
-       * elf.c (_bfd_elf_map_sections_to_segments): Init target_index
-       for sections about to be sorted.
-       (assign_file_positions_for_load_sections): Likewise.
-       (elf_sort_sections): Don't bother optimising both TOEND case.
-       * elflink.c (bfd_elf_final_link): Reset target_index.
+2020-03-26  Alan Modra  <amodra@gmail.com>
 
-2019-10-14  Alan Modra  <amodra@gmail.com>
+       * vms-alpha.c (dst_define_location): Limit size of dst_ptr_offsets
+       array.
+       (_bfd_vms_slurp_object_records): Rename "err" to "ok".
 
-       * elflink.c (elf_get_linked_section_vma): Delete.
-       (compare_link_order): Use elf_linked_to_section and sort by lma,
-       size, and id.
-       (elf_fixup_link_order): Use size_t variables where appropriate.
-       Make use of elf_linked_to_section.  Formatting.  Properly align
-       sections.
+2020-03-25  Nick Clifton  <nickc@redhat.com>
 
-2019-10-14  Alan Modra  <amodra@gmail.com>
-
-       * elf-strtab.c (strrevcmp): Comment.
-       * merge.c (strrevcmp): Likewise.
-       * elf64-ppc.c (compare_symbols): Correct final pointer comparison.
-       Comment on why comparing pointers ensures a stable sort.
-       * elflink.c (struct elf_symbol): Add void* to union.
-       (elf_sort_elf_symbol): Ensure a stable sort with pointer comparison.
-       (elf_sym_name_compare): Likewise.
-       (bfd_elf_match_symbols_in_sections): Style fix.
-       (elf_link_sort_cmp1): Comment.
-
-2019-10-14  Alan Modra  <amodra@gmail.com>
-
-       PR 24955
-       * elflink.c (elf_output_implib): Don't use xmalloc.  Don't ignore
-       return value of bfd_alloc2.
-       * peXXigen.c (_bfd_XXi_write_codeview_record): Don't use xmalloc.
-       * pef.c (bfd_pef_print_symbol): Likewise.  Don't ignore return
-       value of bfd_get_section_contents.
-       * som.c (som_write_space_strings): Don't use xmalloc.
-       (som_write_symbol_strings): Likewise.
-
-2019-10-11  Max Filippov  <jcmvbkbc@gmail.com>
-
-       * dwarf2.c (stash_maybe_enable_info_hash_tables): Only set
-       stash->info_hash_status = STASH_INFO_HASH_ON when
-       stash_maybe_update_info_hash_tables succeeds.
-
-2019-10-09  Alan Modra  <amodra@gmail.com>
-
-       PR 25070
-       * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Catch overflow of
-       total_size calculation.
-
-2019-10-08  Alan Modra  <amodra@gmail.com>
-
-       PR 25078
-       * dwarf2.c (find_abstract_instance): Delete orig_info_ptr, add
-       recur_count.  Error on recur_count reaching 100 rather than
-       info_ptr matching orig_info_ptr.  Adjust calls.
-
-2019-10-07  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
-
-       * elf32-msp430.c (elf32_msp430_merge_mspabi_attributes): Rename to..
-       (elf32_msp430_merge_msp430_attributes): Add support for merging
-       the GNU object attribute for data region.
-
-2019-10-07  Alan Modra  <amodra@gmail.com>
-
-       * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Do allocate
-       space for local got non-tls relocs when PIE.
-
-2019-10-07  Alan Modra  <amodra@gmail.com>
-
-       * elflink.c (elf_fixup_link_order): Don't attempt to find
-       an elf_section for linker created bfd sections.
-
-2019-10-07  Alan Modra  <amodra@gmail.com>
-
-       * elf32-ppc.c (ppc_elf_tls_optimize): Don't process R_PPC_TLSLD
-       with non-local symbol.  Don't double count __tls_get_addr calls
-       with marker relocs.
-       * elf64-ppc.c (ppc64_elf_tls_optimize): Likewise.
-
-2019-10-07  Alan Modra  <amodra@gmail.com>
-
-       * elf32-ppc.c (nomark_tls_get_addr): Rename from has_tls_get_addr_call
-       throughout.
-       * elf64-ppc.c (nomark_tls_get_addr): Likewise.
-
-2019-10-04  Alan Modra  <amodra@gmail.com>
-
-       * elf64-ppc.c (ppc64_elf_check_relocs): Move initialisation of vars.
-       (ppc64_elf_tls_optimize): Correct is_local condition.
-       (allocate_got): Don't reserve dynamic relocations for any of the
-       tls got relocs in PIEs when the symbol is local.
-       (allocate_dynrelocs): Correct validity test for local sym using
-       tlsld_got slot.
-       (ppc64_elf_size_dynamic_sections): Don't reserve dynamic relocations
-       for any of the tls got relocs in PIEs.
-       (ppc64_elf_layout_multitoc): Likewise.
-       (ppc64_elf_relocate_section): Correct validity test for local sym
-       using tlsld_got slot.  Don't emit dynamic relocations for any of
-       the tls got relocs in PIEs when the symbol is local.
-       * elf32-ppc.c (ppc_elf_tls_optimize): Correct is_local condition.
-       (got_relocs_needed): Delete.
-       (allocate_dynrelocs): Correct validity test for local sym using
-       tlsld_got slot.  Don't reserve dynamic relocations for any of the
-       tls got relocs in PIEs when the symbol is local.
-       (ppc_elf_size_dynamic_sections): Don't reserve dynamic relocations
-       for any of the tls got relocs in PIEs.
-       (ppc_elf_relocate_section): Correct validity test for local sym
-       using tlsld_got slot.  Don't emit dynamic relocations for any of
-       the tls got relocs in PIEs when the symbol is local.
-
-2019-10-04  Szabolcs Nagy  <szabolcs.nagy@arm.com>
-
-       PR ld/22263
-       PR ld/25056
-       * elf32-arm.c (elf32_arm_tls_transition): Use bfd_link_dll instead of
-       bfd_link_pic for TLS checks.
-       (elf32_arm_final_link_relocate): Likewise.
-       (allocate_dynrelocs_for_symbol): Likewise.
+       * cofflink.c (bfd_coff_get_internal_extra_pe_aouthdr): New
+       function.
+       * libbfd-in.h (bfd_coff_get_internal_extra_pe_aouthdr): Prototype.
+       * libbfd.h: Regenerate.
 
-2019-10-04  Szabolcs Nagy  <szabolcs.nagy@arm.com>
-
-       PR ld/25062
-       * elf32-arm.c (elf32_arm_final_link_relocate): Sign extend data.
-
-2019-09-30  Nick Alcock  <nick.alcock@oracle.com>
-
-       * elf-bfd.h (bfd_section_is_ctf): New inline function.
-       * elf.c (special_sections_c): Add ".ctf".
-       (assign_file_positions_for_non_load_sections): Note that
-       compressed debugging sections etc are not assigned here.  Treat
-       CTF sections like SEC_ELF_COMPRESS sections when is_linker_output:
-       sh_offset -1.
-       (assign_file_positions_except_relocs): Likewise.
-       (find_section_in_list): Note that debugging and CTF sections, as
-       well as reloc sections, are assigned later.
-       (_bfd_elf_assign_file_positions_for_non_load): CTF sections get
-       their size and contents updated.
-       (_bfd_elf_set_section_contents): Skip CTF sections: unlike
-       compressed sections, they have no uncompressed content to copy at
-       this stage.
-       * elflink.c (elf_link_swap_symbols_out): Call the examine_strtab
-       callback right before the strtab is written out.
-       (bfd_elf_final_link): Don't cache the section contents of CTF
-       sections: they are not populated yet.  Call the emit_ctf callback
-       right at the end, after all the symbols and strings are flushed
-       out.
-
-2019-07-13  Nick Alcock  <nick.alcock@oracle.com>
-
-       * elf-strtab.c (_bfd_elf_strtab_len): New.
-       (_bfd_elf_strtab_str): Likewise.
-       * bfd-elf.h: Declare them.
-
-2019-07-13  Nick Alcock  <nick.alcock@oracle.com>
-
-       * elf-bfd.h (bfd_elf_get_str_section): Add.
-       * elf.c (bfd_elf_get_str_section): No longer static.
-
-2019-09-26  Alan Modra  <amodra@gmail.com>
-
-       PR 24262
-       * Makefile.am (AM_CPPFLAGS): Add -DLIBDIR.
-       * plugin.c (load_plugin): Search both ${libdir}/bfd-plugins and
-       ${bindir}/../lib/bfd-plugins if different.
-       * Makefile.in: Regenerate.
+2020-03-25  Shahab Vahedi  <shahab@synopsys.com>
 
-2019-09-23  Alan Modra  <amodra@gmail.com>
+       * elf32-arc.c (PRINT_DEBUG_RELOC_INFO_BEFORE): Use the
+       correct field name in the output string.
 
-       * elf64-ppc.c (ppc64_elf_check_relocs): Use bfd_link_executable
-       in choosing between different actions for shared library and
-       non-shared library cases.  Delete ELIMINATE_COPY_RELOCS test.
-       (dec_dynrel_count): Likewise.  Account for ifunc special case.
-       (ppc64_elf_adjust_dynamic_symbol): Copy relocs are for executables,
-       not non-pic.
-       (allocate_dynrelocs): Comment fixes.  Delete ELIMINATE_COPY_RELOCS
-       test.
+2020-03-25  Alan Modra  <amodra@gmail.com>
 
-2019-09-23  Alan Modra  <amodra@gmail.com>
+       PR 25662
+       * elf.c (assign_file_positions_for_load_sections): Adjust offset
+       for SHT_NOBITS section if first in segment.
 
-       * Makefile.am (SOURCE_HFILES): Add many missing .h files.
-       * Makefile.in: Regenerate.
-       * po/SRC-POTFILES.in: Regenerate.
+2020-03-24  H.J. Lu  <hongjiu.lu@intel.com>
 
-2019-09-23  Alan Modra  <amodra@gmail.com>
+       PR binutils/25708
+       * elf-bfd.h (_bfd_elf_get_symbol_version_name): Renamed to ...
+       (_bfd_elf_get_symbol_version_string): This.
+       * elf.c (_bfd_elf_get_symbol_version_name): Renamed to ...
+       (_bfd_elf_get_symbol_version_string): This.
+       (bfd_elf_print_symbol): Pass TRUE to
+       _bfd_elf_get_symbol_version_string.
+       * libbfd-in.h (_bfd_nosymbols_get_symbol_version_string): Add a
+       bfd_boolean argument.
+       * syms.c (_bfd_nosymbols_get_symbol_version_string): Likewise.
+       * targets.c  (_bfd_get_symbol_version_string): Likewise.
+       (bfd_get_symbol_version_string): Likewise.
+       * bfd-in2.h: Regenerated.
 
-       * bfd-in.h (bfd_symbol, bfd_section_already_linked),
-       (bfd_elf_version_tree): Delete forward declarations.
-       Move other forward decls and remaining elf function decl later.
-       (bfd_section_already_linked_table_init),
-       (bfd_section_already_linked_table_free),
-       (_bfd_handle_already_linked, _bfd_nearby_section),
-       (_bfd_fix_excluded_sec_syms): Move to bfdlink.h.
+2020-03-24  Nick Clifton  <nickc@redhat.com>
+           Jaydeep Chauhan  <jaydeepchauhan1494@gmail.com>
 
-2019-09-23  Alan Modra  <amodra@gmail.com>
+       PR 25713
+       * bfdio.c (_bfd_real_fopen): Add code to handle long filenames on
+       Win32 systems.
 
-       * bfd-in.h: Move ecoff function declarations..
-       * ecoff-bfd.h: ..to here, new file.
-       * ecoff.c: Include ecoff-bfd.h.
-       * ecofflink.c: Likewise.
-       * elf64-alpha.c: Likewise.
-       * elfxx-mips.c: Likewise.
-       * bfd-in2.h: Regenerate.
+2020-03-24  Nick Clifton  <nickc@redhat.com>
 
-2019-09-23  Alan Modra  <amodra@gmail.com>
+       PR 25681
+       * elf.c (_bfd_elf_map_sections_to_segments): When looking for a
+       segment to use for PT_GNU_RELRO, ignore empty sections in a
+       segment's current list.
 
-       * bfd-in.h (enum notice_asneeded_action): Move to bfdlink.h.
-       Move most other elf declarations..
-       * elf-bfd.h: ..to here.
-       * bfd-in2.h: Regenerate.
+2020-03-24  H.J. Lu  <hongjiu.lu@intel.com>
 
-2019-09-23  Alan Modra  <amodra@gmail.com>
+       PR binutils/25717
+       * elf-bfd.h (elf_obj_tdata): Change num_group to unsigned int.
 
-       * bfd-in.h: Move m68k function declaration..
-       * cpu-m68k.h: ..to here, new file..
-       * elf32-m68k.h: ..and here, new file.
-       * elf32-m68k.c: Include cpu-m68k.h and elf32-m68k.h.
-       * bfd-in2.h: Regenerate.
+2020-03-24  H.J. Lu  <hongjiu.lu@intel.com>
 
-2019-09-23  Alan Modra  <amodra@gmail.com>
+       PR binutils/25708
+       * elf-bfd.h (_bfd_elf_get_symbol_version_name): New.
+       * elf.c (_bfd_elf_get_symbol_version_name): New function.  Based
+       on the previous _bfd_elf_get_symbol_version_string.
+       (_bfd_elf_get_symbol_version_string): Use it.
 
-       * bfd-in.h: Move bfin function declaration..
-       * elf32-bfin.h: ..to here, new file.
-       * elf32-bfin.c: Include elf32-bfin.h.
-       * bfd-in2.h: Regenerate.
+2020-03-24  Alan Modra  <amodra@gmail.com>
 
-2019-09-23  Alan Modra  <amodra@gmail.com>
+       * archive.c (_bfd_generic_read_ar_hdr_mag): Sanity check extended
+       name size.  Use bfd_malloc rather than bfd_zmalloc, clearing just
+       struct areltdata.
 
-       * bfd-in.h: Move cr16 function declaration..
-       * elf32-cr16.h: ..to here, new file.
-       * elf32-cr16.c: Include elf32-cr16.h.
-       * bfd-in2.h: Regenerate.
+2020-03-23  Sebastian Huber  <sebastian.huber@embedded-brains.de>
 
-2019-09-23  Alan Modra  <amodra@gmail.com>
+       * elflink.c (_bfd_elf_tls_setup): Mention .tdata in comment.
 
-       * bfd-in.h (bfd_sunos_get_needed_list),
-       (bfd_sunos_record_link_assignment),
-       (bfd_sunos_size_dynamic_sections),
-       (bfd_i386linux_size_dynamic_sections),
-       (bfd_sparclinux_size_dynamic_sections): Delete obsolete decls.
-       * bfd-in2.h: Regenerate.
+2020-03-23  Alan Modra  <amodra@gmail.com>
 
-2019-09-23  Alan Modra  <amodra@gmail.com>
+       * ecoff.c (_bfd_ecoff_slurp_armap): Sanity check parsed_size and
+       symbol count.  Allocate an extra byte to ensure name strings
+       are terminated.  Sanity check name offsets.  Release memory on
+       error return.
 
-       * bfd-in.h: Move xcoff function declarations..
-       * xcofflink.h: ..to here, new file.
-       * xcofflink.c: Include xcofflink.h.
-       * coff-rs6000.c (bfd_xcoff_ar_archive_set_magic): Delete unused func.
-       * bfd-in2.h: Regenerate.
+2020-03-23  Alan Modra  <amodra@gmail.com>
 
-2019-09-23  Alan Modra  <amodra@gmail.com>
+       * i386msdos.c (msdos_object_p): Don't access e_lfanew when that
+       field hasn't been read.  Remove unnecessary casts.
 
-       * bfd-in.h: Delete coff forward refs and move coff declaration..
-       * coff-bfd.h: ..to here.
-       * bfd-in2.h: Regenerate.
+2020-03-22  Alan Modra  <amodra@gmail.com>
 
-2019-09-23  Alan Modra  <amodra@gmail.com>
-
-       * bfd-in.h: Move arm declaraions..
-       * cpu-arm.h: ..to here, new file..
-       * coff-arm.h: ..and here, new file..
-       * elf32-arm.h: ..and here, new file.
-       * cpu-arm.c: Include cpu-arm.h.
-       * coff-arm.c: Include cpu-arm.h and coff-arm.h.
-       * elf32-arm.c: Include cpu-arm.h and elf32-arm.h.
-       * pe-arm.c: Move function rename defines later.
-       * pe-arm-wince.c: Likewise and include sysdep.h and bfd.h early.
-       * bfd-in2.h: Regenerate.
+       * coff64-rs6000.c (xcoff64_slurp_armap): Ensure size is large
+       enough to read number of symbols.
 
-2019-09-23  Alan Modra  <amodra@gmail.com>
+2020-03-20  H.J. Lu  <hongjiu.lu@intel.com>
 
-       * bfd-in.h: Move tic6x function declaration..
-       * elf32-tic6x.h: ..to here.
-       * bfd-in2.h: Regenerate.
+       * configure.ac (HAVE_EXECUTABLE_SUFFIX): Removed.
+       (EXECUTABLE_SUFFIX): Likewise.
+       * config.in: Regenerated.
+       * configure: Likewise.
+       * plugin.c (bfd_plugin_close_and_cleanup): Defined as
+       _bfd_generic_close_and_cleanup.
+       (plugin_list_entry): Remove resolution_file, resolution_option,
+       real_bfd, real_nsyms, real_syms, lto_nsyms, lto_syms, gcc,
+       lto_wrapper, gcc_env and initialized,
+       (need_lto_wrapper_p): Removed.
+       (get_lto_wrapper): Likewise.
+       (setup_lto_wrapper_env): Likewise.
+       (register_all_symbols_read): Likewise.
+       (egister_cleanup): Likewise.
+       (get_symbols): Likewise.
+       (add_input_file): Likewise.
+       (bfd_plugin_set_program_name): Remove need_lto_wrapper.
+       (add_symbols): Updated.
+       (try_claim): Likewise.
+       (try_load_plugin): Likewise.
+       (bfd_plugin_canonicalize_symtab): Likewise.
+       * plugin.h (bfd_plugin_set_program_name): Remove int argument.
+       (plugin_data_struct): Remove real_bfd, real_nsyms and real_syms.
+
+2020-03-19  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR binutils/25640
+       * plugin.c (plugin_list_entry): Add has_symbol_type.
+       (add_symbols_v2): New function.
+       (bfd_plugin_open_input): Don't invoke LTO wrapper if LTO plugin
+       provides symbol type.
+       (try_load_plugin): Add LDPT_ADD_SYMBOLS_V2.
+       (bfd_plugin_canonicalize_symtab): Use LTO plugin symbol type if
+       available.
+
+2020-03-20  Alan Modra  <amodra@gmail.com>
+
+       * coff-rs6000.c (_bfd_xcoff_slurp_armap): Ensure size is large
+       enough to read number of symbols.
+
+2020-03-20  Alan Modra  <amodra@gmail.com>
+
+       * elf.c (_bfd_elf_setup_sections): Don't test known non-NULL
+       backend functions for NULL before calling.
+       (copy_special_section_fields, _bfd_elf_copy_private_bfd_data),
+       (bfd_section_from_shdr, assign_section_numbers): Likewise.
+       * elfcode.h (elf_write_relocs, elf_slurp_reloc_table): Likewise.
+       * elfnn-ia64.c (ignore_errors): New function.
+       (elf_backend_link_order_error_handler): Redefine as ignore_errors.
+
+2020-03-19  Nick Clifton  <nickc@redhat.com>
+
+       PR 25676
+       * dwarf2.c (struct varinfo): Add unit_offset field to record the
+       location of the varinfo in the unit's debug info data.  Change the
+       type of the stack field to a boolean.
+       (lookup_var_by_offset): New function.  Returns the varinfo
+       structure for the variable described at the given offset in the
+       unit's debug info.
+       (scan_unit_for_symbols): Add support for variables which have the
+       DW_AT_specification attribute.
+
+2020-03-19  Nick Clifton  <nickc@redhat.com>
+
+       PR 25699
+       * elf.c (bfd_elf_set_group_contents): Replace assertion with an
+       error return.
+
+2020-03-19  Sebastian Huber  <sebastian.huber@embedded-brains.de>
+
+       * elfxx-riscv.c (riscv_parse_subset): Don't use C99.
+
+2020-03-18  Nick Clifton  <nickc@redhat.com>
+
+       PR 25673
+       * elf.c (_bfd_elf_write_secondary_reloc_section): Fix illegal
+       memory access when processing a corrupt secondary reloc section.
+
+2020-03-18  Christophe Lyon  <christophe.lyon@linaro.org>
+
+       * elf32-arm.c (arm_build_one_stub): Emit a fatal error message
+       instead of calling abort.
+       * elf32-csky.c (csky_build_one_stub): Likewise.
+       * elf32-hppa.c (hppa_build_one_stub): Likewise.
+       * elf32-m68hc11.c (m68hc11_elf_build_one_stub): Likewise.
+       * elf32-m68hc12.c (m68hc12_elf_build_one_stub): Likewise.
+       * elf32-metag.c (metag_build_one_stub): Likewise.
+       * elf32-nios2.c (nios2_build_one_stub): Likewise.
+       * elf64-ppc.c (ppc_build_one_stub): Likewise.
+       (ppc_size_one_stub): Likewise.
+       * elfnn-aarch64.c (aarch64_build_one_stub): Likewise.
+
+2020-03-17  Nick Clifton  <nickc@redhat.com>
+
+       PR 25688
+       * elf.c (_bfd_elf_copy_special_section_fields): Replace assertions
+       with error messages.
+
+2020-03-17  Nick Clifton  <nickc@redhat.com>
+
+       PR 25687
+       * elf.c (_bfd_elf_slurp_secondary_reloc_section): Remove redundant
+       free.  Add free on another failure path.
+
+2020-03-16  Alan Modra  <amodra@gmail.com>
+
+       PR 25675
+       * elf.c (elf_sort_segments): Don't call bfd_octets_per_byte unless
+       we have a non-zero section count.  Do lma comparison in octets.
+
+2020-03-16  Alan Modra  <amodra@gmail.com>
+
+       * vms-alpha.c (dst_restore_location): Validate index into
+       dst_ptr_offsets array before accessing.  Return status.
+       (dst_retrieve_location): Similarly, making "loc" parameter a
+       pointer to return value.
+       (_bfd_vms_slurp_etir): Update calls to above functions.
 
-2019-09-23  Alan Modra  <amodra@gmail.com>
+2020-03-14  Kamil Rytarowski  <n54@gmx.com>
 
-       * bfd-in.h: Move aarch64 declarations and defines..
-       * cpu-aarch64.h: ..to here, new file..
-       * elfxx-aarch64.h: ..and here.
-       * cpu-aarch64.c: Include cpu-aarch64.h.
-       * elfnn-aarch64.c: Likewise.
-       * bfd-in2.h: Regenerate.
+       * configure.ac: Include netbsd-core.lo for all NetBSD arm and mips
+       targets.
+       * configure: Regenerated.
 
-2019-09-23  Alan Modra  <amodra@gmail.com>
+2020-03-14  Alan Modra  <amodra@gmail.com>
 
-       * bfd-in.h: Delete ticoff function declarations.
-       * coff-tic54x.c (bfd_ticoff_set_section_load_page),
-       (bfd_ticoff_get_section_load_page): Make static.
+       * section.c (BFD_FAKE_SECTIONS): Formatting.
        * bfd-in2.h: Regenerate.
 
-2019-09-23  Alan Modra  <amodra@gmail.com>
+2020-03-13  Kamil Rytarowski  <n54@gmx.com>
 
-       * bfd-in.h: Move h8300 function declaration to..
-       * cpu-h8300.h: ..here, new file.
-       * cpu-h8300.c: Include cpu-h8300.h.
-       * elf32-h8300.c: Likewise.
-       * bfd-in2.h: Regenerate.
+       * elf.c (elfcore_grok_netbsd_note): Add support for
+       NT_NETBSDCORE_LWPSTATUS notes.
 
-2019-09-23  Alan Modra  <amodra@gmail.com>
+2020-03-13  Christophe Lyon  <christophe.lyon@linaro.org>
 
-       * bfd-in.h: Move ia64 function declarations..
-       * elfxx-ia64.h: ..to here.
        * bfd-in2.h: Regenerate.
-
-2019-09-23  Alan Modra  <amodra@gmail.com>
-
-       * bfd-in.h: Move v850 function declarations..
-       * elf32-v850.h: ..to here, new file.
-       * elf32-v850.c: Include elf32-v850.h.
+       * section.c (asection): Add already_assigned field.
+       (BFD_FAKE_SECTION): Add default initializer for it.
+       * ecoff.c (bfd_debug_section): Initialize already_assigned field.
+       * elf32-arm.c (arm_build_one_stub): Add support for
+       non_contiguous_regions.
+       * elf32-csky.c (csky_build_one_stub): Likewise.
+       * elf32-hppa.c (hppa_build_one_stub): Likewise.
+       * elf32-m68hc11.c (m68hc11_elf_build_one_stub): Likewise.
+       * elf32-m68hc12.c (m68hc12_elf_build_one_stub): Likewise.
+       * elf32-metag.c (metag_build_one_stub): Likewise.
+       * elf32-nios2.c (nios2_build_one_stub): Likewise.
+       * elf64-ppc.c (ppc_build_one_stub): Likewise.
+       (ppc_size_one_stub): Likewise.
+       * elfnn-aarch64.c (aarch64_build_one_stub): Likewise.
+       * elflink.c (elf_link_input_bfd): Likewise.
+
+2020-03-13  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR ld/24920
+       * elf-linker-x86.h (elf_linker_x86_params): Add
+       static_before_all_inputs and has_dynamic_linker.
+       * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Report
+       dynamic input objects if -static is passed at command-line
+       before all input files without --dynamic-linker unless
+       --no-dynamic-linker is used.
+
+2020-03-13  Kamil Rytarowski  <n54@gmx.com>
+
+       * elf.c (elfcore_grok_netbsd_note): Add support for aarch64.
+
+2020-03-13  Christian Eggers  <ceggers@gmx.de>
+
+       * bfd.c (bfd_record_phdr): New local "opb".  Fix assignment of
+       "p_paddr" from "at".
+       * elfcode.h (bfd_from_remote_memory): Add units to several
+       parameters.  New local "opb".  Fix usage of p_align.  Fix
+       calculation of "localbase" from "ehdr_vma" and "p_vaddr".  Fix
+       call of target_read_memory.
+       * elflink.c (elf_fixup_link_order): Fix scope of "s" local.  Fix
+       calculation of "offset" and "output_offset".
+       (bfd_elf_final_link): New local "opb".  Fix calculation of "size"
+       from "offset" and fix calculation of "end" from "vma+size".  Fix
+       comparison between "sh_addr" and "vma"/"output_offset".
+       (bfd_elf_discard_info): Fix calculation of "eh_alignment".
+       * elf-bfd.h (struct elf_link_hash_table): Add unit to tls_size
+       member.
+       * elf.c (_bfd_elf_map_sections_to_segments): Add unit (bytes/
+       octets) to "wrap_to2 and "phdr_size" locals.  Fix calculation of
+       "wrap_to" value.  Add unit (bytes) to phdr_lma variable.  Fix
+       assignment of p_paddr from phdr_lma.  Fix comparison between
+       "lma+size" and "next->lma".
+       (elf_sort_segments): Fix assignment from p_paddr to lma.
+       (assign_file_positions_for_load_sections): Add unit (bytes) to
+       local "align".  Fix calculation of local "off_adjust".  Fix
+       calculation of local "filehdr_vaddr".
+       (assign_file_positions_for_non_load_sections): New local "opb".
+       Fix calculation of "end" from "p_size". Fix comparison between
+       "vma+SECTION_SIZE" and "start".  Fix calculation of "p_memsz"
+       from "end" and "p_vaddr".
+       (rewrite_elf_program_header): Fix comparison between p_vaddr and
+       vma.  Fix assignment to p_paddr from lma.  Fix comparison between
+       p_paddr and lma.  Fix assignment to p_paddr from lma.
+       * merge.c (sec_merge_emit): New local "opb". Convert
+       "alignment_power" to octets.
+       (_bfd_add_merge_section): New locals "alignment_power" and
+       "opb".  Fix comparison between "alignment_power" and
+       "sizeof(align)".
+       (_bfd_merge_sections): New local "opb".  Divide size by opb
+       before checking align mask.
+
+2020-03-13  Christian Eggers  <ceggers@gmx.de>
+
+       * elf.c (_bfd_elf_make_section_from_shdr): Introduce new temp
+       opb.  Divide Elf_Internal_Shdr::sh_addr by opb when setting
+       section LMA/VMA.
+       (_bfd_elf_make_section_from_phdr): Similarly.
+       (elf_fake_sections): Fix calculation of
+       Elf_Internal_shdr::sh_addr from section VMA.
+       (_bfd_elf_map_sections_to_segments): Fix mixup between octets
+       and bytes.
+       (assign_file_positions_for_load_sections): Fix calculations of
+       Elf_Internal_shdr::p_vaddr and p_paddr from section LMA/VMA.  Fix
+       comparison between program header address and section LMA.
+       (assign_file_positions_for_non_load_sections): Likewise.
+       (rewrite_elf_program_header): Likewise.  Introduce new temp opb.
+       (IS_CONTAINED_BY_VMA): Add parameter opb.
+       (IS_CONTAINED_BY_LMA,IS_SECTION_IN_INPUT_SEGMENT,
+       INCLUDE_SECTION_IN_SEGMENT): Likewise.
+       (copy_elf_program_header): Update call to ELF_SECTION_IN_SEGMENT.
+       Fix calculations of p_addr_valid and p_vaddr_offset.
+       * elflink.c (elf_link_add_object_symbols): Multiply section VMA
+       with octets per byte when comparing against p_vaddr.
+
+2020-03-11  Alan Modra  <amodra@gmail.com>
+
+       * som.c (setup_sections): Sanity check subspace.name.
+
+2020-03-11  Alan Modra  <amodra@gmail.com>
+
+       * elf64-ppc.c (ppc64_elf_inline_plt): Do increment rel in for loop.
+
+2020-03-10  Alan Modra  <amodra@gmail.com>
+
+       PR 25648
+       * ihex.c (ihex_write_object_contents): Don't assume ordering of
+       addresses here.
+
+2020-03-09  Alan Modra  <amodra@gmail.com>
+
+       * wasm-module.c (wasm_scan): Sanity check file name length
+       before allocating memory.  Move common section setup code.  Do
+       without bfd_tell to calculate section size.
+
+2020-03-06  Nick Clifton  <nickc@redhat.com>
+
+       * elf.c (_bfd_elf_set_section_contents): Replace call to abort
+       with error messages and failure return values.
+
+2020-03-05  Max Filippov  <jcmvbkbc@gmail.com>
+
+       * elf32-xtensa.c (shrink_dynamic_reloc_sections): Shrink dynamic
+       relocation sections for any removed reference to a dynamic symbol.
+
+2020-03-05  Nick Clifton  <nickc@redhat.com>
+
+       * elf-bfd.h (struct elf_backend_data): Add new fields:
+       init_secondary_reloc_section, slurp_secondary_reloc_section,
+       write_secondary_reloc_section.
+       (_bfd_elf_init_secondary_reloc_section): Prototype.
+       (_bfd_elf_slurp_secondary_reloc_section): Prototype.
+       (_bfd_elf_write_secondary_reloc_section): Prototype.
+       * elf.c ( bfd_section_from_shdr): Invoke the new
+       init_secondary_reloc_section backend function, if defined, when a
+       second reloc section is encountered.
+       (swap_out_syms): Invoke the new symbol_section_index function, if
+       defined, when computing the section index of an OS/PROC specific
+       symbol.
+       (_bfd_elf_init_secondary_reloc_section): New function.
+       (_bfd_elf_slurp_secondary_reloc_section): New function.
+       (_bfd_elf_write_secondary_reloc_section): New function.
+       (_bfd_elf_copy_special_section_fields): New function.
+       * elfcode.h (elf_write_relocs): Invoke the new
+       write_secondary_relocs function, if defined, in order to emit
+       secondary relocs.
+       (elf_slurp_reloc_table): Invoke the new slurp_secondary_relocs
+       function, if defined, in order to read in secondary relocs.
+       * elfxx-target.h (elf_backend_copy_special_section_fields):
+       Provide a non-NULL default definition.
+       (elf_backend_init_secondary_reloc_section): Likewise.
+       (elf_backend_slurp_secondary_reloc_section): Likewise.
+       (elf_backend_write_secondary_reloc_section): Likewise.
+       (struct elf_backend_data elfNN_bed): Add initialisers for the new
+       fields.
+        * configure.ac (score_elf32_[bl]e_vec): Add elf64.lo
+        * configure: Regenerate.
+
+2020-03-05  Alan Modra  <amodra@gmail.com>
+
+       * archive64.c (_bfd_archive_64_bit_slurp_armap): Check parsed_size
+       against file size before allocating memory.  Use bfd_alloc rather
+       than bfd_zalloc for carsym/strings memory.
+
+2020-03-04  Alan Modra  <amodra@gmail.com>
+
+       * elf.c (elf_fake_sections): Ensure sh_addralign is such that
+       sh_addr mod sh_addalign is zero.
+
+2020-03-04  Alan Modra  <amodra@gmail.com>
+
+       * format.c (bfd_check_format_matches): Call cleanup on error exit.
+
+2020-03-03  Alan Modra  <amodra@gmail.com>
+
+       * format.c (struct bfd_preserve): Add cleanup field.
+       (bfd_preserve_save): Add cleanup param and save.
+       (bfd_preserve_restore): Return cleanup.
+       (bfd_preserve_finish): Call the cleanup for the discarded match.
+       (bfd_check_format_matches): Pass cleanup to bfd_preserve_save,
+       and clear when preserving a match.  Restore cleanup too when
+       restoring that match.
+
+2020-03-02  Alan Modra  <amodra@gmail.com>
+
+       * cisco-core.c (cisco_core_file_p): Return bfd_cleanup.
+       * hpux-core.c (hpux_core_core_file_p): Update prototype.
+       * sco5-core.c (sco5_core_file_p): Return bfd_cleanup.
+       (core_sco5_vec): Correct initialisers.
+
+2020-03-02  Alan Modra  <amodra@gmail.com>
+
+       * aix386-core.c (aix386_core_file_p): Return bfd_cleanup.
+       * aix5ppc-core.c (xcoff64_core_p): Likewise.
+       * cisco-core.c (cisco_core_file_validate): Likewise.
+       * hppabsd-core.c (hppabsd_core_core_file_p): Likewise.
+       * hpux-core.c (hpux_core_core_file_p): Likewise.
+       * irix-core.c (irix_core_core_file_p): Likewise.
+       * lynx-core.c (lynx_core_file_p): Likewise.
+       * netbsd-core.c (netbsd_core_file_p): Likewise.
+       * osf-core.c (osf_core_core_file_p): Likewise.
+       * ptrace-core.c (ptrace_unix_core_file_p): Likewise.
+       * sco5-core.c (sco5_core_file_p): Likewise.
+
+2020-03-02  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * trad-core.c (trad_unix_core_file_p): Return bfd_cleanup.
+
+2020-03-02  Alan Modra  <amodra@gmail.com>
+
+       * targets.c (bfd_cleanup): New typedef.
+       (struct bfd <_bfd_check_format>): Return a bfd_cleanup.
+       * libbfd-in.h (_bfd_no_cleanup): Define.
+       * format.c (bfd_reinit): Add cleanup parameter, call it.
+       (bfd_check_format_matches): Set cleanup from _bfd_check_format
+       call and pass to bfd_reinit.  Delete temp, use abfd->xvec instead.
+       * aout-target.h (callback, object_p): Return bfd_cleanup.
+       * aout-tic30.c (tic30_aout_callback, tic30_aout_object_p): Likewise.
+       * archive.c (bfd_generic_archive_p): Likewise.
+       * binary.c (binary_object_p): Likewise.
+       * coff-alpha.c (alpha_ecoff_object_p): Likewise.
+       * coff-ia64.c (ia64coff_object_p): Likewise.
+       * coff-rs6000.c (_bfd_xcoff_archive_p, rs6000coff_core_p): Likewise.
+       * coff-sh.c (coff_small_object_p): Likewise.
+       * coff-stgo32.c (go32_check_format): Likewise.
+       * coff64-rs6000.c (xcoff64_archive_p, rs6000coff_core_p),
+       (xcoff64_core_p): Likewise.
+       * coffgen.c (coff_real_object_p, coff_object_p): Likewise.
+       * elf-bfd.h (bfd_elf32_object_p, bfd_elf32_core_file_p),
+       (bfd_elf64_object_p, bfd_elf64_core_file_p): Likewise.
+       * elfcode.h (elf_object_p): Likewise.
+       * elfcore.h (elf_core_file_p): Likewise.
+       * i386msdos.c (msdos_object_p): Likewise.
+       * ihex.c (ihex_object_p): Likewise.
+       * libaout.h (some_aout_object_p): Likewise.
+       * libbfd-in.h (bfd_generic_archive_p, _bfd_dummy_target),
+       (_bfd_vms_lib_alpha_archive_p, _bfd_vms_lib_ia64_archive_p): Likewise.
+       * libbfd.c (_bfd_dummy_target): Likewise.
+       * libcoff-in.h (coff_object_p): Likewise.
+       * mach-o-aarch64.c (bfd_mach_o_arm64_object_p),
+       (bfd_mach_o_arm64_core_p): Likewise.
+       * mach-o-arm.c (bfd_mach_o_arm_object_p),
+       (bfd_mach_o_arm_core_p): Likewise.
+       * mach-o-i386.c (bfd_mach_o_i386_object_p),
+       (bfd_mach_o_i386_core_p): Likewise.
+       * mach-o-x86-64.c (bfd_mach_o_x86_64_object_p),
+       (bfd_mach_o_x86_64_core_p): Likewise.
+       * mach-o.c (bfd_mach_o_header_p, bfd_mach_o_gen_object_p),
+       (bfd_mach_o_gen_core_p, bfd_mach_o_fat_archive_p): Likewise.
+       * mach-o.h (bfd_mach_o_object_p, bfd_mach_o_core_p),
+       (bfd_mach_o_fat_archive_p, bfd_mach_o_header_p): Likewise.
+       * mmo.c (mmo_object_p): Likewise.
+       * pef.c (bfd_pef_object_p, bfd_pef_xlib_object_p): Likewise.
+       * peicode.h (coff_real_object_p, pe_ILF_object_p),
+       (pe_bfd_object_p): Likewise.
+       * plugin.c (ld_plugin_object_p, bfd_plugin_object_p): Likewise.
+       * ppcboot.c (ppcboot_object_p): Likewise.
+       * rs6000-core.c (rs6000coff_core_p): Likewise.
+       * som.c (som_object_setup, som_object_p): Likewise.
+       * srec.c (srec_object_p, symbolsrec_object_p): Likewise.
+       * tekhex.c (tekhex_object_p): Likewise.
+       * vms-alpha.c (alpha_vms_object_p): Likewise.
+       * vms-lib.c (_bfd_vms_lib_archive_p, _bfd_vms_lib_alpha_archive_p),
+       (_bfd_vms_lib_ia64_archive_p, _bfd_vms_lib_txt_archive_p): Likewise.
+       * wasm-module.c (wasm_object_p): Likewise.
+       * xsym.c (bfd_sym_object_p): Likewise.
+       * xsym.h (bfd_sym_object_p): Likewise.
+       * aoutx.h (some_aout_object_p): Likewise, and callback parameter
+       return type.
+       * pdp11.c (some_aout_object_p): Likewise.
+       * plugin.c (register_ld_plugin_object_p): Update object_p
+       parameter type.
+       * plugin.h (register_ld_plugin_object_p): Likewise.
        * bfd-in2.h: Regenerate.
+       * libbfd.h: Regenerate.
+       * libcoff.h: Regenerate.
 
-2019-09-23  Alan Modra  <amodra@gmail.com>
+2020-03-02  Alan Modra  <amodra@gmail.com>
+
+       * coff-alpha.c (alpha_ecoff_le_vec): Add SEC_SMALL_DATA to
+       applicable section flags.
+       * coff-mips.c (mips_ecoff_le_vec, mips_ecoff_be_vec): Likewise.
+       (mips_ecoff_bele_vec): Likewise.
+       * coffcode.h (sec_to_styp_flags): Set SEC_SMALL_DATA for .sdata
+       and .sbss sections.
+       * ecoff.c (_bfd_ecoff_new_section_hook): Likewise.
+       (_bfd_ecoff_styp_to_sec_flags): Likewise.
+
+2020-03-02  Alan Modra  <amodra@gmail.com>
+
+       * elf32-m32r.c (m32r_elf_section_flags): New function.
+       (elf_backend_section_flags): Define.
+       * elf32-nds32.c (nds32_elf_section_flags): New function.
+       (elf_backend_section_flags): Define.
+       * elf32-ppc.c (ppc_elf_section_from_shdr): Set SEC_SMALL_DATA for
+       .sbss and .sdata sections.
+       * elf32-v850.c (v850_elf_section_from_shdr): Set SEC_SMALL_DATA
+       for SHF_V850_GPREL sections.
+       * elf64-alpha.c (elf64_alpha_section_from_shdr): Delete outdated
+       FIXME.
+       * elf64-hppa.c (elf64_hppa_section_from_shdr): Set SEC_SMALL_DATA
+       for SHF_PARISC_SHORT sections.
+       * elf64-ppc.c (ppc64_elf_section_flags): New function.
+       (elf_backend_section_flags): Define.
+       * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Set SEC_SMALL_DATA
+       for SHF_MIPS_GPREL sections.  Delete FIXME.
+
+2020-03-02  Alan Modra  <amodra@gmail.com>
+
+       * elf-bfd.h (elf_backend_section_flags): Remove flagword* param.
+       * elf.c (_bfd_elf_make_section_from_shdr): Set section flags before
+       calling elf_backend_section_flags with adjusted params.  Use
+       newsect->flags past that point.
+       (_bfd_elf_new_section_hook): Always set sh_type and sh_flags for
+       special sections.
+       (_bfd_elf_init_private_section_data): Allow normal sh_type sections
+       to have their type overridden, and all sh_flags but processor and
+       os specific.
+       * elf32-arm.c (elf32_arm_section_flags): Adjust for changed params.
+       * elf32-mep.c (mep_elf_section_flags): Likewise.
+       * elf32-nios2.c (nios2_elf32_section_flags): Likewise.
+       * elf64-alpha.c (elf64_alpha_section_flags): Likewise.
+       * elf64-ia64-vms.c (elf64_ia64_section_flags): Likewise.
+       * elfnn-ia64.c (elfNN_ia64_section_flags): Likewise.
+       * elfnn-aarch64.c (elfNN_aarch64_size_stubs): Exclude the linker
+       stub BFD and non-aarch64 input files when scanning for stubs.
+
+2020-03-02  Alan Modra  <amodra@gmail.com>
+
+       * coff-alpha.c (alpha_ecoff_get_elt_at_filepos): Provide an upper
+       limit to decompressed element size.
+
+2020-03-02  Alan Modra  <amodra@gmail.com>
+
+       * vms-lib.c (vms_traverse_index): Add recur_count param and
+       update calls.  Fail on excessive recursion.
+
+2020-03-02  Alan Modra  <amodra@gmail.com>
+
+       * vms-alpha.c (vms_get_remaining_object_record): Use
+       bfd_realloc_or_free rather than bfd_realloc.
+       (add_symbol_entry, vector_grow1, alpha_vms_slurp_relocs): Likewise.
+       (dst_define_location, parse_module): Likewise, and check realloc
+       return status before using memory.  Return status from function
+       adjusting all callers.
+
+2020-02-28  Alan Modra  <amodra@gmail.com>
+
+       * vms-lib.c (_bfd_vms_lib_archive_p): Free memory on error paths.
+
+2020-02-28  Alan Modra  <amodra@gmail.com>
+
+       * vms-alpha.c (alpha_vms_object_p): Use _bfd_malloc_and_read.
+       Remove duplicate undersize check.
+
+2020-02-27  Alan Modra  <amodra@gmail.com>
 
-       * bfd-in.h: Move mips function declaration to..
-       * elfxx-mips.h: ..here.
-       * bfd-in2.h: Regenerate.
+       PR 24511
+       * mmo.c (mmo_scan): Set SEC_DATA for .data.
 
-2019-09-23  Alan Modra  <amodra@gmail.com>
+2020-02-27  Alan Modra  <amodra@gmail.com>
 
-       * bfd-in.h: Move csky function declarations to..
-       * elf32-csky.h: ..here, new file.
-       * elf32-csky.c: Include elf32-csky.h.
-       * bfd-in2.h: Regenerate.
+       PR 24511
+       * syms.c (stt): Trim off all but 'e', 'i' and 'p' entries.
+       (coff_section_type): Adjust comment.
+       (decode_section_type): Likewise.  Call coff_section_type before
+       decode_section_type.
+       (bfd_decode_symclass): Use 'c' for common sections other than
+       the standard one.
 
-2019-09-20  Nelson Chu <nelson.chu@sifive.com>
-
-       * elfnn-riscv.c (riscv_pcgp_hi_reloc): Add new field undefined_weak.
-       (riscv_record_pcgp_hi_reloc): New parameter undefined_weak.
-       Set undefined_weak field from it.
-       (relax_func_t): New parameter undefined_weak.
-       (_bfd_riscv_relax_call): New ignored parameter undefined_weak.
-       (_bfd_riscv_relax_tls_le): Likewise.
-       (_bfd_riscv_relax_align): Likewise.
-       (_bfd_riscv_relax_delete): Likewise.
-       (_bfd_riscv_relax_lui): New parameter undefined_weak.  If true,
-       allow relaxing.  For LO12* relocs, set rs1 to x0 when undefined_weak.
-       (_bfd_riscv_relax_pc): New parameter undefined_weak.  For LO12* relocs,
-       set undefined_weak from hi_reloc.  If true, allow relaxing.  For LO12*
-       relocs, set rs1 to x0 when undefined_weak and change to non-pcrel
-       reloc.
-       (_bfd_riscv_relax_section): New local undefined_weak.  Set for
-       undef weak relocs that can be relaxed.  Pass to relax_func call.
-
-2019-09-20  Alan Modra  <amodra@gmail.com>
-
-       * bfd-in.h (bfd_section_name, bfd_section_size, bfd_section_vma),
-       (bfd_section_lma, bfd_section_alignment, bfd_section_flags),
-       (bfd_section_userdata, bfd_is_com_section, discarded_section),
-       (bfd_get_section_limit_octets, bfd_get_section_limit): Delete macros.
-       * bfd.c (bfd_get_section_limit_octets, bfd_get_section_limit),
-       (bfd_section_list_remove, bfd_section_list_append),
-       (bfd_section_list_prepend, bfd_section_list_insert_after),
-       (bfd_section_list_insert_before, bfd_section_removed_from_list):
-       New inline functions.
-       * section.c (bfd_is_und_section, bfd_is_abs_section),
-       (bfd_is_ind_section, bfd_is_const_section, bfd_section_list_remove),
-       (bfd_section_list_append, bfd_section_list_prepend),
-       (bfd_section_list_insert_after, bfd_section_list_insert_before),
-       (bfd_section_removed_from_list): Delete macros.
-       (bfd_section_name, bfd_section_size, bfd_section_vma),
-       (bfd_section_lma, bfd_section_alignment, bfd_section_flags),
-       (bfd_section_userdata, bfd_is_com_section, bfd_is_und_section),
-       (bfd_is_abs_section, bfd_is_ind_section, bfd_is_const_section),
-       (discarded_section): New inline functions.
-       * bfd-in2.h: Regenerate.
+2020-02-27  Alan Modra  <amodra@gmail.com>
 
-2019-09-20  Alan Modra  <amodra@gmail.com>
+       * coff-rs6000.c (_bfd_xcoff_read_ar_hdr): Put all data in one
+       malloc'd block.
 
-       * bfd-in.h (bfd_asymbol_section, bfd_asymbol_value, bfd_asymbol_name),
-       (bfd_asymbol_bfd, bfd_asymbol_flavour, bfd_set_asymbol_name): Delete.
-       * bfd.c (bfd_asymbol_section, bfd_asymbol_value, bfd_asymbol_name),
-       (bfd_asymbol_bfd, bfd_set_asymbol_name): New inline functions.
-       * targets.c (bfd_asymbol_flavour): Likewise.
-       * bfd-in2.h: Regenerate.
+2020-02-27  Alan Modra  <amodra@gmail.com>
 
-2019-09-20  Alan Modra  <amodra@gmail.com>
-
-       * archive.c (bfd_generic_archive_p): Use bfd_set_thin_archive.
-       * bfd-in.h (bfd_get_filename, bfd_get_cacheable, bfd_get_format),
-       (bfd_get_target, bfd_get_flavour, bfd_family_coff, bfd_big_endian),
-       (bfd_little_endian, bfd_header_big_endian, bfd_header_little_endian),
-       (bfd_get_file_flags, bfd_applicable_file_flags),
-       (bfd_applicable_section_flags, bfd_has_map, bfd_is_thin_archive),
-       (bfd_valid_reloc_types, bfd_usrdata, bfd_get_start_address),
-       (bfd_get_symcount, bfd_get_outsymbols, bfd_count_sections),
-       (bfd_get_dynamic_symcount, bfd_get_symbol_leading_char): Delete.
-       * bfd/bfd.c (bfd_get_filename, bfd_get_cacheable, bfd_get_format),
-       (bfd_get_file_flags, bfd_get_start_address, bfd_get_symcount),
-       (bfd_get_dynamic_symcount, bfd_get_outsymbols, bfd_count_sections),
-       (bfd_has_map, bfd_is_thin_archive, bfd_set_thin_archive),
-       (bfd_usrdata, bfd_set_usrdata): New inline functions.
-       * targets.c (bfd_get_target, bfd_get_flavour),
-       (bfd_applicable_file_flags, bfd_family_coff, bfd_big_endian),
-       (bfd_little_endian, bfd_header_big_endian),
-       (bfd_header_little_endian, bfd_applicable_section_flags),
-       (bfd_get_symbol_leading_char): New inline functions.
+       * bfd.c (bfd_stat_arch_elt): Use vector of containing archive,
+       if file is an archive element.
        * bfd-in2.h: Regenerate.
 
-2019-09-20  Alan Modra  <amodra@gmail.com>
-
-       * elf64-ppc.c (ppc64_glibc_dynamic_reloc): New function.
-       (ppc64_elf_relocate_section): Warn if emitting unsupported dynamic
-       relocations.
-
-2019-09-18  Alan Modra  <amodra@gmail.com>
-
-       * bfd-in.h (bfd_get_section_name, bfd_get_section_vma),
-       (bfd_get_section_lma, bfd_get_section_alignment),
-       (bfd_get_section_size, bfd_get_section_flags),
-       (bfd_get_section_userdata): Delete.
-       (bfd_section_name, bfd_section_size, bfd_section_vma),
-       (bfd_section_lma, bfd_section_alignment): Lose bfd parameter.
-       (bfd_section_flags, bfd_section_userdata): New.
-       (bfd_is_com_section): Rename parameter.
-       * section.c (bfd_set_section_userdata, bfd_set_section_vma),
-       (bfd_set_section_alignment, bfd_set_section_flags, bfd_rename_section),
-       (bfd_set_section_size): Delete bfd parameter, rename section parameter.
-       (bfd_set_section_lma): New.
-       * bfd-in2.h: Regenerate.
-       * mach-o.c (bfd_mach_o_init_section_from_mach_o): Delete bfd param,
-       update callers.
-       * aoutx.h, * bfd.c, * coff-alpha.c, * coff-arm.c, * coff-mips.c,
-       * coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c,
-       * compress.c, * ecoff.c, * elf-eh-frame.c, * elf-hppa.h,
-       * elf-ifunc.c, * elf-m10200.c, * elf-m10300.c, * elf-properties.c,
-       * elf-s390-common.c, * elf-vxworks.c, * elf.c, * elf32-arc.c,
-       * elf32-arm.c, * elf32-avr.c, * elf32-bfin.c, * elf32-cr16.c,
-       * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c, * elf32-csky.c,
-       * elf32-d10v.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c,
-       * elf32-ft32.c, * elf32-h8300.c, * elf32-hppa.c, * elf32-i386.c,
-       * elf32-ip2k.c, * elf32-iq2000.c, * elf32-lm32.c, * elf32-m32c.c,
-       * elf32-m32r.c, * elf32-m68hc1x.c, * elf32-m68k.c, * elf32-mcore.c,
-       * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c,
-       * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c,
-       * elf32-nios2.c, * elf32-or1k.c, * elf32-ppc.c, * elf32-pru.c,
-       * elf32-rl78.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c,
-       * elf32-score7.c, * elf32-sh.c, * elf32-spu.c, * elf32-tic6x.c,
-       * elf32-tilepro.c, * elf32-v850.c, * elf32-vax.c, * elf32-visium.c,
-       * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c,
-       * elf64-bpf.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mmix.c,
-       * elf64-ppc.c, * elf64-s390.c, * elf64-sparc.c, * elf64-x86-64.c,
-       * elflink.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c,
-       * elfxx-aarch64.c, * elfxx-mips.c, * elfxx-sparc.c,
-       * elfxx-tilegx.c, * elfxx-x86.c, * i386msdos.c, * linker.c,
-       * mach-o.c, * mmo.c, * opncls.c, * pdp11.c, * pei-x86_64.c,
-       * peicode.h, * reloc.c, * section.c, * syms.c, * vms-alpha.c,
-       * xcofflink.c: Update throughout for bfd section macro and function
-       changes.
-
-2019-09-18  Alan Modra  <amodra@gmail.com>
-
-       * bfd-in.h (bfd_asymbol_section): Rename from bfd_get_section.
-       (bfd_get_output_section): Delete.
-       (bfd_asymbol_base): Delete.
-       (bfd_asymbol_section, bfd_asymbol_value, bfd_asymbol_name),
-       (bfd_asymbol_bfd, bfd_asymbol_flavour): Tidy.
-       (bfd_set_asymbol_name): New macro.
-       * bfd-in2.h: Regenerate.
-       * aout-cris.c: Update throughout to use bfd_asymbol_section.
-       * aoutx.h: Likewise.
-       * cofflink.c: Likewise.
+2020-02-26  Alan Modra  <amodra@gmail.com>
+
+       * archive.c (do_slurp_bsd_armap): Increase minimum parsed_size, and
+       bfd_set_error on failing test.  Don't bother changing bfd_error on
+       file read error.  Check symdef_count is multiple of BSD_SYMDEF_SIZE.
+       Check sym name is within string buffer.  Use size_t for some vars.
+       (do_slurp_coff_armap): Use size_t for some variables, fix size of
+       int_buf.  Don't change bfd_error on file read error.  Use
+       _bfd_mul_overflow when calculating carsym buffer size.  Reorder
+       calculations to catch overflows before they occur.  malloc and
+       free raw armap rather than using bfd_alloc.  Read raw armap before
+       allocating carsym+strings buffer.
+       (_bfd_slurp_extended_name_table): Localize variables.  Check
+       name size against file size.
+
+2020-02-26  Alan Modra  <amodra@gmail.com>
+
+       * vms-lib.c (vms_lib_read_index): Release correct buffer.
+
+2020-02-26  Alan Modra  <amodra@gmail.com>
+
+       * elf32-rx.c (rx_elf_relocate_section): Use bfd_malloc rather than
+       malloc.  Check for NULL return from bfd_malloc.
+       (rx_table_find, rx_table_map): Likewise.
+       (rx_set_section_contents): Check bfd_alloc return.
+       (rx_dump_symtab): Don't alloc internal_syms or external_syms.
+
+2020-02-26  Alan Modra  <amodra@gmail.com>
+
+       * aoutx.h: Indent labels correctly.  Format error strings.
+       * archive.c: Likewise.
+       * archive64.c: Likewise.
+       * coff-arm.c: Likewise.
+       * coff-rs6000.c: Likewise.
+       * coff-stgo32.c: Likewise.
+       * cpu-arm.c: Likewise.
        * dwarf2.c: Likewise.
-       * ecoff.c: Likewise.
+       * elf-ifunc.c: Likewise.
+       * elf-properties.c: Likewise.
+       * elf-s390-common.c: Likewise.
+       * elf-strtab.c: Likewise.
        * elf.c: Likewise.
        * elf32-arm.c: Likewise.
-       * elf32-mips.c: Likewise.
-       * elf32-score.c: Likewise.
-       * elf32-score7.c: Likewise.
-       * elfn32-mips.c: Likewise.
+       * elf32-bfin.c: Likewise.
+       * elf32-cr16.c: Likewise.
+       * elf32-csky.c: Likewise.
+       * elf32-i386.c: Likewise.
+       * elf32-m68k.c: Likewise.
+       * elf32-msp430.c: Likewise.
+       * elf32-nds32.c: Likewise.
+       * elf32-nios2.c: Likewise.
+       * elf32-pru.c: Likewise.
+       * elf32-xtensa.c: Likewise.
+       * elf64-ia64-vms.c: Likewise.
+       * elf64-x86-64.c: Likewise.
+       * elfcode.h: Likewise.
+       * elfcore.h: Likewise.
+       * elflink.c: Likewise.
        * elfnn-aarch64.c: Likewise.
+       * elfnn-ia64.c: Likewise.
+       * elfnn-riscv.c: Likewise.
        * elfxx-mips.c: Likewise.
-       * linker.c: Likewise.
+       * elfxx-sparc.c: Likewise.
+       * elfxx-x86.c: Likewise.
+       * i386lynx.c: Likewise.
+       * merge.c: Likewise.
        * pdp11.c: Likewise.
-       * elf64-mmix.c (mmix_elf_reloc): Part expand bfd_get_output_section.
-
-2019-09-18  Simon Marchi  <simon.marchi@polymtl.ca>
-
-       * Makefile.in: Re-generate.
-       * configure: Re-generate.
-       * doc/Makefile.in: Re-generate.
-
-2019-09-18  Alan Modra  <amodra@gmail.com>
-
-       * aoutx.h (slurp_symbol_table): Don't set symcount using bfd_get
-       macros.
-       * pdp11.c (slurp_symbol_table): Likewise.
-       * som.c (som_slurp_symbol_table): Likewise.
-       * coff-ppc.c (ppc_bfd_coff_final_link): Likewise.
-       * coffcode.h (coff_slurp_symbol_table): Likewise.
-       * cofflink.c (_bfd_coff_final_link): Likewise.
-       * ecoff.c (ecoff_slurp_symbolic_header): Likewise.
-       (_bfd_ecoff_slurp_symbolic_info): Likewise.
-       (_bfd_ecoff_slurp_symbol_table): Likewise.
-       (_bfd_ecoff_bfd_final_link): Likewise.
-       * elf.c (_bfd_elf_canonicalize_symtab): Likewise.
-       * elflink.c (elf_link_output_symstrtab): Likewise.
-       (bfd_elf_final_link): Likewise.
-       * peicode.h (pe_ILF_build_a_bfd): Likewise.
-       * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
-       * aoutx.h (some_aout_object_p, slurp_symbol_table): Don't set
-       start_address or symcount using bfd_get macros.
-       * coffgen.c (coff_real_object_p): Likewise.
-       * pdp11.c (some_aout_object_p, slurp_symbol_table): Likewise.
-       * som.c (som_object_setup, som_slurp_symbol_table): Likewise.
-       * elfcore.h (elf_core_file_p): Don't set start_address using
-       bfd_get macro.
-       * elf.c (_bfd_elf_canonicalize_dynamic_symtab): Don't set dynsymcount
-       using bfd_get macro.
-       * bfd.c (bfd_set_file_flags): Don't set flags using bfd_get macro.
-       * linker.c (bfd_generic_link_read_symbols): Don't set outsymbols
-       or symcount using bfd_get macros.
-       (_bfd_generic_final_link, generic_add_output_symbol): Likewise.
-       * syms.c (bfd_set_symtab): Likewise.
-       * vms-alpha.c (alpha_vms_bfd_final_link): Likewise.
-       * archive.c (do_slurp_bsd_armap): Don't set has_armap using
-       bfd_has_map macro.
-       (do_slurp_coff_armap, bfd_slurp_armap): Likewise.
+       * plugin.c: Likewise.
+       * reloc.c: Likewise.
+
+2020-02-26  Alan Modra  <amodra@gmail.com>
+
+       PR 25593
+       * elf-bfd.h (struct elf_link_hash_table): Rename "loaded" to
+       "dyn_loaded".
+       (bfd_elf_add_dt_needed_tag): Declare.
+       * elf-strtab.c (_bfd_elf_strtab_restore): Handle NULL buf.
+       * elflink.c (bfd_elf_add_dt_needed_tag): Make global and rename
+       from elf_add_dt_needed_tag.  Remove soname and doit param.
+       (elf_link_add_object_symbols): Don't use elf_add_dt_needed_tag
+       to see whether as-needed lib is already loaded, use dyn_loaded
+       list instead.  When saving and restoring around as-needed lib
+       handle possibility that dynstr has not been initialised.  Don't
+       add DT_NEEDED tags here.  Limit dyn_loaded list to dynamic libs.
+       Mark libs loaded via DT_NEEDED entries of other libs with
+       DYN_NO_NEEDED if they should not be mentioned in DT_NEEDED of
+       the output.
+       (elf_link_check_versioned_symbol): Remove now unneccesary
+       DYNAMIC check when traversing dyn_loaded list.
+
+2020-02-26  Alan Modra  <amodra@gmail.com>
+
+       * bfdio.c (bfd_get_file_size): Ignore bogus archive element sizes.
+
+2020-02-25  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR binutils/25584
+       * plugin.c (need_lto_wrapper_p): New.
+       (bfd_plugin_set_program_name): Add an int argument to set
+       need_lto_wrapper_p.
+       (get_lto_wrapper): Return FALSE if need_lto_wrapper_p isn't
+       set.
+       * plugin.h (bfd_plugin_set_program_name): Add an int argument.
+
+2020-02-24  Alan Modra  <amodra@gmail.com>
+
+       * vms-lib.c (_bfd_vms_lib_archive_p): Correct overflow checks.
+
+2020-02-24  Alan Modra  <amodra@gmail.com>
+
+       * vms-lib.c (struct carsym_mem): Add limit.
+       (vms_add_index): Heed limit.
+       (vms_traverse_index): Catch buffer overflows.  Remove outdated fixme.
+       (vms_lib_read_index): Set up limit.  Catch 32-bit overflow.
+       Always return actual number read.
+       (_bfd_vms_lib_archive_p): Catch buffer overflows.  Replace
+       assertion with error exit.
+
+2020-02-22  Alan Modra  <amodra@gmail.com>
+
+       PR 25585
+       * elf.c (assign_file_positions_for_load_sections): Continue linking
+       on "PHDR segment not covered by LOAD segment" errors.
+
+2020-02-21  Alan Modra  <amodra@gmail.com>
+
+       * mach-o.c (bfd_mach_o_canonicalize_relocs): Fix ineffective
+       overflow check.
+       (bfd_mach_o_canonicalize_reloc): Likewise.
+       (bfd_mach_o_canonicalize_dynamic_reloc): Likewise.  Sanity check
+       counts and offsets against file size.
+       (bfd_mach_o_build_dysymtab): Fix ineffective overflow check.
+       (bfd_mach_o_mangle_sections): Remove unnecessary overflow check.
+       (bfd_mach_o_read_symtab_symbols): Sanity check count and offset
+       against file size.  Delete symbol table error message.
+       (bfd_mach_o_read_dysymtab): Sanity check counts and offsets
+       against file size.
+       (bfd_mach_o_read_symtab): Likewise.
+       (bfd_mach_o_read_command): Pass file size.
+       (bfd_mach_o_scan): Sanity check command count against file size.
+
+2020-02-21  Alan Modra  <amodra@gmail.com>
+
+       PR 25569
+       * aoutx.h (adjust_o_magic, adjust_z_magic, adjust_n_magic): Use
+       "text", "data" and "bss" section pointer vars.  Don't update
+       section size, just exec header sizes.
+       (adjust_sizes_and_vmas): Don't update text section size.  Set
+       initial exec header a_text.  Print exec headers sizes.
+       * pdp11.c (adjust_o_magic, adjust_z_magic, adjust_n_magic),
+       (adjust_sizes_and_vmas): Similarly.  Formatting.
+       (final_link): Correct final file extension.
+
+2020-02-20  Nick Clifton  <nickc@redhat.com>
+
+       * elf-bfd.h (struct elf_backend_data): Add symbol_section_index
+       callback.
+       * elfxx-target.h (elf_backend_symbol_section_index): Provide
+       default definition.
+       (elfNN_bed): Initialise the symbol_section_index field.
+       * elf.c (swap_out_syms): Call symbol_section_index, if defined, on
+       OS and PROC specific section indicies.  Warn if converting other
+       reserved incidies to SHN_ABS.
+
+2020-02-19  Sergey Belyashov  <sergey.belyashov@gmail.com>
+
+       PR 25537
+       * cpu-z80.c: Add machine type compatibility checking.
+
+2020-02-19  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR binutils/25355
+       * plugin.c (plugin_list_entry): Remove handle.
+       (try_load_plugin): Call dlclose before return.
+
+2020-02-19  Alan Modra  <amodra@gmail.com>
+
+       * libbfd-in.h (_bfd_constant_p): Define.
+       (_bfd_alloc_and_read, _bfd_malloc_and_read): Check read size against
+       file size before allocating memory.
+       * coffgen.c (_bfd_coff_get_external_symbols): Remove file size check.
+       * elf.c (bfd_elf_get_str_section): Likewise.
+       (_bfd_elf_slurp_version_tables): Likewise.
+       * libbfd.h: Regenerate.
+
+2020-02-19  Alan Modra  <amodra@gmail.com>
+
+       * libbfd-in.h (_bfd_alloc_and_read, _bfd_malloc_and_read): New.
+       * aoutx.h (aout_get_external_symbols): Replace calls to
+       bfd_[m]alloc and bfd_bread with call to _bfd_[m]alloc_and_read.
+       (slurp_reloc_table): Likewise.
+       * archive.c (do_slurp_bsd_armap): Likewise.
+       (do_slurp_coff_armap): Likewise.
        * archive64.c (_bfd_archive_64_bit_slurp_armap): Likewise.
        * coff-rs6000.c (_bfd_xcoff_slurp_armap): Likewise.
        * coff64-rs6000.c (xcoff64_slurp_armap): Likewise.
-       * ecoff.c (_bfd_ecoff_slurp_armap): Likewise.
-       * som.c (som_slurp_armap): Likewise.
-
-2019-09-18  Alan Modra  <amodra@gmail.com>
-
-       * archures.c (bfd_get_arch): Make param const.
-       (bfd_get_mach, bfd_arch_bits_per_byte): Likewise.
-       (bfd_arch_bits_per_address, bfd_octets_per_byte): Likewise.
-       * bfd-in2.h: Regenerate.
-
-2019-09-18  Alan Modra  <amodra@gmail.com>
-
-       * bfd-in.h (carsym.name): Make const.
-       * reloc.c (struct reloc_howto_struct.name): Likewise.
-       * targets.c (bfd_target.name): Likewise.!
-       * bfd.c (bfd_get_sign_extend_vma): Make variable const.
-       * som.c (som_bfd_fill_in_ar_symbols): Use an intermediary variable
-       when setting carsym.name.
-       * bfd-in2.h: Regenerate.
-
-2019-09-18  Alan Modra  <amodra@gmail.com>
-
-       * mach-o.c (bfd_mach_o_fat_member_init): Likewise.  Replace
-       xstrdup and xmalloc with bfd_strdup and bfd_malloc.  Return an
-       error status.  Adjust calls.
-       * vms-lib.c (_bfd_vms_lib_get_module): Test mhd->id earlier.
-       Close bfd on failure.  Replace xstrdup/bfd_alloc use with
-       bfd_malloc.  Use bfd_set_filename.
-
-2019-09-18  Alan Modra  <amodra@gmail.com>
-
-       * elf64-ppc.c (must_be_dyn_reloc): Return 0 for TOC16 relocs.
-       (ppc64_elf_check_relocs): Support dynamic/copy relocs for TOC16.
-       (ppc64_elf_adjust_dynamic_symbol): Don't keep dynamic reloc when
-       needs_copy even if all relocs are in rw sections.
-       (dec_dynrel_count): Handle TOC16 relocs.
-       (ppc64_elf_relocate_section): Support dynamic relocs for TOC16.
-       (ppc64_elf_finish_dynamic_symbol): Adjust to handle needs_copy
-       semantic change.
-
-2019-09-16  Phil Blundell  <pb@pbcl.net>
-
-       * version.m4: Set version to 2.33.50.
-       * Makefile.in, configure, doc/Makefile.in: Regenerated.
-
-2019-09-11  Tom Tromey  <tom@tromey.com>
-
-       * opncls.c (bfd_set_filename): New function.
-       * bfd-in2.h: Regenerate.
-
-2019-09-11  Alan Modra  <amodra@gmail.com>
-
-       * targets.c (struct bfd_target): Add _bfd_group_name.
-       (BFD_JUMP_TABLE): Likewise.
-       * coffgen.c (bfd_coff_group_name): New function.
-       * elf.c (bfd_elf_group_name): New function.
-       * linker.c (_bfd_nolink_bfd_group_name): New function.
-       * section.c (bfd_generic_group_name): New function.
-       * elf-bfd.h (bfd_elf_group_name): Declare.
-       * libbfd-in.h (_bfd_nolink_bfd_group_name): Declare.
-       * libcoff-in.h (bfd_coff_group_name): Declare.
-       * aout-target.h (MY_bfd_group_name): Define.
-       * aout-tic30.c (MY_bfd_group_name): Define.
-       * bfd.c (bfd_group_name): Define.
-       * binary.c (binary_bfd_group_name): Define.
-       * coff-alpha.c (_bfd_ecoff_bfd_group_name): Define.
-       * coff-mips.c (_bfd_ecoff_bfd_group_name): Define.
-       * coff-rs6000.c (_bfd_xcoff_bfd_group_name): Define.
-       * coffcode.h (coff_bfd_group_name): Define.
-       * elfxx-target.h (bfd_elfNN_bfd_group_name): Define.
-       * i386msdos.c (msdos_bfd_group_name): Define.
-       * ihex.c (ihex_bfd_group_name): Define.
-       * mach-o-target.c (bfd_mach_o_bfd_group_name): Define.
-       * mmo.c (mmo_bfd_group_name): Define.
-       * pef.c (bfd_pef_bfd_group_name): Define.
-       * plugin.c (bfd_plugin_bfd_group_name): Define.
-       * ppcboot.c (ppcboot_bfd_group_name): Define.
-       * som.c (som_bfd_group_name): Define.
-       * srec.c (srec_bfd_group_name): Define.
-       * tekhex.c (tekhex_bfd_group_name): Define.
-       * verilog.c (verilog_bfd_group_name): Define.
-       * vms-alpha.c (vms_bfd_group_name, alpha_vms_bfd_group_name): Define.
-       * xsym.c (bfd_sym_bfd_group_name): Define.
-       * coff64-rs6000.c (rs6000_xcoff64_vec): Init new field.
-       (rs6000_xcoff64_aix_vec): Likewise.
-       * bfd-in2.h: Regenerate.
+       * coffcode.h (coff_set_arch_mach_hook, buy_and_read): Likewise.
+       * coffgen.c (coff_real_object_p, coff_object_p, build_debug_section),
+       (_bfd_coff_get_external_symbols): Likewise.
+       * ecoff.c (ecoff_slurp_symbolic_header),
+       (_bfd_ecoff_slurp_symbolic_info, ecoff_slurp_reloc_table),
+       (_bfd_ecoff_slurp_armap, ecoff_link_add_object_symbols, READ),
+       (ecoff_indirect_link_order): Likewise.
+       * elf.c (bfd_elf_get_str_section, setup_group, elf_read_notes),
+       (_bfd_elf_slurp_version_tables): Likewise.
+       * elf32-m32c.c (m32c_elf_relax_section): Likewise.
+       * elf32-rl78.c (rl78_elf_relax_section): Likewise.
+       * elf32-rx.c (elf32_rx_relax_section): Likewise.
+       * elf64-alpha.c (READ): Likewise.
+       * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Likewise.
+       * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Likewise.
+       * elfcode.h (elf_slurp_symbol_table),
+       (elf_slurp_reloc_table_from_section): Likewise.
+       * elflink.c (elf_link_add_object_symbols),
+       (elf_link_check_versioned_symbol): Likewise.
+       * elfxx-mips.c (READ): Likewise.
+       * i386lynx.c (slurp_reloc_table): Likewise.
+       * lynx-core.c (lynx_core_file_p): Likewise.
+       * mach-o.c (bfd_mach_o_canonicalize_relocs),
+       (bfd_mach_o_read_symtab_strtab, bfd_mach_o_alloc_and_read),
+       (bfd_mach_o_read_prebound_dylib, bfd_mach_o_read_dyld_content
+       * pdp11.c (aout_get_external_symbols, slurp_reloc_table
+       * pef.c (bfd_pef_print_loader_section, bfd_pef_scan_start_address),
+       (bfd_pef_parse_symbols): Likewise.
+       * peicode.h (pe_ILF_object_p, pe_bfd_object_p
+       * som.c (setup_sections, som_slurp_string_table),
+       (som_slurp_reloc_table, som_bfd_count_ar_symbols),
+       (som_bfd_fill_in_ar_symbols): Likewise.
+       * vms-alpha.c (module_find_nearest_line, evax_bfd_print_dst),
+       (evax_bfd_print_image): Likewise.
+       * vms-lib.c (_bfd_vms_lib_archive_p): Likewise.
+       * wasm-module.c (wasm_scan): Likewise.
+       * xcofflink.c (xcoff_link_add_symbols): Likewise.
+       * xsym.c (bfd_sym_read_name_table),
+       (bfd_sym_print_type_information_table_entry): Likewise.
        * libbfd.h: Regenerate.
-       * libcoff.h: Regenerate.
-
-2019-09-10  Nick Clifton  <nickc@redhat.com>
-
-       PR 24907
-       * archures.c (bfd_arch_info_type): Add max_reloc_offset_into_insn
-       field.
-       (bfd_default_arch_struct): Initialise the new field.
-       * bfd-in2.h: Regenerate.
-       * cpu-aarch64.c: Initialise the new field.
-       * cpu-alpha.c: Likewise.
-       * cpu-arc.c: Likewise.
-       * cpu-arm.c: Likewise.
-       * cpu-avr.c: Likewise.
-       * cpu-bfin.c: Likewise.
-       * cpu-bpf.c: Likewise.
-       * cpu-cr16.c: Likewise.
-       * cpu-cr16c.c: Likewise.
-       * cpu-cris.c: Likewise.
-       * cpu-crx.c: Likewise.
-       * cpu-csky.c: Likewise.
-       * cpu-d10v.c: Likewise.
-       * cpu-d30v.c: Likewise.
-       * cpu-dlx.c: Likewise.
-       * cpu-epiphany.c: Likewise.
-       * cpu-fr30.c: Likewise.
-       * cpu-frv.c: Likewise.
-       * cpu-ft32.c: Likewise.
-       * cpu-h8300.c: Likewise.
-       * cpu-hppa.c: Likewise.
-       * cpu-i386.c: Likewise.
-       * cpu-ia64.c: Likewise.
-       * cpu-iamcu.c: Likewise.
-       * cpu-ip2k.c: Likewise.
-       * cpu-iq2000.c: Likewise.
-       * cpu-k1om.c: Likewise.
-       * cpu-l1om.c: Likewise.
-       * cpu-lm32.c: Likewise.
-       * cpu-m10200.c: Likewise.
-       * cpu-m10300.c: Likewise.
-       * cpu-m32c.c: Likewise.
-       * cpu-m32r.c: Likewise.
-       * cpu-m68hc11.c: Likewise.
-       * cpu-m68hc12.c: Likewise.
-       * cpu-m68k.c: Likewise.
-       * cpu-m9s12x.c: Likewise.
-       * cpu-m9s12xg.c: Likewise.
-       * cpu-mcore.c: Likewise.
-       * cpu-mep.c: Likewise.
-       * cpu-metag.c: Likewise.
-       * cpu-microblaze.c: Likewise.
-       * cpu-mips.c: Likewise.
-       * cpu-mmix.c: Likewise.
-       * cpu-moxie.c: Likewise.
-       * cpu-msp430.c: Likewise.
-       * cpu-mt.c: Likewise.
-       * cpu-nds32.c: Likewise.
-       * cpu-nfp.c: Likewise.
-       * cpu-nios2.c: Likewise.
-       * cpu-ns32k.c: Likewise.
-       * cpu-or1k.c: Likewise.
-       * cpu-pdp11.c: Likewise.
-       * cpu-pj.c: Likewise.
-       * cpu-plugin.c: Likewise.
-       * cpu-powerpc.c: Likewise.
-       * cpu-pru.c: Likewise.
-       * cpu-riscv.c: Likewise.
-       * cpu-rl78.c: Likewise.
-       * cpu-rs6000.c: Likewise.
-       * cpu-rx.c: Likewise.
-       * cpu-s12z.c: Likewise.
-       * cpu-s390.c: Likewise.
-       * cpu-score.c: Likewise.
-       * cpu-sh.c: Likewise.
-       * cpu-sparc.c: Likewise.
-       * cpu-spu.c: Likewise.
-       * cpu-tic30.c: Likewise.
-       * cpu-tic4x.c: Likewise.
-       * cpu-tic54x.c: Likewise.
-       * cpu-tic6x.c: Likewise.
-       * cpu-tic80.c: Likewise.
-       * cpu-tilegx.c: Likewise.
-       * cpu-tilepro.c: Likewise.
-       * cpu-v850.c: Likewise.
-       * cpu-v850_rh850.c: Likewise.
-       * cpu-vax.c: Likewise.
-       * cpu-visium.c: Likewise.
-       * cpu-wasm32.c: Likewise.
-       * cpu-xc16x.c: Likewise.
-       * cpu-xgate.c: Likewise.
-       * cpu-xstormy16.c: Likewise.
-       * cpu-xtensa.c: Likewise.
-       * cpu-z80.c: Likewise.
-       * cpu-z8k.c: Likewise.
-
-2019-09-09  Phil Blundell  <pb@pbcl.net>
-
-       binutils 2.33 branch created.
-
-2019-09-06  Alan Modra  <amodra@gmail.com>
-
-       * aout-target.h (object_p): Formatting.
-       * bfd-in.h (bfd_get_filename): Don't cast to char*.
-       * corefile.c (generic_core_file_matches_executable_p): Constify
-       variables and remove cast.
-       * bfd-in2.h: Regenerate.
-
-2019-09-05  Alan Modra  <amodra@gmail.com>
-
-       * elf64-ppc.c (ppc64_elf_check_relocs): Interpret an addend in
-       GOT_PCREL and PLT_PCREL relocs as affecting the value stored
-       in the GOT/PLT entry rather than affecting the offset to that
-       GOI/PLT entry.
-       (ppc64_elf_edit_toc, ppc64_elf_relocate_section): Likewise.
-
-2019-09-05  Alan Modra  <amodra@gmail.com>
-
-       * elf64-ppc.c (xlate_pcrel_opt): Handle prefix loads and stores
-       in second instruction.
-       (ppc64_elf_relocate_section): Likewise.
 
-2019-09-05  Alan Modra  <amodra@gmail.com>
-
-       PR 24955
-       * libbfd-in.h (bfd_strdup): New inline function.
-       * archive.c (_bfd_get_elt_at_filepos): Use bfd_strdup.  Close
-       bfd on error.
-       * elfcode.h (_bfd_elf_bfd_from_remote_memory): Use bfd_strdup.
-       * opncls.c (bfd_fopen): Use bfd_strdup.  Close fd and stream
-       on error.
-       (bfd_openstreamr): Use bfd_strdup.
-       (bfd_openr_iovec, bfd_openw, bfd_create): Likewise.
-       * plugin.c (try_load_plugin): Use bfd_malloc.
+2020-02-19  Alan Modra  <amodra@gmail.com>
+
+       * aoutx.h (slurp_reloc_table): Allocate reloc_cache after
+       reading external relocs.
+       * ecoff.c (ecoff_slurp_reloc_table): Likewise.
+       * archive.c (_bfd_write_archive_contents): Don't twiddle bfd_error
+       after bfd_bread.
+       * archive64.c (_bfd_archive_64_bit_slurp_armap): Remove unnecessary
+       bfd_release.
+       * elf32-m32c.c (m32c_offset_for_reloc): Make shndx_buf a bfd_byte*.
+       (m32c_elf_relax_section): Likewise.
+       * elf32-rl78.c (rl78_offset_for_reloc): Likewise.
+       (rl78_elf_relax_section): Likewise.
+       * elf32-rx.c (rx_offset_for_reloc): Likewise.
+       (elf32_rx_relax_section): Likewise.
+       * mach-o.c (bfd_mach_o_alloc_and_read): Move earlier with better
+       parameter types and use..
+       (bfd_mach_o_read_dylinker, bfd_mach_o_read_dylib),
+       (bfd_mach_o_read_fvmlib, bfd_mach_o_read_str): ..in these functions.
+       * peicode.h (pe_bfd_object_p): Don't zero the part of opthdr
+       being read from file, just the extra.
+       * som.c (som_slurp_symbol_table): Allocate internal symbol buffer
+       after reading external syms.  Free on failure.
+
+2020-02-19  Alan Modra  <amodra@gmail.com>
+
+       * coffcode.h (buy_and_read, coff_slurp_line_table),
+       (coff_slurp_symbol_table, coff_slurp_reloc_table): Replace
+       bfd_[z][m]alloc2 calls with _bfd_mul_overflow followed by the
+       corresponding bfd_alloc call.  Adjust variables to suit.
+       * coffgen.c (_bfd_coff_get_external_symbols): Likewise.
+       * ecoff.c (_bfd_ecoff_slurp_symbolic_info),
+       (_bfd_ecoff_slurp_symbol_table, READ): Likewise.
+       * elf.c (bfd_elf_get_elf_syms, setup_group, bfd_section_from_shdr),
+       (swap_out_syms, _bfd_elf_slurp_version_tables): Likewise.
+       * elf32-m32c.c (m32c_elf_relax_section): Likewise.
+       * elf32-rl78.c (rl78_elf_relax_section): Likewise.
+       * elf32-rx.c (elf32_rx_relax_section): Likewise.
+       * elf64-alpha.c (READ): Likewise.
+       * elfcode.h (elf_object_p, elf_write_relocs, elf_write_shdrs_and_ehdr),
+       (elf_slurp_symbol_table, elf_slurp_reloc_table),
+       (bfd_from_remote_memory): Likewise.
+       * elfcore.h (core_find_build_id): Likewise.
+       * elfxx-mips.c (READ): Likewise.
+       * mach-o.c (bfd_mach_o_mangle_sections),
+       (bfd_mach_o_read_symtab_symbols, bfd_mach_o_read_thread),
+       (bfd_mach_o_read_dysymtab, bfd_mach_o_flatten_sections),
+       (bfd_mach_o_scan, bfd_mach_o_fat_archive_p): Likewise.
+       * som.c (setup_sections, som_prep_for_fixups)
+       (som_build_and_write_symbol_table, som_slurp_symbol_table),
+       (som_slurp_reloc_table, som_bfd_count_ar_symbols),
+       (som_bfd_fill_in_ar_symbols, som_slurp_armap),
+       (som_bfd_ar_write_symbol_stuff): Likewise.
+       * vms-alpha.c (vector_grow1): Likewise.
+       * vms-lib.c (vms_add_index): Likewise.
+       * wasm-module.c (wasm_scan_name_function_section): Likewise.
+       * libbfd.c (bfd_malloc2, bfd_realloc2, bfd_zmalloc2): Delete.
+       * opncls.c (bfd_alloc2, bfd_zalloc2): Delete.
+       * libbfd-in.h (bfd_malloc2, bfd_realloc2, bfd_zmalloc2),
+       (bfd_alloc2, bfd_zalloc2): Delete.
+       (_bfd_mul_overflow): Define.
        * libbfd.h: Regenerate.
 
-2019-09-02  Alan Modra  <amodra@gmail.com>
-
-       PR 11983
-       * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Free debug_filename
-       on success.  Tidy.
-       (read_alt_indirect_string): Likewise.
-       (read_alt_indirect_ref): Likewise.
-
-2019-08-31  Jim Wilson  <jimw@sifive.com>
-
-       PR 23825
-       * elfnn-riscv.c (riscv_elf_create_dynamic_sections): Add SEC_LOAD,
-       SEC_DATA, and SEC_HAS_CONTENTS to .tdata.dyn section.
-
-2019-08-30  Jim Wilson  <jimw@sifive.com>
-
-       * elfnn-riscv.c (riscv_elf_relocate_section): For unresolvable reloc
-       error, call bfd_set_error, set ret to FALSE, and goto out label.
-
-2019-08-30  H.J. Lu  <hongjiu.lu@intel.com>
-
-       PR ld/24951
-       * archive.c (_bfd_get_elt_at_filepos): Copy BFD_COMPRESS,
-       BFD_DECOMPRESS and BFD_COMPRESS_GABI flags for thin archive.
-
-2019-08-29  Alan Modra  <amodra@gmail.com>
-
-       PR 24697
-       * elf32-ppc.c (ppc_elf_check_relocs): Call bad_shared_reloc
-       when !bfd_link_executable for R_PPC_EMB_SDA2I16 and
-       R_PPC_EMB_SDA2REL.  Don't call bad_shared_reloc for any other
-       reloc.
-
-2019-08-29  Alan Modra  <amodra@gmail.com>
-
-       * elf64-ppc.c (xlate_pcrel_opt): Add poff parameter.  Allow offset
-       on second insn, return it in poff.
-       (ppc64_elf_relocate_section): Add offset to paddi addend for
-       PCREL_OPT.
-
-2019-08-28  Jim Wilson  <jimw@sifive.com>
-
-       * elfnn-riscv.c (_bfd_riscv_relax_lui): Add check to exclude abs
-       section when setting max_alignment.  Update comment.
-       (_bfd_riscv_relax_pc): Likewise.
-
-2019-08-29  Alan Modra  <amodra@gmail.com>
-
-       PR 24891
-       * bfd.c (struct bfd): Add no_element_cache.
-       * archive.c (_bfd_get_elt_at_filepos): Don't add element to
-       archive cache when no_element_cache.
-       (bfd_generic_archive_p): Set no_element_cache when opening first
-       element to check format.  Close first element too.
-       (do_slurp_bsd_armap): Don't zero ardata->cache here.
+2020-02-19  Alan Modra  <amodra@gmail.com>
+
+       * elf.c (bfd_section_from_shdr): Use bfd_zalloc rather than
+       bfd_zalloc2.
+       (assign_section_numbers): Likewise.
+       (elf_map_symbols): Likewise, and bfd_alloc rather than bfd_alloc2.
+       (_bfd_elf_map_sections_to_segments): Use bfd_malloc rather than
+       bfd_malloc2, size_t amt, and unsigned tls_count.
+       (rewrite_elf_program_header): Use bfd_malloc and size_t amt.
+       * elflink.c (elf_create_symbuf): Use bfd_malloc.
+       (elf_output_implib): Use bfd_alloc.
+
+2020-02-19  Alan Modra  <amodra@gmail.com>
+
+       * bfd.c (struct bfd): Move format and direction to other
+       bitfields.  Add "size".
+       * bfdio.c (bfd_get_size): Cache size when not writing file.
+       * opncls.c (bfd_get_debug_link_info_1): Allow for bfd_get_size
+       returning zero, ie. unknown.
+       (bfd_get_alt_debug_link_info): Likewise.
        * bfd-in2.h: Regenerate.
 
-2019-08-24  Alan Modra  <amodra@gmail.com>
-
-       * elf64-ppc.c (ppc64_elf_edit_toc): Exclude undefined weak
-       symbols from GOT optimisation.
-
-2019-08-23  Stafford Horne  <shorne@gmail.com>
-
-       * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Use correct value for
-       PLT GOT entries.
-
-2019-08-23  Nick Clifton  <nickc@redhat.com>
-
-       PR 24456
-       * elf.c (bfd_section_from_shdr): Issue an informative warning
-       message and continue processing other sections after encountering
-       a reloc section for a section which already has other relocs
-       associated with it.
-
-2019-08-23  Alan Modra  <amodra@gmail.com>
-
-       PR 24933
-       * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Don't exit
-       on error without freeing plts[] contents.
-
-2019-08-22  Dennis Zhang  <dennis.zhang@arm.com>
-
-       * cpu-arm.c: New entries for Cortex-M35P, Cortex-A77, Cortex-A76AE.
-
-2019-08-22  Nick Clifton  <nickc@redhat.com>
-
-       PR 24922
-       * pei-x86_64.c (pex64_xdata_print_uwd_codes): Add checks before
-       reading data from extra records.
-
-2019-08-22  Tamar Christina  <tamar.christina@arm.com>
-
-       PR ld/24601
-       * elfnn-aarch64.c (aarch64_relocate): Handle weak TLS and undefined TLS.
-       Also Pass input_bfd to _bfd_aarch64_elf_resolve_relocation.
-       * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Use it.
-       * elfxx-aarch64.h (_bfd_aarch64_elf_resolve_relocation): Emit warning
-       for weak TLS.
-
-2019-08-22  Alan Modra  <amodra@gmail.com>
-
-       * elf32-arm.c (cmse_scan): Don't use ARM_GET_SYM_CMSE_SPCL,
-       instead recognize CMSE_PREFIX in symbol name.
-       (elf32_arm_gc_mark_extra_sections): Likewise.
-       (elf32_arm_filter_cmse_symbols): Don't test ARM_GET_SYM_CMSE_SPCL.
-       (elf32_arm_swap_symbol_in): Don't invoke ARM_SET_SYM_CMSE_SPCL.
-
-2019-08-20  Dennis Zhang  <dennis.zhang@arm.com>
-
-       * cpu-aarch64.c: New entries for Cortex-A34, Cortex-A65,
-        Cortex-A77, cortex-A65AE, and Cortex-A76AE.
-
-2019-08-20  Tamar Christina  <tamar.christina@arm.com>
-
-       * elf32-arm.c (elf32_thumb2_plt_entry, elf32_arm_plt_thumb_stub,
-       elf32_arm_stub_long_branch_v4t_thumb_thumb,
-       elf32_arm_stub_long_branch_v4t_thumb_arm,
-       elf32_arm_stub_short_branch_v4t_thumb_arm,
-       elf32_arm_stub_long_branch_v4t_thumb_arm_pic,
-       elf32_arm_stub_long_branch_v4t_thumb_thumb_pic,
-       elf32_arm_stub_long_branch_v4t_thumb_tls_pic): Change nop to branch to
-       previous instruction.
-
-2019-08-19  Tom Tromey  <tromey@adacore.com>
-
-       * dwarf2.c (_bfd_dwarf2_find_symbol_bias): Create hash table
-       holding symbols.
-
-2019-08-19  Alan Modra  <amodra@gmail.com>
-
-       * elf64-ppc.c (struct ppc64_elf_obj_tdata): Rename has_gotrel
-       to has_optrel.
-       (struct _ppc64_elf_section_data): Likewise.
-       (ppc64_elf_check_relocs): Set has_optrel for more relocs.
-       (ppc64_elf_edit_toc): Do ha/lo insn checks in GOT loop rather
-       than TOC loop.  Check PLT16 insns too.
-
-2019-08-16  H.J. Lu  <hongjiu.lu@intel.com>
-
-       PR ld/24905
-       * elf64-x86-64.c (elf_x86_64_check_relocs): Move PIC check for
-       PC-relative relocations back to ...
-       (elf_x86_64_relocate_section): Here.
-
-2019-08-16  Martin Liska  <mliska@suse.cz>
-
-       PR ld/24912
-       * elflink.c: Report error only for not relocatable.
-       * linker.c (_bfd_generic_link_add_one_symbol): Do not handle
-       here lto_slim_object as it's handled in caller.
-
-2019-08-16  Alan Modra  <amodra@gmail.com>
-
-       * elf32-ppc.c (ppc_elf_relocate_section): Optimize unaligned relocs.
-
-2019-08-15  Jim Wilson  <jimw@sifive.com>
-
-       * elfnn-riscv.c (perform_relocation) <R_RISCV_RVC_LUI>: If
-       RISCV_CONST_HIGH_PART (value) is zero, then convert c.lui instruction
-       to c.li instruction, and use ENCODE_RVC_IMM to set value.
-
-2019-08-15  Tom Tromey  <tromey@adacore.com>
-
-       * dwarf2.c (scan_unit_for_symbols): Check for end of CU, not end
-       of section.
-
-2019-08-14  Alan Modra  <amodra@gmail.com>
-
-       PR 24623
-       * dwarf2.c (stash_comp_unit): New function, extracted from..
-       (_bfd_dwarf2_find_nearest_line): ..here.
-       (find_abstract_instance): Parse comp units and decode line info
-       as needed.
-
-2019-08-14  Alan Modra  <amodra@gmail.com>
-
-       * dwarf2.c (comp_unit_maybe_decode_line_info): Declare.
-       (comp_unit_find_nearest_line): Use it here..
-       (_bfd_dwarf2_find_symbol_bias): ..and here.
-
-2019-08-14  Alan Modra  <amodra@gmail.com>
-
-       * dwarf2.c (_bfd_dwarf2_find_nearest_line): Remove addr_size parameter.
-       * libbfd-in.h  (_bfd_dwarf2_find_nearest_line): Update prototype.
-       * coffgen.c (coff_find_nearest_line_with_names): Adjust
-       _bfd_dwarf2_find_nearest_line calls.
-       * elf.c (_bfd_elf_find_nearest_line, _bfd_elf_find_line): Likewise.
-       * elf32-arm.c (elf32_arm_find_nearest_line): Likewise.
-       * elf64-alpha.c (elf64_alpha_find_nearest_line): Likewise.
-       * elfnn-aarch64.c (elfNN_aarch64_find_nearest_line): Likewise.
-       * elfxx-mips.c (_bfd_mips_elf_find_nearest_line): Likewise.
-       * mach-o.c (bfd_mach_o_find_nearest_line): Likewise.
-       * libbfd.h: Regenerate.
-
-2019-08-09  Mihailo Stojanovic  <mihailo.stojanovic@rt-rk.com>
-
-       * elf-bfd.h (struct elf_backend_data): New members.
-       * elflink.c (_bfd_elf_link_create_dynamic_sections): Create
-       .gnu.hash section if necessary.
-       (struct collect_gnu_hash_codes): New member.
-       (elf_gnu_hash_process_symidx): New function name.
-       (elf_renumber_gnu_hash_syms): Ignore local and undefined
-       symbols. Record xlat location for every symbol which should have
-       a .MIPS.xhash entry.
-       (bfd_elf_size_dynamic_sections): Add DT_GNU_HASH dynamic tag to
-       dynamic section if necessary.
-       (GNU_HASH_SECTION_NAME): New define.
-       (bfd_elf_size_dynsym_hash_dynstr): Get .MIPS.xhash section.
-       Update the section size info.
-       * elfxx-mips.c (struct mips_elf_hash_sort_data): New members.
-       (struct mips_elf_link_hash_entry): New member.
-       (mips_elf_link_hash_newfunc): Initialize .MIPS.xhash translation
-       table location.
-       (mips_elf_sort_hash_table): Initialize the pointer to the
-       .MIPS.xhash section.
-       (mips_elf_sort_hash_table_f): Populate the .MIPS.xhash
-       translation table entry with the symbol dynindx.
-       (_bfd_mips_elf_section_from_shdr): Add SHT_MIPS_XHASH.
-       (_bfd_mips_elf_fake_sections): Initialize .MIPS.xhash section
-       info.
-       (_bfd_mips_elf_create_dynamic_sections): Create .MIPS.xhash
-       section.
-       (_bfd_mips_elf_size_dynamic_sections): Add DT_MIPS_XHASH tag to
-       dynamic section.
-       (_bfd_mips_elf_finish_synamic_sections): Add DT_MIPS_XHASH.
-       (_bfd_mips_elf_final_write_processing): Set .MIPS.xhash section
-       sh_link info.
-       (_bfd_mips_elf_get_target_dtag): Get DT_MIPS_XHASH tag.
-       (MIPS_LIBC_ABI_XHASH): New ABI version enum value.
-       (_bfd_mips_post_process_headers): Mark the ABI version as
-       MIPS_LIBC_ABI_XHASH if there exists a .MIPS.xhash section,
-       but not a .hash section.
-       (_bfd_mips_elf_record_xhash_symbol): New function. Record a
-       position in the translation table, associated with the hash
-       entry.
-       * elfxx-mips.h (literal_reloc_p): Define
-       elf_backend_record_xhash_symbol backend hook.
-       * elfxx-target.h: Initialize elf_backend_record_xhash_symbol
-       backend hook.
-
-2019-08-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
-
-       * elf64-bpf.c (bpf_elf_relocate_section): New function.
-       (bpf_elf_insn_disp_reloc): Delete function.
-       (elf_backend_relocate_section): Define.
-
-2019-08-07  Alan Modra  <amodra@gmail.com>
-
-       PR 24644
-       * archive64.c (_bfd_archive_64_bit_slurp_armap): Properly check
-       for overflow in expressions involving nsymz.
-
-2019-08-01  Ilia Diachkov  <ilia.diachkov@optimitech.com>
-
-       * elfnn-riscv.c (_bfd_riscv_relax_lui): Set lui relax safety area to
-       two pages in relro presence.
-
-2019-08-01  Max Filippov  <jcmvbkbc@gmail.com>
-
-       * elf32-xtensa.c (insn_num_slots, get_rsr_lend_opcode)
-       (get_wsr_lbeg_opcode): New functions.
-       (check_loop_aligned): Detect relaxed loops and adjust loop_len
-       and insn_len for the first actual instruction of the loop.
-
-2019-07-30  Alan Modra  <amodra@gmail.com>
-
-       PR 24768
-       * bfd.c (struct bfd): Add lto_slim_object flag.
-       * bfd-in2.h: Regenerate.
-
-2019-07-29  Martin Liska  <mliska@suse.cz>
-
-       PR 24768
-       * archive.c (_bfd_compute_and_write_armap): Come up with
-       report_plugin_err variable.
-       * bfd-in2.h (struct bfd): Add lto_slim_object flag.
-       * elf.c (struct lto_section): New.
-       (_bfd_elf_make_section_from_shdr): Parse content of
-       .gnu_lto_.lto section.
-       * elflink.c: Report error for a missing LTO plugin.
-       * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
-
-2019-07-28  Alan Modra  <amodra@gmail.com>
-
-       PR 24857
-       PR 24339
-       * elflink.c (elf_link_add_object_symbols): Report an informative
-       error on finding local symbols with index equal or greater than
-       symbol table sh_info.  Correct comment.  Allow such symbols in
-       dynamic objects.  Abort on NULL section for symbol.
-
-2019-07-26  Alan Modra  <amodra@gmail.com>
-
-       * elf-bfd.h (struct output_elf_obj_tdata): Delete "linker" field.
-       (elf_linker): Don't define.
-       * elflink.c (bfd_elf_final_link): Don't set elf_linker.
-
-2019-07-25  YunQiang Su  <syq@debian.org>
-
-       PR 24832
-       * elfxx-mips.c (mips_set_isa_flags): Default to MIPS 3 for 64-bit
-       mips inputs.
-
-2019-07-24  Claudiu Zissulescu  <claziss@synopsys.com>
-
-       * elf32-arc.c (bfd_get_32_me): Add a small description, fix
-       formating.
-       (reloc_type_to_name): Fix formating.
-       (arc_elf_object_p): Likewise.
-       (debug_arc_reloc): Likewise.
-       (arc_do_relocation): Likewise.
-
-2019-07-24  Claudiu Zissulescu  <claziss@synopsys.com>
-
-       * elf32-arc.c (bfd_get_32_me): New function.
-       (bfd_put_32_me): Likewise.
-       (arc_elf_relax_section): Likewise.
-       (bfd_elf32_bfd_relax_section): Define.
-
-2019-07-24  Alan Modra  <amodra@gmail.com>
-
-       * elf-bfd.h (struct elf_backend_data): Return bfd_boolean from
-       elf_backend_final_write_processing, don't pass linker arg.
-       (_bfd_elf_final_write_processing): Update prototype.
-       * elf.c (_bfd_elf_write_object_contents): Adjust call.
-       (_bfd_elf_final_write_processing): Return error on incompatible
-       OSABI and has_gnu_osabi.  Remove linker arg.
-       * elf-nacl.h (nacl_final_write_processing): Update prototype.
-       * elf-vxworks.h (elf_vxworks_final_write_processing): Likewise.
-       * elfxx-mips.h (_bfd_mips_final_write_processing): Likewise.
-       (_bfd_mips_elf_final_write_processing): Likewise.
-       * elf-hppa.h (elf_hppa_final_write_processing): Return status
-       and remove linker arg.
-       * elf-m10300.c (_bfd_mn10300_elf_final_write_processing): Likewise.
-       * elf-nacl.c (nacl_final_write_processing): Likewise.
-       * elf-vxworks.c (elf_vxworks_final_write_processing): Likewise.
-       * elf32-arc.c (arc_elf_final_write_processing): Likewise.
-       * elf32-arm.c (arm_final_write_processing): Likewise.
-       (elf32_arm_final_write_processing): Likewise.
-       (elf32_arm_nacl_final_write_processing): Likewise.
-       (elf32_arm_vxworks_final_write_processing): Likewise.
-       * elf32-avr.c (bfd_elf_avr_final_write_processing): Likewise.
-       * elf32-bfin.c (elf32_bfin_final_write_processing): Likewise.
-       * elf32-cr16.c (_bfd_cr16_elf_final_write_processing): Likewise.
-       * elf32-cris.c (cris_elf_final_write_processing): Likewise.
-       * elf32-h8300.c (elf32_h8_final_write_processing): Likewise.
-       * elf32-lm32.c (lm32_elf_final_write_processing): Likewise.
-       * elf32-m32r.c (m32r_elf_final_write_processing): Likewise.
-       * elf32-m68k.c (elf_m68k_final_write_processing): Likewise.
-       * elf32-mips.c (mips_vxworks_final_write_processing): Likewise.
-       * elf32-msp430.c (bfd_elf_msp430_final_write_processing): Likewise.
-       * elf32-nds32.c (nds32_elf_final_write_processing): Likewise.
-       * elf32-or1k.c (or1k_elf_final_write_processing): Likewise.
-       * elf32-pj.c (pj_elf_final_write_processing): Likewise.
-       * elf32-ppc.c (ppc_final_write_processing): Likewise.
-       (ppc_elf_final_write_processing): Likewise.
-       (ppc_elf_vxworks_final_write_processing): Likewise.
-       * elf32-sparc.c (sparc_final_write_processing): Likewise.
-       (elf32_sparc_final_write_processing): Likewise.
-       (elf32_sparc_vxworks_final_write_processing): Likewise.
-       * elf32-v850.c (v850_elf_final_write_processing): Likewise.
-       * elf32-xc16x.c (elf32_xc16x_final_write_processing): Likewise.
-       * elf32-xtensa.c (elf_xtensa_final_write_processing): Likewise.
-       * elf64-ia64-vms.c (elf64_vms_final_write_processing): Likewise.
-       * elfnn-ia64.c (elfNN_ia64_final_write_processing): Likewise.
-       * elfxx-mips.c (_bfd_mips_final_write_processing): Likewise.
-       (_bfd_mips_elf_final_write_processing): Likewise.
-
-2019-07-24  Alan Modra  <amodra@gmail.com>
-
-       * elf-vxworks.c (elf_vxworks_final_write_processing): Don't return
-       early.
-       * elf32-arc.c (arc_elf_final_write_processing): Likewise.
-       * elf32-xtensa.c (elf_xtensa_final_write_processing): Likewise.
-
-2019-07-24  Alan Modra  <amodra@gmail.com>
-
-       * elf32-visium.c (visium_elf_post_process_headers): Don't set
-       EI_OSABI header byte here.
-       (ELF_OSABI): Define.
-
-2019-07-23  Alan Modra  <amodra@gmail.com>
-
-       * elf-bfd.h (enum elf_gnu_osabi): Add elf_gnu_osabi_mbind.
-       * elf.c (_bfd_elf_make_section_from_shdr): Set elf_gnu_osabi_mbind.
-       (get_program_header_size): Formatting.  Only test SH_GNU_MBIND
-       when elf_gnu_osabi_mbind is set.
-       (_bfd_elf_map_sections_to_segments): Likewise.
-       (_bfd_elf_init_private_section_data): Likewise.
-       (_bfd_elf_final_write_processing): Update comment.
-       * elf64-hppa.c (elf64_hppa_special_sections): Move .tbss entry.
-       (elf_backend_special_sections): Define without .tbss for linux.
-
-2019-07-23  Alan Modra  <amodra@gmail.com>
-
-       * elf-bfd.h (enum elf_gnu_osabi): Rename from elf_gnu_symbols.
-       Remove none, any, all enums.
-       (struct elf_obj_tdata): Rename has_gnu_symbols field to has_gnu_osabi.
-       (_bfd_elf_final_write_processing): Declare.
-       * elf.c (_bfd_elf_write_object_contents): Unconditionally call
-       elf_backend_final_write_processing.
-       (_bfd_elf_post_process_headers): Move body of function to..
-       (_bfd_elf_final_write_processing): ..here, but set EI_OSABI byte
-       only when not already set.  Adjust for rename.
-       * elfxx-target.h (elf_backend_final_write_processing): Default to
-       _bfd_elf_final_write_processing.
-       * elf-hppa.h (elf_hppa_final_write_processing): Call
-       _bfd_elf_final_write_processing.
-       * elf-m10300.c (_bfd_mn10300_elf_final_write_processing): Likewise.
-       * elf-nacl.c (nacl_final_write_processing): Likewise.
-       * elf-vxworks.c (elf_vxworks_final_write_processing): Likewise.
-       * elf32-arc.c (arc_elf_final_write_processing): Likewise.
-       * elf32-avr.c (bfd_elf_avr_final_write_processing): Likewise.
-       * elf32-bfin.c (elf32_bfin_final_write_processing): Likewise.
-       * elf32-cr16.c (_bfd_cr16_elf_final_write_processing): Likewise.
-       * elf32-cris.c (cris_elf_final_write_processing): Likewise.
-       * elf32-h8300.c (elf32_h8_final_write_processing): Likewise.
-       * elf32-lm32.c (lm32_elf_final_write_processing): Likewise.
-       * elf32-m32r.c (m32r_elf_final_write_processing): Likewise.
-       * elf32-m68k.c (elf_m68k_final_write_processing): Likewise.
-       * elf32-msp430.c (bfd_elf_msp430_final_write_processing): Likewise.
-       * elf32-nds32.c (nds32_elf_final_write_processing): Likewise.
-       * elf32-or1k.c (or1k_elf_final_write_processing): Likewise.
-       * elf32-pj.c (pj_elf_final_write_processing): Likewise.
-       * elf32-v850.c (v850_elf_final_write_processing): Likewise.
-       * elf32-xc16x.c (elf32_xc16x_final_write_processing): Likewise.
-       * elf32-xtensa.c (elf_xtensa_final_write_processing): Likewise.
-       * elf64-ia64-vms.c (elf64_vms_final_write_processing): Likewise.
-       * elfnn-ia64.c (elfNN_ia64_final_write_processing): Likewise.
-       * elf32-arm.c (arm_final_write_processing): Split out from..
-       (elf32_arm_final_write_processing): ..here.  Call
-       _bfd_elf_final_write_processing.
-       (elf32_arm_nacl_final_write_processing): Adjust.
-       * elfxx-mips.c (_bfd_mips_final_write_processing): Split out from..
-       (_bfd_mips_elf_final_write_processing): ..here.  Call
-       _bfd_elf_final_write_processing.
-       * elfxx-mips.h (_bfd_mips_final_write_processing): Declare.
-       * elf32-mips.c (mips_vxworks_final_write_processing): Adjust.
-       * elf32-ppc.c (ppc_final_write_processing): Split out from..
-       (ppc_elf_final_write_processing): ..here.  Call
-       _bfd_elf_final_write_processing.
-       (ppc_elf_vxworks_final_write_processing): Adjust.
-       * elf32-sparc.c (sparc_final_write_processing): Split out from..
-       (elf32_sparc_final_write_processing): ..here.  Call
-       _bfd_elf_final_write_processing.
-       (elf32_sparc_vxworks_final_write_processing): Adjust.
-       * elf32-d10v.c (elf_backend_final_write_processing): Don't define.
-       * elf32-d30v.c (elf_backend_final_write_processing): Don't define.
-       * elf32-m68hc11.c (elf_backend_final_write_processing): Don't define.
-       * elf32-m68hc12.c (elf_backend_final_write_processing): Don't define.
-       * elf32-s12z.c (elf_backend_final_write_processing): Don't define.
-       * elf32-i386.c (elf_i386_check_relocs): Don't set has_gnu_symbols.
+2020-02-19  Alan Modra  <amodra@gmail.com>
+
+       * coffgen.c (_bfd_coff_get_external_symbols): Don't call
+       bfd_get_file_size twice.
+       (_bfd_coff_read_string_table): Allow for bfd_get_file_size
+       zero, ie. unknown, return.
+       * elf-attrs.c (_bfd_elf_parse_attributes): Likewise.
+       * elfcode.h (elf_swap_shdr_in): Likewise.
+       (elf_object_p): Don't call bfd_get_file_size twice and correct
+       file size check.
+
+2020-02-19  Alan Modra  <amodra@gmail.com>
+
+       * mach-o.c (bfd_mach_o_flatten_sections): Return a bfd_boolean,
+       FALSE if memory alloc fails.  Adjust calls.
+       * som.c (som_prep_for_fixups): Likewise.
+       * vms-alpha.c (alpha_vms_add_fixup_lp, alpha_vms_add_fixup_ca),
+       (alpha_vms_add_fixup_qr, alpha_vms_add_fixup_lr),
+       (alpha_vms_add_lw_reloc, alpha_vms_add_qw_reloc): Likewise.
+       * som.c (som_build_and_write_symbol_table): Return via error_return
+       on seek failure.
+       * vms-alpha.c (VEC_APPEND): Adjust for vector_grow1 changes.
+       (VEC_APPEND_EL): Delete.
+       (vector_grow1): Return pointer to element.  Catch overflow.
+       Return NULL on memory allocation failure.
+       (alpha_vms_add_fixup_lp): Replace VEC_APPEND_EL with VEC_APPEND.
+       (alpha_vms_add_fixup_ca): Likewise.
+       (alpha_vms_link_add_object_symbols): Check VEC_APPEND result
+       before using.
+       * elf.c (bfd_section_from_shdr): Check bfd_zalloc2 result.
+
+2020-02-19  Alan Modra  <amodra@gmail.com>
+
+       * aix386-core.c (aix386_core_file_p): Use size_t for "amt".
+       * aout-target.h (object_p): Likewise.
+       * aout-tic30.c (tic30_aout_object_p): Likewise.
+       * aoutx.h (some_aout_object_p, mkobject, make_empty_symbol),
+       (emit_stringtab, write_syms, link_hash_table_create),
+       (aout_link_write_other_symbol): Likewise.
+       * archive.c (_bfd_generic_mkarchive, bfd_generic_archive_p),
+       (bfd_ar_hdr_from_filesystem, _bfd_write_archive_contents),
+       (_bfd_compute_and_write_armap): Likewise.
+       * archures.c (bfd_arch_list): Likewise.
+       * bfd.c (bfd_record_phdr): Likewise.
+       * binary.c (binary_canonicalize_symtab): Likewise.
+       * cisco-core.c (cisco_core_file_validate): Likewise.
+       * coff-arm.c (coff_arm_link_hash_table_create, find_thumb_glue),
+       (find_arm_glue, record_arm_to_thumb_glue),
+       (record_thumb_to_arm_glue): Likewise.
+       * coff-ppc.c (ppc_coff_link_hash_table_create, record_toc),
+       (ppc_allocate_toc_section): Likewise.
+       * coff-rs6000.c (_bfd_xcoff_mkobject, _bfd_xcoff_archive_p): Likewise.
+       * coff-sh.c (sh_relax_section): Likewise.
+       * coff64-rs6000.c (xcoff64_archive_p): Likewise.
+       * coffcode.h (handle_COMDAT, coff_new_section_hook),
+       (coff_set_alignment_hook, coff_mkobject),
+       (coff_compute_section_file_positions): Likewise.
+       * coffgen.c (coff_make_empty_symbol, coff_bfd_make_debug_symbol),
+       (coff_find_nearest_line_with_names),
+       ( bfd_coff_set_symbol_class): Likewise.
+       * cofflink.c (_bfd_coff_link_hash_table_create),
+       (_bfd_coff_link_input_bfd): Likewise.
+       * dwarf1.c (alloc_dwarf1_unit, alloc_dwarf1_func): Likewise.
+       * dwarf2.c (read_abbrevs, read_attribute_value, add_line_info),
+       (build_line_info_table, sort_line_sequences),
+       (line_info_add_include_dir, line_info_add_file_name),
+       (decode_line_info, scan_unit_for_symbols, parse_comp_unit),
+       (place_sections, _bfd_dwarf2_slurp_debug_info): Likewise.
+       * ecoff.c (_bfd_ecoff_mkobject, _bfd_ecoff_make_empty_symbol),
+       (_bfd_ecoff_find_nearest_line),
+       (_bfd_ecoff_bfd_link_hash_table_create): Likewise.
+       * ecofflink.c (bfd_ecoff_debug_init): Likewise.
+       * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Likewise.
+       * elf-m10300.c (mn10300_elf_relax_section),
+       (elf32_mn10300_link_hash_table_create): Likewise.
+       * elf-strtab.c (_bfd_elf_strtab_init): Likewise.
+       * elf.c (make_mapping, copy_elf_program_header): Likewise.
+       * elf32-arm.c (elf32_arm_link_hash_table_create),
+       (elf32_arm_setup_section_lists, elf32_arm_check_relocs),
+       (elf32_arm_new_section_hook): Likewise.
+       * elf32-avr.c (elf_avr_new_section_hook),
+       (elf32_avr_link_hash_table_create, get_local_syms),
+       (elf32_avr_setup_section_lists): Likewise.
+       * elf32-bfin.c (bfinfdpic_elf_link_hash_table_create),
+       (bfin_link_hash_table_create): Likewise.
+       * elf32-cr16.c (elf32_cr16_link_hash_table_create): Likewise.
+       * elf32-cris.c (elf_cris_link_hash_table_create): Likewise.
+       * elf32-csky.c (csky_elf_link_hash_table_create),
+       (csky_elf_check_relocs, elf32_csky_setup_section_lists): Likewise.
+       * elf32-frv.c (frvfdpic_elf_link_hash_table_create): Likewise.
+       * elf32-hppa.c (elf32_hppa_link_hash_table_create),
+       (elf32_hppa_setup_section_lists, get_local_syms): Likewise.
+       * elf32-i386.c (elf_i386_check_relocs): Likewise.
+       * elf32-lm32.c (lm32_elf_link_hash_table_create): Likewise.
+       * elf32-m32r.c (m32r_elf_link_hash_table_create),
+       (m32r_elf_check_relocs): Likewise.
+       * elf32-m68hc1x.c (m68hc11_elf_hash_table_create),
+       (elf32_m68hc11_setup_section_lists),
+       (elf32_m68hc11_size_stubs): Likewise.
+       * elf32-m68k.c (elf_m68k_link_hash_table_create): Likewise.
+       * elf32-metag.c (elf_metag_link_hash_table_create),
+       (elf_metag_setup_section_lists): Likewise.
+       * elf32-microblaze.c (microblaze_elf_link_hash_table_create),
+       (microblaze_elf_check_relocs): Likewise.
+       * elf32-nds32.c (nds32_elf_link_hash_table_create),
+       (nds32_elf_check_relocs): Likewise.
+       * elf32-nios2.c (nios2_elf32_setup_section_lists),
+       (get_local_syms, nios2_elf32_check_relocs),
+       (nios2_elf32_link_hash_table_create): Likewise.
+       * elf32-or1k.c (or1k_elf_link_hash_table_create),
+       (or1k_elf_check_relocs): Likewise.
+       * elf32-ppc.c (ppc_elf_modify_segment_map, update_plt_info): Likewise.
+       * elf32-pru.c (pru_elf32_link_hash_table_create): Likewise.
+       * elf32-s390.c (elf_s390_link_hash_table_create),
+       (elf_s390_check_relocs): Likewise.
+       * elf32-score.c (score_elf_create_got_section),
+       (s3_elf32_score_new_section_hook),
+       (elf32_score_link_hash_table_create): Likewise.
+       * elf32-score7.c (score_elf_create_got_section),
+       (s7_elf32_score_new_section_hook): Likewise.
+       * elf32-sh.c (sh_elf_link_hash_table_create),
+       (sh_elf_check_relocs): Likewise.
+       * elf32-tic6x.c (elf32_tic6x_link_hash_table_create),
+       (elf32_tic6x_new_section_hook, elf32_tic6x_check_relocs): Likewise.
+       * elf32-tilepro.c (tilepro_elf_link_hash_table_create),
+       (tilepro_elf_check_relocs): Likewise.
+       * elf32-v850.c (remember_hi16s_reloc): Likewise.
+       * elf32-vax.c (elf_vax_link_hash_table_create): Likewise.
+       * elf32-xtensa.c (elf_xtensa_link_hash_table_create),
+       (elf_xtensa_new_section_hook): Likewise.
+       * elf64-alpha.c (elf64_alpha_bfd_link_hash_table_create),
+       (get_got_entry, elf64_alpha_check_relocs): Likewise.
+       * elf64-hppa.c (elf64_hppa_hash_table_create): Likewise.
+       * elf64-ia64-vms.c (elf64_ia64_object_p): Likewise.
+       * elf64-mmix.c (mmix_elf_new_section_hook): Likewise.
+       * elf64-ppc.c (ppc64_elf_new_section_hook),
+       (ppc64_elf_link_hash_table_create, update_local_sym_info),
+       (update_plt_info, ppc64_elf_check_relocs): Likewise.
+       * elf64-s390.c (elf_s390_link_hash_table_create),
+       (elf_s390_check_relocs): Likewise.
        * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
-       * elflink.c (elf_link_add_object_symbols): Likewise.
-       (elf_link_output_symstrtab): Set has_gnu_osabi for symbols here
-       instead.
-
-2019-07-23  Omar Majid  <omajid@redhat.com>
-
-       * coffcode.h (coff_set_arch_mach_hook): Handle I386_APPLE_MAGIC,
-       I386_FREEBSD_MAGIC, I386_LINUX_MAGIC, I386_NETBSD_MAGIC,
-       AMD64_APPLE_MAGIC, AMD64_FREEBSD_MAGIC, AMD64_LINUX_MAGIC,
-       AMD64_NETBSD_MAGIC.
-       * peXXigen.c: Add comment about source of .NET magic numbers.
-
-2019-07-19  Alan Modra  <amodra@gmail.com>
-
-       * reloc.c (BFD_RELOC_PPC64_TPREL34, BFD_RELOC_PPC64_DTPREL34),
-       (BFD_RELOC_PPC64_GOT_TLSGD34, BFD_RELOC_PPC64_GOT_TLSLD34),
-       (BFD_RELOC_PPC64_GOT_TPREL34, BFD_RELOC_PPC64_GOT_DTPREL34),
-       (BFD_RELOC_PPC64_TLS_PCREL): New pcrel tls relocs.
-       * elf64-ppc.c (ppc64_elf_howto_raw): Add howtos for pcrel tls relocs.
-       (ppc64_elf_reloc_type_lookup): Translate pcrel tls relocs.
-       (must_be_dyn_reloc, dec_dynrel_count): Add R_PPC64_TPREL64.
-       (ppc64_elf_check_relocs): Support pcrel tls relocs.
-       (ppc64_elf_tls_optimize, ppc64_elf_relocate_section): Likewise.
+       * elflink.c (bfd_elf_link_record_local_dynamic_symbol),
+       (_bfd_elf_link_find_version_dependencies, elf_link_add_object_symbols),
+       (elf_link_add_archive_symbols, compute_bucket_count),
+       (bfd_elf_size_dynsym_hash_dynstr, _bfd_elf_link_hash_table_create),
+       (bfd_elf_get_bfd_needed_list, elf_link_swap_symbols_out),
+       (bfd_elf_final_link): Likewise.
+       * elfnn-aarch64.c (elfNN_aarch64_link_hash_table_create),
+       (elfNN_aarch64_setup_section_lists, elfNN_aarch64_check_relocs),
+       (elfNN_aarch64_new_section_hook): Likewise.
+       * elfnn-ia64.c (elfNN_ia64_object_p): Likewise.
+       * elfnn-riscv.c (riscv_elf_link_hash_table_create),
+       (riscv_elf_check_relocs): Likewise.
+       * elfxx-mips.c (_bfd_mips_elf_new_section_hook),
+       (_bfd_mips_elf_add_symbol_hook, _bfd_mips_elf_check_relocs),
+       (_bfd_mips_elf_modify_segment_map, _bfd_mips_elf_set_section_contents),
+       (_bfd_mips_elf_link_hash_table_create): Likewise.
+       * elfxx-sparc.c (_bfd_sparc_elf_link_hash_table_create),
+       (_bfd_sparc_elf_check_relocs),
+       (_bfd_sparc_elf_new_section_hook): Likewise.
+       * elfxx-tilegx.c (tilegx_elf_link_hash_table_create),
+       (tilegx_elf_check_relocs): Likewise.
+       * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Likewise.
+       * format.c (bfd_check_format_matches): Likewise.
+       * hash.c (_bfd_stringtab_init): Likewise.
+       * ihex.c (ihex_scan): Likewise.
+       * irix-core.c (irix_core_core_file_p): Likewise.
+       * linker.c (bfd_wrapped_link_hash_lookup),
+       (_bfd_generic_link_hash_table_create),
+       (_bfd_generic_reloc_link_order): Likewise.
+       * lynx-core.c (lynx_core_file_p): Likewise.
+       * netbsd-core.c (netbsd_core_file_p): Likewise.
+       * osf-core.c (osf_core_core_file_p): Likewise.
+       * pdp11.c (some_aout_object_p, mkobject, make_empty_symbol),
+       (link_hash_table_create, aout_link_write_other_symbol): Likewise.
+       * peXXigen.c (_bfd_XX_bfd_copy_private_section_data): Likewise.
+       * peicode.h (pe_mkobject): Likewise.
+       * ppcboot.c (ppcboot_mkobject, ppcboot_canonicalize_symtab): Likewise.
+       * ptrace-core.c (ptrace_unix_core_file_p): Likewise.
+       * sco5-core.c (read_uarea): Likewise.
+       * som.c (hppa_som_gen_reloc_type, som_object_p, som_prep_headers),
+       (som_write_fixups, som_write_space_strings, som_write_symbol_strings),
+       (som_finish_writing, som_canonicalize_symtab, som_new_section_hook),
+       (som_bfd_copy_private_section_data, bfd_som_set_section_attributes),
+       (bfd_som_attach_aux_hdr, som_write_armap): Likewise.
+       * srec.c (srec_scan): Likewise.
+       * syms.c (_bfd_generic_make_empty_symbol): Likewise.
+       * targets.c (bfd_target_list): Likewise.
+       * tekhex.c (first_phase, tekhex_sizeof_headers): Likewise.
+       * trad-core.c (trad_unix_core_file_p): Likewise.
+       * vms-alpha.c (vms_initialize, alpha_vms_bfd_link_hash_table_create),
+       (vms_new_section_hook): Likewise.
+       * wasm-module.c (wasm_make_empty_symbol): Likewise.
+       * xcofflink.c (xcoff_get_section_contents),
+       (_bfd_xcoff_bfd_link_hash_table_create, xcoff_set_import_path),
+       (xcoff_find_function, bfd_xcoff_link_record_set, xcoff_build_ldsym),
+       (bfd_xcoff_size_dynamic_sections, xcoff_link_input_bfd): Likewise.
+
+2020-02-19  Alan Modra  <amodra@gmail.com>
+
+       * elfxx-riscv.c (riscv_multi_letter_ext_valid_p): Don't use C99.
+
+2020-02-13  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * plugin.c (try_load_plugin): Make plugin_list_iter an argument
+       and use it if it isn't NULL.  Remove has_plugin_p argument.  Add
+       a build_list_p argument.  Don't search plugin_list.  Short circuit
+       when building the plugin list.
+       (has_plugin): Renamed to has_plugin_list.
+       (bfd_plugin_set_plugin): Don't set has_plugin.
+       (bfd_plugin_specified_p): Check plugin_list instead.
+       (build_plugin_list): New function.
+       (load_plugin): Call build_plugin_list and use plugin_list.
+
+2020-02-11  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR binutils/25355
+       * plugin.c (try_claim): Always clean up for LTO wrapper.
+       (try_load_plugin): Treat each object as independent.  Create a
+       copy for plugin name.
+
+2020-02-11  Nick Clifton  <nickc@redhat.com>
+
+       * elf32-msp430.c (msp430_final_link_relocate): Always use longs
+       for addresses in print statements.
+       (msp430_elf_relax_delete_bytes): Likewise.
+       (msp430_elf_relax_add_words): Likewise.
+       (msp430_elf_relax_section): Likewise.
+
+2020-02-11  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * plugin.c (add_symbols): Clear plugin_data memory.
+
+2020-02-10  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR binutils/25355
+       * configure.ac (HAVE_EXECUTABLE_SUFFIX): New AC_DEFINE.
+       (EXECUTABLE_SUFFIX): Likewise.
+       * config.in: Regenerated.
+       * configure: Likewise.
+       * plugin.c (bfd_plugin_close_and_cleanup): Removed.
+       (plugin_list_entry): Add all_symbols_read, cleanup_handler,
+       gcc, lto_wrapper, resolution_file, resolution_option, gcc_env,
+       real_bfd, real_nsyms, real_syms, lto_nsyms and lto_syms.
+       (get_lto_wrapper): New.
+       (setup_lto_wrapper_env): Likewise.
+       (current_plugin): Likewise.
+       (register_all_symbols_read): Likewise.
+       (register_cleanup): Likewise.
+       (get_symbols): Likewise.
+       (add_input_file): Likewise.
+       (bfd_plugin_close_and_cleanup): Likewise.
+       (claim_file): Removed.
+       (register_claim_file): Set current_plugin->claim_file.
+       (add_symbols): Make a copy of LTO symbols.  Set lto_nsyms and
+       lto_syms in current_plugin.
+       (try_claim): Use current_plugin->claim_file.  Call LTO plugin
+       all_symbols_read handler.  Copy real symbols to plugin_data.
+       Call LTO plugin cleanup handler.  Clean up for LTO wrapper.
+       (try_load_plugin): Don't reuse the previous plugin for LTO
+       wrapper.  Set up GCC LTO wrapper if possible.  Don't set
+       plugin_list_iter->claim_file.
+       (bfd_plugin_canonicalize_symtab): Use real LTO symbols if
+       possible.
+       * plugin.h (plugin_data_struct): Add real_bfd, real_nsyms and
+       real_syms.
+
+2020-02-10  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
+
+       * elf32-msp430.c (msp430_elf_relax_section): Before relaxing a branch,
+       check if previous instruction matches a conditional jump inserted
+       earlier. Invert conditional jump and delete branch in this case.
+
+2020-02-10  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
+
+       * elf32-msp430.c (msp430_elf_relax_add_two_words): Rename to
+       msp430_elf_relax_add_words. Support insertion of either one or two
+       words.
+       (msp430_elf_relax_section): Catch opcode of 0x3c00 when relocation
+       needs to be grown. Handle insertion of branch instruction to replace
+       jump.
+
+2020-02-10  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
+
+       * elf32-msp430.c (msp430_final_link_relocate): Add printf statements for
+       debugging relocations.
+       (msp430_elf_relax_delete_bytes): Likewise.
+       (msp430_elf_relax_add_two_words): Likewise.
+       (msp430_elf_relax_section): Likewise.
+
+2020-02-10  Alan Modra  <amodra@gmail.com>
+
+       * archures.c: Wrap overlong z80 comments.
        * bfd-in2.h: Regenerate.
-       * libbfd.h: Regenerate.
-
-2019-07-18  Alan Modra  <amodra@gmail.com>
-
-       * elf64-ppc.c (ppc64_elf_relocate_section): Don't bother selecting
-       a TLS section symbol for edited relocs.  Tighten TLS symbol/reloc
-       match test.
-
-2019-07-18  Alan Modra  <amodra@gmail.com>
-
-       * elf64-ppc.c (TLS_EXPLICIT): Define as 256.
-       (ppc64_elf_check_relocs): Don't store TLS_EXPLICIT even if char
-       is more than 8 bits.
-       (ppc64_elf_tls_optimize): Likewise.  Make tls_set, tls_clear, and
-       tls_type vars unsigned int.
-       (ppc64_elf_relocate_section): Use r_type rather than TLS_EXPLICIT
-       to select r_type edit.
-
-2019-07-18  Alan Modra  <amodra@gmail.com>
 
-       * elf32-ppc.c (TLS_GDIE): Rename from TLS_TPRELGD throughout file.
-       Correct comment.
-       * elf64-ppc.c (TLS_GDIE): Likewise.
+2020-02-07  Sergey Belyashov  <sergey.belyashov@gmail.com>
 
-2019-07-18  Alan Modra  <amodra@gmail.com>
-
-       * elf64-ppc.c (ppc64_elf_tls_optimize): Correct test for allowed
-       range of tp-relative offsets.
-
-2019-07-15  Alan Modra  <amodra@gmail.com>
-
-       * elflink.c (_bfd_elf_fix_symbol_flags): If the def for an
-       alias is no longer bfd_link_hash_defined, clear the alias.
-
-2019-07-13  Alan Modra  <amodra@gmail.com>
-
-       * elflink.c (_bfd_elf_omit_section_dynsym_default): Don't keep
-       tls_sec.
-       (_bfd_elf_init_1_index_section): Prefer not using TLS sections.
-       (_bfd_elf_init_2_index_sections): Likewise.
-       * elf64-ppc.c (ppc64_elf_relocate_section): When emitting dynamic
-       relocations for local TLS symbols, use STN_UNDEF as the relocation
-       symbol.
-       * elf32-ppc.c (ppc_elf_relocate_section): Likewise, and don't
-       leave TLS symbol value in the addend.
-
-2019-07-08  Alan Modra  <amodra@gmail.com>
-
-       PR 24785
-       * elf32-ppc.c (_bfd_elf_ppc_set_arch): Sanity check .PPC.EMB.apuinfo
-       size before reading first word.
-
-2019-07-02  Nick Clifton  <nickc@redhat.com>
-
-       PR 24717
-       * elf.c (is_debuginfo_file): New function.
-       (assign_file_positions_for_non_load_sections): Do not warn about
-       allocated sections outside of loadable segments if they are found
-       in a debuginfo file.
-       * elf-bfd.h (is_debuginfo_file): Prototype.
+       PR 25469
+       * archures.c: Add GBZ80 and Z80N machine values.
+       * reloc.c: Add BFD_RELOC_Z80_16_BE.
+       * coff-z80.c: Add support for new reloc.
+       * coffcode.h: Add support for new machine values.
+       * cpu-z80.c: Add support for new machine names.
+       * elf32-z80.c: Add support for new reloc.
+       * bfd-in2.h: Regenerate.
+       * libbfd.h: Regenerate.
 
-2019-07-02  Nick Clifton  <nickc@redhat.com>
+2020-02-07  Nick Clifton  <nickc@redhat.com>
 
-       PR 24753
-       * compress.c (bfd_get_full_section_contents): Do not complain
-       about linker created sections that are larger than the file size.
+       PR 23932
+       * elf.c (rewrite_elf_program_header): Do not complain if no
+       sections are mapped to a segment.
 
-2019-07-02  Christophe Lyon  <christophe.lyon@linaro.org>
+2020-02-06  H.J. Lu  <hongjiu.lu@intel.com>
 
-       * bfd/elf32-arm.c (CMSE_STUB_NAME): New define.
-       (elf32_arm_get_stub_entry): Do not try to emit long-branch stubs
-       for CMSE stubs.
-       (arm_dedicated_stub_output_section_name): Use CMSE_STUB_NAME.
+       PR ld/25490
+       * elflink.c (_bfd_elf_gc_mark_extra_sections): Issue an error
+       for garbage collection on __patchable_function_entries section
+       without linked-to section.
 
-2019-07-02  Srinath Parvathaneni  <srinath.parvathaneni@arm.com>
+2020-02-06  H.J. Lu  <hongjiu.lu@intel.com>
 
-       * elf32-arm.c (elf32_arm_gc_mark_extra_sections): Mark debug
-       sections when .text section contain secure entry functions
-       is marked.
+       PR gas/25381
+       * bfd-in2.h: Regenerated.
+       * elflink.c (_bfd_elf_gc_mark_extra_sections): Call mark_hook
+       on section if gc_mark of any of its linked-to sections is set
+       and don't set gc_mark again.
+       * section.c (asection): Add linked_to_symbol_name to map_head
+       union.
 
-2019-07-01  Nick Clifton  <nickc@redhat.com>
+2020-02-06  Maciej W. Rozycki  <macro@wdc.com>
 
-       PR 23839
-       * elf32-arm.c (elf32_arm_update_relocs): Do not include the
-       section VMA in the offset used to update exidx relocs.
+       * elf32-v850.c (v850_elf_relax_section): Fix the index used for
+       reporting an unrecognized instruction with R_V850_LONGJUMP.
 
-2019-06-28  Nick Clifton  <nickc@redhat.com>
+2020-02-05  Alan Modra  <amodra@gmail.com>
 
-       PR 24708
-       * elf.c (_bfd_elf_slurp_version_tables): Check for an excessively
-       large version reference section.
-       * compress.c (bfd_get_full_section_contents): Check for an
-       uncompressed section whose size is larger than the file size.
+       * elf64-ppc.c (ppc_stub_plt_branch): Match comment with reality.
 
-2019-06-28  Alan Modra  <amodra@gmail.com>
+2020-02-04  Alan Modra  <amodra@gmail.com>
 
-       * format.c (bfd_check_format_matches): Don't match plugin target
-       if another target matches.  Expand comment.
-       * targets.c (_bfd_target_vector): Move plugin_vec after all other
-       non-corefile targets, outside !SELECT_VECS.
-       * config.bfd: Don't handle targ=plugin here.
-       * configure.ac: Don't add plugin to enable_targets or handle in
-       target loop setting selvecs and other target vars.
-       * configure: Regenerate.
+       * elf32-ppc.c (ppc_elf_relocate_section): After applying
+       R_PPC_VLE_ADDR20, goto copy_reloc.
 
-2019-06-26  Nick Clifton  <nickc@redhat.com>
+2020-02-02  H.J. Lu  <hongjiu.lu@intel.com>
 
-       PR 24703
-       * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add error
-       messages for failures.
-       * mach-o.c (bfd_mach_o_canonicalize_relocs): Set an bfd error code
-       if returning an error value.
+       * bfd-in2.h: Regenerated.
+       * section.c (SEC_ASSEMBLER_SECTION_ID): Fix a typo in comments.
 
-2019-06-25  Jan Beulich  <jbeulich@suse.com>
+2020-02-02  H.J. Lu  <hongjiu.lu@intel.com>
 
-       * elf-properties.c (elf_find_and_remove_property): Rename last
-       parameter. Mention it in comment.
+       PR gas/25380
+       * bfd-in2.h: Regenerated.
+       * ecoff.c (bfd_debug_section): Add section_id.
+       * section.c (bfd_section): Add section_id.
+       (SEC_ASSEMBLER_SECTION_ID): New.
+       (BFD_FAKE_SECTION): Add section_id.
 
-2019-06-24  Ilia Diachkov  <ilia.diachkov@optimitech.com>
+2020-02-01  Nick Clifton  <nickc@redhat.com>
 
-       * elfnn-riscv.c (_bfd_riscv_relax_lui): Delete early exit when
-       SEC_MERGE or SEC_CODE flags are set.
-       (_bfd_riscv_relax_section): New local symtype.  Set sym_sec and
-       symtype consistently.  Don't include sec_addr (sym_sec) in symval.
-       Add check for SEC_INFO_TYPE_MERGE and call _bfd_merged_section_offset.
-       Add sec_addr (sym_sec) after handling merge sections.
+       * config.bfd: Move the c30-aout and tic30-aout targets onto the
+       obsolete list.
 
-2019-06-24  H.J. Lu  <hongjiu.lu@intel.com>
+2020-01-31  Sandra Loosemore  <sandra@codesourcery.com>
 
-       PR ld/24721
-       * elf-properties.c (elf_merge_gnu_property_list): Remove the
-       property after reporting property removal.
+       * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): DW_EH_PE_datarel
+       encodings are relative to the GOT on nios2, too.
 
-2019-06-23  Alan Modra  <amodra@gmail.com>
+2020-01-31  Alan Modra  <amodra@gmail.com>
 
-       PR 24704
-       * elf64-ppc.c (R_PPC64_GOT16_DS): Don't set has_gotrel.
-       (ppc64_elf_edit_toc): Don't remove R_PPC64_GOT16_DS got entries.
-       Reduce range of offsets allowed for other GOT relocs.
+       * Makefile.am (elf32-target.h, elf64-target.h): Don't use a temp
+       file.  Use $< and $@ in rules.
+       (elf32-aarch64.c, elf64-aarch64.c): Likewise.
+       (elf32-ia64.c, elf64-ia64.c): Likewise.
+       (elf32-riscv.c, elf64-riscv.c): Likewise.
+       (peigen.c, pepigen.c, pex64igen.c): Likewise.
+       (elf32-aarch64.c, elf64-aarch64.c): Don't emit $srcdir on #line.
+       (elf32-riscv.c, elf64-riscv.c): Likewise, and use $(SED).
+       (elf32-ia64.c, elf64-ia64.c): Do emit #line.
+       (peigen.c, pepigen.c, pex64igen.c): Likewise.
+       * Makefile.in: Regenerate.
 
-2019-06-23  Alan Modra  <amodra@gmail.com>
+2020-01-31  Alan Modra  <amodra@gmail.com>
 
-       PR 24689
-       * elfcode.h (elf_object_p): Warning fix.
+       PR 4110
+       * elf.c (setup_group): Don't clear entire section contents,
+       just the padding after group flags.  Release alloc'd memory
+       after a seek or read failure.
 
-2019-06-21  Alan Modra  <amodra@gmail.com>
+2020-01-16  Jon Turney  <jon.turney@dronecode.org.uk>
 
-       PR 24689
-       * elfcode.h (elf_object_p): Check type of e_shstrndx section.
+       * peXXigen.c (pe_is_repro): New function.
+       (_bfd_XX_print_private_bfd_data_common): Note timestamp is
+       actually a build hash if PE_IMAGE_DEBUG_TYPE_REPRO is present.
 
-2019-06-19  Alan Modra  <amodra@gmail.com>
+2020-01-16  Jon Turney  <jon.turney@dronecode.org.uk>
 
-       PR 24697
-       * elf32-ppc.c (ppc_elf_relocate_section): Don't read insn for
-       R_PPC_EMB_RELSDA.  Mask low bit of R_PPC_EMB_SDA21 r_offset.
+       * peXXigen.c (debug_type_names): Add names for new debug data type
+       values.
 
-2019-06-19  Alan Modra  <amodra@gmail.com>
+2020-01-16  Jon Turney  <jon.turney@dronecode.org.uk>
 
-       * elf64-ppc.c (ppc64_elf_inline_plt): Correct st_other test for
-       functions that require r2 valid to use local entry.
-       (ppc64_elf_size_stubs, ppc64_elf_relocate_section): Likewise.
+       * peXXigen.c (pe_print_debugdata): Fix the iteration variable for
+       inner loop.  Fix a memory leak.
 
-2019-06-17  Szabolcs Nagy  <szabolcs.nagy@arm.com>
+2020-01-30  Alan Modra  <amodra@gmail.com>
 
-       * elfnn-aarch64.c (elfNN_aarch64_allocate_local_dynrelocs): Remove.
-       (elfNN_aarch64_size_dynamic_sections): Remove loc_hash_table traversal
-       with elfNN_aarch64_allocate_local_dynrelocs.
+       * coffgen.c (coff_real_object_p): Don't clear obj_coff_keep_syms
+       or obj_coff_keep_strings here.
+       (coff_get_normalized_symtab): Free external syms directly.
+       * xcofflink.c (xcoff_link_input_bfd): Restore obj_coff_keep_syms
+       on error exit path.
 
-2019-06-14  Szabolcs Nagy  <szabolcs.nagy@arm.com>
+2020-01-27  Jim Wilson  <jimw@sifive.com>
 
-       * elfnn-aarch64.c: Enable MOVW_PREL relocs for ELF32.
+       * cpu-riscv.c (riscv_scan): New.
+       (N): Change bfd_default_scan to riscv_scan.
 
-2019-06-14  Alan Modra  <amodra@gmail.com>
+2020-01-27  Andreas Schwab  <schwab@suse.de>
 
+       * Makefile.am (ALL_MACHINES): Remove cpu-plugin.lo.
+       (ALL_MACHINES_CFILES): Remove cpu-plugin.c.
        * Makefile.in: Regenerate.
-       * configure: Regenerate.
-
-2019-06-14  Alan Modra  <amodra@gmail.com>
-
-       * elf64-ppc.c: Fix comments involving paddi.
-
-2019-06-12  Adam Lackorzymski  <adam@os.inf.tu-dresden.de>
-
-       PR 24643
-       * elf32-arm.c (arm_elf_find_function): Fail if the symol table is
-       absent, or the bfd is not in the ELF formart.
-       * elfnn-aarch64.c (aarch64_elf_find_function): Likewise.
-
-2019-06-10  Christos Zoulas  <christos@zoulas.com>
-
-       PR 24650
-       * elf.c (elfcore_make_auxv_note_section): New function.
-       (elfcore_grok_note): Use it.
-       (elfcore_grok_freebsd_note): Likewise.
-       (elfcore_grok_openbsd_note): Likewise.
-       (elfcore_grok_netbsd_note): Likewise.  Plus add support for
-       NT_NETBSDCORE_AUXV notes.
-
-2019-06-06  Sudakshina Das  <sudi.das@arm.com>
-
-       * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties): Set
-       alignment of the new gnu property section.
-
-2019-06-06  Sudakshina Das  <sudi.das@arm.com>
-
-       * bfd-in.h: Change comment.
+       * cpu-plugin.c: Remove.
+       * archures.c (enum bfd_architecture): Remove bfd_arch_plugin.
+       (bfd_plugin_arch): Remove declaration.
        * bfd-in2.h: Regenerate.
-       * elfnn-aarch64.c (elfNN_aarch64_merge_gnu_properties): Update warning.
-       * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties):
-       Likwise.
-
-2019-05-28  Faraz Shahbazker  <fshahbazker@wavecomp.com>
-
-       * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_PCHI16>:
-       Remove overflow check.
-
-2019-05-28  Alan Modra  <amodra@gmail.com>
-
-       PR 24596
-       * cofflink.c (coff_link_check_archive_element): Don't assume
-       element is a coff object file after calling add_archive_element.
-
-2019-05-28  Alan Modra  <amodra@gmail.com>
-
-       PR 24596
-       * elf32-microblaze.c (microblaze_elf_finish_dynamic_sections): Don't
-       attempt to set sh_entsize for excluded PLT section.
-
-2019-05-28  Alan Modra  <amodra@gmail.com>
-
-       PR 24596
-       * elf64-alpha.c (elf64_alpha_relocate_section): Don't attempt
-       to emit R_ALPHA_GOTTPREL in PIEs, for which no space is
-       allocated in alpha_dynamic_entries_for_reloc.
-
-2019-05-28  Alan Modra  <amodra@gmail.com>
-
-       PR 24596
-       * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Don't segfault
-       on NULL output_section.
-       * elflink.c (elf_final_link_free): Don't free -1 symshndxbuf.
-
-2019-05-28  Alan Modra  <amodra@gmail.com>
-
-       PR 24596
-       * elf32-m68k.c (elf_m68k_get_got_entry): Don't create a new
-       entry when MUST_FIND.  Abort when MUST_FIND not found.
-       (elf_m68k_get_bfd2got_entry): Likewise.
-       (elf_m68k_relocate_section): Remove now useless assert.
-
-2019-05-28  Alan Modra  <amodra@gmail.com>
-
-       PR 24596
-       * elf64-hppa.c (elf64_hppa_finalize_dynreloc): Get the output bfd
-       from bfd_link_info, not an output section owner.
-       (elf64_hppa_finish_dynamic_symbol, elf64_hppa_finalize_opd): Likewise.
-       (elf_hppa_final_link_relocate): Likewise.
-
-2019-05-28  Alan Modra  <amodra@gmail.com>
-
-       PR 24596
-       * aout-tic30.c (MY_bfd_final_link): Don't segfault on missing
-       create_object_symbols_section, obj_textsec, obj_datasec or
-       obj_bsssec.  Fix other errors in placement.
-       * config.bfd: Obsolete tic30-aout.
-
-2019-05-28  Alan Modra  <amodra@gmail.com>
-
-       PR 24596
-       * dwarf2.c (save_section_vma, section_vma_same): Check for NULL
-       end of section list as well as section_count.
-       * xcofflink.c (xcoff_link_add_symbols): Fix temporarily changed
-       section list before returning error.
-
-2019-05-27  Alan Modra  <amodra@gmail.com>
-
-       * elf.c (bfd_elf_set_group_contents): Exit on zero size section.
-
-2019-05-27  Alan Modra  <amodra@gmail.com>
-
-       PR 24596
-       * linker.c (_bfd_generic_link_output_symbols): Heed BSF_KEEP.
-
-2019-05-24  Szabolcs Nagy  <szabolcs.nagy@arm.com>
-
-       * elfnn-aarch64.c (elfNN_aarch64_merge_symbol_attribute): New function.
-       (struct elf_aarch64_link_hash_table): Add variant_pcs member.
-       (elfNN_aarch64_allocate_dynrelocs): Update variant_pcs.
-       (elfNN_aarch64_size_dynamic_sections): Add DT_AARCH64_VARIANT_PCS.
-       (elf_backend_merge_symbol_attribute): Define.
-
-2019-05-24  Alan Modra  <amodra@gmail.com>
-
        * po/SRC-POTFILES.in: Regenerate.
 
-2019-05-24  Alan Modra  <amodra@gmail.com>
-
-       * elf64-ppc.c: Comment on powerxx _notoc stub variants.
-       (LI_R11_0, LIS_R11, ORI_R11_R11_0, SLDI_R11_R11_34): Define.
-       (PADDI_R12_PC, PLD_R12_PC, D34, HA34): Define.
-       (struct ppc_link_hash_table): Add powerxx_stubs.
-       (ppc64_elf_check_relocs): Set powerxx_stubs.
-       (build_powerxx_offset, size_powerxx_offset),
-       (num_relocs_for_powerxx_offset),
-       (emit_relocs_for_powerxx_offset): New functions.
-       (plt_stub_size): Size powerxx stubs.
-       (ppc_build_one_stub): Emit powerxx stubs.
-       (ppc_size_one_stub): Size powerxx stubs.  Omit .eh_frame for
-       powerxx stubs.
-
-2019-05-24  Alan Modra  <amodra@gmail.com>
-
-       * elf64-ppc.c (ppc64_elf_check_relocs): Set has_gotrel for
-       R_PPC64_GOT_PCREL34.
-       (xlate_pcrel_opt): New function.
-       (ppc64_elf_edit_toc): Handle R_PPC64_GOT_PCREL34.
-       (ppc64_elf_relocate_section): Edit GOT indirect to GOT relative
-       for R_PPC64_GOT_PCREL34.  Implement R_PPC64_PCREL_OPT optimisation.
-
-2019-05-24  Alan Modra  <amodra@gmail.com>
-
-       * reloc.c (BFD_RELOC_PPC64_D34, BFD_RELOC_PPC64_D34_LO),
-       (BFD_RELOC_PPC64_D34_HI30, BFD_RELOC_PPC64_D34_HA30),
-       (BFD_RELOC_PPC64_PCREL34, BFD_RELOC_PPC64_GOT_PCREL34),
-       (BFD_RELOC_PPC64_PLT_PCREL34),
-       (BFD_RELOC_PPC64_ADDR16_HIGHER34, BFD_RELOC_PPC64_ADDR16_HIGHERA34),
-       (BFD_RELOC_PPC64_ADDR16_HIGHEST34, BFD_RELOC_PPC64_ADDR16_HIGHESTA34),
-       (BFD_RELOC_PPC64_REL16_HIGHER34, BFD_RELOC_PPC64_REL16_HIGHERA34),
-       (BFD_RELOC_PPC64_REL16_HIGHEST34, BFD_RELOC_PPC64_REL16_HIGHESTA34),
-       (BFD_RELOC_PPC64_D28, BFD_RELOC_PPC64_PCREL28): New reloc enums.
-       * elf64-ppc.c (PNOP): Define.
-       (ppc64_elf_howto_raw): Add reloc howtos for new relocations.
-       (ppc64_elf_reloc_type_lookup): Translate new bfd reloc numbers.
-       (ppc64_elf_ha_reloc): Adjust addend for highera34 and highesta34
-       relocs.
-       (ppc64_elf_prefix_reloc): New function.
-       (struct ppc_link_hash_table): Add notoc_plt.
-       (is_branch_reloc): Add R_PPC64_PLTCALL_NOTOC.
-       (is_plt_seq_reloc): Add R_PPC64_PLT_PCREL34,
-       R_PPC64_PLT_PCREL34_NOTOC, and R_PPC64_PLTSEQ_NOTOC.
-       (ppc64_elf_check_relocs): Handle pcrel got and plt relocs.  Set
-       has_pltcall for section on seeing R_PPC64_PLTCALL_NOTOC.  Handle
-       possible need for dynamic relocs on non-pcrel powerxx relocs.
-       (dec_dynrel_count): Handle non-pcrel powerxx relocs.
-       (ppc64_elf_inline_plt): Handle R_PPC64_PLTCALL_NOTOC.
-       (toc_adjusting_stub_needed): Likewise.
-       (ppc64_elf_tls_optimize): Handle R_PPC64_PLTSEQ_NOTOC.
-       (ppc64_elf_relocate_section): Handle new powerxx relocs.
-       * bfd-in2.h: Regenerate.
-       * libbfd.h: Regenerate.
-
-2019-05-23  Jose E. Marchesi  <jose.marchesi@oracle.com>
-
-       * config.bfd (targ_cpu): Process bpf-*-none only if BFD64.
-       * configure.ac: Set target_size=64 for bpf_elf64_le_vec and
-       bpf_elf64_be_vec.
-       * configure: Regenerate.
-
-2019-05-23  Jose E. Marchesi  <jose.marchesi@oracle.com>
-
-       * configure: Regenerated.
-       * Makefile.am (ALL_MACHINES): Add cpu-bpf.lo.
-       (ALL_MACHINES_CFILES): Add cpu-bpf.c.
-       (BFD64_BACKENDS): Add elf64-bpf.lo.
-       (BFD64_BACKENDS_CFILES): Add elf64-bpf.c.
-       * Makefile.in (SOURCE_HFILES): Regenerate.
-       * config.bfd (targ_cpu): Handle bpf-*-* targets.
-       * cpu-bpf.c: New file.
-       * elf64-bpf.c: Likewise.
-       * targets.c (_bfd_target_vector): Add bpf_elf64_be_vec and
-       bpf_elf64_le_vec.
-       * archures.c: Define architecture bfd_arch_bpf and machine
-       bfd_arch_bpf.
-       * reloc.c: Define BFD relocations used by the BPF target.
-       * bfd-in2.h: Regenerated.
-       * libbfd.h: Likewise.
-
-2019-05-22  Alan Modra  <amodra@gmail.com>
-
-       * elf32-arm.c (arm_allocate_glue_section_space): Clear section
-       contents.
-
-2019-05-22  Alan Modra  <amodra@gmail.com>
-
-       * vms-alpha.c (_bfd_vms_write_etir): Don't attempt further
-       processing on "size error in section".
-
-2019-05-22  Alan Modra  <amodra@gmail.com>
-
-       * som.c (som_bfd_free_cached_info): Call
-       _bfd_generic_close_and_cleanup.
-
-2019-05-21  Faraz Shahbazker  <fshahbazker@wavecomp.com>
-
-       * elfxx-mips.c (_bfd_mips_elf_check_relocs): Generate error
-       for TLS_TPREL_HI16(/LO16) relocations in shared library.
-
-2019-05-21  Faraz Shahbazker  <fshahbazker@wavecomp.com>
-
-       * elfxx-mips.c (_bfd_mips_elf_check_relocs): Add NULL pointer
-       checks.  Search the RELA table for n64 relocations.
-
-2019-05-21  Matthew Fortune  <matthew.fortune@mips.com>
-           Faraz Shahbazker  <fshahbazker@wavecomp.com>
-
-       * elfxx-mips.c (LA25_BC): New macro.
-       (mips_elf_link_hash_table)<compact_branches>: New field.
-       (STUB_JALRC): New macro.
-       (mipsr6_o32_exec_plt0_entry_compact): New array.
-       (mipsr6_n32_exec_plt0_entry_compact): Likewise.
-       (mipsr6_n64_exec_plt0_entry_compact): Likewise.
-       (mipsr6_exec_plt_entry_compact): Likewise.
-       (mips_elf_create_la25_stub): Use BC instead of J for stubs
-       when compact_branches is true.
-       (_bfd_mips_elf_finish_dynamic_symbol): Choose the compact
-       PLT for MIPSR6 with compact_branches.  Do not reorder the
-       compact branches PLT.  Switch the lazy stub for MIPSR6
-       with compact_branches to use JALRC.
-       (mips_finish_exec_plt): Choose the compact PLT0 for MIPSR6
-       when compact_branches is true.
-       (_bfd_mips_elf_compact_branches): New function.
-       * elfxx-mips.h (_bfd_mips_elf_compact_branches): New prototype.
-
-2019-05-21  Tamar Christina  <tamar.christina@arm.com>
-
-       PR ld/24373
-       * elfnn-aarch64.c (_bfd_aarch64_erratum_843419_branch_to_stub):
-       Fix print formatter.
-
-2019-05-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
-
-       PR 24460
-       * elf32-arm.c (get_value_helper): Remove.
-       (elf32_arm_final_link_relocate): Fix branch future relocations.
-
-2019-05-21  Tamar Christina  <tamar.christina@arm.com>
+2020-01-27  H.J. Lu  <hongjiu.lu@intel.com>
+           Alan Modra  <amodra@gmail.com>
 
-       PR ld/24373
-       * bfd-in.h (enum erratum_84319_opts): New
-       (bfd_elf64_aarch64_set_options, bfd_elf32_aarch64_set_options): Change
-       int to enum erratum_84319_opts.
-       * bfd-in2.h: Regenerate.
-       * elfnn-aarch64.c (struct elf_aarch64_link_hash_table): Change
-       fix_erratum_843419 to use new enum, remove fix_erratum_843419_adr.
-       (_bfd_aarch64_add_stub_entry_after): Conditionally create erratum stub.
-       (aarch64_size_one_stub): Conditionally size erratum 843419 stubs.
-       (_bfd_aarch64_resize_stubs): Amend comment.
-       (elfNN_aarch64_size_stubs): Don't generate stubs when no workaround
-       requested.
-       (bfd_elfNN_aarch64_set_options): Use new fix_erratum_843419 enum.
-       (_bfd_aarch64_erratum_843419_branch_to_stub): Implement selection of
-       erratum workaround.
-       (clear_erratum_843419_entry): Update erratum conditional.
+       PR ld/25458
+       * elflink.c (_bfd_elf_gc_mark_rsec): Mark all weak aliases.
 
-2019-05-21  Senthil Kumar Selvaraj  <senthilkumar.selvaraj@microchip.com>
+2020-01-24  Jim Wilson  <jimw@sifive.com>
 
-       PR ld/24571
-       * bfd/elf32-avr.c (elf32_avr_relax_section): Adjust range check
-       when computing distance_short_enough.
+       * elfxx-riscv.c (riscv_get_prefix_class): Format s case like others.
+       (riscv_parse_prefixed_ext): Fix s extension comment and reword to
+       avoid over long line.
 
-2019-05-21  Senthil Kumar Selvaraj  <senthilkumar.selvaraj@microchip.com>
+2020-01-24  Nick Clifton  <nickc@redhat.com>
 
-       PR ld/24564
-       * bfd/elf32-avr.c (avr_relative_distance_considering_wrap_around):
-       Wrap around even if distance equals avr_pc_wrap_around.
+       PR 25447
+       * coffgen.c (_bfd_coff_close_and_cleanup): Do not clear the keep
+       syms and keep strings flags as these may have been set in order to
+       prevent a bogus call to free.
 
-2019-05-20  Nick Clifton  <nickc@redhat.com>
+2020-01-23  Nick Clifton  <nickc@redhat.com>
 
        * po/fr.po: Updated French translation.
 
-2019-05-16  Andre Vieira  <andre.simoesdiasvieira@arm.com>
-
-       * elf32-arm.c (elf32_arm_merge_eabi_attributes): Add case for Tag_MVE_arch.
-
-2019-05-16  Alan Modra  <amodra@gmail.com>
-
-       * elf32-arm.c (elf32_arm_write_section): Revert last change.
-
-2019-05-15  Alan Modra  <amodra@gmail.com>
-
-       * elf32-arm.c (elf32_arm_write_section): Don't leave
-       error case of STM32L4XX_ERRATUM_BRANCH_TO_VENEER with
-       unitialised section contents.
-
-2019-05-14  Jamey Hicks  <jamey.hicks@gmail.com>
-
-       PR 19921
-       * verilog.c: (VerilogDataWidth): New variable.
-       (verilog_write_record): Emit bytes in VerilogDataWidth bundles.
-
-2019-05-08  Nick Clifton  <nickc@redhat.com>
-
-       PR 24523
-       * elf32-m68k.c (elf32_m68k_merge_private_bfd_data): Return TRUE
-       rather than FALSE if encountering a non-ELF file.
-
-2019-05-06  Alan Modra  <amodra@gmail.com>
-
-       * elf32-pj.c (pj_elf_reloc): Don't report undefined weak as an error.
-
-2019-05-06  Alan Modra  <amodra@gmail.com>
-
-       * reloc.c (BFD_RELOC_PPC64_TPREL16_HIGH, BFD_RELOC_PPC64_TPREL16_HIGHA),
-       (BFD_RELOC_PPC64_DTPREL16_HIGH, BFD_RELOC_PPC64_DTPREL16_HIGHA):
-       Sort before BFD_RELOC_PPC64_DTPREL16_HIGHESTA entry.
-       * libbfd.h: Regenerate.
-       * bfd-in2.h: Regenerate.
-
-2019-05-04  Alan Modra  <amodra@gmail.com>
-
-       PR 24511
-       * syms.c (coff_section_type): Only allow '.', '$' and numeric
-       following the standard section names.
-       (bfd_decode_symclass): Prioritize section flag tests in
-       decode_section_type before name tests in coff_section_type.
-       * plugin.c (bfd_plugin_canonicalize_symtab): Init fake_section
-       and fake_common_section using BFD_FAKE_SECTION.  Use "fake" as
-       their names and choose standard .text section flags for
-       fake_section.
-
-2019-05-02  Nick Clifton  <nickc@redhat.com>
-
-       PR 24493
-       * coffcode.h (styp_to_sec_flags): Treat .gnu.debuglink and
-       .gnu.debugaltlink sections as debugging sections.
-
-2019-04-30  Alan Modra  <amodra@gmail.com>
-
-       * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add has_gotrel.
-       (struct _ppc64_elf_section_data): Likewise.
-       (ppc64_elf_check_relocs): Set above fields.
-       (ppc64_elf_edit_toc): Add a pass over GOT relocs.
-       (ppc64_elf_relocate_section): Edit GOT indirect to GOT relative
-       when possible.
-
-2019-04-26  H.J. Lu  <hongjiu.lu@intel.com>
-
-       PR ld/24486
-       * elflink.c (elf_link_output_extsym): Don't complain undefined
-       weak dynamic reference.
-
-2019-04-25  Sudakshina Das  <sudi.das@arm.com>
-
-       * elfnn-aarch64.c (PLT_BTI_ENTRY_SIZE): Remove.
-       (PLT_BTI_TLSDESC_ENTRY_SIZE): Remove.
-       (PLT_PAC_ENTRY_SIZE, PLT_BTI_PAC_ENTRY_SIZE): Remove.
-       (PLT_BTI_SMALL_ENTRY_SIZE, PLT_PAC_SMALL_ENTRY_SIZE): Update.
-       (elfNN_aarch64_small_plt0_pac_entry): Remove.
-       (elfNN_aarch64_small_plt0_bti_pac_entry): Remove.
-       (elfNN_aarch64_small_plt0_bti_entry): Update.
-       (elfNN_aarch64_small_plt_bti_entry): Update.
-       (elfNN_aarch64_small_plt_pac_entry): Update.
-       (elfNN_aarch64_tlsdesc_small_plt_bti_entry): Update.
-       (setup_plt_values): Setup new entries.
-       (elfNN_aarch64_finish_dynamic_sections): Remove size change.
-       (elfNN_aarch64_plt_sym_val): Likewise.
-
-2019-04-22  Jim Wilson  <jimw@sifive.com>
-
-       * elfnn-riscv.c (PRSTATUS_SIZE) [ARCH_SIZE==32]: Change from 0 to 204.
+2020-01-23  Alan Modra  <amodra@gmail.com>
 
-2019-04-19  Alan Modra  <amodra@gmail.com>
+       PR 25444
+       * elf.c (assign_file_positions_for_load_sections): Avoid divide
+       by zero when p_align is zero.
 
-       * elf32-s12z.c (elf_backend_can_gc_sections): Don't define
+2020-01-22  Maxim Blinov  <maxim.blinov@embecosm.com>
 
-2019-04-17  H.J. Lu  <hongjiu.lu@intel.com>
-
-       * elf64-x86-64.c (elf_x86_64_need_pic): Suggest -fPIE when not
-       building shared object.
-       * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Likewise.
-
-2019-04-17  H.J. Lu  <hongjiu.lu@intel.com>
-
-       PR ld/24458
-       * elfxx-x86.h (SYMBOL_DEFINED_NON_SHARED_P): Also check x86
-       linker_def.
-
-2019-04-15  Thomas Preud'homme  <thomas.preudhomme@arm.com>
-
-       * reloc.c (BFD_RELOC_ARM_T32_VLDR_VSTR_OFF_IMM): New internal
-       relocation.
-       * bfd-in2.h: Regenerate.
-       * libbfd.h: Likewise.
-
-2019-04-15  Sudakshina Das  <sudi.das@arm.com>
-
-       * reloc.c (BFD_RELOC_ARM_THUMB_LOOP12): New.
-       * bfd-in2.h: Regenerated.
-       * libbfd.h: Regenerated.
+       * bfd/elfnn-riscv.c (riscv_skip_prefix): New.
+       (riscv_prefix_cmp): Likewise.
+       (riscv_non_std_ext_p): Deleted.
+       (riscv_std_sv_ext_p): Likewise.
+       (riscv_non_std_sv_ext_p): Likewise.
+       (riscv_merge_non_std_and_sv_ext): Rename to...
+       (riscv_merge_multi_letter_ext): and modified to use riscv_prefix_cmp.
+       (riscv_merge_arch_attr_info): Replace 3 calls to
+       riscv_merge_non_std_and_sv_ext with single call to
+       riscv_merge_multi_letter_ext.
+       * bfd/elfxx-riscv.c (riscv_parse_std_ext): Break if we
+       encounter a 'z' prefix.
+       (riscv_get_prefix_class): New function, return prefix class based
+       on first few characters of input string.
+       (riscv_parse_config): New structure to factor out minor differences
+       in extension class parsing behaviour.
+       (riscv_parse_sv_or_non_std_ext): Rename to...
+       (riscv_parse_prefixed_ext): and parameterise with
+       riscv_parse_config.
+       (riscv_std_z_ext_strtab, riscv_std_s_ext_strtab): New.
+       (riscv_multi_letter_ext_valid_p): New.
+       (riscv_ext_x_valid_p, riscv_ext_z_valid_p, riscv_ext_s_valid_p): New.
+       (riscv_parse_subset): Delegate all non-single-letter parsing work
+       to riscv_parse_prefixed_ext.
+       * bfd/elfxx-riscv.h (riscv_isa_ext_class): New type.
+       (riscv_get_prefix_class): Declare.
+
+2020-01-22  Alan Modra  <amodra@gmail.com>
+
+       * elf64-ppc.c (struct ppc_link_hash_table): Add tga_group.
+       (ppc64_elf_archive_symbol_lookup): Extract __tls_get_addr_opt for
+       __tls_get_addr_desc.
+       (ppc64_elf_size_stubs): Add section for linker generated
+       __tls_get_addr_desc wrapper function.  Loop at least once if
+       generating this function.
+       (emit_tga_desc, emit_tga_desc_eh_frame): New functions.
+       (ppc64_elf_build_stubs): Generate __tls_get_addr_desc.
+
+2020-01-22  Alan Modra  <amodra@gmail.com>
+
+       * elf64-ppc.h (struct ppc64_elf_params): Add no_tls_get_addr_regsave.
+       * elf64-ppc.c (struct ppc_link_hash_table): Add tga_desc and
+       tga_desc_fd.
+       (is_tls_get_addr): Match tga_desc and tga_desc_df too.
+       (STDU_R1_0R1, ADDI_R1_R1): Define.
+       (tls_get_addr_prologue, tls_get_addr_epilogue): New functions.
+       (ppc64_elf_tls_setup): Set up tga_desc and tga_desc_fd.  Indirect
+       tga_desc_fd to opt_fd, and tga_desc to opt.  Set
+       no_tls_get_addr_regsave.
+       (branch_reloc_hash_match): Add hash3 and hash4.
+       (ppc64_elf_tls_optimize): Handle tga_desc_fd and tga_desc too.
+       (ppc64_elf_size_dynamic_sections): Likewise.
+       (ppc64_elf_relocate_section): Likewise.
+       (plt_stub_size, build_plt_stub): Likewise.  Size regsave
+       __tls_get_addr stub.
+       (build_tls_get_addr_stub): Build regsave __tls_get_addr stub and
+       eh_frame.
+       (ppc_size_one_stub): Handle tga_desc_fd and tga_desc too.  Size
+       eh_frame for regsave __tls_get_addr.
 
-2019-04-15  Sudakshina Das  <sudi.das@arm.com>
+2020-01-22  Alan Modra  <amodra@gmail.com>
 
-       * reloc.c (BFD_RELOC_THUMB_PCREL_BFCSEL): New relocation.
-       * bfd-in2.h: Regenerated.
-       * libbfd.h: Likewise.
+       * elf64-ppc.c (ppc64_elf_size_stubs): Correct condition under
+       which __tls_get_addr calls will be eliminated.
 
-2019-04-15  Sudakshina Das  <sudi.das@arm.com>
+2020-01-20  Nick Clifton  <nickc@redhat.com>
 
-       * reloc.c (BFD_RELOC_ARM_THUMB_BF13): New.
-       * bfd-in2.h: Regenerated.
-       * libbfd.h: Regenerated.
-       * elf32-arm.c (elf32_arm_howto_table_1): New entry for R_ARM_THM_BF13.
-       (elf32_arm_reloc_map elf32_arm_reloc_map): Map BFD_RELOC_ARM_THUMB_BF13
-       and R_ARM_THM_BF12 together.
-       (elf32_arm_final_link_relocate): New switch case for R_ARM_THM_BF13.
+       * po/pt.po: Updates Portuguese translation.
+       * po/ru.po: Updated Russian translation.
+       * po/uk.po: Updated Ukranian translation.
 
-2019-04-15  Sudakshina Das  <sudi.das@arm.com>
+2020-01-20  H.J. Lu  <hongjiu.lu@intel.com>
 
-       * reloc.c (BFD_RELOC_ARM_THUMB_BF19): New
-       * libbfd.h: Regenerated.
-       * bfd-in2.h: Regenerated.
-       * bfd-elf32-arm.c (elf32_arm_howto_table_1): New entry for R_ARM_THM_BF18.
-       (elf32_arm_reloc_map elf32_arm_reloc_map): Map BFD_RELOC_ARM_THUMB_BF19
-       and R_ARM_THM_BF18 together.
-       (elf32_arm_final_link_relocate): New switch case for R_ARM_THM_BF19.
+       PR ld/25416
+       * elf64-x86-64.c (elf_x86_64_check_tls_transition): Support
+       "rex leal x@tlsdesc(%rip), %reg" and "call *x@tlsdesc(%eax)" in
+       X32 mode.
+       (elf_x86_64_relocate_section): In x32 mode, for GDesc -> LE
+       transition, relax "rex leal x@tlsdesc(%rip), %reg" to
+       "rex movl $x@tpoff, %reg", for GDesc -> IE transition, relax
+       "rex leal x@tlsdesc(%rip), %reg" to
+       "rex movl x@gottpoff(%rip), %eax".  For both transitions, relax
+       "call *(%eax)" to "nopl (%rax)".
 
-2019-04-15  Sudakshina Das  <sudi.das@arm.com>
+2020-01-20  Alan Modra  <amodra@gmail.com>
 
-       * reloc.c (BFD_RELOC_ARM_THUMB_BF17): New enum.
-       * bfd-in2.h: Regenerated.
-       * libbfd.h: Regenerated.
-       * bfd-elf32-arm.c (elf32_arm_howto_table_1): New entry for R_ARM_THM_BF16.
-       (elf32_arm_reloc_map elf32_arm_reloc_map): Map BFD_RELOC_ARM_THUMB_BF17
-       and R_ARM_THM_BF16 together.
-       (get_value_helper): New reloc helper.
-       (elf32_arm_final_link_relocate): New switch case for R_ARM_THM_BF16.
+       * elf64-ppc.c (LD_R11_0R3, CMPDI_R11_0, STD_R11_0R1, LD_R11_0R1),
+       (MTLR_R11): Don't define.
+       (LD_R0_0R3, CMPDI_R0_0): Define.
+       (build_tls_get_addr_stub): Don't use r11 in stub.
 
-2019-04-15  Sudakshina Das  <sudi.das@arm.com>
+2020-01-20  Alan Modra  <amodra@gmail.com>
 
-       * reloc.c (BFD_RELOC_THUMB_PCREL_BRANCH5): New enum.
-       * bfd-in2.h: Regenerate.
-       * libbfd.h: Regenerate.
+       * elf64-ppc.c (ppc_elf_hash_entry): New function, use throughout file.
+       (defined_sym_val, is_tls_get_addr): Likewise.
 
-2019-04-15  Thomas Preud'homme  <thomas.preudhomme@arm.com>
+2020-01-18  Nick Clifton  <nickc@redhat.com>
 
-       * archures.c (bfd_mach_arm_8_1M_MAIN): Define.
-       * bfd-in2.h: Regenerate.
-       * cpu-arm.c (arch_info_struct): Add entry for Armv8.1-M Mainline.
-       * elf32-arm.c (using_thumb_only): Return true for Armv8.1-M Mainline
-       and update assert.
-       (using_thumb2): Likewise.
-       (using_thumb2_bl): Update assert.
-       (arch_has_arm_nop): Likewise.
-       (bfd_arm_get_mach_from_attributes): Add case for Armv8.1-M Mainline.
-       (tag_cpu_arch_combine): Add logic for Armv8.1-M Mainline merging.
-
-2019-04-11  H.J. Lu  <hongjiu.lu@intel.com>
-
-       * elf-linker-x86.h (elf_x86_cet_report): New.
-       (elf_linker_x86_params): Add cet_report.
-       * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Report
-       missing IBT and SHSTK properties if needed.
-
-2019-04-11  H.J. Lu  <hongjiu.lu@intel.com>
-
-       PR ld/24436
-       * elf-m10300.c (mn10300_elf_check_relocs): Remove BFD_ASSERT of
-       "h != NULL".  Don't check "h != NULL" before calling.
-       bfd_elf_gc_record_vtentry.
-       * elf32-arm.c (elf32_arm_check_relocs): Likewise.
-       * elf32-bfin.c (bfin_check_relocs): Likewise.
-       * elf32-cris.c (cris_elf_check_relocs): Likewise.
-       * elf32-csky.c (csky_elf_check_relocs): Likewise.
-       * elf32-d10v.c (elf32_d10v_check_relocs): Likewise.
-       * elf32-dlx.c (elf32_dlx_check_relocs): Likewise.
-       * elf32-fr30.c (fr30_elf_check_relocs): Likewise.
-       * elf32-frv.c (elf32_frv_check_relocs): Likewise.
-       * elf32-hppa.c (elf32_hppa_check_relocs): Likewise.
-       * elf32-i386.c (elf_i386_check_relocs): Likewise.
-       * elf32-iq2000.c (iq2000_elf_check_relocs): Likewise.
-       * elf32-m32r.c (m32r_elf_check_relocs): Likewise.
-       * elf32-m68hc1x.c (elf32_m68hc11_check_relocs): Likewise.
-       * elf32-m68k.c (elf_m68k_check_relocs): Likewise.
-       * elf32-mcore.c (mcore_elf_check_relocs): Likewise.
-       * elf32-metag.c (elf_metag_check_relocs): Likewise.
-       * elf32-or1k.c (or1k_elf_check_relocs): Likewise.
-       * elf32-ppc.c (ppc_elf_check_relocs): Likewise.
-       * elf32-s390.c (elf_s390_check_relocs): Likewise.
-       * elf32-sh.c (sh_elf_check_relocs): Likewise.
-       * elf32-v850.c (v850_elf_check_relocs): Likewise.
-       * elf32-vax.c (elf_vax_check_relocs): Likewise.
-       * elf32-xstormy16.c (xstormy16_elf_check_relocs): Likewise.
-       * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
-       * elf64-mmix.c (mmix_elf_check_relocs): Likewise.
-       * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
-       * elf64-s390.c (elf_s390_check_relocs): Likewise.
-       * elf64-x86-64.c (elf_s390_check_relocs): Likewise.
-       * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
-       * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
-       * elflink.c (bfd_elf_gc_record_vtinherit): Check for corrupt
-       VTENTRY entry.
-
-2019-04-11  Alan Modra  <amodra@gmail.com>
-
-       PR 24435
-       * elflink.c (elf_link_add_object_symbols): Don't read partial
-       dynamic entries from fuzzed objects.
-
-2019-04-11  Tamar Christina  <tamar.christina@arm.com>
-
-       PR ld/24302
-       * elfnn-aarch64.c (elfNN_aarch64_size_dynamic_sections): Don't emit
-       DT_TLSDESC_GOT and DT_TLSDESC_PLT when DF_BIND_NOW.
-       (elfNN_aarch64_finish_dynamic_sections): Don't write PLT if DF_BIND_NOW.
-
-2019-04-10  Michael Forney  <mforney@mforney.org>
-
-       PR 24427
-       * doc/chew.c (free_words): Correctly free "push_text" strings.
-
-2019-04-08  H.J. Lu  <hongjiu.lu@intel.com>
-
-       * config.bfd: Remove i[3-7]86-*-kaos* and i[3-7]86-*-chaos targets.
-
-2019-04-08  Alan Modra  <amodra@gmail.com>
-
-       * configure.ac (elfxx_x86): Define and use.
+       * version.m4 (BFD_VERSION): Set to 2.34.50.
        * configure: Regenerate.
+       * po/bfd.pot: Regenerate.
 
-2019-04-06  H.J. Lu  <hongjiu.lu@intel.com>
-
-       * elf-linker-x86.h: New file.
-       * elf32-i386.c (elf_i386_convert_load_reloc): Use htab->params
-       to get x86-specific linker options.
-       * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
-       (elf_x86_64_check_relocs): Likewise.
-       (elf_x86_64_relocate_section): Likewise.
-       (elf_x86_64_link_setup_gnu_properties): Likewise.
-       * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Likewise.
-       (_bfd_x86_elf_link_setup_gnu_properties): Likewise.
-       (_bfd_elf_linker_x86_set_options): New function.
-       * elfxx-x86.h: Include "elf-linker-x86.h".
-       (elf_x86_link_hash_table): Add params.
-
-2019-04-03  Alan Modra  <amodra@gmail.com>
-
-       * coff-i386.c, * coff-x86_64.c, * coffgen.c, * dwarf2.c,
-       * elf-m10200.c, * elf.c, * elf32-arm.c, * elf32-bfin.c,
-       * elf32-csky.c, * elf32-m32r.c, * elf32-microblaze.c, * elf32-pru.c,
-       * elf32-rx.c, * elf32-xgate.c, * elf64-sparc.c, * elfnn-ia64.c,
-       * elfxx-riscv.c, * elfxx-sparc.c, * linker.c, * mach-o.c,
-       * pe-x86_64.c, * pei-x86_64.c, * plugin.c: Whitespace fixes.
-
-2019-04-02  Jim Wilson  <jimw@sifive.com>
-
-       PR 24389
-       * elfnn-riscv.c (_bfd_riscv_elf_merge_private_bfd_data): Move read of
-       ELF header flags to after check for ELF object file.  Loop through
-       sections looking for code sections, if none, then skip ABI checks.
-
-2019-03-30  Andrew Waterman  <andrew@sifive.com>
+2020-01-18  Nick Clifton  <nickc@redhat.com>
 
-       * elfnn-riscv.c (_bfd_riscv_relax_call): Only check ARCH_SIZE for
-       rd == X_RA case.
+       Binutils 2.34 branch created.
 
-2019-03-29  Max Filippov  <jcmvbkbc@gmail.com>
+2020-01-17  Christian Biesinger  <cbiesinger@google.com>
 
-       * elf32-xtensa.c (shrink_dynamic_reloc_sections): Add
-       info->export_dynamic to the conditional.
+       * coff-arm.c: Fix spelling error (seperate).
+       * elfxx-riscv.c (riscv_parse_sv_or_non_std_ext): Fix spelling
+       error (seperate).
+       * sysdep.h (strnlen): Fix spelling error (seperate).
 
-2019-03-28  Alan Modra  <amodra@gmail.com>
+2020-01-15  Lars Brinkhoff  <lars@nocrew.org>
 
-       PR 24392
-       * configure.ac: Invoke AC_CHECK_SIZEOF(int).
-       * configure: Regenerate.
-       * coffgen.c (coff_get_reloc_upper_bound): Replace gcc diagnostic
-       workaround with SIZEOF_LONG vs. SIZEOF_INT check.
-       * elf.c (_bfd_elf_get_reloc_upper_bound): Likewise.
-       * elf64-sparc.c (elf64_sparc_get_reloc_upper_bound): Likewise.
-       * mach-o.c (bfd_mach_o_get_reloc_upper_bound): Likewise.
+       PR 20694
+       * pdp11.c (TARGET_PAGE_SIZE): Set to 8192.
 
-2019-03-21  Jim Wilson  <jimw@sifive.com>
+2020-01-15  Alan Modra  <amodra@gmail.com>
 
-       PR 24365
-       * elfnn-riscv.c (riscv_elf_relocate_section): For STT_SECTION check,
-       verify sym non-NULL before using.  Add identical check using h.
+       PR 25384
+       * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Update comment.
+       (ppc64_elf_adjust_dynamic_symbol): Don't allow .dynbss copies
+       of function symbols unless dot symbols are present.  Do warn
+       whenever one is created, regardles of whether a PLT entry is
+       also emitted for the function symbol.
 
-2019-03-21  Sudakshina Das  <sudi.das@arm.com>
+2020-01-14  Alan Modra  <amodra@gmail.com>
 
-       * elf-bfd.h (struct elf_backend_data): Add argument to
-       merge_gnu_properties.
-       * elf-properties.c (elf_merge_gnu_properties): Add argument to
-       itself and while calling bed->merge_gnu_properties.
-       (elf_merge_gnu_property_list): Update the calls for
-       elf_merge_gnu_properties.
-       * elfnn-aarch64.c (elfNN_aarch64_merge_gnu_properties): Update handling
-       of --force-bti warning and add argument.
-       * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties): Add
-       warning.
-       * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Add argument.
-       * elfxx-x86.h (_bfd_x86_elf_merge_gnu_properties): Likewise in
-       declaration.
+       * som.c (som_bfd_count_ar_symbols): Error when file position
+       of symbols on chains is not strictly increasing.
 
-2019-03-20  Sudakshina Das  <sudi.das@arm.com>
+2020-01-14  Alan Modra  <amodra@gmail.com>
 
-       * elfxx-aarch64.c (_bfd_aarch64_elf_link_fixup_gnu_properties): Define.
-       * elfxx-aarch64.h (_bfd_aarch64_elf_link_fixup_gnu_properties): Declare.
-       (elf_backend_fixup_gnu_properties): Define for AArch64.
-
-2019-03-18  Alan Modra  <amodra@gmail.com>
-
-       PR 24355
-       * elf32-ppc.c (ppc_finish_symbols): Don't call write_glink_stub
-       for local iplt syms with ent->plt.offset == -1.  Remove ineffective
-       attempt at writing glink stubs only once.
-
-2019-03-16  Alan Modra  <amodra@gmail.com>
-
-       PR 24337
-       * elf.c (_bfd_elf_rela_local_sym): Revert last change.
-       (_bfd_elf_rel_local_sym): Likewise.
-       * elflink.c (elf_link_input_bfd): Use bfd_und_section for
-       section of symbols with unrecognized shndx.
-
-2019-03-15  H.J. Lu  <hongjiu.lu@intel.com>
-
-       PR ld/24267
-       * coffgen.c (_bfd_coff_section_already_linked): Skip discarded
-       section.
-       * cofflink.c (coff_link_add_symbols): Check for symbols defined
-       in discarded section.
-
-2019-03-15  Alan Modra  <amodra@gmail.com>
-
-       PR 24339
-       * elflink.c (elf_link_add_object_symbols): Bail out on a local
-       symbol after globals if elf_bad_symtab is not set.
-
-2019-03-15  Alan Modra  <amodra@gmail.com>
-
-       PR 24337
-       * elf.c (_bfd_elf_rela_local_sym): Don't segfault on NULL sec.
-       (_bfd_elf_rel_local_sym): Likewise.
-
-2019-03-15  Alan Modra  <amodra@gmail.com>
-
-       PR 24336
-       * elflink.c (elf_link_read_relocs_from_section): Handle fuzzed
-       object files with sh_size not a multiple of sh_entsize.
-
-2019-03-15  H.J. Lu  <hongjiu.lu@intel.com>
-
-       PR ld/24338
-       * elf64-x86-64.c (elf_x86_64_relocate_section): Check for corrupt
-       input with bad relocation.
-
-22019-03-15  H.J. Lu  <hongjiu.lu@intel.com>
-
-       * elf64-x86-64.c (elf_x86_64_relocate_section): Re-indent.
-
-2019-03-14  Nick Clifton  <nickc@redhat.com>
-
-       PR 24334
-       * dwarf2.c (struct dwarf2_debug): Add sec_vma_count field.
-       (save_section_vma): Initialise field to the number of entries in
-       the sec_vma table.
-       (section_vma_same): Check that the number of entries in the
-       sec_vma table matches the number of sections in the bfd.
-
-2019-03-14  Nick Clifton  <nickc@redhat.com>
-
-       PR 24333
-       * elflink.c (_bfd_elf_add_default_symbol): Add a check for a NULL
-       section owner pointer when adding the default symbol.
-
-2019-03-14  Nick Clifton  <nickc@redhat.com>
-
-       PR 24332
-       * elflink.c (elf_link_add_object_symbols): Add new local variable
-       extversym_end.  Initialise it to point to the end of the version
-       symbol table, if present.  Check it when initialising and updating
-       the ever pointer.
-
-2019-03-13  Sudakshina Das  <sudi.das@arm.com>
-
-       * elfnn-aarch64.c (PLT_PAC_ENTRY_SIZE, PLT_PAC_SMALL_ENTRY_SIZE): New.
-       (PLT_BTI_PAC_ENTRY_SIZE, PLT_BTI_PAC_SMALL_ENTRY_SIZE): New.
-       (setup_plt_values): Account for PAC or PAC and BTI enabled PLTs.
-       (elfNN_aarch64_size_dynamic_sections): Add checks for PLT_BTI_PAC
-       and PLT_PAC_PLT.
-       (elfNN_aarch64_finish_dynamic_sections): Account for PLT_BTI_PAC.
-       (get_plt_type): Add case for DT_AARCH64_PAC_PLT.
-       (elfNN_aarch64_plt_sym_val): Add cases for PLT_BTI_PAC and PLT_PAC.
-
-2019-03-13  Sudakshina Das  <sudi.das@arm.com>
-           Szabolcs Nagy  <szabolcs.nagy@arm.com>
-
-       * bfd-in.h (aarch64_plt_type, aarch64_enable_bti_type): New.
-       (aarch64_bti_pac_info): New.
-       (bfd_elf64_aarch64_set_options): Add aarch64_bti_pac_info argument.
-       (bfd_elf32_aarch64_set_options): Likewise.
-       * bfd-in2.h: Regenerate
-       * elfnn-aarch64.c (PLT_BTI_ENTRY_SIZE): New.
-       (PLT_BTI_SMALL_ENTRY_SIZE, PLT_BTI_TLSDESC_ENTRY_SIZE): New.
-       (elfNN_aarch64_small_plt0_bti_entry): New.
-       (elfNN_aarch64_small_plt_bti_entry): New.
-       (elfNN_aarch64_tlsdesc_small_plt_bti_entry): New.
-       (elf_aarch64_obj_tdata): Add no_bti_warn and plt_type fields.
-       (elf_aarch64_link_hash_table): Add plt0_entry, plt_entry and
-       tlsdesc_plt_entry_size fields.
-       (elfNN_aarch64_link_hash_table_create): Initialise the new fields.
-       (setup_plt_values): New helper function.
-       (bfd_elfNN_aarch64_set_options): Use new bp_info to set plt sizes and
-       bti enable type.
-       (elfNN_aarch64_allocate_dynrelocs): Use new size members instead of
-       fixed macros.
-       (elfNN_aarch64_size_dynamic_sections): Likewise and add checks.
-       (elfNN_aarch64_create_small_pltn_entry): Use new generic pointers
-       to plt stubs instead of fixed ones and update filling them according
-       to the need for bti.
-       (elfNN_aarch64_init_small_plt0_entry): Likewise.
-       (elfNN_aarch64_finish_dynamic_sections): Likewise.
-       (get_plt_type, elfNN_aarch64_get_synthetic_symtab): New.
-       (elfNN_aarch64_plt_sym_val): Update size accordingly.
-       (elfNN_aarch64_link_setup_gnu_properties): Set up plts if BTI GNU NOTE
-       is set.
-       (bfd_elfNN_get_synthetic_symtab): Define.
-       (elfNN_aarch64_merge_gnu_properties): Give out warning with --force-bti
-       and mising BTI NOTE SECTION.
-
-
-2019-03-13  Sudakshina Das  <sudi.das@arm.com>
-
-       * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Exclude
-       linker created inputs from merge.
-       * elfnn-aarch64.c (struct elf_aarch64_obj_tdata): Add field for
-       GNU_PROPERTY_AARCH64_FEATURE_1_AND properties.
-       (elfNN_aarch64_link_setup_gnu_properties): New.
-       (elfNN_aarch64_merge_gnu_properties): New.
-       (elf_backend_setup_gnu_properties): Define for AArch64.
-       (elf_backend_merge_gnu_properties): Likewise.
-       * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties): Define.
-       (_bfd_aarch64_elf_parse_gnu_properties): Define.
-       (_bfd_aarch64_elf_merge_gnu_properties): Define.
-       * elfxx-aarch64.h (_bfd_aarch64_elf_link_setup_gnu_properties): Declare.
-       (_bfd_aarch64_elf_parse_gnu_properties): Declare.
-       (_bfd_aarch64_elf_merge_gnu_properties): Declare.
-       (elf_backend_parse_gnu_properties): Define for AArch64.
-
-2019-03-13  H.J. Lu  <hongjiu.lu@intel.com>
-
-       PR ld/24322
-       * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Properly
-       merge GNU_PROPERTY_X86_FEATURE_1_[IBT|SHSTK].
-
-2019-03-12  Alan Modra  <amodra@gmail.com>
-
-       * coffcode.h (buy_and_read): Delete unnecessary forward decl.  Add
-       nmemb parameter.  Use bfd_alloc2.
-       (coff_slurp_line_table): Use bfd_alloc2.  Update buy_and_read calls.
-       Delete assertion.
-       (coff_slurp_symbol_table): Use bfd_alloc2 and bfd_zalloc2.
-       (coff_slurp_reloc_table): Use bfd_alloc2.  Update buy_and_read calls.
-       * coffgen.c (coff_get_reloc_upper_bound): Ensure size calculation
-       doesn't overflow.
-       * elf.c (bfd_section_from_shdr): Use bfd_zalloc2.  Style fix.
-       (assign_section_numbers): Style fix.
-       (swap_out_syms): Use bfd_malloc2.
-       (_bfd_elf_get_reloc_upper_bound): Ensure size calculation doesn't
-       overflow.
-       (_bfd_elf_make_empty_symbol): Style fix.
-       (elfobj_grok_stapsdt_note_1): Formatting.
-       * elfcode.h (elf_object_p): Use bfd_alloc2.
-       (elf_write_relocs, elf_write_shdrs_and_ehdr): Likewise.
-       (elf_slurp_symbol_table): Use bfd_zalloc2.
-       (elf_slurp_reloc_table): Use bfd_alloc2.
-       (_bfd_elf_bfd_from_remote_memory): Use bfd_malloc2.
-       * elf64-sparc (elf64_sparc_get_reloc_upper_bound): Ensure
-       size calculation doesn't overflow.
-       (elf64_sparc_get_dynamic_reloc_upper_bound): Likewise.
-       * mach-o.c (bfd_mach_o_get_reloc_upper_bound): Likewise.
-       * pdp11.c (get_reloc_upper_bound): Copy aoutx.h version.
-
-2019-03-08  Alan Modra  <amodra@gmail.com>
-
-       PR 24311
-       * merge.c (merge_strings): Return secinfo.  Don't pad section
-       to alignment here.
-       (_bfd_merge_sections): Pad section to alignment here, if input
-       sections contributing to merged output all pad to alignment.
-       Formatting.
-
-2019-03-06  Nick Clifton  <nickc@redhat.com>
-
-       * dwarf2.c (_bfd_dwarf2_find_symbol_bias): Check for a NULL symbol
-       table pointer.
-       * coffgen.c (coff_find_nearest_line_with_names): Do not call
-       _bfd_dwarf2_find_symbol_bias if there is no symbol table available.
-
-2019-03-01  Andreas Krebbel  <krebbel@linux.ibm.com>
-
-       This reverts commit 5a12586d44fa8d5dfc74cbca4f2f36a273a16335.
-       2019-01-14  Maamoun Tarsha  <maamountk@hotmail.com>
-
-       PR 20113
-       * elf32-s390.c (allocate_dynrelocs): Update comment.
-
-2019-02-28  Tamar Christina  <tamar.christina@arm.com>
-
-       * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Correct CIE parse.
-
-2019-02-28  Nick Clifton  <nickc@redhat.com>
-
-       PR 24273
-       * elf.c (bfd_elf_string_from_elf_section): Check for a string
-       section that is not NUL terminated.
-
-2019-02-27  H.J. Lu  <hongjiu.lu@intel.com>
-
-       PR ld/24276
-       * elf64-x86-64.c (elf_x86_64_check_relocs): Skip symbol defined
-       by linker when checking copy reloc on protected symbol.
-
-2019-02-24  Alan Modra  <amodra@gmail.com>
-
-       PR 24144
-       * pdp11.c (set_section_contents): Revert 2015-02-24 change.
-
-2019-02-20  Eric Tsai  <erictsai@cadence.com>
+       * vms.h (VMS_DEBUG): Define as 0.
+       * vms-alpha.c (image_write): Move debug output after bounds check.
+       Tidy bounds check.
+       (_bfd_vms_slurp_eihd): Warning fix.
+       (_bfd_vms_slurp_etir): Init variables to avoid bogus warnings.
 
-       * elf32-xtensa.c (is_resolvable_asm_expansion): Scan output
-       sections between the call site and call destination and adjust
-       call distance by the largest alignment.
-
-2019-02-20  Alan Hayward  <alan.hayward@arm.com>
-
-       * elf-bfd.h (elfcore_write_aarch_pauth): Add declaration.
-       * elf.c (elfcore_grok_aarch_pauth): New function.
-       (elfcore_grok_note): Check for NT_ARM_PAC_MASK.
-       (elfcore_write_aarch_pauth): New function.
-       (elfcore_write_register_note): Check for AArch64 pauth section.
+2020-01-13  Alan Modra  <amodra@gmail.com>
 
-2019-02-20  Alan Modra  <amodra@gmail.com>
+       * vms-alpha.c (_bfd_vms_slurp_egsd): Ensure minimum size even
+       for "ignored" records.
 
-       PR 24225
-       * elf32-nios2.c (nios2_elf32_relocate_section): Check asprintf
-       return value.
+2020-01-13  Alan Modra  <amodra@gmail.com>
 
-2019-02-20  Michael Roitzsch  <reactorcontrol@icloud.com>
-
-       * configure.ac (SHARED_LIBADD): Add -liberty -lintl for all
-       Darwin hosts, not just or1k.
-       * configure: Regenerate.
+       * wasm-module.c (wasm_scan_name_function_section): Formatting.
+       Delete asect name check.  Move asect NULL check to wasm_object_p.
+       Correct bounds check of sizes against end.  Replace uses of
+       bfd_zalloc with bfd_alloc, zeroing only necessary bytes.  Use
+       just one bfd_release.
+       (wasm_scan): Don't use malloc/strdup for section names,
+       bfd_alloc instead.  Simplify code prefixing section name.
+       Formatting.  Don't attempt to free memory here..
+       (wasm_object_p): ..do so here.
 
-2019-02-20  Alan Modra  <amodra@gmail.com>
+2020-01-10  Szabolcs Nagy  <szabolcs.nagy@arm.com>
 
-       PR 24236
-       * archive64.c (_bfd_archive_64_bit_slurp_armap): Move code adding
-       sentinel NUL to string buffer nearer to loop where it is used.
-       Don't go past sentinel when scanning strings, and don't write
-       NUL again.
-       * archive.c (do_slurp_coff_armap): Simplify string handling to
-       archive64.c style.
+       PR ld/22269
+       * elf32-arm.c (elf32_arm_final_link_relocate): Use
+       UNDEFWEAK_NO_DYNAMIC_RELOC.
+       (allocate_dynrelocs_for_symbol): Likewise.
 
-2019-02-19  Alan Modra  <amodra@gmail.com>
+2020-01-10  Tamar Christina  <tamar.christina@arm.com>
 
-       PR 24235
-       * pei-x86_64.c (pex64_bfd_print_pdata_section): Correct checks
-       attempting to prevent read past end of section.
+       PR 25210
+       * elfnn-aarch64.c (_bfd_aarch64_create_stub_section): Remove elfclass.
 
-2019-02-18  Alan Modra  <amodra@gmail.com>
+2020-01-10  Alan Modra  <amodra@gmail.com>
 
-       PR 24225
-       * elf32-nios2.c (nios2_elf32_relocate_section): Use asprintf and
-       PRIx64 to generate warning messages.  Print local sym names too.
+       * coff-alpha.c (alpha_ecoff_object_p): Calculate size in bfd_size_type.
 
-2019-02-09  Vineet Gupta  <vgupta@synopsys.com>
+2020-01-09  Nick Clifton  <nickc@redhat.com>
 
-       * elf32-arc (INIT_SYM_STRING): Delete.
-       (FINI_SYM_STRING): Likewise.
-       (init_str): Likewise.
-       (fini_str): Likewise.
+       PR 25221
+       * bfd.c (bfd_convert_section_contents): Check for a compress
+       header size that is larger than the actual section size.
 
-2019-02-08  Alan Modra  <amodra@gmail.com>
+2020-01-08  Alan Modra  <amodra@gmail.com>
 
-       * elf32-ppc.c (ppc_elf_relocate_section): Add %X to "unsupported
-       for bss-plt" warning to make it an error.
+       PR 25351
+       * elflink.c (bfd_elf_final_link): Call _bfd_fix_excluded_sec_syms
+       after removing sections.
 
-2019-02-07  Eric Botcazou  <ebotcazou@adacore.com>
+2020-01-06  Jim Wilson  <jimw@sifive.com>
 
-       PR ld/18841
-       * elf32-sparc.c (elf32_sparc_reloc_type_class): Return
-       reloc_class_ifunc for ifunc symbols.
-       * elf64-sparc.c (elf64_sparc_reloc_type_class): Likewise.
+       PR 25205
+       * elfnn-riscv.c (riscv_elf_relocate_section) <R_RISCV_CALL>: Add
+       check for !bfd_link_pic (info).
+       <R_RISCV_CALL_PLT>: Move next to R_RISCV_CALL.
+       <R_RISCV_JAL>: Add comment.
+       (_bfd_riscv_relax_section): For plt.offset check, add check for
+       bfd_link_pic (info).  Add comment.
 
-2019-02-07  Eric Botcazou  <ebotcazou@adacore.com>
+2020-01-06  Alan Modra  <amodra@gmail.com>
 
-       * elf32-visium.c (visium_elf_howto_parity_reloc): Minor tweak.
-       <R_VISIUM_PC16>: Use explicit range test to detect an overflow.
+       * format.c (bfd_check_format_matches): Ignore bfd_error on target
+       match failures.  Don't init to bfd_error_wrong_format before
+       calling _bfd_check_format.
 
-2019-02-07  Nick Clifton  <nickc@redhat.com>
+2020-01-06  Alan Modra  <amodra@gmail.com>
 
-       * config.bfd: Move the powerpc-lynxos and powerpc-windiss targets
-       into the definitely obsolete list.
+       * vms-alpha.c (_bfd_vms_push, _bfd_vms_pop): Return pass/fail
+       status rather than exiting on stack overflow or underflow.
+       (_bfd_vms_slurp_etir): Adjust to suit.
 
-2019-02-05  H.J. Lu  <hongjiu.lu@intel.com>
+2020-01-06  Alan Modra  <amodra@gmail.com>
 
-       PR ld/24151
-       * elf64-x86-64.c (elf_x86_64_need_pic): Check
-       SYMBOL_DEFINED_NON_SHARED_P instead of def_regular.
-       (elf_x86_64_relocate_section): Move PIC check for PC-relative
-       relocations to ...
-       (elf_x86_64_check_relocs): Here.
-       (elf_x86_64_finish_dynamic_symbol): Use SYMBOL_DEFINED_NON_SHARED_P
-       to check if a symbol is defined in a non-shared object.
-       * elfxx-x86.h (SYMBOL_DEFINED_NON_SHARED_P): New.
+       * som.c (som_bfd_fill_in_ar_symbols): Bounds check som_dict index.
 
-2019-01-21  Sergio Durigan Junior  <sergiodj@redhat.com>
+2020-01-06  Alan Modra  <amodra@gmail.com>
 
-       * elf32-arm.c (elf32_arm_final_link_relocate): Use 'llabs' instead
-       of 'labs' (and fix GCC warning).
+       * mach-o.c (bfd_mach_o_read_dylinker): Don't read past end of
+       command.  Check name offset is within command.
+       (bfd_mach_o_read_dylib, bfd_mach_o_read_prebound_dylib),
+       (bfd_mach_o_read_prebind_cksum, bfd_mach_o_read_twolevel_hints),
+       (bfd_mach_o_read_fvmlib, bfd_mach_o_read_dysymtab),
+       (bfd_mach_o_read_symtab, bfd_mach_o_read_uuid),
+       (bfd_mach_o_read_linkedit, bfd_mach_o_read_str),
+       (bfd_mach_o_read_dyld_info, bfd_mach_o_read_version_min),
+       (bfd_mach_o_read_encryption_info, bfd_mach_o_read_source_version),
+       (bfd_mach_o_read_encryption_info_64, bfd_mach_o_read_main),
+       (bfd_mach_o_read_note, bfd_mach_o_read_build_version),
+       (bfd_mach_o_read_segment): Similarly.
+       (bfd_mach_o_read_thread): Properly bound check thread struct.
+       Don't repeat checks on second loop.
+       (bfd_mach_o_read_command): Fail on invalid command length.
 
-2019-01-25  Nick Clifton  <nickc@redhat.com>
+2020-01-04  Alan Modra  <amodra@gmail.com>
 
-       * po/ru.po: Updated Russian translation.
+       * format.c (bfd_check_format_matches): Add preserve_match.
+       Save initial bfd state in "preserve", matched bfd state in
+       "preserve_match".  Save just the first match.  Release
+       bfd_alloc memory.  Restore and finish preserved state as
+       appropriate on all function exit paths.
 
-2019-01-23  Nick Clifton  <nickc@redhat.com>
+2020-01-04  Alan Modra  <amodra@gmail.com>
 
-       * po/fr.po: Updated French translation.
+       * mmo.c (mmo_mkobject): Allocate tdata with bfd_zalloc.
 
-2019-01-21  Nick Clifton  <nickc@redhat.com>
+2020-01-04  Alan Modra  <amodra@gmail.com>
 
-       * po/pt.po: Updated Portuguese translation.
-       * po/uk.po: Updated Ukranian translation.
+       * coffgen.c (coff_real_object_p): Free malloc'd memory on target
+       match too.
 
-2019-01-21  Yuri Chornoivan  <yurchor@ukr.net>
+2020-01-03  Nick Clifton  <nickc@redhat.com>
 
-       PR 24108
-       * elf32-nds32.c (nds32_relocate_section): Add space between words
-       in error message.
-       * elfnn-riscv.c (riscv_version_mismatch): Fix spelling mistake in
-       error message.
-       (riscv_i_or_e_p): Likewise.
-       (riscv_merge_arch_attr_info): Likewise.
+       PR 25307
+       (bfd_pef_parse_function_stubs): Correct the test that ensures that
+       there is enough data remaining in the code buffer before
+       attempting to read a function stub.
 
-2019-01-19  Nick Clifton  <nickc@redhat.com>
+2020-01-03  Nick Clifton  <nickc@redhat.com>
 
-       * version.m4: Reset to 2.32.51
-       * configure: Regenerate.
-       * po/bfd.pot: Regenerate.
+       PR 25308
+       * elf-properties.c (_bfd_elf_convert_gnu_properties): Check the
+       return value from bfd_malloc.
+       * elf32-arm.c (bfd_elf32_arm_vfp11_fix_veneer_locations): Likewise.
+       (bfd_elf32_arm_stm32l4xx_fix_veneer_locations): Likewise.
+       (elf32_arm_filter_cmse_symbols): Likewise.
+       (elf32_arm_write_section): Likewise.
+       * mach-o.c (bfd_mach_o_core_fetch_environment): Likewise.
+       (bfd_mach_o_follow_dsym): Likewise.
+       * pef.c (bfd_pef_print_loader_section): Likewise.
+       (bfd_pef_scan_start_address): Likewise.
+       (bfd_pef_parse_function_stubs): Likewise.
+       (bfd_pef_parse_symbols): Likewise.
 
-2018-06-24  Nick Clifton  <nickc@redhat.com>
+2020-01-03  Sergei Trofimovich  <siarheit@google.com>
 
-       2.32 branch created.
+        * elfnn-ia64.c (elfNN_ia64_merge_private_bfd_data): don't fail
+        on binary inputs ld/PR25316.
+        (is_ia64_elf): new helper to filter on ia64 objects.
 
-2019-01-16  Kito Cheng  <kito@andestech.com>
+2020-01-03  Jan Beulich  <jbeulich@suse.com>
 
-       * elf-attrs.c (vendor_obj_attr_size): Return 0 if size is 0 even
-       for OBJ_ATTR_PROC.
+       * mach-o.c (cpusubtype, bfd_mach_o_header_p): Insert underscore
+       in parameter names.
+       (bfd_mach_o_scan): Insert underscore in two variable names.
 
-2019-01-16  Kito Cheng  <kito@andestech.com>
-           Nelson Chu  <nelson@andestech.com>
+2020-01-02  Sergey Belyashov  <sergey.belyashov@gmail.com>
 
-       * elfnn-riscv.c (in_subsets): New.
-       (out_subsets): Likewise.
-       (merged_subsets): Likewise.
-       (riscv_std_ext_p): Likewise.
-       (riscv_non_std_ext_p): Likewise.
-       (riscv_std_sv_ext_p): Likewise.
-       (riscv_non_std_sv_ext_p): Likewise.
-       (riscv_version_mismatch): Likewise.
-       (riscv_i_or_e_p): Likewise.
-       (riscv_merge_std_ext): Likewise.
-       (riscv_merge_non_std_and_sv_ext): Likewise.
-       (riscv_merge_arch_attr_info): Likewise.
-       (riscv_merge_attributes): Likewise.
-       (_bfd_riscv_elf_merge_private_bfd_data): Merge attribute.
-
-       * elfnn-riscv.c (riscv_elf_obj_attrs_arg_type): New.
-       (elf_backend_obj_attrs_vendor): Define.
-       (elf_backend_obj_attrs_section_type): Likewise.
-       (elf_backend_obj_attrs_section): Likewise.
-       (elf_backend_obj_attrs_arg_type): Define as
-       riscv_elf_obj_attrs_arg_type.
-       * elfxx-riscv.c (riscv_estimate_digit): New.
-       (riscv_estimate_arch_strlen1): Likewise.
-       (riscv_estimate_arch_strlen): Likewise.
-       (riscv_arch_str1): Likewise.
-       (riscv_arch_str): Likewise.
-       * elfxx-riscv.h (riscv_arch_str): Declare.
-
-2019-01-14  John Darrington <john@darrington.wattle.id.au>
-
-       * bfd-in2.h [BFD_RELOC_S12Z_OPR]: New reloc.
-       * libbfd.h: regen.
-       * elf32-s12z.c (eld_s12z_howto_table): R_S12Z_OPR takes non zero
-       source field.  (md_apply_fix): Apply final fix
-       to BFD_RELOC_S12Z_OPR.
-       * reloc.c[BFD_RELOC_S12Z_OPR]: New reloc.
-
-2019-01-14  Maamoun Tarsha  <maamountk@hotmail.com>
-
-       PR 20113
-       * elf32-s390.c (allocate_dynrelocs): Update comment.
-
-2019-01-09  Andrew Paprocki  <andrew@ishiboo.com>
-
-       * warning.m4: Adjust egrep pattern for non-GNU compilers.
+       * Makefile.am: Add z80-elf target support.
+       * configure.ac: Likewise.
+       * targets.c: Likewise.
+       * Makefile.in: Regenerate.
        * configure: Regenerate.
+       * config.bfd: Add z80-elf target support and new arches: ez80 and
+       z180.
+       * elf32-z80.c: New file.
+       * archures.c: Add new z80 architectures: eZ80 and Z180.
+       * coffcode.h: Likewise.
+       * cpu-z80.c: Likewise.
+       * coff-z80.c: Add new relocations for Z80 target and local label
+       check.
+       * reloc.c: Add new relocs.
+       * bfd-in2.h: Regenerate.
+       * libbfd.h: Regenerate.
 
-2019-01-08  Alan Modra  <amodra@gmail.com>
-
-       PR 23699
-       PR 24065
-       * ihex.c (ihex_write_object_contents): Properly check 32-bit
-       address range.
-
-2019-01-05  Yoshinori Sato <ysato@users.sourceforge.jp>
-
-       * bfd/archures.c: Add bfd_mach_rx_v2 and bfd_mach_rx_v3.
-       * bfd/bfd-in2.h: Regenerate.
-       * bfd/cpu-rx.c (arch_info_struct): Add RXv2 and RXv3 entry.
-       * bfd/elf32-rx.c (elf32_rx_machine): Add RXv2 and RXv3 support.
-
-2019-01-04  Lifang Xia  <lifang_xia@c-sky.com>
-
-       * config.bfd (csky-*-elf* | csky-*-linux*): Modify the csky
-       default target, little endian target is more suitable.
-
-2019-01-04  Alan Modra  <amodra@gmail.com>
+2020-01-02  Tamar Christina  <tamar.christina@arm.com>
 
-       PR 24061
-       PR 21786
-       * coff-rs6000.c (GET_VALUE_IN_FIELD): Add base parameter and
-       adjust all callers.
-       (EQ_VALUE_IN_FIELD): Likewise.
-       * coff64-rs6000.c (GET_VALUE_IN_FIELD): Likewise.
+       PR 25210
+       PR 24753
+       * elfnn-aarch64.c (_bfd_aarch64_create_stub_section): Set ELF class.
 
-2019-01-01  Alan Modra  <amodra@gmail.com>
+2020-01-01  Alan Modra  <amodra@gmail.com>
 
        Update year range in copyright notice of all files.
 
-For older changes see ChangeLog-2018
+For older changes see ChangeLog-2019
 \f
-Copyright (C) 2019 Free Software Foundation, Inc.
+Copyright (C) 2020 Free Software Foundation, Inc.
 
 Copying and distribution of this file, with or without modification,
 are permitted in any medium without royalty provided the copyright
This page took 0.087964 seconds and 4 git commands to generate.