RISC-V: Report warning when linking the objects with different priv specs.
[deliverable/binutils-gdb.git] / bfd / ChangeLog
index e99de6dbed89b44fa0da36796c7b47610f2f273d..6ac3c0fb67efc423a25dd12cad0daceccdc9b7ad 100644 (file)
@@ -1,3 +1,333 @@
+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.
+
+2020-06-15  Max Filippov  <jcmvbkbc@gmail.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.
+
+2020-06-15  Roland McGrath  <mcgrathr@google.com>
+
+       * elflink.c (bfd_elf_define_start_stop): Use start_stop_visibility
+       field of bfd_link_info.
+
+2020-06-15  Alan Modra  <amodra@gmail.com>
+
+       * config.bfd: Obsolete powerpcle-*-pe targets.
+
+2020-06-15  Alan Modra  <amodra@gmail.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.
+
+2020-06-11  Alan Modra  <amodra@gmail.com>
+
+       PR 26107
+       * pdp11.c (is_stab): Replace legacy "index" function with "strchr".
+
+2020-06-10  H.J. Lu  <hongjiu.lu@intel.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.
+
+2020-06-10  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR ld/26094
+       * elflink.c (bfd_elf_define_start_stop): Handle common symbols.
+       Clear verinfo.verdef.
+
+2020-06-09  H.J. Lu  <hongjiu.lu@intel.com>
+
+       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.
+       * libbfd.h: Regenerate.
+       * 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
        (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. 
+       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.
This page took 0.044304 seconds and 4 git commands to generate.