-2020-11-25 H.J. Lu <hongjiu.lu@intel.com>
+2022-07-29 Nick Clifton <nickc@redhat.com>
- PR ld/26936
- * elflink.c (_bfd_elf_check_kept_section): Get the real kept
- section.
-
-2020-11-23 Nick Clifton <nickc@redhat.com>
-
- PR 26931
- * elf-bfd.h (struct elf_backend_data): Add bfd_boolean field to
- slurp_secondary_relocs field.
- (_bfd_elf_slurp_secondary_reloc_section): Update prototype.
- * elf.c (_bfd_elf_slurp_secondary_reloc_section): Add new
- parameter. Compute number of symbols based upon the new
- parameter.
- * elfcode.h (elf_slurp_reloc_table): Pass dynamic as new
- parameter.
-
-2020-11-23 H.J. Lu <hongjiu.lu@intel.com>
-
- PR ld/26918
- * elf64-s390.c (elf_s390_finish_dynamic_sections): Set .got
- sh_entsize only if .got size > 0.
-
-2020-11-21 Nelson Chu <nelson.chu@sifive.com>
-
- * elfnn-riscv.c (_bfd_riscv_relax_section): Add a new relax pass
- to do the pcgp relaxation later, after the lui and call relaxations,
- but before the delete and alignment relaxations.
-
-2020-11-20 Nick Alcock <nick.alcock@oracle.com>
-
- * elflink.c (elf_finalize_dynstr): Call examine_strtab after
- dynstr finalization.
- (elf_link_swap_symbols_out): Don't call it here. Call
- ctf_new_symbol before swap_symbol_out.
- (elf_link_output_extsym): Call ctf_new_dynsym before
- swap_symbol_out.
- (bfd_elf_final_link): Likewise.
- * elf.c (swap_out_syms): Pass in bfd_link_info. Call
- ctf_new_symbol before swap_symbol_out.
- (_bfd_elf_compute_section_file_positions): Adjust.
-
-2020-11-19 Nick Clifton <nickc@redhat.com>
-
- PR 26918
- * elf64-s390.c (elf_s390_finish_dynamic_sections): Check for the
- existance of an sgot output section before setting the
- sh_entsize.
-
-2020-11-18 Jozef Lawrynowicz <jozef.l@mittosystems.com>
- H.J. Lu <hongjiu.lu@intel.com>
-
- * elf-bfd.h (enum elf_gnu_osabi): Add elf_gnu_osabi_retain.
- (struct elf_obj_tdata): Increase has_gnu_osabi to 4 bits.
- * elf.c (_bfd_elf_make_section_from_shdr): Set elf_gnu_osabi_retain
- for SHF_GNU_RETAIN.
- (_bfd_elf_final_write_processing): Report if SHF_GNU_RETAIN is
- not supported by the OSABI.
- Adjust error messages.
- * elflink.c (elf_link_input_bfd): Copy enabled has_gnu_osabi bits from
- input BFD to output BFD.
- (bfd_elf_gc_sections): gc_mark the section if SHF_GNU_RETAIN is set.
-
-2020-11-16 Przemyslaw Wirkus <przemyslaw.wirkus@arm.com>
-
- * cpu-arm.c (processors): Add Cortex-A78C.
-
-2020-11-11 Tom Tromey <tromey@adacore.com>
-
- * archive.c (getuid, getgid): Move...
- * sysdep.h (getuid, getgid): ...here.
-
-2020-11-09 Alan Modra <amodra@gmail.com>
-
- * vms-alpha.c (alpha_vms_write_exec): Write 16 bits to eihd.alias.
-
-2020-11-09 Alan Modra <amodra@gmail.com>
-
- * archive.c (bfd_ar_hdr_from_filesystem): Use bfd_set_input_error
- when stat of archive member fails.
- * coff-rs6000.c (xcoff_write_archive_contents_old),
- (xcoff_write_archive_contents_big): Likewise, and handle in-memory
- bfd.
-
-2020-11-03 Alan Modra <amodra@gmail.com>
-
- * elf.c (bfd_section_from_shdr): Free sections_being_created.
- Use bfd_zmalloc.
-
-2020-11-02 Alan Modra <amodra@gmail.com>
-
- PR 15146
- PR 26314
- PR 26530
- PR 26806
- * elflink.c (elf_link_add_object_symbols): Don't set def/ref flags
- for plugin syms. Do allow plugin syms to mark as-needed libs.
-
-2020-10-30 H.J. Lu <hongjiu.lu@intel.com>
-
- PR gas/26703
- * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Generate
- GNU_PROPERTY_X86_ISA_1_BASELINE for -z x86-64-baseline.
-
-2020-10-29 Nick Clifton <nickc@redhat.com>
-
- PR 26809
- * elf.c (_bfd_elf_slurp_secondary_reloc_section): Use the correct
- sized reloc reading function.
- (_bfd_elf_write_secondary_reloc_section): Use the correct sized
- reloc writing function.
-
-2020-10-28 Nick Clifton <nickc@redhat.com>
-
- PR 26774
- * srec.c (srec_write_symbols): Do not emit symbols in sections
- that have been removed from the output.
-
-2020-10-27 Nick Clifton <nickc@redhat.com>
-
- * elf64-hppa.c (elf_hppa_final_link_relocate): Check that the
- symbol's section is being output before adding its offset to the
- addend when processing R_PARISC_SECREL32.
-
-2020-10-25 Alan Modra <amodra@gmail.com>
-
- * vms-misc.c (_bfd_vms_save_counted_string): Count length byte
- towards maxlen.
-
-2020-10-20 Dr. David Alan Gilbert <dgilbert@redhat.com>
-
- * po/es.po: Fix printf format.
-
-2020-10-16 Nelson Chu <nelson.chu@sifive.com>
-
- * elfnn-riscv.c (riscv_elf_link_hash_table): Add last_iplt_index.
- (riscv_elf_size_dynamic_sections): Initialize the last_iplt_index.
- (riscv_elf_relocate_section): Use riscv_elf_append_rela.
- (riscv_elf_finish_dynamic_symbol): If the use_elf_append_rela is
- false, then we should add the dynamic relocs from the last of
- the .rela.iplt, and don't use the riscv_elf_append_rela to add.
-
-2020-10-16 Nelson Chu <nelson.chu@sifive.com>
-
- * elfnn-riscv.c: Include "objalloc.h" since we need objalloc_alloc.
- (riscv_elf_link_hash_table): Add loc_hash_table and loc_hash_memory
- for local STT_GNU_IFUNC symbols.
- (riscv_elf_got_plt_val): Removed.
- (riscv_elf_local_htab_hash, riscv_elf_local_htab_eq): New functions.
- Use to compare local hash entries.
- (riscv_elf_get_local_sym_hash): New function. Find a hash entry for
- local symbol, and create a new one if needed.
- (riscv_elf_link_hash_table_free): New function. Destroy an riscv
- elf linker hash table.
- (riscv_elf_link_hash_table_create): Create hash table for local ifunc.
- (riscv_elf_check_relocs): Create a fake global symbol to track the
- local ifunc symbol. Add support to check and handle the relocations
- reference to ifunc symbols.
- (allocate_dynrelocs): Let allocate_ifunc_dynrelocs and
- allocate_local_ifunc_dynrelocs to handle the ifunc symbols if they
- are defined and referenced in a non-shared object.
- (allocate_ifunc_dynrelocs): New function. Allocate space in .plt,
- .got and associated reloc sections for ifunc dynamic relocs.
- (allocate_local_ifunc_dynrelocs): Likewise, but for local ifunc
- dynamic relocs.
- (riscv_elf_relocate_section): Add support to handle the relocation
- referenced to ifunc symbols.
- (riscv_elf_size_dynamic_sections): Updated.
- (riscv_elf_adjust_dynamic_symbol): Updated.
- (riscv_elf_finish_dynamic_symbol): Finish up the ifunc handling,
- including fill the PLT and GOT entries for ifunc symbols.
- (riscv_elf_finish_local_dynamic_symbol): New function. Called by
- riscv_elf_finish_dynamic_symbol to handle the local ifunc symbols.
- (_bfd_riscv_relax_section): Don't do the relaxation for ifunc.
- * elfxx-riscv.c: Add R_RISCV_IRELATIVE.
- * configure.ac: Link elf-ifunc.lo to use the generic ifunc support.
- * configure: Regenerated.
-
-2020-10-16 Alan Modra <amodra@gmail.com>
-
- * elf32-arc.c (replace_func): Correct return type.
- (get_replace_function): Use a replace_func function pointer rather
- than void*. Update associated ARC_RELOC_HOWTO define.
+ PR 29424
+ * dwarf2.c (read_attribute_value): Handle DW_FORM_rnglistx and
+ DW_FORM_loclistx.
-2020-10-16 Alan Modra <amodra@gmail.com>
+2022-07-26 Nick Clifton <nickc@redhat.com>
- * elf32-cr16.c: Formatting.
- (cr16_elf_final_link_relocate): Sign extend rather than clumsy
- "add or subtract" of offset value. Simplify range checks. Move
- common code out of "if" branches. Don't refetch insn fields
- needlessly.
+ * elfnn-loongarch.c (loongarch_elf_relocate_section): Fix
+ indentation.
-2020-10-16 Alan Modra <amodra@gmail.com>
+2022-07-08 Nick Clifton <nickc@redhat.com>
- * elf64-ppc.c (ppc64_elf_relocate_section): Tighten sanity check
- on R_PPC64_GOT_LO_DS and R_PPC64_GOT_HA instructions.
+ * 2.39 branch created.
-2020-10-09 Alan Modra <amodra@gmail.com>
+2022-05-19 Yvan Roux <yvan.roux@foss.st.com>
- * elf64-ppc.c (write_plt_relocs_for_local_syms): Don't do local
- entry offset optimisation.
-
-2020-10-09 H.J. Lu <hongjiu.lu@intel.com>
-
- PR gas/26703
- * elf-linker-x86.h (elf_linker_x86_params): Add isa_level.
- * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Merge
- GNU_PROPERTY_X86_ISA_1_V[234].
- (_bfd_x86_elf_link_setup_gnu_properties): Generate
- GNU_PROPERTY_X86_ISA_1_V[234] for -z x86-64-v[234].
-
-2020-10-06 H.J. Lu <hongjiu.lu@intel.com>
-
- PR ld/26711
- * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Merge -z ibt
- and -z shstk only with GNU_PROPERTY_X86_FEATURE_1_AND.
-
-2020-10-06 Brandon Bergren <bdragon@FreeBSD.org>
-
- * config.bfd: Add powerpc64le-*-freebsd*.
- * configure.ac: Add powerpc_elf64_fbsd_le_vec.
- * elf64-ppc.c (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME): Define for
- freebsd.
- * targets.c (powerpc_elf64_fbsd_le_vec): Declare.
- (_bfd_target_vector): Add it.
- * configure: Regenerate.
-
-2020-10-05 Kamil Rytarowski <n54@gmx.com>
-
- * config.bfd (aarch64-*-netbsd*, aarch64_be-*-netbsd*): Add target.
-
-2020-10-05 Nick Clifton <nickc@redhat.com>
-
- PR 26253
- * elf.c (_bfd_elf_setup_sections): Do not complain about an
- sh_link value of zero when the SLF_LINK_ORDER flag is set.
- (assign_section_numbers): Likewise.
-
-2020-10-02 H.J. Lu <hongjiu.lu@intel.com>
-
- PR 26681
- * elflink.c (bfd_elf_gc_sections): Do not arbitrarily keep note
- sections which are linked to another section.
+ PR 25713
+ * bfdio.c (_bfd_real_fopen): Delete ccs string.
+
+2022-04-27 John Baldwin <jhb@FreeBSD.org>
+
+ * elf.c (elfcore_grok_freebsd_note): Handle NT_ARM_TLS notes.
+
+2022-04-25 Nick Clifton <nickc@redhat.com>
+
+ PR 29072
+ * elflink.c (bfd_elf_size_dynamic_sections): Display a note to the
+ user that the current ehaviour of creating an executable stack
+ because of a missing .note.GNU-stack section is deprecated and
+ will be changed in a future release.
+
+2022-04-20 Clément Chigot <clement.chigot@atos.net>
+
+ * coff-rs6000.c (xcoff_reloc_type_noop): Add info argument.
+ (xcoff_reloc_type_fail): Likewise.
+ (xcoff_reloc_type_pos): Likewise.
+ (xcoff_reloc_type_neg): Likewise.
+ (xcoff_reloc_type_rel): Likewise.
+ (xcoff_reloc_type_toc): Likewise.
+ (xcoff_reloc_type_ba): Likewise.
+ (xcoff_reloc_type_crel): Likewise.
+ (xcoff_reloc_type_tls): Likewise.
+ (xcoff_reloc_type_br): Add stub handler.
+ (xcoff_ppc_relocate_section): Add info to
+ xcoff_calculate_relocation.
+ (xcoff_stub_indirect_call_code): New constant.
+ (xcoff_stub_shared_call_code): Likewise.
+ (bfd_xcoff_backend_data): Add stub code fields.
+ (bfd_pmac_xcoff_backend_data): Likewise.
+ * coff64-rs6000.c (xcoff64_reloc_type_br): Add stub handler.
+ (xcoff64_ppc_relocate_section): Add info to
+ xcoff64_calculate_relocation.
+ (xcoff64_stub_indirect_call_code): New constant.
+ (xcoff64_stub_shared_call_code): Likewise.
+ (bfd_xcoff_backend_data): Add stub code fields.
+ (bfd_xcoff_aix5_backend_data): Likewise.
+ * libxcoff.h (struct xcoff_backend_data_rec): Add stub fields.
+ (bfd_xcoff_stub_indirect_call_code): New define.
+ (bfd_xcoff_stub_indirect_call_size): New define.
+ (bfd_xcoff_stub_shared_call_code): New define.
+ (bfd_xcoff_stub_shared_call_size): New define.
+ (xcoff_reloc_function): Add info argument.
+ (enum xcoff_stub_type): New enum.
+ (struct xcoff_stub_hash_entry): New structure.
+ * xcofflink.c (struct xcoff_link_hash_table): Add stub hash
+ table and params fields.
+ (xcoff_stub_hash_entry): New define.
+ (xcoff_stub_hash_lookup): New define.
+ (stub_hash_newfunc): New function.
+ (_bfd_xcoff_bfd_link_hash_table_free): Free the new stub hash
+ table.
+ (_bfd_xcoff_bfd_link_hash_table_create): Create the new stub
+ hash table.
+ (xcoff_link_add_symbols): Save rawsize for XTY_SD.
+ (bfd_xcoff_link_init): New function.
+ (xcoff_stub_csect_name): New function.
+ (xcoff_stub_get_csect_in_range): New function.
+ (xcoff_stub_name): New function.
+ (bfd_xcoff_get_stub_entry): New function.
+ (bfd_xcoff_type_of_stub): New function.
+ (xcoff_add_stub): New function.
+ (xcoff_build_one_stub): New function.
+ (bfd_xcoff_size_stubs): New function.
+ (bfd_xcoff_build_stubs): New function.
+ (xcoff_stub_create_relocations): New function.
+ (xcoff_link_input_bfd): Adapt relocations to stub.
+ (xcoff_write_global_symbol): Adapt to new TOC entries generated
+ for stubs.
+ (_bfd_xcoff_bfd_final_link): Handle stub file.
+ * xcofflink.h (struct bfd_xcoff_link_params): New structure.
+
+2022-04-20 Clément Chigot <clement.chigot@atos.net>
+
+ * coff-rs6000.c (_bfd_xcoff_put_ldsymbol_name): Write len in
+ ldinfo->strings instead of directly in the output_bfd.
+ * coff64-rs6000.c (_bfd_xcoff64_put_ldsymbol_name): Likewise.
+ * xcofflink.c (struct xcoff_link_hash_table): Remove ldrel_count
+ field. Add ldinfo field.
+ (xcoff_mark_symbol): Adjust to new ldinfo field.
+ (xcoff_mark): Likewise.
+ (bfd_xcoff_link_count_reloc): Likewise.
+ (xcoff_build_loader_section): Split into two functions: one that
+ build the loader section (this function) and one that only size
+ it...
+ (xcoff_size_loader_section): ... (this function).
+ (bfd_xcoff_size_dynamic_sections): Adapt to new ldinfo field.
+ Move the part where the dynamic sections are build to ...
+ (bfd_xcoff_build_dynamic_sections): ... this function.
+ * xcofflink.h: Add bfd_xcoff_build_dynamic_sections prototype.
+
+2022-04-13 Alexander von Gluck IV <kallisti5@unixzen.com>
+
+ * config.bfd (x86-haiku): Add i386_pei_vec as a selectable format.
+
+2022-04-08 Nick Clifton <nickc@redhat.com>
+
+ PR 29038
+ * coffgen.c (coff_find_nearest_line_with_names): Fix typo
+ retrieving saved bias.
+
+2022-04-07 Mark Harmstone <mark@harmstone.com>
+
+ * coff-i386.c (in_reloc_p): Add R_SECTION.
+ (howto_table): Add R_SECTION.
+ (coff_pe_i386_relocation_section): Add support for R_SECTION.
+ (coff_i386_reloc_type_lookup): Add support for
+ BFD_RELOC_16_SECCIDX.
+ * coff-x86_64.c (in_reloc_p): Add R_SECTION.
+ (howto_table): Add R_SECTION.
+ (coff_pe_amd64_relocation_section): Add support for R_SECTION.
+ (coff_amd64_reloc_type_lookup): Add support for
+ BFD_RELOC_16_SECCIDX.
+ * reloc.c: Add BFD_RELOC_16_SECIDX.
+ * bfd-in2.h: Regenerate.
+ * libbfd.h: Regenerate.
-2020-09-30 Przemyslaw Wirkus <przemyslaw.wirkus@arm.com>
+2022-04-01 John Baldwin <jhb@FreeBSD.org>
- * cpu-arm.c: Add cortex-a78 and cortex-a78ae.
+ * elf-bfd.h (elfcore_write_x86_segbases): New.
+ * elf.c (elfcore_grok_freebsd_note): Add pseudosections for
+ NT_FREEBSD_X86_SEGBASES register notes.
+ (elfcore_write_x86_segbases): New.
+ (elfcore_write_register_note): Write NT_FREEBSD_X86_SEGBASES
+ register notes.
-2020-09-28 Przemyslaw Wirkus <przemyslaw.wirkus@arm.com>
+2022-04-01 John Baldwin <jhb@FreeBSD.org>
- * cpu-arm.c: (processors) Add Cortex-X1.
+ * elf.c (elfcore_grok_freebsd_note): Remove checks for namesz.
-2020-09-28 Alan Modra <amodra@gmail.com>
+2022-03-22 Steiner H Gunderson <steinar+sourceware@gunderson.no>
- PR 26656
- * elf64-ppc.c (ppc_build_one_stub, ppc_size_one_stub): Check for
- NULL stub_entry->h before calling is_tls_get_addr.
+ * dwarf2.c (_bfd_dwarf2_find_nearest_line): if a function name is
+ found, but no line number info, then return a result of 2.
-2020-09-26 Alan Modra <amodra@gmail.com>
+2022-03-21 Steiner H Gunderson <steinar+sourceware@gunderson.no>
- * elf64-ppc.c (GLINK_PLTRESOLVE_SIZE): Depend on has_plt_localentry0.
- (LD_R0_0R11, ADD_R11_R0_R11): Define.
- (ppc64_elf_tls_setup): Disable params->plt_localentry0 when power10
- code detected.
- (ppc64_elf_size_stubs): Update __glink_PLTresolve eh_frame.
- (ppc64_elf_build_stubs): Move r2 save to start of __glink_PLTresolve,
- and only emit for has_plt_localentry0. Don't use r2 in the stub.
+ PR 28978
+ * dwarf2.c (scan_unit_for_symbols): When performing second pass,
+ check to see if the function or variable being processed is the
+ same as the previous one.
-2020-09-24 Alan Modra <amodra@gmail.com>
+2022-03-18 Viorel Preoteasa <viorel.preoteasa@gmail.com>
- PR 26656
- * elf64-ppc.c (plt_stub_size): Add "odd" param. Use it with
- size_power10_offset rather than calculating from start of stub.
- Add size for notoc tls_get_addr_opt stub.
- (plt_stub_pad): Add "odd" param, pass to plt_stub_size.
- (build_tls_get_addr_head, build_tls_get_addr_tail): New functions.
- (build_tls_get_addr_stub): Delete.
- (ppc_build_one_stub): Use a temp for htab->params->stub_bfd.
- Emit notoc tls_get_addr_opt stub. Move eh_frame code to
- suit. Adjust code to use bfd_tls_get_addr_head/tail in place
- of build_tls_get_addr_stub.
- (ppc_size_one_stub): Size notoc tls_get_addr_opt stub.
- Adjust plt_stub_size and plt_stub_pad calls. Correct "odd"
- when padding stub. Size eh_frame for notoc stub too.
- Correct lr_restore value.
- (ppc64_elf_relocate_section): Don't skip over first insn of
- notoc tls_get_addr_opt stub.
+ PR 28924
+ * elf32-arm.c (THM_MAX_FWD_BRANCH_OFFSET): Fix definition.
+ (THM2_MAX_FWD_BRANCH_OFFSET): Likewise.
-2020-09-24 Alan Modra <amodra@gmail.com>
+2022-03-16 Simon Marchi <simon.marchi@efficios.com>
- PR 26655
- * elf64-ppc.c (ppc64_elf_func_desc_adjust): Rename to..
- (ppc64_elf_edit): Call params->edit.
- (ppc64_elf_tls_setup): Don't call _bfd_elf_tls_setup. Return a
- bfd_boolean.
- * elf64-ppc.h (struct ppc64_elf_params): Add "edit".
- (ppc64_elf_tls_setup): Update declaration.
+ * Makefile.am (ALL_MACHINES, ALL_MACHINES_CFILES):
+ Add cpu-amdgcn.c.
+ (BFD64_BACKENDS): Add elf64-amdgcn.lo.
+ (BFD64_BACKENDS_CFILES): Add elf64-amdgcn.c.
+ * Makefile.in: Re-generate.
+ * cpu-amdgcn.c: New.
+ * elf64-amdgcn.c: New.
+ * archures.c (bfd_architecture): Add bfd_arch_amdgcn and related
+ mach defines.
+ (bfd_amdgcn_arch): New.
+ (bfd_archures_list): Add bfd_amdgcn_arch.
+ * bfd-in2.h: Re-generate.
+ * config.bfd: Handle amdgcn* target.
+ * configure.ac: Handle amdgcn_elf64_le_vec.
+ * configure: Re-generate.
+ * elf-bfd.h (elf_target_id): Add AMDGCN_ELF_DATA.
+ * targets.c (amdgcn_elf64_le_vec): New.
+ (_bfd_target_vector): Add amdgcn_elf64_le_vec.
-2020-09-21 Alan Modra <amodra@gmail.com>
+2022-03-01 Torbjörn Svensson <torbjorn.svensson@st.com>
+ Fred Eisele <fredrick.eisele@gmail.com>
- PR 26569
- * elfxx-riscv.c (howto_table): Correct size and bitsize of
- R_RISCV_RVC_BRANCH, R_RISCV_RVC_JUMP, and R_RISCV_RVC_LUI.
- Correct size for R_RISCV_TLS_DTPMOD32, R_RISCV_TLS_DTPREL32,
- R_RISCV_CALL, and R_RISCV_CALL_PLT. Make R_RISCV_TPREL_ADD and
- R_RISCV_ALIGN like R_RISCV_NONE. Correct dst_mask many relocs.
+ PR 25713
+ * bfdio.c (_bfd_real_fopen): Fix typo.
-2020-09-17 Mikael Pettersson <mikpelinux@gmail.com>
+2022-03-01 Nick Clifton <nickc@redhat.com>
- PR ld/18808
- * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Skip IFUNC
- relocations in debug sections, change abort to _bfd_error_handler.
+ PR 28848
+ * elf32-arm.c (elf32_arm_merge_eabi_attributes): If the first
+ input bfd has a Tag_ABI_HardFP_use set to 3 but does not also have
+ TAG_FP_arch set then reset the TAG_ABI_HardFP_use.
-2020-09-16 H.J. Lu <hongjiu.lu@intel.com>
+2022-02-28 Torbjörn Svensson <torbjorn.svensson@st.com>
+ Fred Eisele <fredrick.eisele@gmail.com>
- PR ld/26583
- * config.bfd (targ64_selvecs, targ_selvecs): Add x86_64_pe_vec
- to x86_64_pei_vec.
- * reloc.c: Include "coff/internal.h".
- (bfd_perform_relocation): Adjust relocation for PE/x86-64 inputs.
+ PR 25713
+ * bfdio.c (_bfd_real_fopen): Fix handling of paths longer than 260
+ characters on Windows hosts.
-2020-09-16 Alan Modra <amodra@gmail.com>
+2022-02-28 Nick Clifton <nickc@redhat.com>
- * elf-bfd.h (elf_symbol_from): Remove unused ABFD parameter.
- * elf.c (ignore_section_sym, _bfd_elf_copy_private_symbol_data),
- (swap_out_syms): Adjust elf_symbol_from invocation.
+ PR 28886
+ * config.bfd: Update error message for obsolete configurations.
-2020-09-16 Alan Modra <amodra@gmail.com>
+2022-02-17 Nick Clifton <nickc@redhat.com>
- PR 26623
- * elf-bfd.h (elf_symbol_from): Exclude synthetic symbols.
+ * po/sr.po: Updated Serbian translation.
-2020-09-15 H.J. Lu <hongjiu.lu@intel.com>
+2022-02-16 Fangrui Song <maskray@google.com>
+ Nick Clifton <nickc@redhat.com>
- * coff-x86_64.c (howto_table): Display PE relocation names.
+ PR ld/28841
+ * bfd-in2.h (struct bfd_section): Add type.
+ (discarded_section): Add field.
+ * elf.c (elf_fake_sections): Handle bfd_section::type.
+ * section.c (BFD_FAKE_SECTION): Add field.
+ * mri.c (mri_draw_tree): Update function call.
-2020-09-15 Hans-Peter Nilsson <hp@axis.com>
+2022-02-11 Michael Forney <mforney@mforney.org>
- PR ld/26589
- * elf32-cris.c (cris_elf_check_relocs): Add missing NULL check
- on argument before calling UNDEFWEAK_NO_DYNAMIC_RELOC.
+ * bfd.c (bfd_set_gp_value): Remove return with expression
+ in void function.
-2020-09-12 H.J. Lu <hongjiu.lu@intel.com>
+2022-02-09 Nick Clifton <nickc@redhat.com>
- PR ld/26391
- * elflink.c (elf_final_link_info): Add local_hash_table.
- (local_hash_entry): New.
- (local_hash_newfunc): Likewise.
- (elf_link_output_symstrtab): Append ".COUNT" to duplicated local
- symbols.
- (bfd_elf_final_link): Initialize and free local_hash_table for
- "-z unique-symbol".
+ * config.bfd: Move pending obsolesence targets into the definitely
+ obsolete list.
-2020-09-10 Siddhesh Poyarekar <siddesh.poyarekar@arm.com>
+2022-02-02 Nick Clifton <nickc@redhat.com>
- * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Revert
- changes in 7e05773767820b441b23a16628b55c98cb1aef46. Set
- error for undefined symbol in BFD_RELOC_AARCH64_BRANCH19 and
- BFD_RELOC_AARCH64_TSTBR14 relocations.
+ PR 28834
+ * dwarf2.c (read_section): Change the heuristic that checks for
+ overlarge dwarf debug info sections.
-2020-09-09 Nick Clifton <nickc@redhat.com>
+2022-02-02 Stafford Horne <shorne@gmail.com>
- * cofflink.c (coff_link_check_archive_element): Move the check for
- coff type input to the start of the function.
+ PR 28735
+ * elf32-or1k.c (or1k_elf_got16_no_overflow_howto): Define.
+ (or1k_elf_relocate_section): Use new howto instead of trying to
+ mask out relocation bits.
-2020-09-09 Alan Modra <amodra@gmail.com>
+2022-01-24 Roland McGrath <mcgrathr@google.com>
- * libbfd-in.h (_bfd_write_unsigned_leb128): Declare.
- * libbfd.h: Regenerate.
+ * doc/local.mk (%D%/bfdver.texi): Add mkdir command.
-2020-09-08 Jozef Lawrynowicz <jozef.l@mittosystems.com>
- Kuan-Lin Chen <kuanlinchentw@gmail.com>
-
- * bfd-in2.h (bfd_reloc_code_real): Add
- BFD_RELOC_MSP430_{SET,SUB}_ULEB128.
- * elf32-msp430.c (msp430_elf_ignore_reloc): New.
- (elf_msp430_howto_table): Add R_MSP430{,X}_GNU_{SET,SUB}_ULEB128.
- (msp430_reloc_map): Add R_MSP430_GNU_{SET,SUB}_ULEB128.
- (msp430x_reloc_map): Add R_MSP430X_GNU_{SET,SUB}_ULEB128.
- (write_uleb128): New.
- (msp430_final_link_relocate): Handle R_MSP430{,X}_GNU_{SET,SUB}_ULEB128.
- * libbfd.c (_bfd_write_unsigned_leb128): New.
- * libbfd.h (_bfd_write_unsigned_leb128): New prototype.
- Add BFD_RELOC_MSP430_{SET,SUB}_ULEB128.
- * reloc.c: Document BFD_RELOC_MSP430_{SET,SUB}_ULEB128.
-
-2020-09-08 Alex Coplan <alex.coplan@arm.com>
-
- * archures.c (bfd_mach_aarch64_8R): New.
- * bfd-in2.h: Regenerate.
- * cpu-aarch64.c (bfd_aarch64_arch_v8_r): New.
- (bfd_aarch64_arch_ilp32): Update tail pointer.
+2022-01-24 Nick Clifton <nickc@redhat.com>
-2020-09-08 Alan Modra <amodra@gmail.com>
+ * po/fr.po: Updated French translation.
+ * po/ro.po: Updated Romanian translation.
+ * po/uk.po: Updated Ukranian translation.
- PR 13250
- PR 26580
- * elflink.c (_bfd_elf_merge_symbol): Make "override" a bfd**.
- Return oldbfd in override when old common should override new
- common.
- (_bfd_elf_add_default_symbol): Adjust to suit.
- (elf_link_add_object_symbols): Likewise. Pass "override" to
- _bfd_generic_link_add_one_symbol. Save and restore common u.c.p
- field for --as-needed shared libraries. Revert pr13250 changes.
+2022-01-22 Nick Clifton <nickc@redhat.com>
-2020-09-08 Nick Clifton <nickc@redhat.com>
+ * version.m4: Change to 2.38.50.
+ * configure: Regenerate.
+ * po/bfd.pot: Regenerate.
- * plugin.c (bfd_plugin_canonicalize_symtab): Handle the case of an
- unrecognized symbol type in a weak definition.
+2022-01-22 Nick Clifton <nickc@redhat.com>
-2020-09-04 Alan Modra <amodra@gmail.com>
+ * 2.38 release branch created.
- PR 26574
- * elfcode.h (elf_object_p): Sanity check section header offset.
- * elf.c (_bfd_elf_slurp_secondary_reloc_section): Sanity check
- sh_entsize.
+2022-01-17 Nick Clifton <nickc@redhat.com>
-2020-09-04 Alan Modra <amodra@gmail.com>
+ * Makefile.in: Regenerate.
+ * configure: Regenerate.
+ * doc/Makefile.in: Regenerate.
+ * po/bfd.pot: Regenerate.
- PR 15146
- PR 26314
- PR 26530
- * elflink.c (elf_link_add_object_symbols): Do set def_regular
- and ref_regular for IR symbols. Don't clear dynsym, allowing
- IR symbols to load --as-needed shared libraries, but prevent
- IR symbols from becoming dynamic.
+2021-12-15 Nikita Popov <npv1310@gmail.com>
-2020-09-03 Nick Clifton <nickc@redhat.com>
+ PR 28687
+ * dwarf1.c (parse_die): Fix undefined behaviour in range tests.
- PR 26521
- * elf.c (_bfd_elf_write_secondary_reloc_section): Check for
- secondary reloc sections with a zero sh_entsize field.
+2021-11-17 Nick Clifton <nickc@redhat.com>
-2020-09-03 Nelson Chu <nelson.chu@sifive.com>
+ PR 28452
+ * elf.c (assign_file_positions_for_non_load_sections): Replace
+ assertion with a warning message.
- * elfnn-riscv.c (riscv_i_or_e_p): Minor cleanup for warnings/errors.
- (riscv_merge_std_ext): Likewise.
- (riscv_merge_arch_attr_info): Likewise.
- (riscv_merge_attributes): Likewise and fix comment typos.
+2021-10-19 Nick Clifton <nickc@redhat.com>
-2020-09-03 Nelson Chu <nelson.chu@sifive.com>
+ * linker.c (_bfd_generic_link_add_one_symbol): Test for a NULL
+ name before checking to see if the symbol is __gnu_lto_slim.
+ * archive.c (_bfd_compute_and_write_armap): Likewise.
- * elfnn-riscv.c (riscv_version_mismatch): Change the return type
- from void to bfd_boolean. Report warnings rather than errors
- when the ISA versions are mis-matched. Afterwards, remember to
- update the output ISA versions to the newest ones.
- (riscv_merge_std_ext): Allow to link objects with different
- standard ISA versions. Try to add output ISA versions to
- merged_subsets first.
- (riscv_merge_multi_letter_ext): Likewise. But for standard additional
- ISA and non-standard ISA versions.
+2021-09-27 Nick Alcock <nick.alcock@oracle.com>
-2020-09-03 Kito Cheng <kito.cheng@sifive.com>
+ * configure: Regenerate.
- * elfnn-riscv.c (riscv_merge_std_ext): Fix to report the correct
- error message when the versions of extension are mis-matched.
- * elfxx-riscv.c (riscv_parse_subset): Don't issue the error when
- the string is empty.
+2021-09-15 Andrew Burgess <andrew.burgess@embecosm.com>
-2020-09-03 Alan Modra <amodra@gmail.com>
+ * archures.c (bfd_arch_list): Use 'char *' instead of 'char **'
+ when calculating space for a string list.
- * xcofflink.c (xcoff_get_archive_info): Allocate xcoff_archive_info
- on the output bfd objalloc memory.
+2021-09-014 Cupertino Miranda <cmiranda@synopsys.com>
+ Claudiu Zissulescu <claziss@synopsys.com>
-2020-09-02 Alan Modra <amodra@gmail.com>
+ * arc-got.h (arc_static_sym_data): New structure.
+ (get_static_sym_data): New function.
+ (relocate_fix_got_relocs_for_got_info): Move the computation fo
+ symbol value and section to above introduced function, and use
+ this new function.
- * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Correct type
- of constant shifted left.
+2021-09-07 Luis Machado <luis.machado@linaro.org>
-2020-09-02 Alan Modra <amodra@gmail.com>
+ Revert: [AArch64] MTE corefile support
- * elf32-pru.c (pru_elf32_do_ldi32_relocate): Use an unsigned
- type for "relocation".
+ 2021-05-21 Luis Machado <luis.machado@linaro.org>
-2020-09-01 Alan Modra <amodra@gmail.com>
+ * elf.c (elfcore_make_memtag_note_section): New function.
+ (elfcore_grok_note): Handle NT_MEMTAG note types.
- * reloc.c (N_ONES): Handle N=0.
- * elf32-arm.c (elf32_arm_howto_table_1): Set complain_overflow_dont
- for R_ARM_TLS_DESCSEQ and R_ARM_THM_TLS_DESCSEQ.
+2021-09-07 Nick Clifton <nickc@redhat.com>
-2020-09-01 Alan Modra <amodra@gmail.com>
+ PR 28305
+ * elf32-xtensa.c (elf_xtensa_do_reloc): Add check for put of range
+ reloc.
- PR 26429
- * elf32-arm.c (elf32_arm_allocate_local_sym_info): Allocate arrays
- in descending order of alignment.
+ PR 28303
+ * elfxx-riscv.c (riscv_elf_add_sub_reloc): Add check for out of
+ range relocs.
-2020-09-01 Alan Modra <amodra@gmail.com>
+2021-08-10 Nick Clifton <nickc@redhat.com>
- PR 26423
- * elf32-arm.c (calculate_group_reloc_mask): Use 3u in shift.
+ * po/sr.po: Updated Serbian translation.
-2020-08-31 Alan Modra <amodra@gmail.com>
+2021-07-18 Nick Clifton <nickc@redhat.com>
- PR 26493
- * elfnn-riscv.c (riscv_make_plt_header): Cast PLT_HEADER_SIZE to
- unsigned when using with RISCV_ITYPE.
- (_bfd_riscv_relax_call): Use an unsigned foff.
+ * config.bfd: Move pending obsoletion targets to obsolete list.
-2020-08-31 Alan Modra <amodra@gmail.com>
+2021-07-16 Giulio Benetti <giulio.benetti@benettiengineering.com>
- PR 26476
- PR 26477
- * elfxx-mips.c (CRINFO_CTYPE, CRINFO_RTYPE, CRINFO_DIST2TO),
- (CRINFO_RELVADDR): Make unsigned.
- (mips_elf_nullify_got_load): Use unsigned constant when shifting
- into sign bit.
+ * elf32-or1k.c (or1k_elf_relocate_section): Use a separate entry
+ in switch case R_OR1K_INSN_REL_26 where we need to check for
+ !SYMBOL_CALLS_LOCAL() instead of !SYMBOL_REFERENCES_LOCAL().
-2020-08-31 Alan Modra <amodra@gmail.com>
+2021-07-14 Clément Chigot <clement.chigot@atos.net>
- PR 26466
- * mep-relocs.pl (emit_apply): Handle HI16S adjustment. Use "u"
- variable and rewrite signed overflow check.
- * elf32-mep.c: Regenerate.
- (mep_final_link_relocate): Delete "s".
+ * libxcoff.h (struct xcoff_dwsect_name): Add DWARF name.
+ * coff-rs6000.c (xcoff_dwsect_names): Update.
+ * coffcode.h (sec_to_styp_flags): Likewise.
+ (coff_new_section_hook): Likewise.
-2020-08-31 Alan Modra <amodra@gmail.com>
+2021-07-10 Alan Modra <amodra@gmail.com>
- PR 26461
- * elfxx-ia64.c (ia64_elf_install_value): Make expressions unsigned
- that might shift values into sign bit.
+ * dwarf2.c (read_address): Remove accidental commit.
+ (read_ranges): Compare offset rather than pointers.
-2020-08-31 Alan Modra <amodra@gmail.com>
+2021-07-08 Nick Clifton <nickc@redhat.com>
- PR 26445
- * elf32-csky.c (csky_relocate_contents): Make relocation a bfd_vma,
- and similarly for variables dealing with overflow.
+ * po/pt.po: Updated Portuguese translation.
-2020-08-31 Alan Modra <amodra@gmail.com>
+2021-07-07 Nick Clifton <nickc@redhat.com>
- PR 26442
- * elf32-crx.c (crx_elf_final_link_relocate): Calculate reloc_bits
- without undefined behaviour. Tidy excess casts.
+ * elfcode.h (elf_swap_symbol_out): Revert accidental change that
+ removed an abort if the shndx pointer is NULL.
-2020-08-31 Alan Modra <amodra@gmail.com>
+2021-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
- * elf-m10300.c (mn10300_elf_relax_delete_bytes): Calculate
- alignment from reloc addend after reloc type R_MN10300_ALIGN is
- found.
+ * sysdep.h [!ENABLE_NLS]: Prevent inclusion of <libintl.h> on
+ Solaris.
-2020-08-30 Alan Modra <amodra@gmail.com>
+2021-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
- PR 26435
- PR 26436
- * elf32-cr16.c (cr16_elf_final_link_relocate): Calculate reloc_bits
- without undefined behaviour.
+ * configure.ac: Check for strnlen declaration.
+ * configure, config.in: Regenerate.
-2020-08-29 Nick Clifton <nickc@redhat.com>
+2021-07-07 Nick Clifton <nickc@redhat.com>
- PR 26520
- * dwarf2.c (scan_unit_for_symbols): Add member entries to the
- variable table.
+ PR 28051
+ * coff-rs6000.c (xcoff_reloc_type_tls): Reformat error messages in
+ order to fix problems when translating.
+ * cofflink.c (_bfd_coff_write_global_sym): Likewise.
+ * elfnn-aarch64.c (_bfd_aarch64_erratum_843419_branch_to_stub):
+ Likewise.
+ * po/bfd.pot: Regenerate.
-2020-08-29 Alan Modra <amodra@gmail.com>
+2021-07-06 Michael Matz <matz@suse.de>
- PR 26459
- * elfnn-ia64.c (get_dyn_sym_info): Don't bsearch or look at last
- element when count is zero. bfd_realloc when shrinking.
+ PR ld/28021
+ * elfnn-riscv.c (riscv_relax_delete_bytes): Check for any
+ versioning.
-2020-08-28 Alan Modra <amodra@gmail.com>
+2021-07-06 Alan Modra <amodra@gmail.com>
- PR 26418
- * ecofflink.c (bfd_ecoff_write_accumulated_debug): Don't write
- zero size buffers.
+ PR 28055
+ * elf64-bpf.c (bpf_elf_generic_reloc): Add missing ATTRIBUTE_UNUSED.
-2020-08-28 Alan Modra <amodra@gmail.com>
+2021-07-05 Alan Modra <amodra@gmail.com>
- PR 26418
- * ecofflink.c (WRITE): Really don't write zero size chunks.
+ PR 28055
+ * elf64-bpf.c (bpf_elf_generic_reloc): Use correct bfd for bfd_put
+ and bfd_put_32 calls. Correct section limit checks.
-2020-08-28 Tuckker <tuckkern+sourceware@gmail.com>
+2021-07-03 Nick Clifton <nickc@redhat.com>
- PR 26543
- * linker.c (bfd_generic_define_common_symbol): Force the alignment
- to 1 if the section has now alignment requirement.
+ * version.m4: Update version number.
+ * configure: Regenerate.
+ * po/opcodes.pot: Regenerate.
-2020-08-28 Cooper Qu <cooper.qu@linux.alibaba.com>
+2021-07-03 Nick Clifton <nickc@redhat.com>
- * elf32-csky.c (csky_archs): Fix arch names.
- (csky_find_arch_with_name): New.
- (elf32_csky_merge_attributes): New.
- (csky_elf_merge_private_bfd_data): Add process of merge
- attribute section.
- (elf32_csky_obj_attrs_arg_type): New.
- (elf32_csky_obj_attrs_handle_unknown): New.
- (elf_backend_obj_attrs_vendor): Define.
- (elf_backend_obj_attrs_section): Define.
- (elf_backend_obj_attrs_arg_type): Define.
- (elf_backend_obj_attrs_section_type): Define.
+ * 2.37 release branch created.
-2020-08-28 Nick Clifton <nickc@redhat.com>
+2021-07-02 Nick Clifton <nickc@redhat.com>
- PR19011
- * cofflink.c (_bfd_coff_generic_relocate_section): Provide a value
- for undefined symbols which will not generate extra warning
- messages about truncated relocs.
+ PR 28046
+ * dwarf2.c (read_ranges): Check that range_ptr does not exceed
+ range_end.
-2020-08-28 Nelson Chu <nelson.chu@sifive.com>
+2021-06-30 YunQiang Su <yunqiang.su@cipunited.com>
- * elfnn-riscv.c (riscv_elf_check_relocs): Treat R_RISCV_CALL
- and R_RISCV_CALL_PLT as the same in the riscv_elf_check_relocs.
- (riscv_elf_relocate_section): Remove the R_RISCV_CALL for the
- unresolved reloc checks.
+ PR mips/28009
+ * bfd/elfxx-mips.c (_bfd_mips_elf_section_from_shdr,
+ _bfd_mips_elf_fake_sections): Mark LTO debug info as
+ SHT_MIPS_DWARF.
-2020-08-27 John David Anglin <danglin@gcc.gnu.org>
+2021-06-29 Nick Clifton <nickc@redhat.com>
- PR 26356
- * som.c (som_bfd_copy_private_section_data): Issue error when a
- subspace is specified without its containing space.
+ * config.bfd (obsolete configurations): Add netbsdpe.
-2020-08-27 Alan Modra <amodra@gmail.com>
+2021-06-22 Nelson Chu <nelson.chu@sifive.com>
- PR 26469
- * elflink.c: Include limits.h.
- (CHAR_BIT): Provide fallback define.
- (set_symbol_value): Correct complex reloc comment.
- (undefined_reference): Set bfd_error.
- (BINARY_OP_HEAD, BINARY_OP_TAIL): Split out from..
- (BINARY_OP): ..this.
- (eval_symbol): Limit shifts. Force unsigned for left shift.
- Catch divide by zero.
- * configure.ac (AC_CHECK_HEADERS): Combine, sort and add limits.h.
- * configure: Regenerate.
- * config.in: Regenerate.
+ * elfnn-riscv.c (riscv_pcrel_hi_reloc): Added field to store
+ the original relocation type, in case the type is converted to
+ R_RISCV_HI20.
+ (riscv_pcrel_lo_reloc): Removed unused name field.
+ (riscv_pcrel_relocs): Added comments.
+ (riscv_zero_pcrel_hi_reloc): Removed unused input_bfd.
+ (riscv_record_pcrel_hi_reloc): Updated.
+ (riscv_record_pcrel_lo_reloc): Likewise.
+ (riscv_resolve_pcrel_lo_relocs): Likewise. Check the original
+ type of auipc, to make sure the %pcrel_lo without any addends.
+ Otherwise, report dangerous relocation error.
+ (riscv_elf_relocate_section): Updated above functions are changed.
+ For R_RISCV_GOT_HI20, report dangerous relocation error when addend
+ isn't zero.
-2020-08-27 Alan Modra <amodra@gmail.com>
+2021-06-19 H.J. Lu <hongjiu.lu@intel.com>
- PR 26462
- * reloc.c (bfd_check_overflow): Return early if zero bitsize.
+ PR ld/27998
+ * elfxx-x86.c (elf_x86_allocate_dynrelocs): Count PLT for GOTOFF
+ relocation against IFUNC symbols.
+ (_bfd_x86_elf_adjust_dynamic_symbol): Likewise.
-2020-08-27 Alan Modra <amodra@gmail.com>
+2021-06-19 H.J. Lu <hongjiu.lu@intel.com>
+
+ * elflink.c (bfd_elf_final_link): Correct DT_TEXTREL warning in
+ PDE.
+
+2021-06-18 H.J. Lu <hongjiu.lu@intel.com>
+
+ * elf-properties.c (_bfd_elf_parse_gnu_properties): Handle
+ GNU_PROPERTY_UINT32_AND_LO, GNU_PROPERTY_UINT32_AND_HI,
+ GNU_PROPERTY_UINT32_OR_LO and GNU_PROPERTY_UINT32_OR_HI.
+ (elf_merge_gnu_properties): Likewise.
+
+2021-06-11 Alan Modra <amodra@gmail.com>
+
+ PR 27952
+ * elf-bfd.h (struct elf_obj_tdata): Add is_pie.
+ * elflink.c (elf_link_add_object_symbols): Set is_pie.
+
+2021-06-09 Nick Clifton <nickc@redhat.com>
+
+ PR 27666
+ * config.bfd: Do not add the sparc_elf32_vec or sparc_elf64_vec
+ vectors to Sparc Solaris2 targets.
+
+2021-06-08 Michael Matz <matz@suse.de>
+
+ * elf.c (bfd_section_from_shdr): Set has_secondary_relocs flag.
+ (_bfd_elf_slurp_secondary_reloc_section): Use it for early-out.
+
+2021-06-07 Jan Beulich <jbeulich@suse.com>
+
+ * dwarf2.c (read_ranges, read_rnglists): Add u suffix to constant.
+
+2021-06-02 Alan Modra <amodra@gmail.com>
+
+ * elf-attrs.c (_bfd_elf_parse_attributes): Break out of loop if
+ subsection length is too small to cover tag and length field.
+
+2021-05-31 Nelson Chu <nelson.chu@sifive.com>
+ Lifang Xia <lifang_xia@c-sky.com>
+
+ PR 27566
+ * elfnn-riscv.c (struct riscv_elf_link_hash_table): New integer pointer
+ to monitor the data segment phase.
+ (bfd_elfNN_riscv_set_data_segment_info): New function called by
+ after_allocation, to set the data_segment_phase from expld.dataseg.
+ (_bfd_riscv_relax_section): Don't relax when data_segment_phase is
+ exp_seg_relro_adjust (0x4).
+ * elfxx-riscv.h (bfd_elf32_riscv_set_data_segment_info): New extern.
+ (bfd_elf64_riscv_set_data_segment_info): Likewise
+
+2021-05-28 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/27905
+ * elf32-i386.c: Don't include "libiberty.h".
+ (elf_howto_table): Revert commits a7664973b24 and 50c95a739c9.
+ (elf_i386_rtype_to_howto): Revert commit 50c95a739c9.
+ (elf_i386_info_to_howto_rel): Likewise.
+ (elf_i386_tls_transition): Likewise.
+ (elf_i386_relocate_section): Likewise.
+ * elf64-x86-64.c (x86_64_elf_howto_table): Revert commits
+ a7664973b24 and 50c95a739c9.
+ (elf_x86_64_rtype_to_howto): Revert commit 50c95a739c9.
+ * elfxx-x86.c (_bfd_x86_elf_parse_gnu_properties): Likewise.
+ * elfxx-x86.h (elf_x86_obj_tdata): Likewise.
+ (elf_x86_has_code16): Likewise.
+
+2021-05-26 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/27905
+ * elf32-i386.c: Include "libiberty.h".
+ (elf_howto_table): Add 16-bit R_386_PC16 entry.
+ (elf_i386_rtype_to_howto): Add a BFD argument. Use 16-bit
+ R_386_PC16 if input has 16-bit mode instructions.
+ (elf_i386_info_to_howto_rel): Update elf_i386_rtype_to_howto
+ call.
+ (elf_i386_tls_transition): Likewise.
+ (elf_i386_relocate_section): Likewise.
+ * elf64-x86-64.c (x86_64_elf_howto_table): Add 16-bit
+ R_X86_64_PC16 entry.
+ (elf_x86_64_rtype_to_howto): Use 16-bit R_X86_64_PC16 if input
+ has 16-bit mode instructions.
+ * elfxx-x86.c (_bfd_x86_elf_parse_gnu_properties): Set
+ elf_x86_has_code16 if relocatable input is marked with
+ GNU_PROPERTY_X86_FEATURE_2_CODE16.
+ * elfxx-x86.h (elf_x86_obj_tdata): Add has_code16.
+ (elf_x86_has_code16): New.
+
+2021-05-26 Nelson Chu <nelson.chu@sifive.com>
+
+ * elfxx-riscv.h (check_unknown_prefixed_ext): New bool.
+ * elfxx-riscv.c (riscv_parse_prefixed_ext): Do not check the
+ prefixed extension name if check_unknown_prefixed_ext is false.
+ * elfnn-riscv.c (riscv_merge_arch_attr_info): Set
+ check_unknown_prefixed_ext to false for linker.
+
+2021-05-25 Nick Clifton <nickc@redhat.com>
+
+ * elf32-arn.c (struct elf_arm_obj_tdata): Add num_entries field.
+ (elf32_arm_num_entries): New macro.
+ (elf32_arm_allocate_local_sym_info): Initialise the new field.
+ Allocate arrays individually so that buffer overruns can be
+ detected by memory checkers.
+ (elf32_arm_create_local_iplt): Check num_entries.
+ (elf32_arm_get_plt_info): Likewise.
+ (elf32_arm_final_link_relocate): Likewise.
+ (elf32_arm_check_relocs): Likewise.
+ (elf32_arm_size_dynamic_sections): Likewise.
+ (elf32_arm_output_arch_local_syms): Likewise.
- * elf32-arm.c (elf32_arm_final_link_relocate): Don't segfault
- on sym_sec not being output.
+2021-05-25 Nick Clifton <nickc@redhat.com>
+
+ * elf32-arm.c: Fix formatting.
+
+2021-05-25 Alan Modra <amodra@gmail.com>
+
+ * elf-attrs.c (elf_attr_strdup): New function.
+ (_bfd_elf_attr_strdup): Use it here.
+ (elf_add_obj_attr_string): New function, extracted from..
+ (bfd_elf_add_obj_attr_string): ..here.
+ (elf_add_obj_attr_int_string): New function, extracted from..
+ (bfd_elf_add_obj_attr_int_string): ..here.
+ (_bfd_elf_parse_attributes): Don't allocate an extra byte for a
+ string terminator. Instead ensure parsing doesn't go past
+ end of sub-section. Use size_t variables for lengths.
+
+2021-05-22 Alan Modra <amodra@gmail.com>
+
+ * libbfd.c (_bfd_safe_read_leb128): Remove length_return parameter.
+ Replace data pointer with pointer to pointer. Increment pointer
+ over bytes read.
+ * libbfd-in.h (_bfd_safe_read_leb128): Update prototype.
+ * elf-attrs.c (_bfd_elf_parse_attributes): Adjust to suit. Be
+ careful not to increment data pointer past end. Remove now
+ redundant pr17512 check.
+ * wasm-module.c (READ_LEB128): Adjust to suit changes to
+ _bfd_safe_read_leb128.
+ * dwarf2.c (read_n_bytes): New inline function, old one renamed to..
+ (read_blk): ..this. Allocate and return block. Increment bfd_byte**
+ arg.
+ (read_3_bytes): New function.
+ (read_1_byte, read_1_signed_byte, read_2_bytes, read_4_bytes),
+ (read_8_bytes, read_string, read_indirect_string),
+ (read_indirect_line_string, read_alt_indirect_string): Take a
+ byte_byte** arg which is incremented over bytes read. Remove any
+ bytes_read return. Rewrite limit checks to compare lengths
+ rather than pointers.
+ (read_abbrevs, read_attribute_value, read_formatted_entries),
+ (decode_line_info, find_abstract_instance, read_ranges),
+ (read_rnglists, scan_unit_for_symbols, parse_comp_unit),
+ (stash_comp_unit): Adjust to suit. Rewrite limit checks to
+ compare lengths rather than pointers.
+ * libbfd.h: Regenerate.
-2020-08-27 Alan Modra <amodra@gmail.com>
+2021-05-21 Luis Machado <luis.machado@linaro.org>
- PR 26416
- * elf64-alpha.c (elf64_alpha_relax_tls_get_addr): Correct "dynamic".
+ * elf.c (elfcore_make_memtag_note_section): New function.
+ (elfcore_grok_note): Handle NT_MEMTAG note types.
-2020-08-26 Nick Clifton <nickc@redhat.com>
+2021-05-20 Andrew Burgess <andrew.burgess@embecosm.com>
- PR 26433
- * elf32-avr.c (avr_final_link_relocate): Fix undefined shift
- behaviour.
- (avr_elf32_load_records_from_section): Use bfd_get_16 and
- bfd_get_32 to load values from potentially unaligned pointers.
+ * section.c (bfd_get_section_by_name): Return NULL if name is
+ NULL.
+ (bfd_get_section_by_name_if): Likewise.
+ * dwarf2.c (read_section): Remove unneeded NULL check.
+ (find_debug_info): Likewise.
- PR 26416
- * elf64-alpha.c (elf64_alpha_relax_tls_get_addr): Test for and
- ignore local symbols.
- (elf64_alpha_relax_got_load): Do not check for local dynamic
- symbols.
- (OP_LDA, OP_LDAH, OP_LDQ, OP_BR, OP_BSR): Use unsigned constant
- values.
- (INSN_A) Cast the A parameter to unsigned.
- (INSN_AB): Define in terms of INSN_A.
- (INSN_ABC): Likewise.
- (INSN_ABO): Likewise.
- (INSN_AD): Likewise.
+2021-05-19 Nick Clifton <nickc@redhat.com>
- PR 26411
- * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Use an
- unsigned long constant when creating a mask to test for alignment
- issues.
+ * plugin.c (bfd_plugin_open_input): Inform the user if the limit
+ on the number of open files is reached. If possible, try to
+ increase this limit before failing.
-2020-08-26 Alan Modra <amodra@gmail.com>
+2021-05-14 Nelson Chu <nelson.chu@sifive.com>
- PR 26507
- * elf32-xtensa.c (find_removed_literal): Don't bsearch empty map.
+ * elfnn-riscv.c (riscv_resolve_pcrel_lo_relocs): Check the values
+ of %pcrel_hi, before and after adding the addend. Make sure the
+ value won't be changed, otherwise, report dangerous error.
-2020-08-26 Alan Modra <amodra@gmail.com>
+2021-05-13 Nelson Chu <nelson.chu@sifive.com>
- PR 26506
- * elf32-xtensa.c (elf_xtensa_combine_prop_entries): Return early
- when section is empty.
+ * elfxx-riscv.c (check_implicit_always): The check_func, always add
+ the implicit subset without checking.
+ (check_implicit_for_i): The check_func for i, only add zicsr and
+ zifencei when the version of i less than 2.1.
+ (struct riscv_implicit_subset): Record the subsets and their
+ corresponding implicit subsets.
+ (riscv_implicit_subsets): Table records all implicit informations.
+ (riscv_parse_add_implicit_subsets): Updated and add implicit subsets
+ according to riscv_implicit_subsets. Remove the redundant codes.
-2020-08-26 Alan Modra <amodra@gmail.com>
+2021-05-13 Alan Modra <amodra@gmail.com>
- PR 26498
- * elf32-spu.c (find_function_stack_adjust): Use unsigned vars to
- avoid UB left shift.
+ PR 27858
+ * elf32-sh.c (sh_elf_info_to_howto): Correct check for last valid
+ reloc howto.
-2020-08-26 Alan Modra <amodra@gmail.com>
+2021-05-12 Luis Machado <luis.machado@linaro.org>
- PR 26484
- PR 26485
- PR 26486
- PR 26487
- PR 26488
- PR 26490
- * elf64-ppc.c (is_tls_get_addr): Avoid UB &h->elf when h is NULL.
- (ppc64_elf_tls_setup): Likewise.
- (branch_reloc_hash_match): Likewise.
- (build_plt_stub): Likewise.
- (ppc64_elf_relocate_section): Likewise.
+ * elf-bfd.h (elfcore_write_aarch_mte): New prototype.
+ * elf.c (elfcore_grok_aarch_mte, elfcore_write_aarch_mte): New
+ functions.
+ (elfcore_grok_note): Handle notes of type NT_ARM_TAGGED_ADDR_CTRL.
+ (elfcore_write_register_note): Handle MTE notes.
-2020-08-26 Alan Modra <amodra@gmail.com>
+2021-05-11 Alan Modra <amodra@gmail.com>
- PR 26478
- * mmo.c (mmo_write_symbols_and_terminator): Don't memcpy empty table.
+ PR 27844
+ * pdp11.c (aout_get_external_symbols): Clear first four bytes of
+ strings array, not just the first byte.
+ * aoutx.h (aout_get_external_symbols): Likewise.
-2020-08-26 Alan Modra <amodra@gmail.com>
+2021-05-10 H.J. Lu <hongjiu.lu@intel.com>
- PR 26475
- * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_sections): Check
- sstubs->contents != NULL.
+ PR binutils/27839
+ * simple.c (bfd_simple_get_relocated_section_contents): Remove
+ strayed fprintf.
-2020-08-26 Alan Modra <amodra@gmail.com>
+2021-05-10 Nick Clifton <nickc@redhat.com>
- PR 26453
- * som.c (som_prep_for_fixups): Return early when no symbols.
+ PR 27839
+ * simple.c (simple_dummy_add_to_set): New function.
+ (simple_dummy_constructor): New function.
+ (simple_dummy_multiple_common): New function.
+ (bfd_simple_get_relocated_section_contents): Zero out the
+ callbacks structure, and then set the add_to_set, constructor and
+ multiple_common fields.
-2020-08-26 Alan Modra <amodra@gmail.com>
+2021-05-10 Dimitar Dimitrov <dimitar@dinux.eu>
- PR 26418
- * ecofflink.c (WRITE): Don't write size 0 chunks.
+ * elf32-pru.c (elf_backend_can_gc_sections): Define as 1.
-2020-08-26 Alan Modra <amodra@gmail.com>
+2021-05-08 Mike Frysinger <vapier@gentoo.org>
- * bfdio.c (bfd_get_file_size): Don't segv on NULL adata.
+ * doc/Makefile.am (html-local, bfd/index.html): New targets.
+ * doc/Makefile.in: Regenerate.
-2020-08-26 Alan Modra <amodra@gmail.com>
+2021-05-08 Mike Frysinger <vapier@gentoo.org>
- PR 26415
- * vms-misc.c (vms_time_t_to_vms_time): Don't use unsigned short vars.
+ * doc/Makefile.am (AM_MAKEINFOFLAGS): Define.
+ * doc/Makefile.in: Regenerate.
-2020-08-26 David Faust <david.faust@oracle.com>
+2021-05-07 Clément Chigot <clement.chigot@atos.net>
- * archures.c (bfd_mach_xbpf): Define.
- * bfd-in2.h: Regenerate.
- * cpu-bpf.c (bfd_xbpf_arch) New.
- (bfd_bpf_arch) Update next in list field to point to xbpf arch.
-
-2020-08-26 Alan Modra <amodra@gmail.com>
-
- * archures.c (bfd_mach_ck860): Define.
-
-2020-08-25 Mark Wielaard <mark@klomp.org>
-
- * dwarf2.c (struct dwarf2_debug_file): Add dwarf_rnglists_buffer
- and dwarf_rnglists_size fields.
- (dwarf_debug_sections): Add debug_rnglists.
- (dwarf_debug_section_enum): Likewise.
- (read_debug_rnglists): New function.
- (read_rangelist): New function to call either read_ranges or
- read_rnglists. Rename original function to...
- (read_ranges): ...this.
- (read_rnglists): New function.
-
-2020-08-25 Alan Modra <amodra@gmail.com>
-
- PR 26505
- * elf32-xstormy16.c (xstormy16_elf_relax_section): Check
- is_elf_hash_table before accessing elf fields.
-
-2020-08-25 Alan Modra <amodra@gmail.com>
-
- PR 26482
- * coff-rs6000.c (_bfd_xcoff_sizeof_headers): Ignore sections that
- won't be output.
+ * coff-rs6000.c (xcoff_dwsect_names): Add new DWARF
+ sections.
+ * coffgen.c (coff_pointerize_aux): Handle C_DWARF.
+ (coff_print_symbol): Likewise.
+ * libxcoff.h (XCOFF_DWSECT_NBR_NAMES): Update.
-2020-08-25 Alan Modra <amodra@gmail.com>
-
- PR 26463
- * elf32-m32c.c (m32c_elf_relax_section): Check is_elf_hash_table
- before accessing elf fields.
+2021-05-07 Jan Beulich <jbeulich@suse.com>
-2020-08-25 Alan Modra <amodra@gmail.com>
+ * elf64-x86-64.c (x86_64_elf_howto_table): Set src_mask fields
+ to zero.
- PR 26452
- * som.c (som_compute_checksum): XOR 32-bit words in header,
- not unsigned long sized words.
-
-2020-08-25 Alan Modra <amodra@gmail.com>
-
- PR 26430
- * elf-nacl.c (nacl_modify_segment_map): Correct alloc size and
- amount copied for elf_segment_map defined with one element
- sections array.
-
-2020-08-25 Alan Modra <amodra@gmail.com>
-
- PR 26422
- * elf32-arm.c (elf32_arm_final_link_relocate): Use the appropriate
- bfd_get_x size function to read addends out of fields. Apply
- rightshift adjustment too. Don't apply the now unnecessary
- howto->size shift to branch REL addends. Don't refetch R_ARM_ABS8
- and R_ARM_ABS16 addends. Don't refetch thumb branch addends.
- Correct R_ARM_THM_JUMP6 addend.
-
-2020-08-25 Alan Modra <amodra@gmail.com>
-
- PR 26419
- * elf-m10300.c (mn10300_elf_relax_section): Don't attempt access
- before start of section.
-
-2020-08-25 Alan Modra <amodra@gmail.com>
-
- * elf-m10300.c (elf32_mn10300_hash_table): Test is_elf_hash_table
- before accessing elf_hash_table_id.
- * elf32-arc.c (elf_arc_hash_table): Likewise.
- * elf32-arm.c (elf32_arm_hash_table): Likewise.
- * elf32-avr.c (avr_link_hash_table): Likewise.
- * elf32-bfin.c (bfinfdpic_hash_table): Likewise.
- * elf32-cris.c (elf_cris_hash_table): Likewise.
- * elf32-csky.c (csky_elf_hash_table): Likewise.
- * elf32-frv.c (frvfdpic_hash_table): Likewise.
- * elf32-hppa.c (hppa_link_hash_table): Likewise.
- * elf32-lm32.c (lm32_elf_hash_table): Likewise.
- * elf32-m32r.c (m32r_elf_hash_table): Likewise.
- * elf32-m68hc1x.h (m68hc11_elf_hash_table): Likewise.
- * elf32-m68k.c (elf_m68k_hash_table): Likewise.
- * elf32-metag.c (metag_link_hash_table): Likewise.
- * elf32-microblaze.c (elf32_mb_hash_table): Likewise.
- * elf32-nds32.h (nds32_elf_hash_table): Likewise.
- * elf32-or1k.c (or1k_elf_hash_table): Likewise.
- * elf32-s390.c (elf_s390_hash_table): Likewise.
- * elf32-sh.c (sh_elf_hash_table): Likewise.
- * elf32-spu.c (spu_hash_table): Likewise.
- * elf32-tilepro.c (tilepro_elf_hash_table): Likewise.
- * elf32-xtensa.c (elf_xtensa_hash_table): Likewise.
- * elf64-alpha.c (alpha_elf_hash_table): Likewise.
- * elf64-hppa.c (hppa_link_hash_table): Likewise.
- * elf64-ia64-vms.c (elf64_ia64_hash_table): Likewise.
- * elf64-s390.c (elf_s390_hash_table): Likewise.
- * elfnn-ia64.c (elfNN_ia64_hash_table): Likewise.
- * elfnn-riscv.c (riscv_elf_hash_table): Likewise.
- * elfxx-mips.c (mips_elf_hash_table): Likewise.
- * elfxx-sparc.h (_bfd_sparc_elf_hash_table): Likewise.
- * elfxx-tilegx.c (tilegx_elf_hash_table): Likewise.
-
-2020-08-21 Jon Turney <jon.turney@dronecode.org.uk>
-
- * elf.c (elfcore_grok_win32pstatus): Change name_size to unsigned
- int. Use '%u' format with _bfd_error_handler to render it.
-
-2020-08-25 Alan Modra <amodra@gmail.com>
-
- PR 26489
- * elf64-ppc.c (ppc64_elf_size_stubs): Test code_sec->has_toc_reloc
- and code_sec->makes_toc_func_call before sec_info[code_sec->id].
-
-2020-08-25 Alan Modra <amodra@gmail.com>
-
- PR 26492
- * elf64-ppc.c (ppc_hash_table): Test is_elf_hash_table before
- accessing elf_hash_table_id.
-
-2020-08-25 Alan Modra <amodra@gmail.com>
-
- PR 26483
- * elf32-ppc.c (ppc_elf_hash_table): Test is_elf_hash_table before
- accessing elf_hash_table_id.
-
-2020-08-24 Mark Wielaard <mark@klomp.org>
-
- * dwarf2.c (read_attribute_value): Handle DW_FORM_data16.
- (read_formatted_entries): Likewise. And skip zero entry.
-
-2020-08-24 Cooper Qu <cooper.qu@linux.alibaba.com>
-
- * bfd-in2.h (bfd_mach_ck860): New.
- * cpu-csky.c (arch_info_struct): Add item for CK860.
-
-2020-08-24 Alan Modra <amodra@gmail.com>
-
- * elf32-ppc.c (ppc_elf_check_relocs): Set has_tls_reloc for
- high part tprel16 relocs.
- (ppc_elf_tls_optimize): Sanity check high part tprel16 relocs.
- Clear do_tls_opt on odd instructions.
- (ppc_elf_relocate_section): Move TPREL16_HA/LO optimisation later.
- Don't sanity check them here.
- * elf64-ppc.c (ppc64_elf_check_relocs): Set has_tls_reloc for
- high part tprel16 relocs.
- (ppc64_elf_tls_optimize): Sanity check high part tprel16 relocs.
- Clear do_tls_opt on odd instructions.
- (ppc64_elf_relocate_section): Don't sanity check TPREL16_HA.
-
-2020-08-23 John David Anglin <danglin@gcc.gnu.org>
-
- PR binutils/26357
- * configure.ac: Disable plugins by default on 32-bit hppa*-*-hpux*.
- * configure: Regenerate.
+2021-05-07 Alan Modra <amodra@gmail.com>
-2020-08-22 H.J. Lu <hongjiu.lu@intel.com>
-
- PR ld/26382
- * elflink.c (elf_link_output_symstrtab): Keep only one '@' for
- versioned symbols, which are defined in shared objects, in
- symbol string table.
-
-2020-08-21 Nick Clifton <nickc@redhat.com>
-
- * elfnn-aarch64.c (_bfd_aarch64_erratum_835769_scan): Only sort
- the data map if there are entries in it.
- (_bfd_aarch64_erratum_843419_scan): Likewise.
-
-2020-08-21 Jan Beulich <jbeulich@suse.com>
-
- * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Check
- last byte of debug dir, not first.
-
-2020-08-20 Nick Clifton <nickc@redhat.com>
-
- PR 26428
- * bfd.c (bfd_update_compression_header): Also set the sh_addralign
- field in the ELF header of the compressed sections.
-
-2020-08-20 Nick Clifton <nickc@redhat.com>
-
- PR 26406
- * elf-bfd.h (struct bfd_elf_section_data): Add
- has_secondary_relocs field.
- * elf.c (_bfd_elf_copy_special_section_fields): Set the
- has_secondary_relocs field for sections which have associated
- secondary relocs.
- * elfcode.h (elf_write_relocs): Only call write_secondary_relocs
- on sections which have associated secondary relocs.
-
-2020-08-15 Alan Modra <amodra@gmail.com>
-
- * elf32-frv.c (elf32_frv_add_symbol_hook): Set SEC_SMALL_DATA on
- small common section.
- * elf32-m32r.c (m32r_elf_add_symbol_hook): Likewise.
- * elf32-microblaze.c (microblaze_elf_add_symbol_hook): Likewise.
- * elf32-nds32.c (nds32_elf_add_symbol_hook): Likewise.
- * elf32-nios2.c (nios2_elf_add_symbol_hook): Likewise.
- * elf32-ppc.c (ppc_elf_add_symbol_hook): Likewise.
- * elf32-score.c (s3_bfd_score_elf_add_symbol_hook): Likewise.
- * elf32-score7.c (s7_bfd_score_elf_add_symbol_hook): Likewise.
- * elf32-tic6x.c (elf32_tic6x_add_symbol_hook): Likewise.
- * elf32-v850.c (v850_elf_check_relocs): Likewise.
- (v850_elf_add_symbol_hook): Likewise.
- * elf64-alpha.c (elf64_alpha_add_symbol_hook): Likewise.
- * elf64-ia64-vms.c (elf64_ia64_add_symbol_hook): Likewise.
- * elfnn-ia64.c (elfNN_ia64_add_symbol_hook): Likewise.
- * elfxx-mips.c (_bfd_mips_elf_add_symbol_hook): Likewise.
-
-2020-08-15 Alan Modra <amodra@gmail.com>
-
- PR 26389
- * syms.c (bfd_decode_symclass): Choose 'c' for commons only when
- SEC_SMALL_DATA.
- * elf32-m32r.c (_bfd_m32r_elf_symbol_processing): Set SEC_SMALL_DATA
- on small common section.
- * elf32-score.c (s3_bfd_score_elf_symbol_processing): Likewise.
- * elf32-score7.c (s7_bfd_score_elf_symbol_processing): Likewise.
- * elf32-tic6x.c (elf32_tic6x_symbol_processing): Likewise.
- * elf32-v850.c (v850_elf_symbol_processing): Likewise.
- * elfxx-mips.c (_bfd_mips_elf_symbol_processing): Likewise.
- * ecoff.c (ecoff_set_symbol_info, ecoff_link_add_externals): Likewise.
-
-2020-08-14 Alan Modra <amodra@gmail.com>
-
- * hash.c (bfd_hash_set_default_size): Use higher_prime_number
- rather than another copy of primes. Increase maximum default
- size allowed.
-
-2020-08-13 Alan Modra <amodra@gmail.com>
-
- * config.bfd: Obsolete arm*-*-symbianelf*, and ia64*-*-*.
-
-2020-08-13 Alan Modra <amodra@gmail.com>
-
- * elf64-ppc.h (struct ppc64_elf_params): Add no_pcrel_opt.
- * elf64-ppc.c (ppc64_elf_relocate_section): Disable GOT reloc
- optimizations when --no-toc-optimize. Disable R_PPC64_PCREL_OPT
- optimization when --no-pcrel-optimize.
-
-2020-08-13 Alan Modra <amodra@gmail.com>
-
- PR 26348
- * bfd.c (struct bfd): Add read_only.
- * elfcode.h (elf_swap_shdr_in): Test both sh_offset and sh_size.
- Set read_only on warning.
- (elf_object_p): Sanity check program header alignment. Set
- read_only on warning.
* bfd-in2.h: Regenerate.
+ * libbfd.h: Regenerate.
-2020-08-12 Jon Turney <jon.turney@dronecode.org.uk>
-
- * elf.c (elfcore_grok_win32pstatus): Use unsigned int for
- win32pstatus note type to avoid signedness comparison warning.
-
-2020-07-21 Jon Turney <jon.turney@dronecode.org.uk>
-
- * elf.c (elfcore_grok_win32pstatus): Warn on malformed
- win32pstatus notes, and return TRUE so we continue rather than
- stopping as if it was an error.
+2021-05-06 Stafford Horne <shorne@gmail.com>
+
+ PR 27746
+ * elf32-or1k.c (PLT_ENTRY_SIZE_LARGE, PLT_MAX_INSN_COUNT,
+ OR1K_ADD, OR1K_ORI): New macros to help with plt creation.
+ (elf_or1k_link_hash_table): New field plt_count.
+ (elf_or1k_link_hash_entry): New field plt_index.
+ (elf_or1k_plt_entry_size): New function.
+ (or1k_write_plt_entry): Update to support variable size PLTs.
+ (or1k_elf_finish_dynamic_sections): Use new or1k_write_plt_entry
+ API.
+ (or1k_elf_finish_dynamic_symbol): Update to write large PLTs
+ when needed.
+ (allocate_dynrelocs): Use elf_or1k_plt_entry_size to account for
+ PLT size.
+
+2021-05-06 Stafford Horne <shorne@gmail.com>
+
+ PR 21464
+ * elf32-or1k.c (or1k_elf_relocate_section): Relax R_OR1K_GOT16
+ overflow check if we have R_OR1K_GOT_AHI16 followed by
+ R_OR1K_GOT16.
+
+2021-05-06 Stafford Horne <shorne@gmail.com>
+
+ PR 21464
+ * bfd-in2.h: Add BFD_RELOC_OR1K_GOT_AHI16 relocation.
+ * elf32-or1k.c (or1k_elf_howto_table, or1k_reloc_map): Likewise.
+ (or1k_final_link_relocate, or1k_elf_relocate_section,
+ or1k_elf_check_relocs): Likewise.
+ * libbfd.h (bfd_reloc_code_real_names): Likewise.
+ * reloc.c: Likewise.
-2020-07-01 Jon Turney <jon.turney@dronecode.org.uk>
+2021-05-06 Stafford Horne <shorne@gmail.com>
- * elf.c (elfcore_grok_win32pstatus): Handle NOTE_INFO_MODULE64.
+ PR 27624
+ * elf32-or1k.c (or1k_elf_adjust_dynamic_symbol): Change
+ condition used to cleanup plt entries to cleanup forced local
+ entries.
-2020-07-11 Jon Turney <jon.turney@dronecode.org.uk>
+2021-05-05 H.J. Lu <hongjiu.lu@intel.com>
- * elf.c (elfcore_grok_win32pstatus): Don't apply size constraint
- for NOTE_INFO_THREAD to all win32pstatus ELF notes, instead apply
- appropriate size constraint for each win32pstatus note type.
+ PR ld/27825
+ * elflink.c (elf_link_output_symstrtab): Always append ".COUNT"
+ to local symbols.
-2020-07-01 Jon Turney <jon.turney@dronecode.org.uk>
+2021-05-05 Alan Modra <amodra@gmail.com>
- * elf.c (elfcore_grok_win32pstatus): Don't hardcode the size of
- the Win32 API thread CONTEXT type read from a NOTE_INFO_THREAD
- win32pstatus note.
+ * vms-lib.c (vms_traverse_index): Account for vms_kbn size when
+ sanity checking keylen.
-2020-07-11 Jon Turney <jon.turney@dronecode.org.uk>
+2021-05-04 Nick Clifton <nickc@redhat.com>
- * elf.c (NOTE_INFO{_PROCESS,_THREAD,_MODULE}): Define.
- (elfcore_grok_win32pstatus): Use.
+ * libbfd.c (bfd_malloc): Provide some documenation. Treat a size
+ of 0 as 1.
+ (bfd_realloc): Likewise.
+ (bfd_zmalloc): Likewise.
+ (bfd_realloc_or_free): Provide some documentation. Treat a size
+ of 0 as a request to free.
+ * libbfd-in.h (bfd_realloc): Remove prototype.
+ (bfd_realloc_or_free): Remove prototype.
+ (bfd_zmalloc): Remove prototype.
+ * libbfd.h: Regenerate.
-2020-07-01 Jon Turney <jon.turney@dronecode.org.uk>
+2021-05-03 Jan Beulich <jbeulich@suse.com>
- * elf.c (elfcore_grok_win32pstatus): Fix the offset used to read
- the tid from a win32pstatus NOTE_INFO_THREAD ELF note. Fix
- offsets used to read NOTE_INFO_PROCESS.
+ * elf32-i386.c (elf_howto_table): Switch all 32-bit relocs to
+ complain_overflow_dont.
+ * elf64-x86-64.c (x86_64_elf_howto_table): Switch all 64-bit
+ relocs to complain_overflow_dont.
-2020-08-12 Nick Clifton <nickc@redhat.com>
+2021-05-03 Alan Modra <amodra@gmail.com>
- * po/ru.po: Updated Russian translation.
- * po/sr.po: Updated Serbian translation.
+ * elf32-ppc.c (allocate_dynrelocs): Keep dyn_relocs for undefweak
+ symbols when -z dynamic-undefined-weak or when there are no
+ dynamic relocs in read-only sections and -z nodynamic-undefined-weak
+ is not given.
+ * elf64-ppc.c (allocate_dynrelocs): Likewise.
-2020-08-07 David Faust <david.faust@oracle.com>
+2021-05-03 Alan Modra <amodra@gmail.com>
- * elf64-bpf.c (bpf_elf_relocate_section): Ensure signed division for
- DISP16 and DISP32 relocations.
+ * elf32-ppc.c (allocate_dynrelocs): Call ensure_undef_dynamic for
+ weak undefined symols that only appear on PLT relocs.
+ * elf64-ppc.c (allocate_dynrelocs): Likewise.
-2020-08-05 David Faust <david.faust@oracle.com>
+2021-05-03 Alan Modra <amodra@gmail.com>
- * elf64-bpf.c (bpf_elf_generic_reloc): New function.
- (bpf_elf_howto_table): Use it here.
- (bpf_elf_relocate_section): Use addends recorded in input_bfd for
- instruction and data relocations.
+ PR 27755
+ * elf32-ppc.c (ppc_elf_inline_plt): Do increment rel in loop.
-2020-08-03 Alan Modra <amodra@gmail.com>
+2021-05-03 Alan Modra <amodra@gmail.com>
- * vms-lib.c (vms_traverse_index): Sanity check size remaining
- before accessing vms_idx or vms_elfidx.
+ * elf32-csky.c (is_mapping_symbol_name): New function.
+ (csky_elf_is_target_special_symbol): Likewise.
+ (csky_elf_maybe_function_sym): Likewise.
+ (bfd_elf32_bfd_is_target_special_symbol): Define.
+ (elf_backend_maybe_function_sym): Define.
-2020-08-03 Alan Modra <amodra@gmail.com>
+2021-04-30 Nick Clifton <nickc@redhat.com>
- PR 26330
- * elf.c (_bfd_elf_get_symtab_upper_bound): Sanity check symbol table
- size against file size. Correct LONG_MAX limit check.
- (_bfd_elf_get_dynamic_symtab_upper_bound): Likewise.
- (_bfd_elf_get_reloc_upper_bound): Don't check file size if writing.
- (_bfd_elf_get_dynamic_reloc_upper_bound): Likewise.
- * elf64-x86-64-.c (elf_x86_64_get_synthetic_symtab): Use
- bfd_malloc_and_get_section.
+ PR 27801
+ * mach-o.c (bfd_mach_o_core_fetch_environment): Use bfd_get_32 to
+ read 32-bit value.
-2020-07-31 Alan Modra <amodra@gmail.com>
+2021-04-30 Nick Clifton <nickc@redhat.com>
- PR 26314
- * elflink.c (bfd_elf_link_record_dynamic_symbol): Don't allow
- IR symbols to become dynamic.
- (elf_link_add_object_symbols): Don't exclude IR symbols when
- deciding whether an as-needed shared library is needed.
+ PR 27799
+ * elf32-xtensa.c (elf_xtensa_grok_prstatus): Check for core notes
+ that are too small.
-2020-07-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
+2021-04-30 Nick Clifton <nickc@redhat.com>
- PR ld/26312
- * elfnn-aarch64.c (elfNN_aarch64_init_small_plt0_entry): Set sh_entsize
- to 0.
- (elfNN_aarch64_finish_dynamic_sections): Remove sh_entsize setting.
+ PR 27797
+ * libbfd.c (bfd_realloc_or_free): Do not free a pointer than has
+ been realloc'ed to size 0.
-2020-07-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+2021-04-30 Nick Clifton <nickc@redhat.com>
- * bfd.m4 (BFD_SYS_PROCFS_H): New macro.
- (BFD_HAVE_SYS_PROCFS_TYPE): Require BFD_SYS_PROCFS_H.
- Don't define _STRUCTURED_PROC.
- (BFD_HAVE_SYS_PROCFS_TYPE_MEMBER): Likewise.
- * elf.c [HAVE_SYS_PROCFS_H] (_STRUCTURED_PROC): Don't define.
- * configure.ac: Use BFD_SYS_PROCFS_H to check for <sys/procfs.h>.
- * configure, config.in: Regenerate.
- * Makefile.am (AM_CPPFLAGS): Add LARGEFILE_CPPFLAGS.
- * Makefile.in, doc/Makefile.in: Regenerate.
+ PR 27795
+ * coff-rs6000.c (_bfd_xcoff_read_ar_hdr): Check for invalid name
+ lengths.
-2020-07-30 H.J. Lu <hongjiu.lu@intel.com>
+2021-04-29 Nick Clifton <nickc@redhat.com>
- * elf-bfd.h (sym_cache): Moved before elf_link_hash_table.
- (elf_link_hash_table): Add sym_cache.
- * elf32-arm.c (elf32_arm_link_hash_table): Remove sym_cache.
- (elf32_arm_check_relocs): Updated.
- (elf32_arm_size_dynamic_sections): Likewise.
- * elf32-bfin.c (bfin_link_hash_table): Removed.
- (bfin_link_hash_newfunc): Updated.
- (bfin_hash_table): Removed.
- * elf32-csky.c (csky_elf_link_hash_table): Remove sym_cache.
- (csky_elf_check_relocs): Updated.
- * elf32-hppa.c (elf32_hppa_link_hash_table): Remove sym_cache.
- (elf32_hppa_check_relocs): Updated.
- * elf32-i386.c (elf_i386_tls_transition): Updated.
- (elf_i386_convert_load_reloc): Likewise.
- (elf_i386_check_relocs): Likewise.
- * elf32-m32r.c (elf_m32r_link_hash_table): Removed.
- (m32r_elf_hash_table): Updated.
- (m32r_elf_link_hash_table_create): Likewise.
- (m32r_elf_create_dynamic_sections): Likewise.
- (m32r_elf_adjust_dynamic_symbol): Likewise.
- (allocate_dynrelocs): Likewise.
- (m32r_elf_size_dynamic_sections): Likewise.
- (m32r_elf_relocate_section): Likewise.
- (m32r_elf_finish_dynamic_symbol): Likewise.
- (m32r_elf_check_relocs): Likewise.
- * elf32-m68hc1x.h (m68hc11_elf_link_hash_table): Remove
- sym_cache.
- * elf32-m68k.c (elf_m68k_link_hash_table): Likewise.
- (elf_m68k_check_relocs): Updated.
- * elf32-metag.c (elf_metag_link_hash_table): Remove sym_cache.
- (elf_metag_check_relocs): Updated.
- * elf32-microblaze.c (elf32_mb_link_hash_table): Remove sym_sec.
- (microblaze_elf_check_relocs): Updated.
- * elf32-nds32.c (nds32_elf_link_hash_table_create): Likewise.
- (nds32_elf_create_dynamic_sections): Likewise.
- (nds32_elf_adjust_dynamic_symbol): Likewise.
- (nds32_elf_check_relocs): Likewise.
- * elf32-nds32.h (elf_nds32_link_hash_table): Remove sdynbss,
- srelbss and aym_cache.
- * elf32-nios2.c (elf32_nios2_link_hash_table): Remove sym_cache.
- (nios2_elf32_check_relocs): Updated.
- * elf32-or1k.c (elf_or1k_link_hash_table): Remove sym_sec.
- (or1k_elf_check_relocs): Updated.
- * elf32-ppc.c (ppc_elf_check_relocs): Remove sym_cache.
- (ppc_elf_check_relocs): Updated.
- * elf32-s390.c (elf_s390_link_hash_table): Remove sym_cache.
- (elf_s390_check_relocs): Updated.
- (elf_s390_finish_dynamic_sections): Likewise.
- * elf32-sh.c (elf_sh_link_hash_table): Remove sdynbss, srelbss
- and aym_cache.
- (sh_elf_create_dynamic_sections): Updated.
- (sh_elf_adjust_dynamic_symbol): Likewise.
- (sh_elf_size_dynamic_sections): Likewise.
- (sh_elf_check_relocs): Likewise.
- * elf32-tic6x.c (elf32_tic6x_link_hash_table): Remove sym_cache.
- (elf32_tic6x_check_relocs): Updated.
- * elf32-tilepro.c (tilepro_elf_link_hash_table): Removed.
- (tilepro_elf_hash_table): Updated.
- (tilepro_elf_link_hash_table_create): Likewise.
- (tilepro_elf_check_relocs): Likewise.
- (tilepro_elf_adjust_dynamic_symbol): Likewise.
- (allocate_dynrelocs): Likewise.
- (tilepro_elf_size_dynamic_sections): Likewise.
- (tilepro_elf_relocate_section): Likewise.
- (tilepro_elf_finish_dynamic_symbol): Likewise.
- (tilepro_finish_dyn): Likewise.
- (tilepro_elf_finish_dynamic_sections): Likewise.
- * elf64-ppc.c (ppc_link_hash_table): Remove sym_cache.
- (ppc64_elf_before_check_relocs): Updated.
- (ppc64_elf_check_relocs): Likewise.
- * elf64-s390.c (elf_s390_link_hash_table): Remove sym_cache.
- (elf_s390_check_relocs): Updated.
- (elf_s390_relocate_section): Likewise.
- (elf_s390_finish_dynamic_sections): Likewise.
- * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
- (elf_x86_64_check_relocs): Likewise.
- * elfnn-aarch64.c (elf_aarch64_link_hash_table): Remove
- sym_cache.
- (elfNN_aarch64_check_relocs): Updated.
- * elfnn-riscv.c (riscv_elf_link_hash_table): Remove sym_cache.
- (riscv_elf_check_relocs): Updated.
- * elfxx-mips.c (mips_elf_link_hash_table): Remove sym_cache.
- (mips_elf_resolve_got_page_ref): Updated.
- * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
- * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Remove
- sym_cache.
- * elfxx-tilegx.c (tilegx_elf_link_hash_table): Likewise.
- (tilegx_elf_check_relocs): Updated.
- * elfxx-x86.h (elf_x86_link_hash_table): Remove sym_cache.
-
-2020-07-29 Maciej W. Rozycki <macro@linux-mips.org>
-
- * elflink.c (bfd_elf_final_link): Give local symbols a name if
- so requested.
- * elfxx-mips.c (_bfd_mips_elf_name_local_section_symbols): Only
- return TRUE if making ET_REL output.
-
-2020-07-29 Maciej W. Rozycki <macro@linux-mips.org>
-
- * elf-bfd.h (elf_backend_data): Add
- `elf_backend_elfsym_local_is_section' member.
- * elfxx-target.h (elf_backend_elfsym_local_is_section): New
- macro.
- (elfNN_bed): Add `elf_backend_elfsym_local_is_section' member.
- * elflink.c (bfd_elf_final_link): Use it to determine whether
- set the `.symtab' section's `sh_info' value to the index of the
- first non-local or non-section symbol.
- * elf32-mips.c (mips_elf32_elfsym_local_is_section): New
- function.
- (elf_backend_elfsym_local_is_section): New macro.
- * elfn32-mips.c (mips_elf_n32_elfsym_local_is_section): New
- function.
- (elf_backend_elfsym_local_is_section): New macro.
+ PR 27793
+ * som.c (som_slurp_symbol_table): Assign symbols without any scope
+ to the undefined section.
+ (som_decode_symclass): Check for a missing symbol section.
+ * syms.c (bfd_decode_symclass): Likewise.
-2020-07-29 Alan Modra <amodra@gmail.com>
+2021-04-29 Nick Clifton <nickc@redhat.com>
- * elflink.c (bfd_elf_final_link): Don't segfault on local dynsyms
- defined in excluded sections.
+ PR 27792
+ * som.c (som_slurp_string_table): Place a terminating NUL byte at
+ the end of the table.
+ (som_slurp_symbol_table): Check for an over-large offset into the
+ string string table.
-2020-07-28 Alan Modra <amodra@gmail.com>
+2021-04-28 Nick Clifton <nickc@redhat.com>
- * elf.c (assign_section_numbers): Comment. Don't segfault on
- discarded sections when setting linked-to section for generic
- ELF linker.
- * elflink.c (bfd_elf_match_symbols_in_sections): Allow NULL info.
+ * elf.c (_bfd_elf_maybe_function_sym): Do not accept annobin
+ symbols as potential function symbols.
+ * elfnn-aarch64.c (elfNN_aarch64_maybe_function_sym): Likewise.
+ * elf64-ppc.c (ppc64_elf_maybe_function_sym): Likewise.
+ * elf32-arm.c (elf32_arm_maybe_function_sym): Likewise.
-2020-07-27 Alan Modra <amodra@gmail.com>
+2021-04-26 Mike Frysinger <vapier@gentoo.org>
- * xcofflink.c (xcoff_need_ldrel_p): Accept --just-symbols symbols and
- similar as absolute.
- (bfd_xcoff_import_symbol): Don't fuss over absolute symbol
- redefinitions here.
+ * elf-bfd.h: Include stdlib.h.
-2020-07-24 Nick Clifton <nickc@redhat.com>
+2021-04-26 Jan Beulich <jbeulich@suse.com>
- * config.bfd: Move xc16x target to the obsolete list.
+ * elf32-i386.c (elf_howto_table): Switch R_386_PC16 to
+ complain_overflow_signed.
+ * elf64-x86-64.c (x86_64_elf_howto_table): Switch R_X86_64_PC16
+ to complain_overflow_signed.
-2020-07-22 Kevin Buettner <kevinb@redhat.com>
+2021-04-23 Eric Botcazou <ebotcazou@adacore.com>
- * binary.c (binary_get_section_contents): Seek using offset
- from section's file position.
+ * elf.c (special_sections_p): Add .persistent.bss.
-2020-07-22 Kevin Buettner <kevinb@redhat.com>
+2021-04-23 Jan Beulich <jbeulich@suse.com>
- * elf.c (_bfd_elf_make_section_from_phdr): Remove hack for GDB.
+ * elf32-i386.c (elf_howto_table): R_386_TLS_DESC_CALL has zero
+ size field.
+ * elf64-x86-64.c (x86_64_elf_howto_table): R_X86_64_TLSDESC_CALL
+ has zero size field.
-2020-07-22 Max Filippov <jcmvbkbc@gmail.com>
+2021-04-22 Clément Chigot <clement.chigot@atos.net>
- PR 26246
- * elf32-xtensa.c (removed_literal_compare): Use correct pointer
- type for the first function argument. Rename pointers to reflect
- that they have distinct types.
+ * hash.c (struct bfd_strtab_hash): Remove xcoff field.
+ Add length_field_size field.
+ (_bfd_stringtab_init): Change prototype.
+ Adapt to new length_field_size.
+ (_bfd_xcoff_stringtab_init): Likewise.
+ (_bfd_stringtab_add): Likewise.
+ (_bfd_stringtab_emit): Likewise.
+ * libbfd-in.h (_bfd_xcoff_stringtab_init):
+ Change prototype.
+ * libbfd.h: Regenerate.
+ * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create):
+ Call _bfd_xcoff_stringtab_init with isxcoff64 value.
-2020-07-20 Alan Modra <amodra@gmail.com>
+2021-04-22 Clément Chigot <clement.chigot@atos.net>
- * elflink.c (_bfd_elf_gc_keep): Use bfd_is_const_section.
+ * coff-rs6000.c (_bfd_xcoff_swap_aux_in): Add errors for
+ unsupported storage class or auxialiry entries.
+ Improve and adapt to new aux structures.
+ Add C_DWARF support.
+ (_bfd_xcoff_swap_aux_out): Likewise.
+ * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Likewise.
+ (_bfd_xcoff64_swap_aux_out): Likewise.
-2020-07-19 Alan Modra <amodra@gmail.com>
+2021-04-21 Eli Zaretskii <eliz@gnu.org>
- * elf64-ppc.c (struct ppc_link_hash_table): Add has_power10_relocs.
- (select_alt_stub): New function.
- (ppc_get_stub_entry): Use it here.
- (ppc64_elf_check_relocs): Set had_power10_relocs rather than
- power10_stubs.
- (ppc64_elf_size_stubs): Clear power10_stubs here instead. Don't
- merge notoc stubs with other varieties when power10_stubs is "auto".
- Instead dup the stub hash table entry.
- (plt_stub_size, ppc_build_one_stub, ppc_size_one_stub): Adjust
- tests of power10_stubs.
+ PR 27760
+ * peXXigen.c (_bfd_XX_print_private_bfd_data_common): Add display
+ of IMAGE_FILE_REMOVABLE_RUN_FROM_SWAP,
+ IMAGE_FILE_NET_RUN_FROM_SWAP and IMAGE_FILE_UP_SYSTEM_ONLY flags.
+ Decode the contents of the DllCharacteristics field.
-2020-07-15 Alan Modra <amodra@gmail.com>
+2021-04-21 Nick Clifton <nickc@redhat.com>
- PR 26239
- * coffgen.c (_bfd_coff_close_and_cleanup): Free dwarf2 info.
+ PR 27759
+ * srec.c (srec_read_section): Replace assertions with error
+ returns.
-2020-07-15 Nick Clifton <nickc@redhat.com>
+2021-04-20 Clément Chigot <clement.chigot@atos.net>
- PR26240
- * coffgen.c (coff_get_normalized_symtab): Fix off-by-one error in
- check for aux entries that overflow the buufer.
+ PR binutils/21700
+ * reloc.c (BFD_RELOC_PPC_NEG): New relocation.
+ * bfd-in2.h: Regenerate.
+ * libbfd.h: Regenerate.
+ * coff-rs6000.c (_bfd_xcoff_reloc_type_lookup): Add
+ BFD_RELOC_PPC_NEG handler.
+ (xcoff_reloc_type_neg): Correctly substract addend.
+ * coff64-rs6000.c (xcoff64_howto_table): Add R_NEG_32
+ howto.
+ (xcoff64_rtype2howto): Add handler for R_NEG_32.
+ (xcoff64_reloc_type_lookup): Add BFD_RELOC_PPC_NEG handler.
+ * xcofflink.c (xcoff_need_ldrel_p): Check output section
+ for R_POS-like relocations. New argument added.
+ (xcoff_mark): Adapt to new xcoff_need_ldrel_p argument.
+ (xcoff_link_input_bfd): Likewise.
-2020-07-15 Hans-Peter Nilsson <hp@bitrange.com>
+2021-04-16 Alan Modra <amodra@gmail.com>
- * elf64-mmix.c (mmix_elf_relax_section): Improve accounting for
- R_MMIX_PUSHJ_STUBBABLE relocs against undefined symbols.
+ PR 27567
+ * coffcode.h (styp_to_sec_flags): Use an unsigned long styp_flags.
+ (coff_write_object_contents): Pass bfd to COFF_ENCODE_ALIGNMENT,
+ ignore alignment checks when return is false. Formatting.
-2020-07-15 Markus Böck <markus.boeck02@gmail.com>
- Alan Modra <amodra@gmail.com>
+2021-04-15 Nelson Chu <nelson.chu@sifive.com>
- PR 26198
- * coffgen.c (_bfd_coff_section_already_linked): Allow for plugin
- objects both before and after normal object files.
- * elflink.c (_bfd_elf_section_already_linked): Likewise.
+ PR27584
+ * elfnn-riscv.c (riscv_elf_is_target_special_symbol): Added to
+ omit local and empty symbols since they usually generated to
+ mark the auipc instructions.
-2020-07-10 Alan Modra <amodra@gmail.com>
+2021-04-15 Lifang Xia<lifang_xia@c-sky.com>
- * elf64-ppc.h (struct ppc64_elf_params): Add power10_stubs.
- * elf64-ppc.c (struct ppc_link_hash_table): Delete
- power10_stubs.
- (ppc64_elf_check_relocs): Adjust setting of power10_stubs.
- (plt_stub_size, ppc_build_one_stub, ppc_size_one_stub): Adjust
- uses of power10_stubs.
+ * elf32-csky.c (csky_elf_howto_table)
+ <R_CKCORE_PCREL_IMM16BY2>: Set special_function to
+ bfd_elf_generic_reloc.
+ <R_CKCORE_PCREL_IMM16BY4>: Likewise.
+ <R_CKCORE_PCREL_IMM10BY4>: Likewise.
+ <R_CKCORE_PCREL_IMM18BY2>: Likewise.
+ <R_CKCORE_PCREL_FLRW_IMM8BY4>: Likewise.
-2020-07-09 Alan Modra <amodra@gmail.com>
+2021-04-14 H.J. Lu <hongjiu.lu@intel.com>
- * coff-ppc.c: Delete.
- * pe-ppc.c: Delete.
- * pei-ppc.c: Delete.
- * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Remove PE PPC.
- * coffcode.h (coff_set_arch_mach_hook, coff_set_flags): Remove
- PPCMAGIC code.
- (coff_write_object_contents): Remove PPC_PE code.
- * config.bfd: Move powerpcle-pe to removed targets.
- * configure.ac: Remove powerpc PE entries.
- * libcoff-in.h (ppc_allocate_toc_section): Delete.
- (ppc_process_before_allocation): Delete.
- * peXXigen.c: Remove POWERPC_LE_PE code and comments.
- * targets.c: Remove powerpc PE vectors.
- * po/SRC-POTFILES.in: Regenerate.
- * libcoff.h: Regenerate.
- * Makefile.in: Regenerate.
- * configure: Regenerate.
+ PR binutils/27708
+ * elf.c (assign_file_positions_for_non_load_sections): Set
+ p_memsz to p_filesz for the loadable PT_NOTE segment.
-2020-07-09 Nick Clifton <nickc@redhat.com>
+2021-04-14 Frederic Cambus <fred@statdns.com>
- * po/fr.po: Updated French translation.
+ * elf.c (elfcore_grok_netbsd_note): Remove unneeded #ifdef
+ checks for NT_NETBSDCORE_AUXV and NT_NETBSDCORE_LWPSTATUS.
-2020-07-07 Alan Modra <amodra@gmail.com>
+2021-04-14 Alan Modra <amodra@gmail.com>
- * xcofflink.c (xcoff_mark): Don't mark const sections.
- (bfd_xcoff_record_link_assignment): Add FIXME.
- (_bfd_xcoff_bfd_final_link): Don't segfault on assorted magic
- sections being discarded by linker script.
+ PR 27631
+ * elf32-metag.c (elf_metag_relocate_section): Don't use &hh->elf
+ when hh might be NULL, test for NULL first.
-2020-07-07 Alan Modra <amodra@gmail.com>
+2021-04-14 Alan Modra <amodra@gmail.com>
- * coff-rs6000.c (xcoff_write_archive_contents_old): Set default
- time, uid, gid and mode for deterministic archive.
- (xcoff_write_archive_contents_big): Likewise.
+ PR 27630
+ * elf32-arm.c (elf32_arm_size_stubs): Don't use &hash->root when
+ hash might be NULL, cast instead.
-2020-07-07 Alan Modra <amodra@gmail.com>
+2021-04-13 Clément Chigot <clement.chigot@atos.net>
- * coffcode.h (coff_classify_symbol): Handle C_HIDEXT and
- C_AIX_WEAKEXT.
+ * xcofflink.c (xcoff_link_check_ar_symbols): Update esym earlier.
-2020-07-06 Nick Clifton <nickc@redhat.com>
+2021-04-13 Nelson Chu <nelson.chu@sifive.com>
- * po/pt.po: Updated Portuguese translation.
- * po/uk.po: Updated Ukranian translation.
+ * elfnn-riscv.c (riscv_version_mismatch): Do not report the warning
+ when the version of input or output is RISCV_UNKNOWN_VERSION, since
+ the extension is added implicitly.
+ * elfxx-riscv.c: Updated the obsolete comments.
+ (RISCV_UNKNOWN_VERSION): Moved to elfxx-riscv.h.
+ * elfxx-riscv.h (RISCV_UNKNOWN_VERSION): Added.
-2020-07-04 Nick Clifton <nickc@redhat.com>
+2021-04-12 Alan Modra <amodra@gmail.com>
- * version.m4: Set version to 2.35.50.
+ * elf-bfd.h (ENABLE_CHECKING): Define.
+ (elf_link_hash_lookup): Abort if wrong type of hash table.
+ * configure.ac (--enable-checking): Add support.
+ * config.in: Regenerate.
* configure: Regenerate.
- * po/bbfd.pot: Regenerate.
-
-2020-07-04 Nick Clifton <nickc@redhat.com>
-
- Binutils 2.35 branch created.
-
-2020-07-01 Alan Modra <amodra@gmail.com>
-
- PR 26188
- * coffgen.c (coff_find_nearest_line_with_names): Sanity check
- raw syment index before dereferencing.
-
-2020-07-01 Alan Modra <amodra@gmail.com>
-
- * elf32-i386.c (elf_backend_object_p): Undef for vxworks.
-
-2020-07-01 Alan Modra <amodra@gmail.com>
-
- * config.bfd: Obsolete xc16x.
-
-2020-06-30 H.J. Lu <hongjiu.lu@intel.com>
-
- * archures.c (bfd_mach_i386_nacl): Removed.
- (bfd_mach_i386_i386_nacl): Likewise.
- (bfd_mach_x86_64_nacl): Likewise.
- (bfd_mach_x64_32_nacl): Likewise.
- * config.bfd: Remove *-*-nacl* targets.
- * configure.ac: Remove x86 NaCl target vectors.
- * cpu-i386.c (bfd_arch_i386_onebyte_nop_fill): Removed.
- (bfd_x64_32_nacl_arch): Likewise.
- (bfd_x86_64_nacl_arch): Likewise.
- (bfd_i386_nacl_arch): Likewise.
- (bfd_x64_32_arch_intel_syntax): Updated.
- * elf32-i386.c: Don't include "elf-nacl.h".
- (elf_i386_nacl_plt): Removed.
- (elf_i386_nacl_plt0_entry): Likewise.
- (elf_i386_nacl_plt_entry): Likewise.
- (elf_i386_nacl_pic_plt0_entry): Likewise.
- (elf_i386_nacl_pic_plt_entry): Likewise.
- (elf_i386_nacl_eh_frame_plt): Likewise.
- (elf_i386_nacl_plt): Likewise.
- (elf32_i386_nacl_elf_object_p): Likewise.
- (elf_i386_get_synthetic_symtab): Updated.
- (elf_i386_link_setup_gnu_properties): Likewise.
- * elf64-x86-64.c: Don't include "elf-nacl.h".
- (elf_x86_64_nacl_plt): Removed.
- (elf64_x86_64_nacl_elf_object_p): Likewise.
- (elf_x86_64_nacl_plt0_entry): Likewise.
- (elf_x86_64_nacl_plt_entry): Likewise.
- (elf_x86_64_nacl_eh_frame_plt): Likewise.
- (elf_x86_64_nacl_plt): Likewise.
- (elf32_x86_64_nacl_elf_object_p): Likewise.
- (elf_x86_64_get_synthetic_symtab): Updated.
- (elf_x86_64_link_setup_gnu_properties): Likewise.
- * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Likewise.
- * targets.c: Remove x86 NaCl target vectors.
- * bfd-in2.h: Regenerated.
- * configure: Likewise.
-2020-06-29 H.J. Lu <hongjiu.lu@intel.com>
+2021-04-12 Alan Modra <amodra@gmail.com>
+
+ * elf-bfd.h (is_elf_hash_table): Convert macro to inline function.
+ (elf_link_hash_lookup, elf_link_hash_traverse): Likewise.
+ (elf_hash_table, elf_hash_table_id): Likewise.
+ * elf32-arm.c (elf32_arm_setup_section_lists): Delete redundant
+ is_elf_hash_table check.
+ * elf32-csky.c (elf32_csky_setup_section_lists): Likewise.
+ * elf32-hppa.c (clobber_millicode_symbols): Correct param types.
+ * elf64-alpha.c (elf64_alpha_output_extsym): Likewise.
+ * elfnn-ia64.c (elfNN_ia64_global_dyn_info_free: Likewise.
+ (elfNN_ia64_global_dyn_sym_thunk: Likewise.
+ * elf64-ia64-vms.c (elf64_ia64_global_dyn_info_free): Likewise.
+ (elf64_ia64_global_dyn_sym_thunk): Likewise.
+ (elf64_vms_link_add_object_symbols): Pass base type of hash table
+ to is_elf_hash_table.
+ * elflink.c (_bfd_elf_dynamic_symbol_p): Likewise.
+ (_bfd_elf_symbol_refs_local_p, _bfd_elf_add_dynamic_entry): Likewise.
+ (_bfd_elf_strip_zero_sized_dynamic_sections): Likewise.
+ (_bfd_elf_link_check_relocs, elf_link_add_object_symbols): Likewise.
+ (bfd_elf_final_link): Likewise.
+ * elfnn-aarch64.c (elfNN_aarch64_setup_section_lists): Likewise.
+ * elf64-ppc.c (ppc64_elf_set_toc): Likewise. Use bfd_link_hash_lookup.
- * elf32-tic6x.c (elf32_tic6x_size_dynamic_sections): Call
- _bfd_elf_add_dynamic_tags.
+2021-04-12 Alan Modra <amodra@gmail.com>
-2020-06-29 Alan Modra <amodra@gmail.com>
+ * elf-bfd.h (struct elf_backend_data): Return bfd_link_hash_entry*
+ from elf_backend_archive_symbol_lookup.
+ (_bfd_elf_archive_symbol_lookup): Return bfd_link_hash_entry*.
+ * elf64-ppc.c (ppc64_elf_archive_symbol_lookup): Likewise. Check
+ we have a ppc_hash_table before accessing ppc_link_hash_entry
+ fields.
+ * elflink.c (_bfd_elf_archive_symbol_lookup): Return
+ bfd_link_hash_entry*.
+ (elf_link_add_archive_symbols): Adjust to suit.
+
+2021-04-12 Nelson Chu <nelson.chu@sifive.com>
+
+ * elfxx-riscv.c (riscv_parse_std_ext): Fixed the wrong versions of
+ i-ext when expanding g-ext.
+
+2021-04-12 Nelson Chu <nelson.chu@sifive.com>
+
+ * elfxx-riscv.c (riscv_ext_dont_care_version): Removed.
+ (riscv_parse_add_subset): Always add the implicit extensions, even if
+ their versions are RISCV_UNKNOWN_VERSION.
+ (riscv_parse_std_ext): Delay to add i-ext as the implicit extension
+ in the riscv_parse_add_implicit_subsets. Besides, add g-ext as the
+ implicit extension after it has been expanded.
+ (riscv_parse_add_implicit_subsets): Updated.
+
+2021-04-12 Nelson Chu <nelson.chu@sifive.com>
+
+ * elfxx-riscv.c (riscv_std_z_ext_strtab): Moved forward.
+ (riscv_std_s_ext_strtab): Likewise.
+ (riscv_std_h_ext_strtab): Likewise.
+ (riscv_std_zxm_ext_strtab): Added for the zxm prefix.
+ (enum riscv_prefix_ext_class): Moved forward and renamed from
+ riscv_isa_ext_class. Reorder them according to the parsing order,
+ since the enum values are used to check the orders in the
+ riscv_compare_subsets.
+ (struct riscv_parse_prefix_config): Moved forward and renamed from
+ riscv_parse_config_t. Also removed the ext_valid_p field, the
+ related functions are replaced by riscv_valid_prefixed_ext.
+ (parse_config): Moved forward and updated. The more letters of the
+ prefix string, the more forward it must be defined. Otherwise, we
+ will get the wrong mapping when using strncmp in riscv_get_prefix_class.
+ (riscv_get_prefix_class): Moved forward. Support to parse the
+ multi-letter prefix, like zxm.
+ (riscv_known_prefixed_ext): New function, check if the prefixed
+ extension is supported according to the right riscv_std_*_ext_strtab.
+ (riscv_valid_prefixed_ext): New function, used to replace the
+ riscv_ext_*_valid_p functions.
+ (riscv_init_ext_order): Do not set the values for prefix keywords
+ since they may have multiple letters for now.
+ (riscv_compare_subsets): Set the order values of prefix keywords
+ to negative numbers according to the riscv_prefix_ext_class.
+ (riscv_parse_std_ext): Call riscv_get_prefix_class to see if we
+ have parsed the prefixed extensions.
+ (riscv_parse_prefixed_ext): Updated and removed the parameter config.
+ Report error when the prefix is unknown.
+ (riscv_parse_subset): Do not parse the prefixed extensions according
+ to the orders in the parse_config. Remove the confused message and
+ let riscv_parse_prefixed_ext to report the details.
+ * elfxx-riscv.h (enum riscv_isa_ext_class): Moved to elfxx-riscv.c.
+ (riscv_get_prefix_class): Removed to static.
+
+2021-04-08 Mike Frysinger <vapier@gentoo.org>
+
+ * configure.ac (ACX_BUGURL): Use https://.
+ * configure.com (COPY_TEXT): Likewise.
+ * configure: Regenerate.
- * peXXigen.c (_bfd_XXi_slurp_codeview_record): Properly check
- return value of bfd_bread. Don't read more than requested length.
- Sanity check length. Properly terminate file name.
+2021-04-05 Alan Modra <amodra@gmail.com>
+
+ * configure.ac: Don't check for long long or long double type.
+ Don't check for alloca.h, limits.h, stddef.h, stdlib.h, string.h,
+ strings.h, time.h, wchar.h, wctype.h or sys/time.h. Don't check
+ for strtoull, free, malloc, realloc, getenv, strstr, snprintf,
+ vsnprintf, strlen or setitimer. Sort AC_CHECK_DECLS.
+ (AC_ISC_POSIX): Don't invoke.
+ (AC_HEADER_TIME, AC_HEADER_DIRENT, ACX_HEADER_STRING): Likewise.
+ * sysdep.h: Remove many HAVE_*_H checks and fallback declarations.
+ Do test HAVE_SYS_TYPES_H. Don't include sys/time.h. Reorder
+ header order as per automake AC_INCLUDES_DEFAULT.
+ * bfd-in.h: Include inttypes.h unconditionally.
+ * bfd.c (_bfd_doprnt, _bfd_doprnt_scan): Assume long long and
+ long double are available.
+ (bfd_scan_vma): Assume long long and strtoull are available.
+ * elflink.c: Include limits.h unconditionally.
+ * elfnn-riscv.c: Likewise.
+ * wasm-module.c: Likewise.
+ * hpux-core.c: Include dirent.h unconditionally.
+ * trad-core.c: Likewise.
+ * hosts/x86-64linux.h: Include stdlib.h unconditionally.
+ * peXXigen.c: Remove HAVE_WCHAR_H and HAVE_WCTYPE_H checks.
+ * elf32-m68hc1x.c: Don't include alloca-conf.h.
+ * elf64-hppa.c: Likewise.
+ * som.c: Likewise.
+ * wasm-module.c: Likewise.
+ * xsym.c: Likewise.
+ * bfd-in2.h: Regenerate.
+ * config.in: Regenerate.
+ * configure: Regenerate.
-2020-06-29 Alan Modra <amodra@gmail.com>
+2021-04-01 Tamar Christina <tamar.christina@arm.com>
- * arc-got.h: Use C style comments.
- * coff-z80.c: Likewise.
- * elf32-csky.c: Likewise.
- * peXXigen.c: Likewise.
- * elf32-m32c.c (m32c_elf_relax_delete_bytes): Remove commented out
- code.
+ PR ld/26659
+ * cofflink.c (_bfd_coff_generic_relocate_section): Ignore overflow.
-2020-06-26 Pat Bernardi <bernardi@adacore.com>
+2021-04-01 Martin Liska <mliska@suse.cz>
- * elf32-m68k.c (m68k_elf_merge_obj_attributes): New function.
- (elf32_m68k_merge_private_bfd_data): Merge GNU attributes.
+ * ecoff.c (strneq): Remove strneq and use startswith.
+ (_bfd_ecoff_slurp_armap): Likewise.
-2020-06-26 Alan Modra <amodra@gmail.com>
+2021-04-01 Martin Liska <mliska@suse.cz>
- * elfxx-riscv.c (struct priv_spec_t, priv_specs),
- (riscv_get_priv_spec_class, riscv_get_priv_spec_class_from_numbers),
- (riscv_get_priv_spec_name): Move to..
- * cpu-riscv.c: ..here.
- (riscv_get_priv_spec_class_from_numbers): Don't xmalloc temp buffer.
- Use %u to print unsigned numbers.
+ * elf-bfd.h (bfd_section_is_ctf): Use startswith function.
+ * elf.c (_bfd_elf_make_section_from_shdr): Likewise.
+ (elf_get_reloc_section): Likewise.
+ * elf32-arc.c (elf_arc_size_dynamic_sections): Likewise.
+ * elf32-m32r.c (m32r_elf_section_flags): Likewise.
+ * elf32-microblaze.c (microblaze_elf_size_dynamic_sections): Likewise.
+ * elf32-nds32.c (nds32_elf_size_dynamic_sections): Likewise.
+ (nds32_elf_relocate_section): Likewise.
+ (nds32_elf_action_discarded): Likewise.
+ (nds32_elf_check_relocs): Likewise.
+ (nds32_elf_section_flags): Likewise.
+ * elf32-or1k.c (or1k_elf_check_relocs): Likewise.
+ * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
+ * elf32-rx.c (rx_table_find): Likewise.
+ (rx_table_map): Likewise.
+ * elf32-spu.c (spu_elf_backend_symbol_processing): Likewise.
+ (spu_elf_find_overlays): Likewise.
+ (needs_ovl_stub): Likewise.
+ (allocate_spuear_stubs): Likewise.
+ (build_spuear_stubs): Likewise.
+ (mark_overlay_section): Likewise.
+ (spu_elf_auto_overlay): Likewise.
+ (spu_elf_output_symbol_hook): Likewise.
+ * elf32-tilepro.c (tilepro_elf_size_dynamic_sections): Likewise.
+ * elf32-xtensa.c (xtensa_property_section_name): Likewise.
+ * elf64-ppc.c (ppc64_elf_section_flags): Likewise.
+ (ppc64_elf_relocate_section): Likewise.
+ * elflink.c (resolve_section): Likewise.
+ (UNARY_OP): Likewise.
+ (BINARY_OP_HEAD): Likewise.
+ (elf_link_input_bfd): Likewise.
+ * elfnn-riscv.c (riscv_elf_size_dynamic_sections): Likewise.
+ * elfxx-riscv.c (riscv_parse_subset): Likewise.
+ * elfxx-tilegx.c (tilegx_elf_size_dynamic_sections): Likewise.
+ * opncls.c (get_build_id): Likewise.
-2020-06-24 Andrew Burgess <andrew.burgess@embecosm.com>
+2021-03-31 Alan Modra <amodra@gmail.com>
- * cpu-riscv.c (riscv_scan): Don't allow shorter matches using the
- default architecture.
+ PR 27671
+ * bfd-in.h: Don't poison FALSE or TRUE.
+ * bfd-in2.h: Regenerate.
-2020-06-24 H.J. Lu <hongjiu.lu@intel.com>
+2021-03-31 Alan Modra <amodra@gmail.com>
+
+ * sysdep.h: POISON_BFD_BOOLEAN: Define.
+ * aix5ppc-core.c, * aout-cris.c, * aout-ns32k.c, * aout-target.h,
+ * aoutx.h, * arc-got.h, * archive.c, * archive64.c, * archures.c,
+ * bfd-in.h, * bfd.c, * bfdwin.c, * binary.c, * cache.c,
+ * coff-alpha.c, * coff-arm.c, * coff-arm.h, * coff-bfd.c,
+ * coff-bfd.h, * coff-go32.c, * coff-i386.c, * coff-ia64.c,
+ * coff-mcore.c, * coff-mips.c, * coff-rs6000.c, * coff-sh.c,
+ * coff-stgo32.c, * coff-tic30.c, * coff-tic4x.c, * coff-tic54x.c,
+ * coff-x86_64.c, * coff-z80.c, * coff-z8k.c, * coff64-rs6000.c,
+ * coffcode.h, * coffgen.c, * cofflink.c, * compress.c,
+ * corefile.c, * cpu-aarch64.c, * cpu-aarch64.h, * cpu-alpha.c,
+ * cpu-arc.c, * cpu-arm.c, * cpu-arm.h, * cpu-avr.c, * cpu-bfin.c,
+ * cpu-bpf.c, * cpu-cr16.c, * cpu-cris.c, * cpu-crx.c,
+ * cpu-csky.c, * cpu-d10v.c, * cpu-d30v.c, * cpu-dlx.c,
+ * cpu-epiphany.c, * cpu-fr30.c, * cpu-frv.c, * cpu-ft32.c,
+ * cpu-h8300.c, * cpu-hppa.c, * cpu-i386.c, * cpu-ia64.c,
+ * cpu-iamcu.c, * cpu-ip2k.c, * cpu-iq2000.c, * cpu-k1om.c,
+ * cpu-l1om.c, * cpu-lm32.c, * cpu-m10200.c, * cpu-m10300.c,
+ * cpu-m32c.c, * cpu-m32r.c, * cpu-m68hc11.c, * cpu-m68hc12.c,
+ * cpu-m68k.c, * cpu-m9s12x.c, * cpu-m9s12xg.c, * cpu-mcore.c,
+ * cpu-mep.c, * cpu-metag.c, * cpu-microblaze.c, * cpu-mips.c,
+ * cpu-mmix.c, * cpu-moxie.c, * cpu-msp430.c, * cpu-mt.c,
+ * cpu-nds32.c, * cpu-nfp.c, * cpu-nios2.c, * cpu-ns32k.c,
+ * cpu-or1k.c, * cpu-pdp11.c, * cpu-pj.c, * cpu-powerpc.c,
+ * cpu-pru.c, * cpu-riscv.c, * cpu-rl78.c, * cpu-rs6000.c,
+ * cpu-rx.c, * cpu-s12z.c, * cpu-s390.c, * cpu-score.c,
+ * cpu-sh.c, * cpu-sparc.c, * cpu-spu.c, * cpu-tic30.c,
+ * cpu-tic4x.c, * cpu-tic54x.c, * cpu-tic6x.c, * cpu-tilegx.c,
+ * cpu-tilepro.c, * cpu-v850.c, * cpu-v850_rh850.c, * cpu-vax.c,
+ * cpu-visium.c, * cpu-wasm32.c, * cpu-xc16x.c, * cpu-xgate.c,
+ * cpu-xstormy16.c, * cpu-xtensa.c, * cpu-z80.c, * cpu-z8k.c,
+ * dwarf1.c, * dwarf2.c, * ecoff-bfd.h, * ecoff.c, * ecofflink.c,
+ * elf-attrs.c, * elf-bfd.h, * elf-eh-frame.c, * elf-hppa.h,
+ * elf-ifunc.c, * elf-m10200.c, * elf-m10300.c, * elf-nacl.c,
+ * elf-nacl.h, * elf-properties.c, * elf-s390-common.c,
+ * elf-s390.h, * elf-strtab.c, * elf-vxworks.c, * elf-vxworks.h,
+ * elf.c, * elf32-am33lin.c, * elf32-arc.c, * elf32-arm.c,
+ * elf32-arm.h, * elf32-avr.c, * elf32-avr.h, * elf32-bfin.c,
+ * elf32-bfin.h, * elf32-cr16.c, * elf32-cr16.h, * elf32-cris.c,
+ * elf32-crx.c, * elf32-csky.c, * elf32-csky.h, * elf32-d10v.c,
+ * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c,
+ * elf32-fr30.c, * elf32-frv.c, * elf32-ft32.c, * elf32-gen.c,
+ * elf32-h8300.c, * elf32-hppa.c, * elf32-hppa.h, * elf32-i386.c,
+ * elf32-ip2k.c, * elf32-iq2000.c, * elf32-lm32.c, * elf32-m32c.c,
+ * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c,
+ * elf32-m68hc1x.c, * elf32-m68hc1x.h, * elf32-m68k.c,
+ * elf32-m68k.h, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c,
+ * elf32-metag.h, * elf32-microblaze.c, * elf32-mips.c,
+ * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c,
+ * elf32-nios2.c, * elf32-nios2.h, * elf32-or1k.c, * elf32-pj.c,
+ * elf32-ppc.c, * elf32-ppc.h, * elf32-pru.c, * elf32-rl78.c,
+ * elf32-rx.c, * elf32-s12z.c, * elf32-s390.c, * elf32-score.c,
+ * elf32-score.h, * elf32-score7.c, * elf32-sh-relocs.h,
+ * elf32-sh.c, * elf32-sparc.c, * elf32-spu.c, * elf32-spu.h,
+ * elf32-tic6x.c, * elf32-tic6x.h, * elf32-tilegx.c,
+ * elf32-tilepro.c, * elf32-v850.c, * elf32-v850.h,
+ * elf32-vax.c, * elf32-visium.c, * elf32-wasm32.c,
+ * elf32-xc16x.c, * elf32-xgate.c, * elf32-xstormy16.c,
+ * elf32-xtensa.c, * elf32-z80.c, * elf64-alpha.c, * elf64-bpf.c,
+ * elf64-gen.c, * elf64-hppa.c, * elf64-ia64-vms.c,
+ * elf64-mips.c, * elf64-mmix.c, * elf64-nfp.c, * elf64-ppc.c,
+ * elf64-ppc.h, * elf64-s390.c, * elf64-sparc.c,
+ * elf64-tilegx.c, * elf64-x86-64.c, * elfcode.h,
+ * elfcore.h, * elflink.c, * elfn32-mips.c, * elfnn-aarch64.c,
+ * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-aarch64.c,
+ * elfxx-aarch64.h, * elfxx-ia64.c, * elfxx-ia64.h,
+ * elfxx-mips.c, * elfxx-mips.h, * elfxx-riscv.c, * elfxx-riscv.h,
+ * elfxx-sparc.c, * elfxx-sparc.h, * elfxx-target.h,
+ * elfxx-tilegx.c, * elfxx-tilegx.h, * elfxx-x86.c, * elfxx-x86.h,
+ * format.c, * genlink.h, * hash.c, * i386aout.c, * i386lynx.c,
+ * i386msdos.c, * ihex.c, * libaout.h, * libbfd-in.h,
+ * libbfd.c, * libcoff-in.h, * libecoff.h, * libpei.h,
+ * libxcoff.h, * linker.c, * mach-o-aarch64.c, * mach-o-arm.c,
+ * mach-o-i386.c, * mach-o-x86-64.c, * mach-o.c, * mach-o.h,
+ * merge.c, * mmo.c, * netbsd.h, * opncls.c, * pc532-mach.c,
+ * pdp11.c, * pe-arm.c, * pe-i386.c, * pe-mcore.c, * pe-sh.c,
+ * pe-x86_64.c, * peXXigen.c, * pef.c, * pei-arm.c, * pei-i386.c,
+ * pei-ia64.c, * pei-mcore.c, * pei-sh.c, * pei-x86_64.c,
+ * peicode.h, * plugin.c, * plugin.h, * ppcboot.c, * reloc.c,
+ * reloc16.c, * rs6000-core.c, * section.c, * simple.c, * som.c,
+ * som.h, * srec.c, * stabs.c, * syms.c, * targets.c, * tekhex.c,
+ * verilog.c, * vms-alpha.c, * vms-lib.c, * vms-misc.c, * vms.h,
+ * wasm-module.c, * xcofflink.c, * xcofflink.h, * xsym.c,
+ * xsym.h: Replace bfd_boolean with bool, FALSE with false, and
+ TRUE with true throughout.
+ * bfd-in2.h: Regenerate.
+ * libbfd.h: Regenerate.
+ * libcoff.h: Regenerate.
- PR ld/26083
- * elf32-csky.c (csky_elf_size_dynamic_sections): Call
- _bfd_elf_add_dynamic_tags.
+2021-03-31 Alan Modra <amodra@gmail.com>
-2020-06-24 H.J. Lu <hongjiu.lu@intel.com>
+ * bfd-in.h: Include stdbool.h.
+ (bfd_boolean): Define as bool
+ * bfd-in2.h: Regenerate.
- PR ld/26083
- * elf32-cris.c (elf_cris_size_dynamic_sections): Call
- _bfd_elf_add_dynamic_tags.
+2021-03-31 Alan Modra <amodra@gmail.com>
-2020-06-24 Alan Modra <amodra@gmail.com>
+ * .gitignore: Delete bfd_stdint.h entry.
+ * Makefile.am (bfdinclude_HEADERS): Delete bfd_stdint.h.
+ (BUILD_HFILES, LOCAL_H_DEPS): Likewise.
+ * bfd-in.h: Include stdint.h in place of bfd_stdint.h.
+ * configure.ac: Don't invoke GCC_HEADER_STDINT.
+ * configure.com: Don't create bfd_stdint.h.
+ * Makefile.in: Regenerate.
+ * aclocal.m4: Regenerate.
+ * bfd-in2.h: Regenerate.
+ * config.in: Regenerate.
+ * configure: Regenerate.
+ * doc/Makefile.in: Regenerate.
+ * po/BLD-POTFILES.in: Regenerate.
- * vms-alpha.c (_bfd_vms_slurp_etir <ETIR__C_OPR_ASH>): Implement
- shifts without undefined behaviour.
+2021-03-31 Alan Modra <amodra@gmail.com>
-2020-06-23 H.J. Lu <hongjiu.lu@intel.com>
+ * bfd-in.h: Include string.h.
+ (LITMEMCPY, LITSTRCPY): Delete.
+ * bfd-in2.h: Regenerate.
- * elf-bfd.h (elf_link_hash_table): Add dt_pltgot_required and
- dt_jmprel_required.
- (_bfd_elf_add_dynamic_tags): New.
- * elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Call
- _bfd_elf_add_dynamic_tags.
- * elf32-arc.c (elf_arc_size_dynamic_sections): Likewise.
- * elf32-bfin.c (elf32_bfinfdpic_size_dynamic_sections): Likewise.
+2021-03-30 Alan Modra <amodra@gmail.com>
+
+ * elflink.c (elf_link_add_object_symbols): Don't set h->indx
+ unless is_elf_hash_table.
+
+2021-03-29 Alan Modra <amodra@gmail.com>
+
+ * aoutx.h (aout_link_write_symbols): Don't cast boolean expression
+ to bfd_boolean.
+ * elf32-or1k.c (or1k_set_got_and_rela_sizes): Dont compare booleans
+ against FALSE.
+ * elf32-arc.c (name_for_global_symbol): Don't compare boolean to TRUE.
+ (is_reloc_PC_relative): Don't use "boolean_condition ? TRUE : FALSE".
+ (is_reloc_SDA_relative, is_reloc_for_GOT): Likewise.
+ (is_reloc_for_PLT, is_reloc_for_TLS): Likewise.
+ * elf32-arm.c (stm32l4xx_need_create_replacing_stub): Likewise.
+ * elf32-nds32.c (insert_nds32_elf_blank): Likewise.
+ * elf32-rx.c (rx_set_section_contents): Likewise.
+ * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
+ * elfxx-mips.c (_bfd_mips_elf_ignore_undef_symbol): Likewise.
+ * mach-o.c (bfd_mach_o_read_command): Likewise.
+ * targets.c (bfd_get_target_info): Likewise.
+
+2021-03-29 Alan Modra <amodra@gmail.com>
+
+ * coff-z80.c (z80_is_local_label_name): Return bfd_boolean.
+ * elf32-z80.c (z80_is_local_label_name): Likewise.
+ * elf32-spu.c (spu_elf_modify_headers): Likewise.
+ * elf32-nds32.h (struct elf_nds32_link_hash_table <hyper_relax>):
+ Change type to int.
+ * vms-lib.c (_bfd_vms_lib_write_archive_contents): Correct test
+ for error return from vms_write_data_block.
+
+2021-03-29 Alan Modra <amodra@gmail.com>
+
+ * elf32-i386.c (elf_i386_finish_local_dynamic_symbol): Return int.
+ * elf64-ia64-vms.c (elf64_ia64_local_dyn_info_free): Likewise.
+ (elf64_ia64_local_dyn_sym_thunk): Likewise.
+ * elf64-x86-64.c (elf_x86_64_finish_local_dynamic_symbol): Likewise.
+ * elfnn-aarch64.c (elfNN_aarch64_allocate_local_ifunc_dynrelocs),
+ (elfNN_aarch64_finish_local_dynamic_symbol): Likewise.
+ * elfnn-ia64.c (elfNN_ia64_local_dyn_info_free): Likewise.
+ (elfNN_ia64_local_dyn_sym_thunk): Likewise.
+ * elfnn-riscv.c (allocate_local_ifunc_dynrelocs): Likewise.
+ (riscv_pcrel_reloc_eq): Likewise.
+ (riscv_elf_finish_local_dynamic_symbol): Likewise.
+ * elfxx-sparc.c (allocate_local_dynrelocs): Likewise.
+ (finish_local_dynamic_symbol): Likewise.
+ * elfxx-x86.c (elf_x86_allocate_local_dynreloc): Likewise.
+ * elfxx-mips.c (mips_elf_resolve_got_page_ref): Likewise.
+ (mips_elf_count_got_symbols): Change return type to bfd_boolean.
+
+2021-03-29 Alan Modra <amodra@gmail.com>
+
+ * elflink.c (elf_link_output_symstrtab): Make flinfo parameter
+ a void pointer.
+ (bfd_elf_final_link): Delete out_sym_func typedef and don't cast
+ elf_link_output_symstrtab when calling output_arch_syms and
+ output_arch_local_syms.
+ * elf-bfd.h (struct elf_backend_data <elf_backend_output_arch_syms,
+ elf_backend_output_arch_local_syms>): Change return type of func
+ arg to match elf_link_output_symstrtab.
+ * elf-vxworks.h (elf_vxworks_link_output_symbol_hook): Correct
+ return type.
+ * elf32-nds32.c (nds32_elf_output_symbol_hook): Correct return type.
+ (nds32_elf_output_arch_syms): Correct func return type.
+
+2021-03-29 Alan Modra <amodra@gmail.com>
+
+ * elf-m10200.c (mn10200_elf_relocate_section): Return int.
+ * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
+ * elf32-arc.c (elf_arc_relocate_section): Likewise.
+ * elf32-arm.c (elf32_arm_relocate_section): Likewise.
+ * elf32-avr.c (elf32_avr_relocate_section): Likewise.
+ * elf32-bfin.c (bfin_relocate_section): Likewise.
+ (bfinfdpic_relocate_section): Likewise.
+ * elf32-cr16.c (elf32_cr16_relocate_section): Likewise.
+ * elf32-cris.c (cris_elf_relocate_section): Likewise.
+ * elf32-crx.c (elf32_crx_relocate_section): Likewise.
+ * elf32-csky.c (csky_elf_relocate_section): Likewise.
+ * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
+ * elf32-epiphany.c (epiphany_elf_relocate_section): Likewise.
+ * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
+ * elf32-frv.c (elf32_frv_relocate_section): Likewise.
+ * elf32-ft32.c (ft32_elf_relocate_section): Likewise.
+ * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
+ * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
+ * elf32-i386.c (elf_i386_relocate_section): Likewise.
+ * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
+ * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise.
+ * elf32-lm32.c (lm32_elf_relocate_section): Likewise.
+ * elf32-m32c.c (m32c_elf_relocate_section): Likewise.
+ * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
+ * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise.
+ * elf32-m68hc1x.h (elf32_m68hc11_relocate_section): Likewise.
+ * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
+ * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
+ * elf32-mep.c (mep_elf_relocate_section): Likewise.
+ * elf32-metag.c (elf_metag_relocate_section): Likewise.
+ * elf32-microblaze.c (microblaze_elf_relocate_section): Likewise.
+ * elf32-moxie.c (moxie_elf_relocate_section): Likewise.
+ * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
+ * elf32-mt.c (mt_elf_relocate_section): Likewise.
+ * elf32-nds32.c (nds32_elf_relocate_section): Likewise.
+ * elf32-nios2.c (nios2_elf32_relocate_section): Likewise.
+ * elf32-or1k.c (or1k_elf_relocate_section): Likewise.
+ * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
+ * elf32-pru.c (pru_elf32_relocate_section): Likewise.
+ * elf32-rl78.c (rl78_elf_relocate_section): Likewise.
+ * elf32-rx.c (rx_elf_relocate_section): Likewise.
+ * elf32-s390.c (elf_s390_relocate_section): Likewise.
+ * elf32-score.c (s3_bfd_score_elf_relocate_section): Likewise.
+ (_bfd_score_elf_relocate_section): Likewise.
+ * elf32-score.h (s7_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-tic6x.c (elf32_tic6x_relocate_section): Likewise.
+ * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
+ * elf32-v850.c (v850_elf_relocate_section): Likewise.
+ * elf32-vax.c (elf_vax_relocate_section): Likewise.
+ * elf32-visium.c (visium_elf_relocate_section): Likewise.
+ * elf32-xc16x.c (elf32_xc16x_relocate_section): Likewise.
+ * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
+ * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
+ * elf32-z80.c (z80_elf_relocate_section): Likewise.
+ * elf64-alpha.c (elf64_alpha_relocate_section_r): Likewise.
+ (elf64_alpha_relocate_section): Likewise.
+ * elf64-bpf.c (bpf_elf_relocate_section): Likewise.
+ * elf64-hppa.c (elf64_hppa_relocate_section): Likewise.
+ * elf64-ia64-vms.c (elf64_ia64_relocate_section): Likewise.
+ * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
+ * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
+ * elf64-s390.c (elf_s390_relocate_section): Likewise.
+ * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
+ * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Likewise.
+ * elfnn-ia64.c (elfNN_ia64_relocate_section): Likewise.
+ * elfnn-riscv.c (riscv_elf_relocate_section): Likewise.
+ * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise.
+ * elfxx-mips.h (_bfd_mips_elf_relocate_section): Likewise.
+ * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
+ * elfxx-sparc.h (_bfd_sparc_elf_relocate_section): Likewise.
+ * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
+ * elfxx-tilegx.h (tilegx_elf_relocate_section): Likewise.
+
+2021-03-26 Keith Seitz <keiths@redhat.com>
+
+ * elfcore.h (_bfd_elf_core_find_build_id): Seek file
+ offset of program headers after calling elf_read_notes.
+
+2021-03-23 Jan Beulich <jbeulich@suse.com>
+
+ * dwarf2.c (read_indexed_string): Rename index to idx.
+
+2021-03-22 Martin Liska <mliska@suse.cz>
+
+ * bfd-in.h (startswith): Add startswith function.
+ (CONST_STRNEQ): Remove.
+ * bfd-in2.h (startswith): Regenerate with make headers.
+ * archive.c (bfd_slurp_armap): Replace usage of CONST_STRNEQ with startswith.
+ (_bfd_slurp_extended_name_table): Likewise.
+ * archive64.c (_bfd_archive_64_bit_slurp_armap): Likewise.
+ * bfd.c (bfd_get_sign_extend_vma): Likewise.
+ (bfd_convert_section_size): Likewise.
+ (bfd_convert_section_contents): Likewise.
+ * coff-stgo32.c (go32exe_create_stub): Likewise.
+ (go32exe_check_format): Likewise.
+ * coffcode.h (styp_to_sec_flags): Likewise.
+ (GNU_DEBUGALTLINK): Likewise.
+ * coffgen.c (_bfd_coff_section_already_linked): Likewise.
+ (coff_gc_sweep): Likewise.
+ (bfd_coff_gc_sections): Likewise.
+ * cofflink.c (coff_link_add_symbols): Likewise.
+ (process_embedded_commands): Likewise.
+ * compress.c (bfd_is_section_compressed_with_header): Likewise.
+ (bfd_init_section_decompress_status): Likewise.
+ * dwarf2.c (find_debug_info): Likewise.
+ (place_sections): Likewise.
+ * ecoff.c (_bfd_ecoff_slurp_armap): Likewise.
+ * elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Likewise.
+ * elf.c (_bfd_elf_make_section_from_shdr): Likewise.
+ (assign_section_numbers): Likewise.
+ (elfcore_grok_win32pstatus): Likewise.
+ * elf32-arm.c (cmse_scan): Likewise.
+ (elf32_arm_gc_mark_extra_sections): Likewise.
+ (elf32_arm_size_dynamic_sections): Likewise.
+ (is_arm_elf_unwind_section_name): Likewise.
+ * elf32-bfin.c (bfin_size_dynamic_sections): Likewise.
* elf32-cr16.c (_bfd_cr16_elf_size_dynamic_sections): Likewise.
- * elf32-frv.c (elf32_frvfdpic_size_dynamic_sections): Likewise.
+ * elf32-cris.c (elf_cris_size_dynamic_sections): Likewise.
+ * elf32-csky.c (csky_elf_size_dynamic_sections): Likewise.
+ * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
+ * elf32-iq2000.c (iq2000_elf_check_relocs): Likewise.
* elf32-lm32.c (lm32_elf_size_dynamic_sections): Likewise.
* elf32-m32r.c (m32r_elf_size_dynamic_sections): Likewise.
* elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
- * elf32-microblaze.c (microblaze_elf_size_dynamic_sections):
- Likewise.
- * elf32-nds32.c (nds32_elf_size_dynamic_sections): Likewise.
+ * elf32-metag.c (elf_metag_size_dynamic_sections): Likewise.
+ * elf32-msp430.c (msp430_elf_relax_delete_bytes): Likewise.
* elf32-nios2.c (nios2_elf32_size_dynamic_sections): Likewise.
* elf32-or1k.c (or1k_elf_size_dynamic_sections): Likewise.
+ * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
* elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
- * elf32-tilepro.c (tilepro_elf_size_dynamic_sections): Likewise.
+ * elf32-score.c (s3_bfd_score_elf_size_dynamic_sections): Likewise.
+ * elf32-score7.c (s7_bfd_score_elf_size_dynamic_sections): Likewise.
+ * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
+ * elf32-tic6x.c (is_tic6x_elf_unwind_section_name): Likewise.
+ (elf32_tic6x_size_dynamic_sections): Likewise.
* elf32-vax.c (elf_vax_size_dynamic_sections): Likewise.
+ * elf32-xtensa.c (elf_xtensa_size_dynamic_sections): Likewise.
+ (xtensa_is_insntable_section): Likewise.
+ (xtensa_is_littable_section): Likewise.
+ (xtensa_is_proptable_section): Likewise.
+ (xtensa_property_section_name): Likewise.
+ (xtensa_callback_required_dependence): Likewise.
* elf64-alpha.c (elf64_alpha_size_dynamic_sections): Likewise.
+ * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
+ * elf64-ia64-vms.c (is_unwind_section_name): Likewise.
+ (get_reloc_section): Likewise.
+ (elf64_ia64_size_dynamic_sections): Likewise.
+ (elf64_ia64_object_p): Likewise.
+ * elf64-mmix.c (mmix_elf_add_symbol_hook): Likewise.
+ * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Likewise.
* elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
- * elfnn-aarch64.c (elfNN_aarch64_size_dynamic_sections):
- Likewise.
- * elfnn-riscv.c (riscv_elf_size_dynamic_sections): Likewise.
- * elfxx-tilegx.c (tilegx_elf_size_dynamic_sections): Likewise.
- * elf32-arm.c (elf32_arm_size_dynamic_sections): Call
- _bfd_elf_maybe_vxworks_add_dynamic_tags.
- * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
- * elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections):
- Likewise.
- * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Likewise.
- (_bfd_x86_elf_size_dynamic_sections): Likewise.
- * elfxx-x86.h (elf_x86_link_hash_table): Remove dt_reloc,
- dt_reloc_sz and dt_reloc_ent.
- * elf-vxworks.c (_bfd_elf_maybe_vxworks_add_dynamic_tags): New.
- * elf-vxworks.h (_bfd_elf_maybe_vxworks_add_dynamic_tags):
- Likewise.
- * elf32-hppa.c (elf32_hppa_link_hash_table_create): Set
- etab.dt_pltgot_required.
- (elf32_hppa_size_dynamic_sections): Call
- _bfd_elf_add_dynamic_tags.
- * elf32-metag.c (elf_metag_link_hash_table_create): Set
- etab.dt_pltgot_required.
- (elf_metag_size_dynamic_sections): Call _bfd_elf_add_dynamic_tags.
- * elf32-sh.c (sh_elf_link_hash_table_create): Set
- root.dt_pltgot_required for FDPIC output.
- (sh_elf_size_dynamic_sections): Call
- _bfd_elf_maybe_vxworks_add_dynamic_tags.
- * elf32-xtensa.c (elf_xtensa_link_hash_table_create): Set
- elf.dt_pltgot_required.
- (elf_xtensa_size_dynamic_sections): Call
- _bfd_elf_add_dynamic_tags.
- * elf64-hppa.c (elf64_hppa_hash_table_create): Set
- root.dt_pltgot_required.
- (elf64_hppa_size_dynamic_sections): Call
- _bfd_elf_add_dynamic_tags.
- * elfnn-ia64.c (elfNN_ia64_hash_table_create): Set
- root.dt_pltgot_required.
- (elfNN_ia64_size_dynamic_sections): Set root.dt_jmprel_required
- for rel_pltoff_sec. Call _bfd_elf_add_dynamic_tags.
- * elflink.c (_bfd_elf_add_dynamic_tags): New.
-
-2020-06-22 Saagar Jha <saagar@saagarjha.com>
-
- * mach-o.c: Support the new load commands by reading a linkedit
- data command for them.
-
-2020-06-22 Nelson Chu <nelson.chu@sifive.com>
-
- * elfxx-riscv.c (struct priv_spec_t priv_specs[]): Move them from
- opcodes/riscv-opc.c to bfd/elfxx-riscv.c, since we need it in linker.
- (riscv_get_priv_spec_class): Likewise.
- (riscv_get_priv_spec_name): Likewise.
- (riscv_get_priv_spec_class_from_numbers): New function, convert
- the version numbers into string, then call riscv_get_priv_spec_class
- to get the priv spec class.
- * elfxx-riscv.h (riscv_get_priv_spec_class): Move forward declaration
- from include/opcode/riscv.h to bfd/elfxx-riscv.h.
- (riscv_get_priv_spec_name): Likewise.
- (riscv_get_priv_spec_class_from_numbers): New forward declaration.
- (opcode/riscv.h): Include it in the header rather than elfxx-riscv.c.
- * elfnn-riscv.c (riscv_merge_attributes): Get the priv spec classes
- of input and output objects form their priv spec attributes by
- riscv_get_priv_spec_class_from_numbers. Report warning rather than
- errors when linking objects with differnet priv spec versions. We do
- know v1.9.1 may have conflicts to other versions, so report the
- warning, too. After that, update the output priv spec version to the
- newest one so far.
-
-2020-06-22 Nelson Chu <nelson.chu@sifive.com>
-
- * elfnn-riscv.c (riscv_merge_attributes): Once we meet one of the
- priv attributes, we will check the conflicts for all of them (major,
- minor and revision), and then set the priv_attrs_merged to TRUE to
- indicate that we have handled all of the priv attributes. Remove
- the unused boolean priv_may_conflict, in_priv_zero and out_priv_zero.
-
-2020-06-21 Alan Modra <amodra@gmail.com>
-
- PR 26132
- * configure.ac: Disable plugins by default for some targets.
- * plugin.c: Comment typo fix.
- * configure: Regenerate.
-
-2020-06-19 Nick Clifton <nickc@redhat.com>
-
- * plugin.c (try_load_plugin): Suppress the error message about
- being unable to open a plugin if creating a list of viable
- plugins.
-
-2020-06-16 Alan Modra <amodra@gmail.com>
-
- * aout-tic30.c: Delete file.
- * Makefile.am (BFD32_BACKENDS): Remove aout-tic30.lo.
- (BFD32_BACKENDS_CFILES): Remove aout-tic30.c.
- * config.bfd (c30-*-*aout*, tic30-*-*aout*): Remove entry.
- (xc16x-*-elf): Sort properly.
- * configure.ac: Remove tic30_aout_vec.
- * targets.c: Likewise.
- * Makefile.in: Regenerate.
- * configure: Regenerate.
- * po/SRC-POTFILES.in: Regenerate.
+ * elflink.c (elf_link_add_object_symbols): Likewise.
+ (_bfd_elf_gc_mark_extra_sections): Likewise.
+ (bfd_elf_parse_eh_frame_entries): Likewise.
+ (_bfd_elf_section_already_linked): Likewise.
+ * elfnn-aarch64.c (elfNN_aarch64_size_dynamic_sections): Likewise.
+ * elfnn-ia64.c (is_unwind_section_name): Likewise.
+ (elfNN_ia64_size_dynamic_sections): Likewise.
+ (elfNN_ia64_object_p): Likewise.
+ * elfxx-mips.c (FN_STUB_P): Likewise.
+ (CALL_STUB_P): Likewise.
+ (CALL_FP_STUB_P): Likewise.
+ (_bfd_mips_elf_section_from_shdr): Likewise.
+ (_bfd_mips_elf_fake_sections): Likewise.
+ (_bfd_mips_elf_size_dynamic_sections): Likewise.
+ (_bfd_mips_final_write_processing): Likewise.
+ (_bfd_mips_elf_final_link): Likewise.
+ * elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections): Likewise.
+ * elfxx-x86.c (elf_i386_is_reloc_section): Likewise.
+ (elf_x86_64_is_reloc_section): Likewise.
+ * hpux-core.c (thread_section_p): Likewise.
+ * libcoff.h (bfd_pei_p): Likewise.
+ * linker.c (REAL): Likewise.
+ (unwrap_hash_lookup): Likewise.
+ (_bfd_generic_link_add_one_symbol): Likewise.
+ * mmo.c (mmo_internal_write_section): Likewise.
+ * osf-core.c (osf_core_core_file_p): Likewise.
+ * pef.c (bfd_pef_print_symbol): Likewise.
+ * pei-x86_64.c (pex64_print_all_pdata_sections): Likewise.
+ * som.c (som_slurp_symbol_table): Likewise.
+ (som_slurp_armap): Likewise.
+ * wasm-module.c (wasm_compute_custom_section_file_position): Likewise.
-2020-06-15 Max Filippov <jcmvbkbc@gmail.com>
+2021-03-22 Jan Beulich <jbeulich@suse.com>
- * elf32-xtensa.c (XSHAL_ABI, XTHAL_ABI_UNDEFINED)
- (XTHAL_ABI_WINDOWED, XTHAL_ABI_CALL0): New macros.
- (elf32xtensa_abi): New global variable.
- (xtensa_abi_choice): New function.
- (elf_xtensa_create_plt_entry): Use xtensa_abi_choice instead of
- XSHAL_ABI to select PLT code.
+ * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Add missing
+ language translation wrapping to _bfd_error_handler()
+ invocations.
-2020-06-15 Roland McGrath <mcgrathr@google.com>
+2021-03-21 Alan Modra <amodra@gmail.com>
- * elflink.c (bfd_elf_define_start_stop): Use start_stop_visibility
- field of bfd_link_info.
+ * bfd-in.h (startswith): New inline.
+ (CONST_STRNEQ): Use startswith.
+ * bfd-in2.h: Regenerate.
-2020-06-15 Alan Modra <amodra@gmail.com>
+2021-03-20 Alan Modra <amodra@gmail.com>
- * config.bfd: Obsolete powerpcle-*-pe targets.
+ PR 27590
+ * elf.c (_bfd_elf_make_section_from_shdr): Remove SHF_EXCLUDE
+ test for .gnu.debuglto*.
-2020-06-15 Alan Modra <amodra@gmail.com>
+2021-03-18 H.J. Lu <hongjiu.lu@intel.com>
- PR 26103
- * elflink.c (elf_link_add_archive_symbols): Exclude undefined
- symbols that were defined in discarded sections.
- * cofflink.c (coff_link_check_archive_element): Likewise.
- (coff_link_add_symbols): Set indx to -3 for symbols defined in
- discarded sections.
- (_bfd_coff_write_global_sym): Don't emit such symbols.
- libcoff-in.h (struct coff_link_hash_entry): Update indx comment.
- libcoff.h: Regenerate.
+ PR ld/27590
+ * elf.c (_bfd_elf_make_section_from_shdr): Treat
+ .gnu.debuglto_.debug_ section as debugging section unless it is
+ marked with SHF_EXCLUDE.
+ * elflink.c (elf_create_symbuf): Revert commit 994b2513281.
+ (bfd_elf_match_symbols_in_sections): Ignore section symbols when
+ matching non-debugging sections or linkonce section with comdat
+ section.
-2020-06-11 Alan Modra <amodra@gmail.com>
+2021-03-18 H.J. Lu <hongjiu.lu@intel.com>
- PR 26107
- * pdp11.c (is_stab): Replace legacy "index" function with "strchr".
+ PR ld/27587
+ * dwarf2.c (read_attribute_value): Check version >= 3 for
+ DW_FORM_ref_addr.
-2020-06-10 H.J. Lu <hongjiu.lu@intel.com>
+2021-03-16 Nick Clifton <nickc@redhat.com>
- * elfnn-ia64.c (elfNN_ia64_link_hash_table): Remove reltext.
- (allocate_dynrel_entries): Set DF_TEXTREL instead of reltext.
- (elfNN_ia64_size_dynamic_sections): Check DF_TEXTREL instead
- of reltext.
+ * peXXigen.c (_bfd_XXi_swap_aux_out): Avoid potential buffer
+ overrun by using sizeof of the destination x_fname field as the
+ limit for a memcpy.
-2020-06-10 H.J. Lu <hongjiu.lu@intel.com>
+2021-03-16 Kuan-Lin Chen <kuanlinchentw@gmail.com>
- PR ld/26094
- * elflink.c (bfd_elf_define_start_stop): Handle common symbols.
- Clear verinfo.verdef.
+ * elfxx-riscv.c (riscv_std_z_ext_strtab): Add zba, zbb and zbc.
-2020-06-09 H.J. Lu <hongjiu.lu@intel.com>
+2021-03-12 Clément Chigot <clement.chigot@atos.net>
- PR ld/18801
- * elf-bfd.h (elf_link_hash_table): Add ifunc_resolvers.
- (_bfd_elf_allocate_ifunc_dyn_relocs): Remove the
- bfd_boolean * argument. Set ifunc_resolvers if there are IFUNC
- resolvers.
- * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Updated.
- Set ifunc_resolvers if there are FUNC resolvers.
- * elf64-ppc.c (ppc_link_hash_table): Remove local_ifunc_resolver.
- (build_global_entry_stubs_and_plt): Replace local_ifunc_resolver
- with elf.ifunc_resolvers.
- (write_plt_relocs_for_local_syms): Likewise.
- (ppc64_elf_relocate_section): Likewise.
- (ppc64_elf_finish_dynamic_sections): Likewise.
- * elfnn-aarch64.c (elfNN_aarch64_allocate_ifunc_dynrelocs):
- Updated.
- * elfxx-x86.c (elf_x86_allocate_dynrelocs): Likewise.
- (_bfd_x86_elf_size_dynamic_sections): Check elf.ifunc_resolvers
- instead of readonly_dynrelocs_against_ifunc.
- * elfxx-x86.h (elf_x86_link_hash_table): Remove
- readonly_dynrelocs_against_ifunc.
-
-2020-06-09 Alan Modra <amodra@gmail.com>
-
- * elf64-ppc.c (struct ppc_link_hash_table): Delete
- maybe_local_ifunc_resolver field.
- (build_global_entry_stubs_and_plt): Set local_ifunc_resolver in
- cases where maybe_local_ifunc_resolver was set.
- (ppc64_elf_relocate_section): Likewise.
- (ppc64_elf_finish_dynamic_sections): Downgrade ifunc with textrel
- error to a warning.
-
-2020-06-08 H.J. Lu <hongjiu.lu@intel.com>
-
- * elf-bfd.h (elf_link_hash_entry): Add tlsdesc_plt and
- tlsdesc_got.
- * elf32-arm.c (elf32_arm_link_hash_table): Remove tlsdesc_plt
- and dt_tlsdesc_got.
- (elf32_arm_size_dynamic_sections): Updated. Clear
- root.tlsdesc_plt for DF_BIND_NOW.
- (elf32_arm_finish_dynamic_sections): Updated.
- (elf32_arm_output_arch_local_syms): Likewise.
- * elf32-nds32.c (nds32_elf_size_dynamic_sections): Updated.
- Clear root.tlsdesc_plt for DF_BIND_NOW.
- (nds32_elf_finish_dynamic_sections): Updated.
- * elf32-nds32.h (elf_nds32_link_hash_table): Remove
- dt_tlsdesc_plt and dt_tlsdesc_got.
- * elf64-x86-64.c (elf_x86_64_finish_dynamic_sections): Updated.
- * elfnn-aarch64.c (elf_aarch64_link_hash_table): Remove
- tlsdesc_plt and dt_tlsdesc_got.
- (elfNN_aarch64_allocate_dynrelocs): Updated.
- (elfNN_aarch64_finish_dynamic_sections): Likewise.
- (elfNN_aarch64_size_dynamic_sections): Updated. Clear
- root.tlsdesc_plt for DF_BIND_NOW. Don't check DF_BIND_NOW
- twice.
- * elfxx-x86.c (elf_x86_allocate_dynrelocs): Updated.
- (_bfd_x86_elf_size_dynamic_sections): Likewise.
- (_bfd_x86_elf_finish_dynamic_sections): Likewise.
- * elfxx-x86.h (elf_x86_link_hash_table): Remove tlsdesc_plt and
- tlsdesc_got.
-
-2020-06-07 H.J. Lu <hongjiu.lu@intel.com>
-
- * elf32-tic6x.c (elf32_bed): Defined the default to
- elf32_tic6x_bed.
-
-2020-06-07 H.J. Lu <hongjiu.lu@intel.com>
-
- * elf64-hppa.c (elf64_hppa_link_hash_table): Remove plt_sec and
- plt_rel_sec.
- (elf64_hppa_check_relocs): Replace plt_sec/plt_rel_sec with
- root.splt/root.srelplt.
- (elf64_hppa_create_dynamic_sections): Likewise.
- (elf64_hppa_size_dynamic_sections): Likewise.
- (elf64_hppa_finish_dynamic_symbol): Likewise.
- (elf_hppa_final_link): Likewise.
- (elf_hppa_final_link_relocate): Likewise.
-
-2020-06-06 H.J. Lu <hongjiu.lu@intel.com>
-
- * elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections): Updated.
- * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Remove
- is_vxworks.
-
-2020-06-06 H.J. Lu <hongjiu.lu@intel.com>
-
- * elf-bfd.h (elf_target_os): New.
- (elf_link_hash_table): Add target_os.
- (elf_backend_data): Add target_os.
- * elf32-arm.c (elf32_arm_link_hash_table): Remove vxworks_p,
- symbian_p and nacl_p.
- (create_got_section): Updated.
- (elf32_arm_create_dynamic_sections): Likewise.
- (arm_type_of_stub): Likewise.
- (elf32_arm_create_or_find_stub_sec): Likewise.
- (elf32_arm_allocate_plt_entry): Likewise.
- (elf32_arm_populate_plt_entry): Likewise.
- (elf32_arm_final_link_relocate): Likewise.
- (elf32_arm_check_relocs): Likewise.
- (allocate_dynrelocs_for_symbol): Likewise.
- (elf32_arm_finish_dynamic_symbol): Likewise.
- (elf32_arm_finish_dynamic_sections): Likewise.
- (elf32_arm_output_plt_map_1): Likewise.
- (elf32_arm_output_arch_local_syms): Likewise.
- (elf32_arm_add_symbol_hook): Likewise.
- (elf32_arm_nacl_link_hash_table_create): Likewise.
- (elf32_arm_vxworks_link_hash_table_create): Likewise.
- (elf32_arm_symbian_link_hash_table_create): Likewise.
- (ELF_TARGET_OS): New.
- * elf32-i386.c (elf_i386_arch_bed): Removed.
- (elf_backend_arch_data): Likewise.
- (elf_i386_solaris_arch_bed): Likewise.
- (elf_i386_nacl_arch_bed): Likewise.
- (elf_i386_vxworks_arch_bed): Likewise.
- (elf_i386_relocate_section): Updated.
- (elf_i386_finish_dynamic_sections): Likewise.
- (elf_i386_get_synthetic_symtab): Likewise.
- (elf_i386_link_setup_gnu_properties): Likewise.
- (ELF_TARGET_OS): New.
- * elf32-mips.c (ELF_TARGET_OS): New.
- * elf32-ppc.c (ppc_elf_link_hash_table): Remove is_vxworks.
- (ppc_elf_create_got): Updated.
- (ppc_elf_create_dynamic_sections): Likewise.
- (ppc_elf_check_relocs): Likewise.
- (ppc_elf_adjust_dynamic_symbol): Likewise.
- (ppc_elf_size_dynamic_sections): Likewise.
- (ppc_elf_relocate_section): Likewise.
- (ppc_elf_finish_dynamic_sections): Likewise.
- (ppc_elf_vxworks_link_hash_table_create): Likewise.
- (ELF_TARGET_OS): New.
- * elf32-sh.c (elf_sh_link_hash_table): Remove vxworks_p.
- (sh_elf_link_hash_table_create): Updated.
- (sh_elf_create_dynamic_sections): Likewise.
- (allocate_dynrelocs): Likewise.
- (sh_elf_size_dynamic_sections): Likewise.
- (sh_elf_relocate_section): Likewise.
- (sh_elf_finish_dynamic_symbol): Likewise.
- (sh_elf_finish_dynamic_sections): Likewise.
- (ELF_TARGET_OS): New.
- * elf32-sparc.c (elf32_sparc_vxworks_link_hash_table_create):
- Removed.
- (bfd_elf32_bfd_link_hash_table_create): Likewise.
- (ELF_TARGET_OS): New.
- * elf64-x86-64.c (elf_x86_64_arch_bed): Removed.
- (elf_x86_64_solaris_arch_bed): Likewise.
- (elf_x86_64_nacl_arch_bed): Likewise.
- (elf_x86_64_finish_dynamic_sections): Updated.
- (elf_x86_64_get_synthetic_symtab): Likewise.
- (elf_x86_64_link_setup_gnu_properties): Likewise.
- (ELF_TARGET_OS): New.
- * elflink.c (_bfd_elf_link_hash_table_init): Initialize
- target_o.
- * elfxx-mips.c (mips_elf_link_hash_table): Remove is_vxworks.
- (MIPS_ELF_REL_DYN_NAME): Updated.
- (ELF_MIPS_GP_OFFSET): Likewise.
- (mips_elf_create_local_got_entry): Likewise.
- (mips_elf_allocate_dynamic_relocations): Likewise.
- (mips_elf_count_got_symbols): Likewise.
- (is_gott_symbol): Likewise.
- (mips_elf_calculate_relocation): Likewise.
- (mips_elf_create_dynamic_relocation): Likewise.
- (_bfd_mips_elf_check_relocs): Likewise.
- (allocate_dynrelocs): Likewise.
- (_bfd_mips_elf_adjust_dynamic_symbol): Likewise.
- (mips_elf_lay_out_got): Likewise.
- (mips_elf_set_plt_sym_value): Likewise.
- (_bfd_mips_elf_size_dynamic_sections): Likewise.
- (_bfd_mips_elf_finish_dynamic_symbol): Likewise.
- (_bfd_mips_elf_finish_dynamic_sections): Likewise.
- (_bfd_mips_elf_final_link): Likewise.
- (_bfd_mips_init_file_header): Likewise.
- * elfxx-sparc.c (_bfd_sparc_elf_create_dynamic_sections):
- Likewise.
- (allocate_dynrelocs): Likewise.
- (_bfd_sparc_elf_size_dynamic_sections): Likewise.
- (_bfd_sparc_elf_relocate_section): Likewise.
- (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
- (sparc_finish_dyn): Likewise.
- (_bfd_sparc_elf_finish_dynamic_sections): Likewise.
- * elfxx-target.h (ELF_TARGET_OS): New.
- (elfNN_bed): Add ELF_TARGET_OS.
- * elfxx-x86.c (elf_x86_allocate_dynrelocs): Updated.
- (_bfd_x86_elf_link_hash_table_create): Likewise.
- (_bfd_x86_elf_size_dynamic_sections): Likewise.
- (_bfd_x86_elf_finish_dynamic_sections): Likewise.
- (_bfd_x86_elf_adjust_dynamic_symbol): Likewise.
- (_bfd_x86_elf_link_setup_gnu_properties): Likewise.
- * elfxx-x86.h (elf_x86_target_os): Removed.
- (elf_x86_backend_data): Likewise.
- (get_elf_x86_backend_data): Likewise.
- (elf_x86_link_hash_table): Remove target_os.
-
-2020-06-06 Alan Modra <amodra@gmail.com>
-
- * reloc.c: Rename
- BFD_RELOC_PPC64_GOT_TLSGD34 to BFD_RELOC_PPC64_GOT_TLSGD_PCREL34,
- BFD_RELOC_PPC64_GOT_TLSLD34 to BFD_RELOC_PPC64_GOT_TLSLD_PCREL34,
- BFD_RELOC_PPC64_GOT_TPREL34 to BFD_RELOC_PPC64_GOT_TPREL_PCREL34,
- BFD_RELOC_PPC64_GOT_DTPREL34 to BFD_RELOC_PPC64_GOT_DTPREL_PCREL34.
- * elf64-ppc.c: Update throughout for reloc renaming.
- (ppc64_elf_reloc_name_lookup): Handle old reloc names.
+ * reloc.c (BFD_RELOC_PPC_TLS_LE, BFD_RELOC_PPC_TLS_IE,
+ BFD_RELOC_PPC_TLS_M, BFD_RELOC_PPC_TLS_ML, BFD_RELOC_PPC64_TLS_GD,
+ BFD_RELOC_PPC64_TLS_LD, BFD_RELOC_PPC64_TLS_LE,
+ BFD_RELOC_PPC64_TLS_IE, BFD_RELOC_PPC64_TLS_M,
+ BFD_RELOC_PPC64_TLS_ML): New relocations.
+ * bfd-in2.h: Regenerate.
* libbfd.h: Regenerate.
+ * coff-rs6000.c (xcoff_calculate_relocation): Call
+ xcoff_reloc_type_tls for TLS relocations.
+ (xcoff_howto_table): Implement TLS relocations.
+ (_bfd_xcoff_reloc_type_lookup): Add cases TLS relocations.
+ (xcoff_reloc_type_tls): New function.
+ * coff64-rs6000.c (xcoff_calculate_relocation): Likewise.
+ (xcoff_howto_table): Likewise.
+ (_bfd_xcoff_reloc_type_lookup): Likewise.
+ * coffcode.h (sec_to_styp_flags): Handle TLS sections.
+ (styp_to_sec_flags): Likewise.
+ (coff_compute_section_file_positions): Avoid file offset
+ optimisation for .data when the previous section is .tdata.
+ (coff_write_object_contents): Handle TLS sections.
+ * coffswap.h (coff_swap_aouthdr_out): Add support for
+ new fields in aouthdr.
+ * libxcoff.h (xcoff_reloc_type_tls): Add prototype.
+ * xcofflink.c (xcoff_link_add_symbols): Handle XMC_UL.
+ (xcoff_need_ldrel_p): Add cases for TLS relocations.
+ (xcoff_create_ldrel): Add l_symndx for TLS sections.
+
+2021-03-12 Clément Chigot <clement.chigot@atos.net>
+
+ * reloc.c (BFD_RELOC_PPC_TOC16_HI, BFD_RELOC_PPC_TOC16_LO):
+ New relocations.
* bfd-in2.h: Regenerate.
-
-2020-06-05 H.J. Lu <hongjiu.lu@intel.com>
-
- PR ld/26080
- * elf32-bfin.c (bfinfdpic_relocate_section): Skip non SEC_ALLOC
- section.
-
-2020-06-05 Nick Clifton <nickc@redhat.com>
-
- * pdp11.c (aout_link_add_symbols): Fix use before initialisation
- bug.
-
-2020-06-05 Nelson Chu <nelson.chu@sifive.com>
-
- * elfnn-riscv.c (riscv_merge_attributes): Add new boolean
- priv_may_conflict, in_priv_zero and out_priv_zero to decide
- whether the object can be linked according to it's priv
- attributes. The object without any priv spec attributes can
- be linked with others. If the first input object doesn't contain
- any priv attributes, then we need to copy the setting from the
- next input one. Also report more detailed error messages to user.
-
-2020-06-04 Stephen Casner <casner@acm.org>
-
- Extend pdp11-aout symbol table format to accommodate .stab
- symbols and implement correct handling of them.
-
- * pdp11.c (pdp11_external_nlist): Repurposed e_unused to e_desc.
- (N_STAB, is_stab): Needed new function is_stab to disambiguate
- normal vs. .stab symbol table type values, replacing N_STAB mask.
- (translate_from_native_sym_flags): Determine correct section for
- different .stab types.
- (translate_to_native_sym_flags): Leave .stab types intact.
- (translate_symbol_table): Error if symbol indicates overlay;
- store desc field from .stab symbols.
- (write_syms): Output desc field with symbol.
- (aout_link_check_ar_symbols): Skip .stab symbols.
- (aout_link_add_symbols): Correctly distinguish .stab symbols.
- (aout_link_write_other_symbol): Write 0 for desk and ovly fields.
- (aout_link_write_symbols): Write 0 for desk and ovly fields;
- correctly distinguish .stab symbols and select calculate their
- section and value; and copy desc and ovly fields from input symbol
- to output symbol.
-
-2020-06-04 Stephen Casner <casner@acm.org>
-
- * aoutx.h (translate_symbol_table): Comment had external and
- internal swapped.
- * pdp11.c (translate_symbol_table): Likewise.
-
-2020-06-04 H.J. Lu <hongjiu.lu@intel.com>
-
- * elfxx-x86.h (elf_x86_link_hash_table): Remove target_id.
- (is_x86_elf): Check elf.hash_table_id instead of target_id.
- * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Updated.
-
-2020-06-04 H.J. Lu <hongjiu.lu@intel.com>
-
- PR ld/26080
- * elf-m10300.c (mn10300_elf_relocate_section): Resolve relocation
- in debug section against symbol defined in shared library to 0.
- * elf32-i386.c (elf_i386_check_relocs): Remove SEC_ALLOC check.
- * elf32-lm32.c (lm32_elf_check_relocs): Likewise.
- * elf32-m32r.c (m32r_elf_check_relocs): Likewise.
- * elf32-nds32.c (nds32_elf_check_relocs): Likewise.
- * elf32-nios2.c (nios2_elf32_check_relocs): Likewise.
- * elf32-or1k.c (or1k_elf_check_relocs): Likewise.
- * elf32-ppc.c (ppc_elf_check_relocs): Likewise.
- * elf32-sh.c (sh_elf_check_relocs): Likewise.
- * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
- * elf64-alpha.c (elf64_alpha_check_relocs): Likewise.
- * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
- * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
- * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
- * elf32-vax.c (elf_vax_check_relocs): Set non_got_ref for non-GOT
- reference.
- (elf_vax_adjust_dynamic_symbol): Generate a copy reloc only if
- there is non-GOT reference.
- * elflink.c (_bfd_elf_link_check_relocs): Skip non-loaded,
- non-alloced sections.
-
-2020-06-03 Stephen Casner <casner@acm.org>
-
- Copy several years of fixes from bfd/aoutx.h to bfd/pdp11.c.
-
- * pdp11.c (some_aout_object_p): 4c1534c7a2a - Don't set EXEC_P for
- files with relocs.
- (aout_get_external_symbols): 6b8f0fd579d - Return if count is zero.
- 0301ce1486b PR 22306 - Handle stringsize of zero, and error for any
- other size that doesn't qcover the header word.
- bf82069dce1 PR 23056 - Allocate an extra byte at the end of the
- string table, and zero it.
- (translate_symbol_table): 0d329c0a83a PR 22887 - Print an error
- message and set bfd_error on finding an invalid name string offset.
- (add_to_stringtab): INLINE -> inline
- (pdp11_aout_swap_reloc_in): 116acb2c268 PR 22887 - Correct r_index
- bound check.
- (squirt_out_relocs): e2996cc315d PR 20921 - Check for and report
- any relocs that could not be recognised.
- 92744f05809 PR 20929 - Check for relocs without an associated symbol.
- (find_nearest_line): 808346fcfcf PR 23055 - Check that the symbol
- name exists and is long enough, before attempting to see if it is
- for a .o file.
- c3864421222 - Correct case for N_SO being the last symbol.
- 50455f1ab29 PR 20891 - Handle the case where the main file name
- and the directory name are both empty.
- e82ab856bb4 PR 20892 - Handle the case where function name is empty.
- (aout_link_add_symbols): e517df3dbf7 PR 19629 - Check for out of
- range string table offsets.
- 531336e3a0b PR 20909 - Fix off-by-one error in check for an
- illegal string offset.
- (aout_link_includes_newfunc): Add comment.
- (pdp11_aout_link_input_section): ad756e3f9e6 - Return with an error
- on unexpected relocation type rather than ASSERT.
-
-2020-06-03 H.J. Lu <hongjiu.lu@intel.com>
-
- PR ld/26066
- * elf32-nios2.c (nios2_elf32_size_dynamic_sections): Call
- _bfd_elf_maybe_set_textrel to set DF_TEXTREL.
-
-2020-06-03 H.J. Lu <hongjiu.lu@intel.com>
-
- PR ld/26066
- * elf32-nios2.c (nios2_elf32_check_relocs): Skip non-loaded,
- non-alloced sections.
-
-2020-06-03 H.J. Lu <hongjiu.lu@intel.com>
-
- * elf32-frv.c (elf32_frv_relocate_section): Don't generate
- dynamic relocations for non SEC_ALLOC sections.
-
-2020-06-03 Gunther Nikl <gnikl@justmail.de>
-
- * aout64.c (BMAGIC, QMAGIC): Do not define.
- * aoutx.h (N_IS_BMAGIC, N_SET_QMAGIC): New defines.
- (NAME (aout, some_aout_object_p)): Use N_IS_QMAGIC and N_IS_BMAGIC
- to check the file format.
- (adjust_z_magic): Use N_SET_QMAGIC to set file format.
- * i386aout.c (NO_WRITE_HEADER_KLUDGE): Delete define.
- * libaout.h (NO_WRITE_HEADER_KLUDGE): Do not define.
-
-2020-06-03 H.J. Lu <hongjiu.lu@intel.com>
-
- * elf32-arc.c (elf_arc_relocate_section): Don't generate dynamic
- relocations for non SEC_ALLOC sections.
-
-2020-06-03 H.J. Lu <hongjiu.lu@intel.com>
-
- * elf-bfd.h (_bfd_elf_maybe_set_textrel): New
- * elf32-arm.c (maybe_set_textrel): Removed.
- (elf32_arm_size_dynamic_sections): Replace maybe_set_textrel
- with _bfd_elf_maybe_set_textrel.
- * elf32-csky.c (maybe_set_textrel): Removed.
- (csky_elf_size_dynamic_sections): Replace maybe_set_textrel
- with _bfd_elf_maybe_set_textrel.
- * elf32-hppa.c (maybe_set_textrel): Removed.
- (elf32_hppa_size_dynamic_sections): Replace maybe_set_textrel
- with _bfd_elf_maybe_set_textrel.
- * elf32-lm32.c (maybe_set_textrel): Removed.
- (lm32_elf_size_dynamic_sections): Replace maybe_set_textrel
- with _bfd_elf_maybe_set_textrel.
- * elf32-m32r.c (maybe_set_textrel): Removed.
- (m32r_elf_size_dynamic_sections): Replace maybe_set_textrel
- with _bfd_elf_maybe_set_textrel.
- * elf32-metag.c (maybe_set_textrel): Removed.
- (elf_metag_size_dynamic_sections): Replace maybe_set_textrel
- with _bfd_elf_maybe_set_textrel.
- * elf32-nds32.c (maybe_set_textrel): Removed.
- (nds32_elf_size_dynamic_sections): Replace maybe_set_textrel
- with _bfd_elf_maybe_set_textrel.
- * elf32-or1k.c (maybe_set_textrel): Removed.
- (or1k_elf_size_dynamic_sections): Replace maybe_set_textrel
- with _bfd_elf_maybe_set_textrel.
- * elf32-ppc.c (maybe_set_textrel): Removed.
- (ppc_elf_size_dynamic_sections): Replace maybe_set_textrel
- with _bfd_elf_maybe_set_textrel.
- * elf32-s390.c (maybe_set_textrel): Removed.
- (elf_s390_size_dynamic_sections): Replace maybe_set_textrel
- with _bfd_elf_maybe_set_textrel.
- * elf32-sh.c (maybe_set_textrel): Removed.
- (sh_elf_size_dynamic_sections): Replace maybe_set_textrel
- with _bfd_elf_maybe_set_textrel.
- * elf32-tic6x.c (maybe_set_textrel): Removed.
- (elf32_tic6x_size_dynamic_sections): Replace maybe_set_textrel
- with _bfd_elf_maybe_set_textrel.
- * elf32-tilepro.c (maybe_set_textrel): Removed.
- (tilepro_elf_size_dynamic_sections): Replace maybe_set_textrel
- with _bfd_elf_maybe_set_textrel.
- * elf64-ppc.c (maybe_set_textrel): Removed.
- (ppc64_elf_size_dynamic_sections): Replace maybe_set_textrel
- with _bfd_elf_maybe_set_textrel.
- * elf64-s390.c (maybe_set_textrel): Removed.
- (elf_s390_size_dynamic_sections): Replace maybe_set_textrel
- with _bfd_elf_maybe_set_textrel.
- * elfnn-aarch64.c (maybe_set_textrel): Removed.
- (elfNN_aarch64_size_dynamic_sections): Replace maybe_set_textrel
- with _bfd_elf_maybe_set_textrel.
- * elfnn-riscv.c (maybe_set_textrel): Removed.
- (riscv_elf_size_dynamic_sections): Replace maybe_set_textrel
- with _bfd_elf_maybe_set_textrel.
- * elfxx-sparc.c (maybe_set_textrel): Removed.
- (_bfd_sparc_elf_size_dynamic_sections): Replace maybe_set_textrel
- with _bfd_elf_maybe_set_textrel.
- * elfxx-tilegx.c (maybe_set_textrel): Removed.
- (tilegx_elf_size_dynamic_sections): Replace maybe_set_textrel
- with _bfd_elf_maybe_set_textrel.
- * elfxx-x86.c (maybe_set_textrel): Removed.
- (_bfd_x86_elf_size_dynamic_sections): Replace maybe_set_textrel
- with _bfd_elf_maybe_set_textrel.
- * elflink.c (_bfd_elf_maybe_set_textrel): New.
-
-2020-06-03 H.J. Lu <hongjiu.lu@intel.com>
-
- PR ld/26067
- * elf32-arm.c (elf32_arm_copy_indirect_symbol): Don't copy
- dyn_relocs.
- * elf32-csky.c (csky_elf_copy_indirect_symbol): Likewise.
- * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
- * elf32-metag.c (elf_metag_copy_indirect_symbol): Likewise.
- * elf32-microblaze.c (microblaze_elf_copy_indirect_symbol):
+ * libbfd.h: Regenerate.
+ * coff-rs6000.c (xcoff_calculate_relocation): Call
+ xcoff_reloc_type_toc for R_TOCU and R_TOCL.
+ (xcoff_howto_table): Remove src_mask for TOC relocations.
+ Add R_TOCU and R_TOCL howtos.
+ (_bfd_xcoff_reloc_type_lookup): Add cases for
+ BFD_RELOC_PPC_TOC16_HI and BFD_RELOC_PPC_TOC16_LO.
+ (xcoff_reloc_type_toc): Compute the whole offset.
+ Implement R_TOCU and R_TOCL.
+ * coff64-rs6000.c (xcoff64_calculate_relocation):
Likewise.
- * elf32-nds32.c (nds32_elf_copy_indirect_symbol): Likewise.
- * elf32-nios2.c (nios2_elf32_copy_indirect_symbol): Likewise.
- * elf32-or1k.c (or1k_elf_copy_indirect_symbol): Likewise.
- * elf32-s390.c (elf_s390_copy_indirect_symbol): Likewise.
- * elf32-sh.c (sh_elf_copy_indirect_symbol): Likewise.
- * elf32-tilepro.c (tilepro_elf_copy_indirect_symbol): Likewise.
- * elf64-s390.c (elf_s390_copy_indirect_symbol): Likewise.
- * elfnn-aarch64.c (elfNN_aarch64_copy_indirect_symbol): Likewise.
- * elfnn-riscv.c (riscv_elf_copy_indirect_symbol): Likewise.
- * elfxx-sparc.c (_bfd_sparc_elf_copy_indirect_symbol): Likewise.
- * elfxx-tilegx.c (tilegx_elf_copy_indirect_symbol): Likewise.
- * elfxx-x86.c (_bfd_x86_elf_copy_indirect_symbol): Likewise.
- * elf32-lm32.c (lm32_elf_copy_indirect_symbol): Removed.
- (elf_backend_copy_indirect_symbol): Likewise.
- * elf32-m32r.c (m32r_elf_copy_indirect_symbol): Removed.
- (elf_backend_copy_indirect_symbol): Likewise.
- * elflink.c (_bfd_elf_link_hash_copy_indirect): Copy dyn_relocs.
-
-2020-06-03 H.J. Lu <hongjiu.lu@intel.com>
-
- PR ld/26067
- * elf-bfd.h (_bfd_elf_readonly_dynrelocs): New.
- * elf32-arm.c (readonly_dynrelocs): Removed.
- (maybe_set_textrel): Replace readonly_dynrelocs with
- _bfd_elf_readonly_dynrelocs.
- * elf32-csky.c (readonly_dynrelocs): Removed.
- (maybe_set_textrel): Replace readonly_dynrelocs with
- _bfd_elf_readonly_dynrelocs.
- * elf32-hppa.c(readonly_dynrelocs): Removed.
- (alias_readonly_dynrelocs): Replace readonly_dynrelocs with
- _bfd_elf_readonly_dynrelocs.
- (maybe_set_textrel): Likewise.
- * elf32-lm32.c (readonly_dynrelocs): Removed.
- (lm32_elf_adjust_dynamic_symbol): Replace readonly_dynrelocs
- with _bfd_elf_readonly_dynrelocs.
- (maybe_set_textrel): Likewise.
- * elf32-m32r.c (readonly_dynrelocs): Removed.
- (m32r_elf_adjust_dynamic_symbol): Replace readonly_dynrelocs
- with _bfd_elf_readonly_dynrelocs.
- (maybe_set_textrel): Likewise.
- * elf32-metag.c (readonly_dynrelocs): Removed.
- (elf_metag_adjust_dynamic_symbol): Replace readonly_dynrelocs
- with _bfd_elf_readonly_dynrelocs.
- (maybe_set_textrel): Likewise.
- * elf32-microblaze.c (readonly_dynrelocs): Removed.
- (microblaze_elf_adjust_dynamic_symbol): Replace readonly_dynrelocs
- with _bfd_elf_readonly_dynrelocs.
- * elf32-nds32.c (readonly_dynrelocs): Removed.
- (nds32_elf_adjust_dynamic_symbol): Replace readonly_dynrelocs
- with _bfd_elf_readonly_dynrelocs.
- (maybe_set_textrel): Likewise.
- * elf32-or1k.c (readonly_dynrelocs): Removed.
- (or1k_elf_adjust_dynamic_symbol): Replace readonly_dynrelocs
- with _bfd_elf_readonly_dynrelocs.
- * elf32-ppc.c (readonly_dynrelocs): Removed.
- (alias_readonly_dynrelocs): Replace readonly_dynrelocs with
- _bfd_elf_readonly_dynrelocs.
- (ppc_elf_adjust_dynamic_symbol): Likewise.
- (maybe_set_textrel): Likewise.
- * elf32-s390.c (readonly_dynrelocs): Removed.
- (elf_s390_adjust_dynamic_symbol): Replace readonly_dynrelocs
- with _bfd_elf_readonly_dynrelocs.
- (maybe_set_textrel): Likewise.
- * elf32-sh.c (readonly_dynrelocs): Removed.
- (sh_elf_adjust_dynamic_symbol): Replace readonly_dynrelocs with
- _bfd_elf_readonly_dynrelocs.
- (maybe_set_textrel): Likewise.
- * elf32-tic6x.c (readonly_dynrelocs): Removed.
- (maybe_set_textrel): Replace readonly_dynrelocs with
- _bfd_elf_readonly_dynrelocs.
- * elf32-tilepro.c (readonly_dynrelocs): Removed.
- (tilepro_elf_adjust_dynamic_symbol): Replace readonly_dynrelocs
- with _bfd_elf_readonly_dynrelocs.
- (maybe_set_textrel): Likewise.
- * elf64-ppc.c (readonly_dynrelocs): Removed.
- (alias_readonly_dynrelocs): Replace readonly_dynrelocs with
- _bfd_elf_readonly_dynrelocs.
- (ppc64_elf_adjust_dynamic_symbol): Likewise.
- (maybe_set_textrel): Likewise.
- * elf64-s390.c (readonly_dynrelocs): Removed.
- (elf_s390_adjust_dynamic_symbol): Replace readonly_dynrelocs
- with _bfd_elf_readonly_dynrelocs.
- (maybe_set_textrel): Likewise.
- * elflink.c (_bfd_elf_readonly_dynrelocs): New.
- * elfnn-aarch64.c (readonly_dynrelocs): Removed.
- (maybe_set_textrel): Replace readonly_dynrelocs with
- _bfd_elf_readonly_dynrelocs.
- * elfnn-riscv.c (readonly_dynrelocs): Removed.
- (riscv_elf_adjust_dynamic_symbol): Replace readonly_dynrelocs
- with _bfd_elf_readonly_dynrelocs.
- (maybe_set_textrel): Likewise.
- * elfxx-sparc.c (readonly_dynrelocs): Removed.
- (_bfd_sparc_elf_adjust_dynamic_symbol): Replace
- readonly_dynrelocs with _bfd_elf_readonly_dynrelocs.
- (maybe_set_textrel): Likewise.
- * elfxx-tilegx.c (readonly_dynrelocs): Removed.
- (tilegx_elf_adjust_dynamic_symbol): Replace readonly_dynrelocs
- with _bfd_elf_readonly_dynrelocs.
- (maybe_set_textrel): Likewise.
- * elfxx-x86.c (readonly_dynrelocs): Removed.
- (maybe_set_textrel): Replace readonly_dynrelocs with
- _bfd_elf_readonly_dynrelocs.
- (_bfd_x86_elf_adjust_dynamic_symbol): Likewise.
-
-2020-06-03 H.J. Lu <hongjiu.lu@intel.com>
-
- * elfxx-x86.h (GENERATE_DYNAMIC_RELOCATION_P): Silence
- -fsanitize=undefined.
-
-2020-06-03 Alan Modra <amodra@gmail.com>
-
- PR 26069
- PR 18758
- * peicode.h (pe_ILF_make_a_section): Align data for compilers
- other than gcc.
- (pe_ILF_build_a_bfd): Likewise.
-
-2020-06-03 Alan Modra <amodra@gmail.com>
-
- PR 26069
- * elf.c (_bfd_elf_close_and_cleanup): Free elf_shstrtab for
- core files as well as objects.
-
-2020-06-01 H.J. Lu <hongjiu.lu@intel.com>
-
- PR ld/26067
- * elf-bfd.h (elf_link_hash_entry): Add dyn_relocs after size.
- * elf-s390-common.c (s390_elf_allocate_ifunc_dyn_relocs):
- Updated.
- * elf32-arc.c (elf_arc_link_hash_entry): Remove dyn_relocs.
- (elf_arc_link_hash_newfunc): Updated.
- * elf32-arm.c (elf32_arm_link_hash_entry): Remove dyn_relocs.
- (elf32_arm_link_hash_newfunc): Updated.
- (elf32_arm_copy_indirect_symbol): Likewise.
- (elf32_arm_check_relocs): Likewise.
- (readonly_dynrelocs): Likewise.
- (allocate_dynrelocs_for_symbol): Likewise.
- * elf32-csky.c (csky_elf_link_hash_entry): Remove dyn_relocs.
- (csky_elf_link_hash_newfunc): Updated.
- (csky_allocate_dynrelocs): Likewise.
- (readonly_dynrelocs): Likewise.
- (csky_elf_copy_indirect_symbol): Likewise.
- * elf32-hppa.c (elf32_hppa_link_hash_entry): Remove dyn_relocs.
- (hppa_link_hash_newfunc): Updated.
- (elf32_hppa_copy_indirect_symbol): Likewise.
- (elf32_hppa_hide_symbol): Likewise.
- (elf32_hppa_adjust_dynamic_symbol): Likewise.
- (allocate_dynrelocs): Likewise.
- (elf32_hppa_relocate_section): Likewise.
- * elf32-i386.c (elf_i386_check_relocs): Likewise.
- * elf32-lm32.c (elf_lm32_link_hash_entry): Removed.
- (lm32_elf_link_hash_newfunc): Likewise.
- (lm32_elf_link_hash_table_create): Updated.
- (readonly_dynrelocs): Likewise.
- (allocate_dynrelocs): Likewise.
- (lm32_elf_copy_indirect_symbol): Likewise.
- * elf32-m32r.c (elf_m32r_link_hash_entry): Removed.
- (m32r_elf_link_hash_newfunc): Likewise.
- (m32r_elf_link_hash_table_create): Updated.
- (m32r_elf_copy_indirect_symbol): Likewise.
- (allocate_dynrelocs): Likewise.
- * elf32-metag.c (elf_metag_link_hash_entry): Remove dyn_relocs.
- (metag_link_hash_newfunc): Updated.
- (elf_metag_copy_indirect_symbol): Likewise.
- (readonly_dynrelocs): Likewise.
- (allocate_dynrelocs): Likewise.
- * elf32-microblaze.c (elf32_mb_link_hash_entry): Remove
- dyn_relocs.
- (link_hash_newfunc): Updated.
- (microblaze_elf_check_relocs): Likewise.
- (microblaze_elf_copy_indirect_symbol): Likewise.
- (readonly_dynrelocs): Likewise.
- (allocate_dynrelocs): Likewise.
- * elf32-nds32.c (elf_nds32_link_hash_entry): Remove dyn_relocs.
- (nds32_elf_link_hash_newfunc): Updated.
- (nds32_elf_copy_indirect_symbol): Likewise.
- (readonly_dynrelocs): Likewise.
- (allocate_dynrelocs): Likewise.
- (nds32_elf_check_relocs): Likewise.
- * elf32-nios2.c (elf32_nios2_link_hash_entry): Remove dyn_relocs.
- (link_hash_newfunc): Updated.
- (nios2_elf32_copy_indirect_symbol): Likewise.
- (nios2_elf32_check_relocs): Likewise.
- (allocate_dynrelocs): Likewise.
- * elf32-or1k.c (elf_or1k_link_hash_entry): Remove dyn_relocs.
- (or1k_elf_link_hash_newfunc): Updated.
- (readonly_dynrelocs): Likewise.
- (allocate_dynrelocs): Likewise.
- (or1k_elf_copy_indirect_symbol): Likewise.
- * elf32-ppc.c (ppc_elf_link_hash_entry): Remove dyn_relocs.
- (ppc_elf_link_hash_newfunc): Updated.
- (ppc_elf_copy_indirect_symbol): Likewise.
- (ppc_elf_check_relocs): Likewise.
- (readonly_dynrelocs): Likewise.
- (ppc_elf_adjust_dynamic_symbol): Likewise.
- (allocate_dynrelocs): Likewise.
- (ppc_elf_relocate_section): Likewise.
- * elf32-s390.c (elf_s390_link_hash_entry): Remove dyn_relocs.
- (link_hash_newfunc): Updated.
- (elf_s390_copy_indirect_symbol): Likewise.
- (readonly_dynrelocs): Likewise.
- (elf_s390_adjust_dynamic_symbol): Likewise.
- (allocate_dynrelocs): Likewise.
- * elf32-sh.c (elf_sh_link_hash_entry): Remove dyn_relocs.
- (sh_elf_link_hash_newfunc): Updated.
- (readonly_dynrelocs): Likewise.
- (allocate_dynrelocs): Likewise.
- (sh_elf_copy_indirect_symbol): Likewise.
- (sh_elf_check_relocs): Likewise.
- * elf32-tic6x.c (elf32_tic6x_link_hash_entry): Removed.
- (elf32_tic6x_link_hash_newfunc): Likewise.
- (elf32_tic6x_link_hash_table_create): Updated.
- (readonly_dynrelocs): Likewise.
- (elf32_tic6x_check_relocs): Likewise.
- (elf32_tic6x_allocate_dynrelocs): Likewise.
- * elf32-tilepro.c (tilepro_elf_link_hash_entry): Remove
- dyn_relocs.
- (link_hash_newfunc): Updated.
- (tilepro_elf_copy_indirect_symbol): Likewise.
- (tilepro_elf_check_relocs): Likewise.
- (allocate_dynrelocs): Likewise.
- * elf64-ppc.c (ppc_link_hash_entry): Remove dyn_relocs.
- (ppc64_elf_copy_indirect_symbol): Updated.
- (ppc64_elf_check_relocs): Likewise.
- (readonly_dynrelocs): Likewise.
- (ppc64_elf_adjust_dynamic_symbol): Likewise.
- (dec_dynrel_count): Likewise.
- (allocate_dynrelocs): Likewise.
- (ppc64_elf_relocate_section): Likewise.
- * elf64-s390.c (elf_s390_link_hash_entry): Remove dyn_relocs.
- (link_hash_newfunc): Updated.
- (elf_s390_copy_indirect_symbol): Likewise.
- (readonly_dynrelocs): Likewise.
- (allocate_dynrelocs): Likewise.
- * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
- * elfnn-aarch64.c (elf_aarch64_link_hash_entry): Remove
- dyn_relocs.
- (elfNN_aarch64_link_hash_newfunc): Updated.
- (elfNN_aarch64_copy_indirect_symbol): Likewise.
- (readonly_dynrelocs): Likewise.
- (need_copy_relocation_p): Likewise.
- (elfNN_aarch64_allocate_dynrelocs): Likewise.
- (elfNN_aarch64_allocate_ifunc_dynrelocs): Likewise.
- * elfnn-riscv.c (riscv_elf_link_hash_entry): Remove dyn_relocs.
- (link_hash_newfunc): Updated.
- (riscv_elf_copy_indirect_symbol): Likewise.
- (riscv_elf_check_relocs): Likewise.
- (readonly_dynrelocs): Likewise.
- (allocate_dynrelocs): Likewise.
- * elfxx-sparc.c (_bfd_sparc_elf_link_hash_entry): Remove
- dyn_relocs.
- (link_hash_newfunc): Updated.
- (_bfd_sparc_elf_copy_indirect_symbol): Likewise.
- (_bfd_sparc_elf_check_relocs): Likewise.
- (readonly_dynrelocs): Likewise.
- (allocate_dynrelocs): Likewise.
- * elfxx-tilegx.c (tilegx_elf_link_hash_entry): Remove dyn_relocs.
- (link_hash_newfunc): Updated.
- (tilegx_elf_copy_indirect_symbol): Likewise.
- (tilegx_elf_check_relocs): Likewise.
- (readonly_dynrelocs): Likewise.
- (allocate_dynrelocs): Likewise.
- * elfxx-x86.c (elf_x86_allocate_dynrelocs): Likewise.
- (readonly_dynrelocs): Likewise.
- (_bfd_x86_elf_copy_indirect_symbol): Likewise.
- * elfxx-x86.h (elf_x86_link_hash_entry): Remove dyn_relocs.
-
-2020-06-01 Alan Modra <amodra@gmail.com>
-
- * vms-alpha.c (_bfd_vms_slurp_etir): Check bound for the current
- command against cmd_length, not the end of record. For
- ETIR__C_STO_IMMR check size against cmd_length, mask repeat count
- to 32-bits and break out on zero size. Add ETIR__C_STC_LP_PSB
- cmd_length test.
-
-2020-05-28 David Faust <david.faust@oracle.com>
-
- * elf64-bpf.c (bpf_elf_relocate_section): Fix handling of
- R_BPF_INSN_{32,64} relocations.
-
-2020-05-28 Stephen Casner <casner@acm.org>
-
- * pdp11.c: Implement BRD_RELOC_32 to relocate the low 16 bits of
- addreses in .long (used in testsuites) and .stab values.
-
-2020-05-27 H.J. Lu <hongjiu.lu@intel.com>
-
- PR ld/22909
- * elflink.c (bfd_elf_final_link): Use bfd_link_textrel_check.
- Check bfd_link_dll when issue a DT_TEXTREL warning.
- * elfxx-x86.c (maybe_set_textrel): Likewise.
- (_bfd_x86_elf_size_dynamic_sections): Likewise.
-
-2020-05-26 Nick Clifton <nickc@redhat.com>
-
- * plugin.c (try_load_plugin): Extend error message when a plugin
- fails to open.
-
-2020-05-23 Alan Modra <amodra@gmail.com>
-
- * bfdio.c (bfd_get_file_size): Don't segfault on NULL arch_header.
-
-2020-05-22 Alan Modra <amodra@gmail.com>
-
- PR 25882
- * elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Don't init FP
- attributes from shared libraries, and do not return an error if
- they don't match.
-
-2020-05-21 Alan Modra <amodra@gmail.com>
-
- PR 25993
- * opncls.c (_bfd_free_cached_info): Keep a copy of the bfd
- filename.
- (_bfd_delete_bfd): Free the copy.
- (_bfd_new_bfd): Free nbfd->memory on error.
-
-2020-05-21 Alan Modra <amodra@gmail.com>
-
- * aoutx.h: Replace "if (x) free (x)" with "free (x)" throughout.
- * archive.c, * bfd.c, * bfdio.c, * coff-alpha.c, * coff-ppc.c,
- * coff-sh.c, * coff-stgo32.c, * coffcode.h, * coffgen.c,
- * cofflink.c, * cpu-arm.c, * doc/chew.c, * dwarf2.c, * ecoff.c,
- * ecofflink.c, * elf-eh-frame.c, * elf-m10200.c, * elf-m10300.c,
- * elf-strtab.c, * elf.c, * elf32-arc.c, * elf32-arm.c,
- * elf32-avr.c, * elf32-bfin.c, * elf32-cr16.c, * elf32-crx.c,
- * elf32-epiphany.c, * elf32-ft32.c, * elf32-h8300.c,
- * elf32-ip2k.c, * elf32-m32c.c, * elf32-m68hc11.c,
- * elf32-m68k.c, * elf32-microblaze.c, * elf32-msp430.c,
- * elf32-nds32.c, * elf32-nios2.c, * elf32-ppc.c, * elf32-pru.c,
- * elf32-rl78.c, * elf32-rx.c, * elf32-sh.c, * elf32-spu.c,
- * elf32-v850.c, * elf32-xtensa.c, * elf64-alpha.c,
- * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mips.c
- * elf64-mmix.c, * elf64-ppc.c, * elf64-sparc.c, * elfcode.h,
- * elflink.c, * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-mips.c,
- * elfxx-x86.c, * format.c, * ihex.c, * libbfd.c, * linker.c,
- * mmo.c, * opncls.c, * pdp11.c, * peXXigen.c, * pef.c,
- * peicode.h, * simple.c, * som.c, * srec.c, * stabs.c, * syms.c,
- * targets.c, * vms-lib.c, * xcofflink.c, * xtensa-isa.c: Likewise.
-
-2020-05-20 Nelson Chu <nelson.chu@sifive.com>
-
- * elfxx-riscv.h (riscv_parse_subset_t): Add new callback function
- get_default_version. It is used to find the default version for
- the specific extension.
- * elfxx-riscv.c (riscv_parsing_subset_version): Remove the parameters
- default_major_version and default_minor_version. Add new bfd_boolean
- parameter *use_default_version. Set it to TRUE if we need to call
- the callback rps->get_default_version to find the default version.
- (riscv_parse_std_ext): Call rps->get_default_version if we fail to find
- the default version in riscv_parsing_subset_version, and then call
- riscv_add_subset to add the subset into subset list.
- (riscv_parse_prefixed_ext): Likewise.
- (riscv_std_z_ext_strtab): Support Zicsr extensions.
- * elfnn-riscv.c (riscv_merge_std_ext): Use strcasecmp to compare the
- strings rather than characters.
- riscv_merge_arch_attr_info): The callback function get_default_version
- is only needed for assembler, so set it to NULL int the linker.
- * elfxx-riscv.c (riscv_estimate_digit): Remove the static.
- * elfxx-riscv.h: Updated.
-
-2020-05-20 Alan Modra <amodra@gmail.com>
-
- PR 25993
- * archive.c (_bfd_get_elt_at_filepos): Don't strdup filename,
- use bfd_set_filename.
- * elfcode.h (_bfd_elf_bfd_from_remote_memory): Likewise.
- * mach-o.c (bfd_mach_o_fat_member_init): Likewise.
- * opncls.c (bfd_fopen, bfd_openstreamr, bfd_openr_iovec, bfd_openw),
- (bfd_create): Likewise.
- (_bfd_delete_bfd): Don't free filename.
- (bfd_set_filename): Copy filename param to bfd_alloc'd memory,
- return pointer to the copy or NULL on alloc fail.
- * vms-lib.c (_bfd_vms_lib_get_module): Free newname and test
- result of bfd_set_filename.
- * bfd-in2.h: Regenerate.
-
-2020-05-20 Alan Modra <amodra@gmail.com>
-
- PR 26011
- * elf.c (_bfd_elf_get_reloc_upper_bound): Sanity check reloc
- section size against file size.
- (_bfd_elf_get_dynamic_reloc_upper_bound): Likewise.
-
-2020-05-19 Gunther Nikl <gnikl@justmail.de>
-
- PR 26005
- * elf.c (bfd_section_from_shdr): Replace bfd_zmalloc with bfd_malloc
- and memset when allocating memory for the sections_being_created
- array.
-
-2020-05-19 Stafford Horne <shorne@gmail.com>
-
- * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Rename srela
- to relgot.
- (or1k_elf_relocate_section): Access srelgot via
- htab->root.srelgot. Add assertions for srelgot->contents.
- Introduce local variable for srelgot to not reuse global
- sreloc.
- (or1k_elf_relocate_section): Fixup dynamic symbol detection.
- (or1k_set_got_and_rela_sizes): New function.
- (or1k_initial_exec_offset): New function.
- (TLS_GD, TLS_IE, TLS_LD, TLS_LE): Redefine macros as masks.
- (or1k_elf_relocate_section): Allow for TLS to handle multiple
- model access.
- (or1k_elf_check_relocs): Use OR to set TLS access.
- (allocate_dynrelocs): Use or1k_set_got_and_rela_sizes to set
- sizes.
- (or1k_elf_size_dynamic_sections): Use
- or1k_set_got_and_rela_sizes to set sizes.
- (or1k_elf_relocate_section): Fixup PCREL relocation calculation.
- (TCB_SIZE): New macro.
- (tpoff): Use TCB_SIZE and alignment to calculate offset.
- (allocate_dynrelocs, readonly_dynrelocs, or1k_elf_check_relocs)
- (or1k_elf_size_dynamic_sections): Rename p to sec_relocs.
- (allocate_dynrelocs): Rename s to splt or sgot based on usage.
- (tpoff): Add dynamic boolean argument.
- (or1k_elf_relocate_section): Pass dynamic flag to tpoff.
-
-2020-05-19 Siddhesh Poyarekar <siddesh.poyarekar@arm.com>
-
- * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Club
- BFD_RELOC_AARCH64_BRANCH19 and BFD_RELOC_AARCH64_TSTBR14
- cases with BFD_RELOC_AARCH64_JUMP26.
- (elfNN_aarch64_check_relocs): Likewise.
-
-2020-05-19 Alan Modra <amodra@gmail.com>
-
- * aix5ppc-core.c (xcoff64_core_file_matches_executable_p): Use
- bfd_get_filename rather than accessing bfd->filename directly.
- * aout-target.h (MY (object_p)): Likewise.
- * aoutx.h (aout_find_nearest_line, aout_link_write_symbols): Likewise.
- * archive.c (find_nested_archive, _bfd_generic_read_ar_hdr_mag),
- (_bfd_construct_extended_name_table, _bfd_bsd44_write_ar_hdr),
- (_bfd_archive_bsd44_construct_extended_name_table),
- (_bfd_write_archive_contents, _bfd_compute_and_write_armap),
- (_bfd_bsd_write_armap): Likewise.
- * bfd.c (bfd_errmsg, _bfd_doprnt): Likewise.
- * cache.c (bfd_open_file): Likewise.
- * ecoff.c (_bfd_ecoff_write_armap): Likewise.
- * ecofflink.c (bfd_ecoff_debug_accumulate_other): Likewise.
- * elf32-bfin.c (bfinfdpic_relocate_section): Likewise.
- * elf32-frv.c (elf32_frv_relocate_section): Likewise.
- * elf32-hppa.c (elf32_hppa_final_link): Likewise.
- * elf32-nds32.c (nds32_elf_output_symbol_hook),
- (patch_tls_desc_to_ie): Likewise.
- * elf32-spu.c (sort_bfds, print_one_overlay_section),
- (spu_elf_auto_overlay): Likewise.
- * elf64-hppa.c (elf_hppa_final_link): Likewise.
- * elf64-ia64-vms.c (elf64_ia64_size_dynamic_sections): Likewise.
- * elfcore.h (elf_core_file_matches_executable_p): Likewise.
- * elflink.c (bfd_elf_size_dynamic_sections),
- (elf_link_input_bfd): Likewise.
- * linker.c (_bfd_generic_link_output_symbols): Likewise.
- * mach-o.c (bfd_mach_o_follow_dsym),
- (bfd_mach_o_close_and_cleanup): Likewise.
- * opncls.c (_bfd_delete_bfd, _maybe_make_executable),
- (find_separate_debug_file, get_build_id_name): Likewise.
- * pdp11.c (aout_find_nearest_line, aout_link_write_symbols): Likewise.
- * plugin.c (bfd_plugin_open_input): Likewise.
- * rs6000-core.c (rs6000coff_core_file_matches_executable_p): Likewise.
- * som.c (som_write_armap): Likewise.
- * srec.c (srec_write_record, srec_write_symbols): Likewise.
- * vms-lib.c (_bfd_vms_lib_get_imagelib_file),
- (_bfd_vms_lib_write_archive_contents): Likewise.
- * xcofflink.c (xcoff_link_add_dynamic_symbols): Likewise.
-
-2020-05-19 Alan Modra <amodra@gmail.com>
+ (xcoff64_howto_table): Likewise.
+ (xcoff64_reloc_type_lookup): Likewise.
+
+2021-03-12 Clément Chigot <clement.chigot@atos.net>
+
+ * coff-rs6000.c (xcoff_calculate_relocation): Correct and
+ add new relocations.
+ (xcoff_howto_table): Likewise.
+ (xcoff_rtype2howto): Increase r_type maximum value.
+ (xcoff_ppc_relocate_section): Reuse predefined HOWTOs instead
+ of create a new one from scratch. Enable only some relocations
+ to have a changing r_size.
+ * coff64-rs6000.c (xcoff64_calculate_relocation): Likewise.
+ (xcoff64_howto_table): Likewise.
+ (xcoff64_rtype2howto): Likewise.
+ (xcoff64_ppc_relocate_section): Likewise.
+ * libxcoff.h (XCOFF_MAX_CALCULATE_RELOCATION): Fix value.
+
+2021-03-12 Clément Chigot <clement.chigot@atos.net>
+
+ * coff64-rs6000.c (xcoff64_ppc_relocate_section): Move.
+
+2021-03-12 Clément Chigot <clement.chigot@atos.net>
+
+ * coff64-rs6000.c (xcoff64_write_object_contents): Remove.
+ * coffcode.h (coff_write_object_contents): Add bfd_mach_ppc_620
+ support for o_cputype field. Avoid creating an empty a.out header
+ for XCOFF64.
+
+2021-03-12 Clément Chigot <clement.chigot@atos.net>
- PR 25713
- * bfdio.c (_bfd_real_fopen): Typo fix.
+ * coff64-rs6000.c (xcoff64_create_csect_from_smclas): Add
+ missing smclass.
-2020-05-18 Nick Clifton <nickc@redhat.com>
+2021-03-11 Nelson Chu <nelson.chu@sifive.com>
- PR 26005
- * elf.c (bfd_section_from_shdr): Use bfd_malloc to allocate memory
- for the sections_being_created array.
+ * elfnn-riscv.c (riscv_elf_link_hash_table): New boolean
+ restart_relax, used to check if we need to run the whole
+ relaxations from relax pass 0 to 2 again.
+ (riscv_elf_link_hash_table_create): Init restart_relax to FALSE.
+ (_bfd_riscv_relax_align): Remove obsolete sec_flg0 set.
+ (_bfd_riscv_relax_delete): Set again to TRUE if we do delete the code.
+ (bfd_elfNN_riscv_restart_relax_sections): New function. Called by
+ after_allocation to check if we need to run the whole relaxations again.
+ (_bfd_riscv_relax_section): We will only enter into the relax pass 3
+ when the restart_relax is FALSE; At last set restart_relax to TRUE if
+ again is TRUE, too.
+ * elfxx-riscv.h (bfd_elf32_riscv_restart_relax_sections): Declaration.
+ (bfd_elf64_riscv_restart_relax_sections): Likewise.
-2020-05-18 Alan Modra <amodra@gmail.com>
+2021-03-10 Jan Beulich <jbeulich@suse.com>
- * ecoff.c (ecoff_slurp_reloc_table): Malloc external_relocs so
- they can be freed without also freeing internal_relocs.
+ * cofflink.c (_bfd_coff_write_global_sym): Range-check symbol
+ offset.
-2020-05-18 Jaydeep Chauhan <jaydeepchauhan1494@gmail.com>
+2021-03-10 Alan Modra <amodra@gmail.com>
+ Jan Beulich <jbeulich@suse.com>
- PR 25713
- * bfdio.c (_bfd_real_fopen): Convert UNIX style sirectory
- separators into DOS style when creating a WIN32 fullpath.
+ * elf.c (bfd_elf_generic_reloc): Make references between debug
+ sections use section relative values.
-2020-05-14 Nelson Chu <nelson.chu@sifive.com>
+2021-03-09 Jan Beulich <jbeulich@suse.com>
- * elfnn-riscv.c (elfNN_riscv_mkobject): New function. We need this
- to initialize RISC-V tdata.
+ * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Diagnose out of range RVA.
-2020-05-12 Gunther Nikl <gnikl@justmail.de>
+2021-03-05 H.J. Lu <hongjiu.lu@intel.com>
- * aoutx.h (NAME (aout, swap_std_reloc_out)): Reject an unsupported
- relocation size.
+ PR ld/27425
+ PR ld/27432
+ * bfd.c (_bfd_get_link_info): New function.
+ * elf-bfd.h (output_elf_obj_tdata): Add link_info.
+ (elf_link_info): New.
+ * libbfd-in.h (_bfd_get_link_info): New prototype.
+ * coff-x86_64.c (coff_amd64_reloc): Also subtract __ImageBase for
+ R_AMD64_IMAGEBASE when generating x86-64 ELF executable.
+ * pe-x86_64.c: Include "coff/internal.h" and "libcoff.h".
+ (pex64_link_add_symbols): New function.
+ (coff_bfd_link_add_symbols): New macro.
+ * libbfd.h: Regenerated.
-2020-05-11 Alan Modra <amodra@gmail.com>
+2021-03-05 Craig Blackmore <craig.blackmore@embecosm.com>
+ Andrew Burgess <andrew.burgess@embecosm.com>
- * elf64-ppc.c (xlate_pcrel_opt): Handle lxvp and stxvp.
+ * elf-bfd.h (elfcore_write_riscv_csr): Declare.
+ * elf.c (elfcore_grok_riscv_csr): New function.
+ (elfcore_grok_note): Handle NT_RISCV_CSR.
+ (elfcore_write_riscv_csr): New function.
+ (elfcore_write_register_note): Handle '.reg-riscv-csr'.
-2020-05-11 Alan Modra <amodra@gmail.com>
+2021-03-05 Craig Blackmore <craig.blackmore@embecosm.com>
+ Andrew Burgess <andrew.burgess@embecosm.com>
- * elf64-ppc.c: Rename powerxx to power10 throughout.
+ * elfnn-riscv.c (PRPSINFO_PR_FNAME_LENGTH): Define.
+ (PRPSINFO_PR_PSARGS_LENGTH): Define.
+ (riscv_write_core_note): New function.
+ (riscv_elf_grok_psinfo): Make use of two new length defines.
+ (elf_backend_write_core_note): Define.
-2020-05-11 Alan Modra <amodra@gmail.com>
+2021-03-05 Craig Blackmore <craig.blackmore@embecosm.com>
+ Andrew Burgess <andrew.burgess@embecosm.com>
- PR 25961
- * coffgen.c (coff_get_normalized_symtab): Check that buffer
- contains required number of auxents before processing any auxent.
- * coffswap.h (coff_swap_aux_in <C_FILE>): Only swap in extended
- file name from auxents for PE.
+ * elf-bfd.h (elfcore_write_gdb_tdesc): Declare new function.
+ * elf.c (elfcore_grok_gdb_tdesc): New function.
+ (elfcore_grok_note): Handle NT_GDB_TDESC.
+ (elfcore_write_gdb_tdesc): New function.
+ (elfcore_write_register_note): Handle NT_GDB_TDESC.
-2020-05-04 Gunther Nikl <gnikl@justmail.de>
+2021-03-05 Nick Clifton <nickc@redhat.com>
- * aout-cris.c (DEFAULT_ARCH): Delete define.
- (MY_set_arch_mach): Likewise.
- (SET_ARCH_MACH): Use bfd_set_arch_mach with an explicit architecture
- of bfd_arch_cris.
- (swap_ext_reloc_in): Add casts to r_index extraction. Mask valid bits
- of r_type before the shift.
+ PR 27521
+ * dwarf2.c (is_str_attr): Add DW_FORM_strx* forms.
+ (read_indexed_string): Placeholder function.
+ (read_attribute_value): Handle DW_FORM_strx* and DW_FORM_addrx*
+ forms.
-2020-05-04 Wilco Dijkstra <wdijkstr@arm.com>
+2021-03-05 Alan Modra <amodra@gmail.com>
- PR ld/25665
- * elfnn-aarch64.c (group_sections): Copy implementation from
- elf32-arm.c.
+ * reloc.c (bfd_perform_relocation): Revert 2021-01-12 and
+ 2020-09-16 changes.
+ * coff-x86_64.c (coff_amd64_reloc): Do more or less the same
+ adjustments here instead. Separate pc-relative adjustments
+ from symbol related adjustments. Tidy comments and formatting.
-2020-05-01 Alan Modra <amodra@gmail.com>
+2021-03-04 Jan Beulich <jbeulich@suse.com>
- PR 25900
- * elfnn-riscv.c (_bfd_riscv_relax_section): Check root.type before
- accessing root.u.def of symbols. Also check root.u.def.section
- is non-NULL. Reverse tests so as to make the logic positive.
+ * coffcode.h (sec_to_styp_flags): Don't set IMAGE_SCN_LNK_* in
+ final PE images.
-2020-05-01 Alan Modra <amodra@gmail.com>
+2021-03-04 Alan Modra <amodra@gmail.com>
- PR 25882
- * elf32-tic6x.c (elf32_tic6x_merge_attributes): Don't transfer
- Tag_ABI_PIC or Tag_ABI_PID from dynamic objects to the output.
+ * rs6000-core.c (rs6000coff_core_p): Correct prototype.
-2020-05-01 Alan Modra <amodra@gmail.com>
+2021-03-03 Alan Modra <amodra@gmail.com>
- PR 25882
- * elf32-bfin.c (elf32_bfin_merge_private_bfd_data): Add FIXME.
- * elf32-frv.c (frv_elf_merge_private_bfd_data): Likewise.
- * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Likewise.
- * elf32-nds32.c (nds32_elf_merge_private_bfd_data): Likewise.
- * elf32-score.c (s3_elf32_score_merge_private_bfd_data): Likewise.
- * elf32-score7.c (s7_elf32_score_merge_private_bfd_data): Likewise.
- * elf32-sh.c (sh_elf_merge_private_data): Likewise.
- * elf32-tic6x.c (elf32_tic6x_merge_attributes): Likewise.
- * elf64-ia64-vms.c (elf64_ia64_merge_private_bfd_data): Likewise.
- * elfnn-ia64.c (elfNN_ia64_merge_private_bfd_data): Likewise.
+ PR 27500
+ * elflink.c (_bfd_elf_gc_mark_rsec): Do special start/stop
+ processing not when start/stop symbol section is unmarked but
+ on first time a start/stop symbol is processed.
-2020-05-01 Alan Modra <amodra@gmail.com>
+2021-03-03 Alan Modra <amodra@gmail.com>
- PR 25882
- * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Ignore e_flags
- from shared libraries.
+ * reloc.c: Include x86_64.h rather than internal.h.
-2020-04-29 Max Filippov <jcmvbkbc@gmail.com>
+2021-03-02 Nick Clifton <nickc@redhat.com>
- * elf32-xtensa.c (relax_section): Don't negate diff_value for
- XTENSA_NDIFF relocations. Don't add sign bits whe diff_value
- equals 0. Report overflow when the result has negative sign but
- all significant bits are zero.
+ PR 27484
+ * dwarf2.c (scan_unit_for_symbols): Scan twice, once to accumulate
+ function and variable tags and a second time to resolve their
+ attributes.
-2020-04-29 Gunther Nikl <gnikl@justmail.de>
+2021-03-02 Nick Alcock <nick.alcock@oracle.com>
- * aoutx.h (swap_std_reloc_out): Special case 64 bit relocations.
- (aout_link_reloc_link_order): Likewise. Make r_length an unsigned.
+ * elf-strtab.c (_bfd_elf_strtab_str): Skip strings with zero refcount.
-2020-04-28 Alan Modra <amodra@gmail.com>
+2021-03-02 Alan Modra <amodra@gmail.com>
- * vms-alpha.c (_bfd_vms_slurp_etir): Correct divide by zero check.
- Emit warning message.
+ PR 27451
+ * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Ignore synthesized
+ linker defined start/stop symbols when start_stop_gc.
-2020-04-27 Tamar Christina <tamar.christina@arm.com>
+2021-03-02 Alan Modra <amodra@gmail.com>
- * coff-i386.c (COFF_WITH_PE_BIGOBJ): New.
- * coff-x86_64.c (COFF_WITH_PE_BIGOBJ): New.
- * config.bfd (targ_selvecs): Rename x86_64_pe_be_vec
- to x86_64_pe_big_vec as it not a big-endian format.
- (vec i386_pe_big_vec): New.
- * configure.ac: Likewise.
- * targets.c: Likewise.
- * configure: Regenerate.
- * pe-i386.c (TARGET_SYM_BIG, TARGET_NAME_BIG,
- COFF_WITH_PE_BIGOBJ): New.
- * pe-x86_64.c (TARGET_SYM_BIG, TARGET_NAME_BIG):
- New.
- (x86_64_pe_be_vec): Moved.
+ * elf64-ppc.c (ppc64_elf_relocate_section): Don't optimise got
+ indirect to pc-relative or toc-relative for undefined symbols.
-2020-04-23 Anton Kolesov <anton.kolesov@synopsys.com>
+2021-03-01 Alan Modra <amodra@gmail.com>
+ Fangrui Song <maskray@google.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.
+ * elflink.c (_bfd_elf_gc_mark_rsec): Ignore synthesized linker
+ defined start/stop symbols when start_stop_gc.
+ (bfd_elf_gc_mark_dynamic_ref_symbol): Likewise.
+ (bfd_elf_define_start_stop): Don't modify ldscript_def syms.
+ * linker.c (bfd_generic_define_start_stop): Likewise.
-2020-04-22 Max Filippov <jcmvbkbc@gmail.com>
+2021-02-25 Alan Modra <amodra@gmail.com>
- 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}.
-
-2020-04-21 Tamar Christina <tamar.christina@arm.com>
-
- PR binutils/24753
- * compress.c (bfd_get_full_section_contents): Exclude sections with no
- content.
-
-2020-04-21 H.J. Lu <hongjiu.lu@intel.com>
-
- 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.
+ PR 27441
+ * elf-bfd.h (struct elf_link_hash_entry): Add ref_ir_nonweak.
+ * elflink.c (elf_link_add_object_symbols): Set ref_ir_nonweak and
+ use when deciding an as-needed library should be loaded instead
+ of using the binding of the library definition.
-2020-04-21 H.J. Lu <hongjiu.lu@intel.com>
+2021-02-24 Alan Modra <amodra@gmail.com>
- * 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.
+ PR 27459
+ * coff-stgo32.c (go32exe_check_format): Sanity check size of
+ header to avoid a buffer overflow.
-2020-04-21 Nick Clifton <nickc@redhat.com>
+2021-02-22 Alan Modra <amodra@gmail.com>
- * po/sr.po: Updated Serbian translation.
+ * coff-rs6000.c (_bfd_xcoff_reloc_type_lookup): Remove BFD_RELOC_16.
+ * coff64-rs6000.c (xcoff64_reloc_type_lookup): Likewise.
-2020-04-21 Alan Modra <amodra@gmail.com>
+2021-02-19 Nelson Chu <nelson.chu@sifive.com>
- * elf32-sh.c (sh_elf_relocate_section): Remove STO_SH5_ISA32
- processing.
+ PR 27158
+ * elfnn-riscv.c (perform_relocation): Updated encoding macros.
+ (_bfd_riscv_relax_call): Likewise.
+ (_bfd_riscv_relax_lui): Likewise.
+ * elfxx-riscv.c (howto_table): Likewise.
-2020-04-20 Stephen Casner <casner@acm.org>
+2021-02-18 Nelson Chu <nelson.chu@sifive.com>
- * 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.
+ * Makefile.am: Added cpu-riscv.h.
+ * Makefile.in: Regenerated.
+ * po/SRC-POTFILES.in: Regenerated.
+ * cpu-riscv.h: Added to support spec versions controlling.
+ Also added extern arrays and functions for cpu-riscv.c.
+ (enum riscv_spec_class): Define all spec classes here uniformly.
+ (struct riscv_spec): Added for all specs.
+ (RISCV_GET_SPEC_CLASS): Added to reduce repeated code.
+ (RISCV_GET_SPEC_NAME): Likewise.
+ (RISCV_GET_ISA_SPEC_CLASS): Added to get ISA spec class.
+ (RISCV_GET_PRIV_SPEC_CLASS): Added to get privileged spec class.
+ (RISCV_GET_PRIV_SPEC_NAME): Added to get privileged spec name.
+ * cpu-riscv.c (struct priv_spec_t): Replaced with struct riscv_spec.
+ (riscv_get_priv_spec_class): Replaced with RISCV_GET_PRIV_SPEC_CLASS.
+ (riscv_get_priv_spec_name): Replaced with RISCV_GET_PRIV_SPEC_NAME.
+ (riscv_priv_specs): Moved below.
+ (riscv_get_priv_spec_class_from_numbers): Likewise, updated.
+ (riscv_isa_specs): Moved from include/opcode/riscv.h.
+ * elfnn-riscv.c: Included cpu-riscv.h.
+ (riscv_merge_attributes): Initialize in_priv_spec and out_priv_spec.
+ * elfxx-riscv.c: Included cpu-riscv.h and opcode/riscv.h.
+ (RISCV_UNKNOWN_VERSION): Moved from include/opcode/riscv.h.
+ * elfxx-riscv.h: Removed extern functions to cpu-riscv.h.
-2020-04-20 Alan Modra <amodra@gmail.com>
+2021-02-17 Alan Modra <amodra@gmail.com>
- * elf64-ppc.c (ppc64_elf_size_stubs): Strip relbrlt too.
+ * wasm-module.c: Guard include of limits.h.
+ (CHAR_BIT): Provide backup define.
+ (wasm_read_leb128): Use CHAR_BIT to size "result" in bits.
+ Correct signed overflow checking.
-2020-04-18 Alan Modra <amodra@gmail.com>
+2021-02-17 Nelson Chu <nelson.chu@sifive.com>
- * section.c (bfd_is_const_section): Correct test for special
- sections.
- * bfd-in2.h: Regenerate.
+ PR 27200
+ * elfnn-riscv.c (_bfd_riscv_elf_merge_private_bfd_data): Delay
+ copying the elf flags from input BFD to output BFD, until we have
+ checked if the input BFD has no code section or not. Also fix the
+ problem that we only check the first section rather than the entire
+ sections for input BFD.
-2020-04-17 Alan Modra <amodra@gmail.com>
+2021-02-16 Alan Modra <amodra@gmail.com>
- PR 25842
- * elf.c (_bfd_elf_get_symbol_version_string): Don't segfault on
- NULL nodename.
+ * libbfd.c (_bfd_read_unsigned_leb128): Avoid excessive shift.
+ (_bfd_safe_read_leb128, _bfd_read_signed_leb128): Likewise.
-2020-04-16 Nick Clifton <nickc@redhat.com>
+2021-02-15 Jan Beulich <jbeulich@suse.com>
- PR 25803
- * elfxx-mips.c (_bfd_mips_elf_adjust_dynamic_symbol): Replace an
- abort with a more helpful error message.
+ * doc/Makefile.am: Replace "cp -p" by "$(LN_S)".
+ * doc/Makefile.in: Re-generate.
-2020-04-16 Alan Modra <amodra@gmail.com>
+2021-02-15 Alan Modra <amodra@gmail.com>
- PR 25827
- * dwarf2.c (scan_unit_for_symbols): Wrap overlong lines. Don't
- strdup(0).
+ * elf32-nds32.c (nds32_get_section_contents): Replace
+ bfd_malloc_and_get_section with bfd_get_full_section_contents.
+ (nds32_elf_relax_delete_blanks): Init contents.
+ (nds32_elf_relax_section, nds32_relax_fp_as_gp): Likewise.
-2020-04-15 Fangrui Song <maskray@google.com>
+2021-02-15 Alan Modra <amodra@gmail.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.
+ * coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Use
+ bfd_get_full_section_contents.
-2020-04-14 Fangrui Song <maskray@google.com>
+2021-02-14 Alan Modra <amodra@gmail.com>
- PR gas/25768
- * elf.c (assign_section_numbers): Always set .stab sh_entsize to
- 12.
+ * elfxx-mips.c (_bfd_elf_mips_get_relocated_section_contents): Apply
+ all fixes to bfd_generic_get_relocated_section_contents since this
+ function was split out.
-2020-04-14 Stephen Casner <casner@acm.org>
+2021-02-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.
+ * config.bfd: Remove ia64 from obsolete list.
-2020-04-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
- Nick Clifton <nickc@redhat.com>
+2021-02-11 Alan Modra <amodra@gmail.com>
- * elf32-sparc.c (sparc_final_write_processing): Fix whitespace.
- <0>: Ignore.
- <default>: Error rather than abort.
+ PR ld/22269
+ * elfnn-ia64.c: Revert 2017-10-14 git commit db41f6eb5234.
-2020-04-03 H.J. Lu <hongjiu.lu@intel.com>
+2021-02-11 Alan Modra <amodra@gmail.com>
- PR ld/25767
- * elf.c (_bfd_elf_fixup_group_sections): Remove zero-sized
- relocation section from section group.
+ PR 27294
+ * elf32-avr.c (avr_elf32_load_records_from_section): Use
+ bfd_malloc_and_get_section. Use bfd_byte* vars and remove then
+ unnecessary casts.
-2020-04-02 Jan W. Jagersma <jwjagersma@gmail.com>
+2021-02-11 Alan Modra <amodra@gmail.com>
- * 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.
- * 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.
- * 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.
-
-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.
-
-2020-03-31 Alan Modra <amodra@gmail.com>
-
- * tekhex.c (pass_over): Check is_eof before reading buffer.
-
-2020-03-30 Nick Clifton <nickc@redhat.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.
+ PR 27291
+ * section.c (bfd_get_section_contents): Avoid possible overflow
+ when range checking offset and count.
+ (bfd_set_section_contents): Likewise.
-2020-03-30 Alan Modra <amodra@gmail.com>
+2021-02-03 Nick Alcock <nick.alcock@oracle.com>
- PR 25745
- * elf64-ppc.c (ppc64_elf_build_stubs): Use asprintf to form
- statistics message.
+ * configure.ac (SHARED_LIBADD): Remove explicit -lintl population in
+ favour of LIBINTL.
+ * configure: Regenerated.
-2020-03-26 Nick Clifton <nickc@redhat.com>
+2021-02-09 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.
+ * config.bfd (arm*-*-symbianelf*): Move from obsolete to removed.
+ * configure.ac: Delete symbian entries.
+ * elf-bfd.h (enum elf_target_os): Delete is_symbian.
+ * elf32-arm.c: Remove symbian support. Formatting.
+ * targets.c: Delete symbian entries.
+ * configure: Regenerate.
-2020-03-26 Alan Modra <amodra@gmail.com>
+2021-02-04 H.J. Lu <hongjiu.lu@intel.com>
- * i386msdos.c (msdos_object_p): Catch -1 return from bfd_bread.
+ PR ld/19609
+ * elf64-x86-64.c (elf_x86_64_relocate_section): Provide more
+ info when failed to convert GOTPCREL relocation.
-2020-03-26 Alan Modra <amodra@gmail.com>
+2021-02-04 Nelson Chu <nelson.chu@sifive.com>
- * vms-alpha.c (dst_define_location): Limit size of dst_ptr_offsets
- array.
- (_bfd_vms_slurp_object_records): Rename "err" to "ok".
+ * elfxx-riscv.c (riscv_parse_prefixed_ext): Removed zb*.
-2020-03-25 Nick Clifton <nickc@redhat.com>
+2021-02-04 Alan Modra <amodra@gmail.com>
- * 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.
+ PR 27311
+ * elflink.c (elf_link_add_object_symbols): Don't pull in as-needed
+ libraries for IR references on pass over libraries after LTO
+ recompilation.
-2020-03-25 Shahab Vahedi <shahab@synopsys.com>
+2021-02-03 Alan Modra <amodra@gmail.com>
- * elf32-arc.c (PRINT_DEBUG_RELOC_INFO_BEFORE): Use the
- correct field name in the output string.
+ PR 27311
+ * elflink.c (_bfd_elf_add_default_symbol): Revert last two changes.
+ (elf_link_add_object_symbols): Here too. Don't pull in as-needed
+ libraries when H is an indirect symbol after calling
+ _bfd_elf_add_default_symbol.
-2020-03-25 Alan Modra <amodra@gmail.com>
+2021-02-03 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.
+ PR 27311
+ * elflink.c (_bfd_elf_add_default_symbol): Clear override when
+ undecorated symbol will have a different version.
-2020-03-24 H.J. Lu <hongjiu.lu@intel.com>
+2021-02-02 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.
+ PR 27311
+ * elflink.c (_bfd_elf_add_default_symbol): Add override parameter.
+ Use when handling default versioned symbol. Rename existing
+ override variable to nondef_override and use for non-default
+ versioned symbol.
+ (elf_link_add_object_symbols): Adjust call to suit. Don't
+ pull in as-needed libraries when override is set.
-2020-03-24 Nick Clifton <nickc@redhat.com>
- Jaydeep Chauhan <jaydeepchauhan1494@gmail.com>
+2021-02-01 Emery Hemingway <ehmry@posteo.net>
- PR 25713
- * bfdio.c (_bfd_real_fopen): Add code to handle long filenames on
- Win32 systems.
+ * config.bfd: Add *-*-genode* as a target for AArch64 and x86.
-2020-03-24 Nick Clifton <nickc@redhat.com>
+2021-02-01 Egor Vishnyakov <lenvampir@yandex.ru>
- 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.
+ PR 27254
+ * elf32-rl78.c (rl78_elf_relocate_section): Fix calculation of
+ offset for the R_RL78_RH_SADDR relocation.
-2020-03-24 H.J. Lu <hongjiu.lu@intel.com>
+2021-01-29 Alan Modra <amodra@gmail.com>
- PR binutils/25717
- * elf-bfd.h (elf_obj_tdata): Change num_group to unsigned int.
+ PR 27271
+ * elflink.c (bfd_elf_link_record_dynamic_symbol): Don't segfault
+ on symbols defined in absolute or other special sections.
-2020-03-24 H.J. Lu <hongjiu.lu@intel.com>
+2021-01-28 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.
+ PR 27259
+ * elflink.c (_bfd_elf_gc_mark_extra_sections): Use linker_mark to
+ prevent endless looping of linked-to sections.
-2020-03-24 Alan Modra <amodra@gmail.com>
+2020-12-17 Mihails Strasuns <mihails.strasuns@intel.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-elf.h (elfcore_write_file_note): New function.
+ * elf.c (elfcore_write_file_note): New function.
-2020-03-23 Sebastian Huber <sebastian.huber@embedded-brains.de>
+2021-01-26 Alan Modra <amodra@gmail.com>
- * elflink.c (_bfd_elf_tls_setup): Mention .tdata in comment.
+ * elf32-ft32.c (ft32_reloc_type_lookup): Don't miss ft32_reloc_map[0].
-2020-03-23 Alan Modra <amodra@gmail.com>
+2021-01-24 H.J. Lu <hongjiu.lu@intel.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.
+ PR binutils/27231
+ * dwarf2.c (read_rnglists): Ignore empty range when parsing line
+ number tables.
-2020-03-23 Alan Modra <amodra@gmail.com>
+2021-01-23 H.J. Lu <hongjiu.lu@intel.com>
- * i386msdos.c (msdos_object_p): Don't access e_lfanew when that
- field hasn't been read. Remove unnecessary casts.
+ PR binutils/27231
+ * dwarf2.c (read_rnglists): Advance rngs_ptr after
+ _bfd_safe_read_leb128 when parsing DW_RLE_offset_pair.
-2020-03-22 Alan Modra <amodra@gmail.com>
+2021-01-20 Alan Modra <amodra@gmail.com>
- * coff64-rs6000.c (xcoff64_slurp_armap): Ensure size is large
- enough to read number of symbols.
+ * elf32-ppc.c: Delete outdated comment.
+ (TARGET_KEEP_UNUSED_SECTION_SYMBOLS): Define.
+ * elf64-ppc.c (TARGET_KEEP_UNUSED_SECTION_SYMBOLS): Define.
-2020-03-20 H.J. Lu <hongjiu.lu@intel.com>
+2021-01-20 Alan Modra <amodra@gmail.com>
- * 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.
+ * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't assume
+ section symbols are present.
-2020-03-14 Kamil Rytarowski <n54@gmx.com>
+2021-01-19 Alan Modra <amodra@gmail.com>
- * configure.ac: Include netbsd-core.lo for all NetBSD arm and mips
- targets.
- * configure: Regenerated.
+ * elf64-ppc.c (elf_hash_entry): New inline function. Use
+ throughout to replace casts.
+ (branch_reloc_hash_match): Remove const from params.
+ (use_local_plt): New function.
+ (allocate_dynrelocs, ppc_build_one_stub, ppc_size_one_stub),
+ (build_global_entry_stubs_and_plt, ppc64_elf_relocate_section):
+ Use use_local_plt.
+ * elf32-ppc.c (use_local_plt): New function.
+ (allocate_dynrelocs, ppc_elf_relocate_section),
+ (write_global_sym_plt): Use use_local_plt.
-2020-03-14 Alan Modra <amodra@gmail.com>
+2021-01-17 H.J. Lu <hongjiu.lu@intel.com>
- * section.c (BFD_FAKE_SECTIONS): Formatting.
- * bfd-in2.h: Regenerate.
+ PR ld/27193
+ * elflink.c (elf_create_symbuf): Also ignore section symbols.
-2020-03-13 Kamil Rytarowski <n54@gmx.com>
+2021-01-16 H.J. Lu <hongjiu.lu@intel.com>
- * elf.c (elfcore_grok_netbsd_note): Add support for
- NT_NETBSDCORE_LWPSTATUS notes.
+ PR ld/23169
+ * elfxx-x86.c (_bfd_x86_elf_link_fixup_ifunc_symbol): Don't
+ check pointer_equality_needed.
-2020-03-13 Christophe Lyon <christophe.lyon@linaro.org>
+2021-01-15 H.J. Lu <hongjiu.lu@intel.com>
- * bfd-in2.h: Regenerate.
- * 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.
-
-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>
-
- PR 24511
- * mmo.c (mmo_scan): Set SEC_DATA for .data.
-
-2020-02-27 Alan Modra <amodra@gmail.com>
-
- 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.
-
-2020-02-27 Alan Modra <amodra@gmail.com>
-
- * coff-rs6000.c (_bfd_xcoff_read_ar_hdr): Put all data in one
- malloc'd block.
-
-2020-02-27 Alan Modra <amodra@gmail.com>
-
- * bfd.c (bfd_stat_arch_elt): Use vector of containing archive,
- if file is an archive element.
- * bfd-in2.h: Regenerate.
-
-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.
- * 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-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.
- * elfxx-sparc.c: Likewise.
- * elfxx-x86.c: Likewise.
- * i386lynx.c: Likewise.
- * merge.c: Likewise.
- * pdp11.c: 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.
- * 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.
-
-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.
-
-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.
-
-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 (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.
-
-2020-02-07 Sergey Belyashov <sergey.belyashov@gmail.com>
-
- 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.
-
-2020-02-07 Nick Clifton <nickc@redhat.com>
-
- PR 23932
- * elf.c (rewrite_elf_program_header): Do not complain if no
- sections are mapped to a segment.
-
-2020-02-06 H.J. Lu <hongjiu.lu@intel.com>
-
- 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.
+ report_relative_reloc.
+ * elf32-i386.c (elf_i386_relocate_section): Call
+ _bfd_x86_elf_link_report_relative_reloc to report relative
+ relocations for -z report-relative-reloc.
+ (elf_i386_finish_dynamic_symbol): Likewse.
+ * elf64-x86-64.c (elf_x86_64_relocate_section): Likewse.
+ (elf_x86_64_finish_dynamic_symbol): Likewse.
+ * elfxx-x86.c (_bfd_x86_elf_link_report_relative_reloc): New
+ function.
+ * elfxx-x86.h (_bfd_x86_elf_link_report_relative_reloc): New
+ prototype.
-2020-02-06 H.J. Lu <hongjiu.lu@intel.com>
+2021-01-16 Alan Modra <amodra@gmail.com>
- 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.
+ * compress.c (decompress_contents): Tidy inflateEnd result test.
-2020-02-06 Maciej W. Rozycki <macro@wdc.com>
+2021-01-16 Alan Modra <amodra@gmail.com>
- * elf32-v850.c (v850_elf_relax_section): Fix the index used for
- reporting an unrecognized instruction with R_V850_LONGJUMP.
+ PR 26002
+ * elflink.c (elf_link_output_extsym): Use version 1 in
+ .gnu.version for undefined unversioned symbols.
-2020-02-05 Alan Modra <amodra@gmail.com>
+2021-01-15 Nelson Chu <nelson.chu@sifive.com>
- * elf64-ppc.c (ppc_stub_plt_branch): Match comment with reality.
+ * elfnn-riscv.c (riscv_relax_delete_bytes): Fixed the indent that
+ caused the by previous commit accidentally.
-2020-02-04 Alan Modra <amodra@gmail.com>
+2021-01-15 Nelson Chu <nelson.chu@sifive.com>
- * elf32-ppc.c (ppc_elf_relocate_section): After applying
- R_PPC_VLE_ADDR20, goto copy_reloc.
+ * elfnn-riscv.c: Indent, labels and GNU coding standards tidy,
+ also aligned the code.
-2020-02-02 H.J. Lu <hongjiu.lu@intel.com>
+2021-01-15 Nelson Chu <nelson.chu@sifive.com>
- * bfd-in2.h: Regenerated.
- * section.c (SEC_ASSEMBLER_SECTION_ID): Fix a typo in comments.
+ * elfnn-riscv.c (riscv_merge_attributes): Fix typos of messages.
-2020-02-02 H.J. Lu <hongjiu.lu@intel.com>
+2021-01-15 Nelson Chu <nelson.chu@sifive.com>
- 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.
+ * elfnn-riscv.c: Comments tidy and improvement.
+ * elfxx-riscv.c: Likewise.
+ * elfxx-riscv.h: Likewise.
-2020-02-01 Nick Clifton <nickc@redhat.com>
+2021-01-14 H.J. Lu <hongjiu.lu@intel.com>
- * config.bfd: Move the c30-aout and tic30-aout targets onto the
- obsolete list.
+ PR ld/26688
+ * elf32-bfin.c (bfinfdpic_relocate_section): Skip non SEC_ALLOC
+ section for R_BFIN_FUNCDESC.
-2020-01-31 Sandra Loosemore <sandra@codesourcery.com>
+2021-01-14 Nick Clifton <nickc@redhat.com>
- * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): DW_EH_PE_datarel
- encodings are relative to the GOT on nios2, too.
+ * elf.c (elfcore_grok_win32pstatus): Check for a note type of 0.
-2020-01-31 Alan Modra <amodra@gmail.com>
+2021-01-13 Alan Modra <amodra@gmail.com>
- * 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.
+ * doc/Makefile.in: Regenerate.
-2020-01-31 Alan Modra <amodra@gmail.com>
-
- 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.
-
-2020-01-16 Jon Turney <jon.turney@dronecode.org.uk>
-
- * 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.
-
-2020-01-16 Jon Turney <jon.turney@dronecode.org.uk>
-
- * peXXigen.c (debug_type_names): Add names for new debug data type
- values.
-
-2020-01-16 Jon Turney <jon.turney@dronecode.org.uk>
+2021-01-13 Alan Modra <amodra@gmail.com>
- * peXXigen.c (pe_print_debugdata): Fix the iteration variable for
- inner loop. Fix a memory leak.
-
-2020-01-30 Alan Modra <amodra@gmail.com>
-
- * 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.
-
-2020-01-27 Jim Wilson <jimw@sifive.com>
-
- * cpu-riscv.c (riscv_scan): New.
- (N): Change bfd_default_scan to riscv_scan.
-
-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.
- * cpu-plugin.c: Remove.
- * archures.c (enum bfd_architecture): Remove bfd_arch_plugin.
- (bfd_plugin_arch): Remove declaration.
+ PR 27160
+ * section.c (struct bfd_section): Remove pattern field.
+ (BFD_FAKE_SECTION): Adjust to suit.
* bfd-in2.h: Regenerate.
- * po/SRC-POTFILES.in: Regenerate.
+ * elflink.c (compare_link_order, elf_fixup_link_order): Delete.
+ (bfd_elf_final_link): Don't call elf_fixup_link_order.
-2020-01-27 H.J. Lu <hongjiu.lu@intel.com>
- Alan Modra <amodra@gmail.com>
+2021-01-12 H.J. Lu <hongjiu.lu@intel.com>
- PR ld/25458
- * elflink.c (_bfd_elf_gc_mark_rsec): Mark all weak aliases.
+ PR binutils/26792
+ * configure.ac: Use GNU_MAKE_JOBSERVER.
+ * aclocal.m4: Regenerated.
+ * configure: Likewise.
-2020-01-24 Jim Wilson <jimw@sifive.com>
+2021-01-12 H.J. Lu <hongjiu.lu@intel.com>
- * 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.
+ PR ld/27171
+ * reloc.c (bfd_perform_relocation): Adjust R_AMD64_DIR64 and
+ R_AMD64_DIR32 relocations for PE/x86-64 inputs.
-2020-01-24 Nick Clifton <nickc@redhat.com>
+2021-01-11 H.J. Lu <hongjiu.lu@intel.com>
- 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.
+ PR ld/27173
+ * configure: Regenerated.
-2020-01-23 Nick Clifton <nickc@redhat.com>
+2021-01-11 Nick Clifton <nickc@redhat.com>
* po/fr.po: Updated French translation.
-
-2020-01-23 Alan Modra <amodra@gmail.com>
-
- PR 25444
- * elf.c (assign_file_positions_for_load_sections): Avoid divide
- by zero when p_align is zero.
-
-2020-01-22 Maxim Blinov <maxim.blinov@embecosm.com>
-
- * 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.
-
-2020-01-22 Alan Modra <amodra@gmail.com>
-
- * elf64-ppc.c (ppc64_elf_size_stubs): Correct condition under
- which __tls_get_addr calls will be eliminated.
-
-2020-01-20 Nick Clifton <nickc@redhat.com>
-
- * po/pt.po: Updates Portuguese translation.
- * po/ru.po: Updated Russian translation.
+ * po/pt.po: Updated Portuguese translation.
+ * po/sr.po: Updated Serbian translation.
* po/uk.po: Updated Ukranian translation.
-2020-01-20 H.J. Lu <hongjiu.lu@intel.com>
-
- 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)".
-
-2020-01-20 Alan Modra <amodra@gmail.com>
+2021-01-09 H.J. Lu <hongjiu.lu@intel.com>
- * 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.
+ * configure: Regenerated.
-2020-01-20 Alan Modra <amodra@gmail.com>
+2021-01-09 H.J. Lu <hongjiu.lu@intel.com>
- * elf64-ppc.c (ppc_elf_hash_entry): New function, use throughout file.
- (defined_sym_val, is_tls_get_addr): Likewise.
+ PR ld/27166
+ * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Handle
+ -z lam-u48 and -z lam-u57.
-2020-01-18 Nick Clifton <nickc@redhat.com>
+2021-01-09 Nick Clifton <nickc@redhat.com>
- * version.m4 (BFD_VERSION): Set to 2.34.50.
+ * version.m4: Change to 2.36.50.
* configure: Regenerate.
* po/bfd.pot: Regenerate.
-2020-01-18 Nick Clifton <nickc@redhat.com>
-
- Binutils 2.34 branch created.
+2021-01-09 Nick Clifton <nickc@redhat.com>
-2020-01-17 Christian Biesinger <cbiesinger@google.com>
+ * 2.36 release branch crated.
- * 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).
+2021-01-08 H.J. Lu <hongjiu.lu@intel.com>
-2020-01-15 Lars Brinkhoff <lars@nocrew.org>
+ * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Also set
+ LAM_U57 when setting LAM_U48.
- PR 20694
- * pdp11.c (TARGET_PAGE_SIZE): Set to 8192.
+2021-01-08 H.J. Lu <hongjiu.lu@intel.com>
-2020-01-15 Alan Modra <amodra@gmail.com>
+ PR ld/26256
+ PR ld/27160
+ * elflink.c (elf_fixup_link_order): Verify that fixing up
+ SHF_LINK_ORDER doesn't increase the output section size.
- 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.
+2021-01-09 Alan Modra <amodra@gmail.com>
-2020-01-14 Alan Modra <amodra@gmail.com>
-
- * som.c (som_bfd_count_ar_symbols): Error when file position
- of symbols on chains is not strictly increasing.
-
-2020-01-14 Alan Modra <amodra@gmail.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.
-
-2020-01-13 Alan Modra <amodra@gmail.com>
-
- * vms-alpha.c (_bfd_vms_slurp_egsd): Ensure minimum size even
- for "ignored" records.
-
-2020-01-13 Alan Modra <amodra@gmail.com>
-
- * 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.
-
-2020-01-10 Szabolcs Nagy <szabolcs.nagy@arm.com>
-
- PR ld/22269
- * elf32-arm.c (elf32_arm_final_link_relocate): Use
- UNDEFWEAK_NO_DYNAMIC_RELOC.
- (allocate_dynrelocs_for_symbol): Likewise.
-
-2020-01-10 Tamar Christina <tamar.christina@arm.com>
-
- PR 25210
- * elfnn-aarch64.c (_bfd_aarch64_create_stub_section): Remove elfclass.
-
-2020-01-10 Alan Modra <amodra@gmail.com>
-
- * coff-alpha.c (alpha_ecoff_object_p): Calculate size in bfd_size_type.
-
-2020-01-09 Nick Clifton <nickc@redhat.com>
-
- PR 25221
- * bfd.c (bfd_convert_section_contents): Check for a compress
- header size that is larger than the actual section size.
-
-2020-01-08 Alan Modra <amodra@gmail.com>
-
- PR 25351
- * elflink.c (bfd_elf_final_link): Call _bfd_fix_excluded_sec_syms
- after removing sections.
-
-2020-01-06 Jim Wilson <jimw@sifive.com>
+ * configure: Regenerate.
- 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.
+2021-01-07 Samuel Thibault <samuel.thibault@gnu.org>
-2020-01-06 Alan Modra <amodra@gmail.com>
+ * configure: Regenerate.
- * 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.
+2021-01-07 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR 27109
+ * aix386-core.c (core_aix386_vec): Initialize
+ keep_unused_section_symbol to TARGET_KEEP_UNUSED_SECTION_SYMBOLS.
+ * aout-target.h (MY (vec)): Likewise.
+ * binary.c (binary_vec): Likewise.
+ * cisco-core.c (core_cisco_be_vec): Likewise.
+ (core_cisco_le_vec): Likewise.
+ * coff-alpha.c (alpha_ecoff_le_vec): Likewise.
+ * coff-i386.c (TARGET_SYM): Likewise.
+ (TARGET_SYM_BIG): Likewise.
+ * coff-ia64.c (TARGET_SYM): Likewise.
+ * coff-mips.c (mips_ecoff_le_vec): Likewise.
+ (mips_ecoff_be_vec): Likewise.
+ (mips_ecoff_bele_vec): Likewise.
+ * coff-rs6000.c (rs6000_xcoff_vec): Likewise.
+ (powerpc_xcoff_vec): Likewise.
+ * coff-sh.c (sh_coff_small_vec): Likewise.
+ (sh_coff_small_le_vec): Likewise.
+ * coff-tic30.c (tic30_coff_vec): Likewise.
+ * coff-tic54x.c (tic54x_coff0_vec): Likewise.
+ (tic54x_coff0_beh_vec): Likewise.
+ (tic54x_coff1_vec): Likewise.
+ (tic54x_coff1_beh_vec): Likewise.
+ (tic54x_coff2_vec): Likewise.
+ (tic54x_coff2_beh_vec): Likewise.
+ * coff-x86_64.c (TARGET_SYM): Likewise.
+ (TARGET_SYM_BIG): Likewise.
+ * coff64-rs6000.c (rs6000_xcoff64_vec): Likewise.
+ (rs6000_xcoff64_aix_vec): Likewise.
+ * coffcode.h (CREATE_BIG_COFF_TARGET_VEC): Likewise.
+ (CREATE_BIGHDR_COFF_TARGET_VEC): Likewise.
+ (CREATE_LITTLE_COFF_TARGET_VEC): Likewise.
+ * elfxx-target.h (TARGET_BIG_SYM): Likewise.
+ (TARGET_LITTLE_SYM): Likewise.
+ * hppabsd-core.c (core_hppabsd_vec): Likewise.
+ * hpux-core.c (core_hpux_vec): Likewise.
+ * i386msdos.c (i386_msdos_vec): Likewise.
+ * ihex.c (ihex_vec): Likewise.
+ * irix-core.c (core_irix_vec): Likewise.
+ * mach-o-target.c (TARGET_NAME): Likewise.
+ * mmo.c (mmix_mmo_vec): Likewise.
+ * netbsd-core.c (core_netbsd_vec): Likewise.
+ * osf-core.c (core_osf_vec): Likewise.
+ * pdp11.c (MY (vec)): Likewise.
+ * pef.c (pef_vec): Likewise.
+ (pef_xlib_vec): Likewise.
+ * plugin.c (plugin_vec): Likewise.
+ * ppcboot.c (powerpc_boot_vec): Likewise.
+ * ptrace-core.c (core_ptrace_vec): Likewise.
+ * sco5-core.c (core_sco5_vec): Likewise.
+ * som.c (hppa_som_vec): Likewise.
+ * srec.c (srec_vec): Likewise.
+ (symbolsrec_vec): Likewise.
+ * tekhex.c (tekhex_vec): Likewise.
+ * trad-core.c (core_trad_vec): Likewise.
+ * verilog.c (verilog_vec): Likewise.
+ * vms-alpha.c (alpha_vms_vec): Likewise.
+ * vms-lib.c (alpha_vms_lib_txt_vec): Likewise.
+ * wasm-module.c (wasm_vec): Likewise.
+ * xsym.c (sym_vec): Likewise.
+ * elf.c (ignore_section_sym): Return TRUE if BSF_SECTION_SYM_USED
+ isn't set.
+ (elf_map_symbols): Don't include ignored section symbols.
+ * elfcode.h (elf_slurp_symbol_table): Also set
+ BSF_SECTION_SYM_USED on STT_SECTION symbols.
+ * elflink.c (bfd_elf_final_link): Generated section symbols only
+ when emitting relocations or reqired.
+ * elfxx-x86.h (TARGET_KEEP_UNUSED_SECTION_SYMBOLS): New.
+ * syms.c (BSF_SECTION_SYM_USED): New.
+ * targets.c (TARGET_KEEP_UNUSED_SECTION_SYMBOLS): New.
+ (bfd_target): Add keep_unused_section_symbols.
+ (bfd_keep_unused_section_symbols): New.
+ * bfd-in2.h: Regenerated.
-2020-01-06 Alan Modra <amodra@gmail.com>
+2021-01-07 Nick Clifton <nickc@redhat.com>
- * 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.
+ PR 25713
+ * bfdio.c (_bfd_real_fopen): For Win32 convert relative paths to
+ absolute paths and check to see if they are longer than MAX_PATH.
-2020-01-06 Alan Modra <amodra@gmail.com>
+2021-01-07 Philipp Tomsich <prt@gnu.org>
- * som.c (som_bfd_fill_in_ar_symbols): Bounds check som_dict index.
+ * elfxx-riscv.c (riscv_std_z_ext_strtab): Added zihintpause.
-2020-01-06 Alan Modra <amodra@gmail.com>
+2021-01-07 Claire Xenia Wolf <claire@symbioticeda.com>
+ Jim Wilson <jimw@sifive.com>
+ Andrew Waterman <andrew@sifive.com>
+ Maxim Blinov <maxim.blinov@embecosm.com>
+ Kito Cheng <kito.cheng@sifive.com>
+ Nelson Chu <nelson.chu@sifive.com>
- * 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.
+ * elfxx-riscv.c (riscv_std_z_ext_strtab): Added zba, zbb and zbc.
-2020-01-04 Alan Modra <amodra@gmail.com>
+2021-01-06 H.J. Lu <hongjiu.lu@intel.com>
- * 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.
+ * elf32-bfin.c (bfin_check_relocs): Check bfd_link_hash_indirect.
+ (bfinfdpic_check_relocs): Likewise.
-2020-01-04 Alan Modra <amodra@gmail.com>
+2021-01-06 Alan Modra <amodra@gmail.com>
- * mmo.c (mmo_mkobject): Allocate tdata with bfd_zalloc.
+ * elf32-score.c (s3_bfd_score_info_to_howto): Report an error
+ on unknown r_type.
+ * elf32-score7.c (s7_bfd_score_info_to_howto): Likewise.
-2020-01-04 Alan Modra <amodra@gmail.com>
+2021-01-06 Alan Modra <amodra@gmail.com>
- * coffgen.c (coff_real_object_p): Free malloc'd memory on target
- match too.
+ * config.bfd (sparc-*-solaris2*): Add sparc_elf32_vec.
+ (sparc64-*-solaris2*): Add sparc_elf64_vec and
+ sparc_elf32_vec.
-2020-01-03 Nick Clifton <nickc@redhat.com>
+2021-01-06 Marcus Comstedt <marcus@mc.pp.se>
- 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.
+ * config.bfd: Added targets riscv64be*-*-*, riscv32be*-*-* and
+ riscvbe*-*-*. Also added riscv_elf[32|64]_be_vec.
+ * configure.ac: Handle riscv_elf[32|64]_be_vec.
+ * configure: Regenerate.
+ * elfnn-riscv.c: Include <limits.h> and define CHAR_BIT for
+ riscv_is_insn_reloc.
+ (riscv_get_insn): RISC-V instructions are always little endian, but
+ bfd_get may be used for big-endian, so add new riscv_get_insn to handle
+ the insturctions.
+ (riscv_put_insn): Likewsie.
+ (riscv_is_insn_reloc): Check if we are relocaing an instruction.
+ (perform_relocation): Call riscv_is_insn_reloc to decide if we should
+ use riscv_[get|put]_insn or bfd_[get|put].
+ (riscv_zero_pcrel_hi_reloc): Use riscv_[get|put]_insn, bfd_[get|put]l32
+ or bfd_[get|put]l16 for code.
+ (riscv_elf_relocate_section): Likewise.
+ (riscv_elf_finish_dynamic_symbol): Likewise.
+ (riscv_elf_finish_dynamic_sections): Likewise.
+ (_bfd_riscv_relax_call): Likewise.
+ (_bfd_riscv_relax_lui): Likewise.
+ (_bfd_riscv_relax_align): Likewise.
+ (_bfd_riscv_relax_pc): Likewise.
+ (riscv_elf_object_p): Handled for big endian.
+ (TARGET_BIG_SYM, TARGET_BIG_NAME): Defined.
+ * targets.c: Add riscv_elf[32|64]_be_vec.
+ (_bfd_target_vector): Likewise.
+
+2021-01-05 Alan Modra <amodra@gmail.com>
+
+ * elflink.c (bfd_elf_link_record_dynamic_symbol): Handle no_export
+ for relocatable executable.
+
+2021-01-05 Alan Modra <amodra@gmail.com>
+
+ * vms-alpha.c (_bfd_vms_slurp_egsd): Read flags after size check.
+
+2021-01-05 Nelson Chu <nelson.chu@sifive.com>
+
+ * elfnn-riscv.c (allocate_dynrelocs): When we are generating pde,
+ make sure gp symbol is output as a dynamic symbol.
+
+2021-01-04 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/26256
+ * elflink.c (compare_link_order): Place unordered sections before
+ ordered sections.
+ (elf_fixup_link_order): Add a link info argument. Allow mixed
+ ordered and unordered input sections for non-relocatable link.
+ Sort the consecutive bfd_indirect_link_order sections with the
+ same pattern. Change the offsets of the bfd_indirect_link_order
+ sections only.
+ (bfd_elf_final_link): Pass info to elf_fixup_link_order.
+ * section.c (bfd_section): Add pattern.
+ (BFD_FAKE_SECTION): Initialize pattern to NULL.
+ * bfd-in2.h: Regenerated.
-2020-01-03 Nick Clifton <nickc@redhat.com>
+2021-01-04 Alexander Fedotov <alfedotov@gmail.com>
- 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.
+ * elf32-arm.c (elf32_arm_print_private_bfd_data): Prefix hex value
+ of private flags with 0x.
+ * elfnn-aarch64.c (elfNN_aarch64_print_private_bfd_data): Likewise.
-2020-01-03 Sergei Trofimovich <siarheit@google.com>
+2021-01-04 Alan Modra <amodra@gmail.com>
- * 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.
+ PR 26822
+ * elflink.c (elf_link_input_bfd): Use the file base name in
+ linker generated STT_FILE symbols.
-2020-01-03 Jan Beulich <jbeulich@suse.com>
+2021-01-04 Nelson Chu <nelson.chu@sifive.com>
- * mach-o.c (cpusubtype, bfd_mach_o_header_p): Insert underscore
- in parameter names.
- (bfd_mach_o_scan): Insert underscore in two variable names.
+ * elfxx-riscv.c (riscv_compare_subsets): Removed static.
+ * elfxx-riscv.h: Add declaration.
+ * elfnn-riscv.c (riscv_merge_multi_letter_ext): Use
+ riscv_compare_subsets to check the orders.
+ (riscv_skip_prefix): Removed.
+ (riscv_prefix_cmp): Removed.
-2020-01-02 Sergey Belyashov <sergey.belyashov@gmail.com>
+2021-01-04 Alan Modra <amodra@gmail.com>
- * 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.
+ PR 26741
+ * elfxx-riscv.c (riscv_parse_prefixed_ext): Free subset after
+ calculating subset version length.
-2020-01-02 Tamar Christina <tamar.christina@arm.com>
+2021-01-01 Nicolas Boulenguez <nicolas@debian.org>
- PR 25210
- PR 24753
- * elfnn-aarch64.c (_bfd_aarch64_create_stub_section): Set ELF class.
+ * xcofflink.c: Correct spelling in comments.
-2020-01-01 Alan Modra <amodra@gmail.com>
+2021-01-01 Alan Modra <amodra@gmail.com>
Update year range in copyright notice of all files.
-For older changes see ChangeLog-2019
+For older changes see ChangeLog-2020
\f
-Copyright (C) 2020 Free Software Foundation, Inc.
+Copyright (C) 2021-2022 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright