xcoff slurp_armap bounds checking
[deliverable/binutils-gdb.git] / bfd / ChangeLog
index 8d4404ebf1b2ee607cbd7a746996397d9001336d..dc264de3cc360cd741a32c6d3de1b7350e9bed00 100644 (file)
@@ -1,3 +1,610 @@
+2019-12-18  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.
+
+2019-12-18  Alan Modra  <amodra@gmail.com>
+
+       * 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.
+
+2019-12-18  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.
+
+2019-12-17  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.
+       * bfd-in2.h: Regenerate.
+       * configure: Regenerate.
+       * po/SRC-POTFILES.in: Regenerate.
+
+2019-12-13  Alan Modra  <amodra@gmail.com>
+
+       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.
+
+2019-12-12  Alan Modra  <amodra@gmail.com>
+
+       * libbfd.c (bfd_get): Don't cast result of bfd_get_8.
+       * bfd-in2.h: Regenerate.
+
+2019-12-11  Alan Modra  <amodra@gmail.com>
+
+       * 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.
+
+2019-12-11  Alan Modra  <amodra@gmail.com>
+
+       * libbfd.c (bfd_get_8): Return a bfd_vma.
+       (bfd_get_signed_8): Return a bfd_signed_vma.
+       * bfd-in2.h: Regenerate.
+
+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.
+
+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.
+
+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.
+       * 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.
+       * 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.
+
+2019-10-15  Alan Modra  <amodra@gmail.com>
+
+       PR 25100
+       * elf64-ppc.c (sfpr_define): Delete dead code that triggered a warning.
+
+2019-10-15  Alan Modra  <amodra@gmail.com>
+
+       * bfd.c (bfd_check_compression_header): Check for powers of two
+       with x == (x & -x).
+
+2019-10-14  Alan Modra  <amodra@gmail.com>
+
+       * syms.c (struct indexentry): Add idx field.
+       (cmpindexentry): Final sort on idx.
+       (_bfd_stab_section_find_nearest_line): Set idx.
+
+2019-10-14  Alan Modra  <amodra@gmail.com>
+
+       * 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.
+
+2019-10-14  Alan Modra  <amodra@gmail.com>
+
+       * elflink.c (elf_sort_symbol): Sort on type and name as well.
+       (elf_link_add_object_symbols): Style fix.
+
+2019-10-14  Alan Modra  <amodra@gmail.com>
+
+       * 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.
+
+2019-10-14  Alan Modra  <amodra@gmail.com>
+
+       * 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.
+
 2019-10-14  Alan Modra  <amodra@gmail.com>
 
        * elf-strtab.c (strrevcmp): Comment.
This page took 0.029274 seconds and 4 git commands to generate.