Treat the .gnu.debuglink and .gnu.debugaltlink sections as debug sections when readin...
[external/binutils.git] / bfd / ChangeLog
index a072ade..676f4ad 100644 (file)
@@ -1,3 +1,323 @@
+2019-05-02  Nick Clifton  <nickc@redhat.com>
+
+       PR 24493
+       * coffcode.h (styp_to_sec_flags): Treat .gnu.debuglink and
+       .gnu.debugaltlink sections as debugging sections.
+
+2019-04-30  Alan Modra  <amodra@gmail.com>
+
+       * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add has_gotrel.
+       (struct _ppc64_elf_section_data): Likewise.
+       (ppc64_elf_check_relocs): Set above fields.
+       (ppc64_elf_edit_toc): Add a pass over GOT relocs.
+       (ppc64_elf_relocate_section): Edit GOT indirect to GOT relative
+       when possible.
+
+2019-04-26  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR ld/24486
+       * elflink.c (elf_link_output_extsym): Don't complain undefined
+       weak dynamic reference.
+
+2019-04-25  Sudakshina Das  <sudi.das@arm.com>
+
+       * elfnn-aarch64.c (PLT_BTI_ENTRY_SIZE): Remove.
+       (PLT_BTI_TLSDESC_ENTRY_SIZE): Remove.
+       (PLT_PAC_ENTRY_SIZE, PLT_BTI_PAC_ENTRY_SIZE): Remove.
+       (PLT_BTI_SMALL_ENTRY_SIZE, PLT_PAC_SMALL_ENTRY_SIZE): Update.
+       (elfNN_aarch64_small_plt0_pac_entry): Remove.
+       (elfNN_aarch64_small_plt0_bti_pac_entry): Remove.
+       (elfNN_aarch64_small_plt0_bti_entry): Update.
+       (elfNN_aarch64_small_plt_bti_entry): Update.
+       (elfNN_aarch64_small_plt_pac_entry): Update.
+       (elfNN_aarch64_tlsdesc_small_plt_bti_entry): Update.
+       (setup_plt_values): Setup new entries.
+       (elfNN_aarch64_finish_dynamic_sections): Remove size change.
+       (elfNN_aarch64_plt_sym_val): Likewise.
+
+2019-04-22  Jim Wilson  <jimw@sifive.com>
+
+       * elfnn-riscv.c (PRSTATUS_SIZE) [ARCH_SIZE==32]: Change from 0 to 204.
+
+2019-04-19  Alan Modra  <amodra@gmail.com>
+
+       * elf32-s12z.c (elf_backend_can_gc_sections): Don't define
+
+2019-04-17  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * elf64-x86-64.c (elf_x86_64_need_pic): Suggest -fPIE when not
+       building shared object.
+       * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Likewise.
+
+2019-04-17  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR ld/24458
+       * elfxx-x86.h (SYMBOL_DEFINED_NON_SHARED_P): Also check x86
+       linker_def.
+
+2019-04-15  Thomas Preud'homme  <thomas.preudhomme@arm.com>
+
+       * reloc.c (BFD_RELOC_ARM_T32_VLDR_VSTR_OFF_IMM): New internal
+       relocation.
+       * bfd-in2.h: Regenerate.
+       * libbfd.h: Likewise.
+
+2019-04-15  Sudakshina Das  <sudi.das@arm.com>
+
+       * reloc.c (BFD_RELOC_ARM_THUMB_LOOP12): New.
+       * bfd-in2.h: Regenerated.
+       * libbfd.h: Regenerated.
+
+2019-04-15  Sudakshina Das  <sudi.das@arm.com>
+
+       * reloc.c (BFD_RELOC_THUMB_PCREL_BFCSEL): New relocation.
+       * bfd-in2.h: Regenerated.
+       * libbfd.h: Likewise.
+
+2019-04-15  Sudakshina Das  <sudi.das@arm.com>
+
+       * reloc.c (BFD_RELOC_ARM_THUMB_BF13): New.
+       * bfd-in2.h: Regenerated.
+       * libbfd.h: Regenerated.
+       * elf32-arm.c (elf32_arm_howto_table_1): New entry for R_ARM_THM_BF13.
+       (elf32_arm_reloc_map elf32_arm_reloc_map): Map BFD_RELOC_ARM_THUMB_BF13
+       and R_ARM_THM_BF12 together.
+       (elf32_arm_final_link_relocate): New switch case for R_ARM_THM_BF13.
+
+2019-04-15  Sudakshina Das  <sudi.das@arm.com>
+
+       * reloc.c (BFD_RELOC_ARM_THUMB_BF19): New
+       * libbfd.h: Regenerated.
+       * bfd-in2.h: Regenerated.
+       * bfd-elf32-arm.c (elf32_arm_howto_table_1): New entry for R_ARM_THM_BF18.
+       (elf32_arm_reloc_map elf32_arm_reloc_map): Map BFD_RELOC_ARM_THUMB_BF19
+       and R_ARM_THM_BF18 together.
+       (elf32_arm_final_link_relocate): New switch case for R_ARM_THM_BF19.
+
+2019-04-15  Sudakshina Das  <sudi.das@arm.com>
+
+       * reloc.c (BFD_RELOC_ARM_THUMB_BF17): New enum.
+       * bfd-in2.h: Regenerated.
+       * libbfd.h: Regenerated.
+       * bfd-elf32-arm.c (elf32_arm_howto_table_1): New entry for R_ARM_THM_BF16.
+       (elf32_arm_reloc_map elf32_arm_reloc_map): Map BFD_RELOC_ARM_THUMB_BF17
+       and R_ARM_THM_BF16 together.
+       (get_value_helper): New reloc helper.
+       (elf32_arm_final_link_relocate): New switch case for R_ARM_THM_BF16.
+
+2019-04-15  Sudakshina Das  <sudi.das@arm.com>
+
+       * reloc.c (BFD_RELOC_THUMB_PCREL_BRANCH5): New enum.
+       * bfd-in2.h: Regenerate.
+       * libbfd.h: Regenerate.
+
+2019-04-15  Thomas Preud'homme  <thomas.preudhomme@arm.com>
+
+       * archures.c (bfd_mach_arm_8_1M_MAIN): Define.
+       * bfd-in2.h: Regenerate.
+       * cpu-arm.c (arch_info_struct): Add entry for Armv8.1-M Mainline.
+       * elf32-arm.c (using_thumb_only): Return true for Armv8.1-M Mainline
+       and update assert.
+       (using_thumb2): Likewise.
+       (using_thumb2_bl): Update assert.
+       (arch_has_arm_nop): Likewise.
+       (bfd_arm_get_mach_from_attributes): Add case for Armv8.1-M Mainline.
+       (tag_cpu_arch_combine): Add logic for Armv8.1-M Mainline merging.
+
+2019-04-11  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * elf-linker-x86.h (elf_x86_cet_report): New.
+       (elf_linker_x86_params): Add cet_report.
+       * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Report
+       missing IBT and SHSTK properties if needed.
+
+2019-04-11  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR ld/24436
+       * elf-m10300.c (mn10300_elf_check_relocs): Remove BFD_ASSERT of
+       "h != NULL".  Don't check "h != NULL" before calling.
+       bfd_elf_gc_record_vtentry.
+       * elf32-arm.c (elf32_arm_check_relocs): Likewise.
+       * elf32-bfin.c (bfin_check_relocs): Likewise.
+       * elf32-cris.c (cris_elf_check_relocs): Likewise.
+       * elf32-csky.c (csky_elf_check_relocs): Likewise.
+       * elf32-d10v.c (elf32_d10v_check_relocs): Likewise.
+       * elf32-dlx.c (elf32_dlx_check_relocs): Likewise.
+       * elf32-fr30.c (fr30_elf_check_relocs): Likewise.
+       * elf32-frv.c (elf32_frv_check_relocs): Likewise.
+       * elf32-hppa.c (elf32_hppa_check_relocs): Likewise.
+       * elf32-i386.c (elf_i386_check_relocs): Likewise.
+       * elf32-iq2000.c (iq2000_elf_check_relocs): Likewise.
+       * elf32-m32r.c (m32r_elf_check_relocs): Likewise.
+       * elf32-m68hc1x.c (elf32_m68hc11_check_relocs): Likewise.
+       * elf32-m68k.c (elf_m68k_check_relocs): Likewise.
+       * elf32-mcore.c (mcore_elf_check_relocs): Likewise.
+       * elf32-metag.c (elf_metag_check_relocs): Likewise.
+       * elf32-or1k.c (or1k_elf_check_relocs): Likewise.
+       * elf32-ppc.c (ppc_elf_check_relocs): Likewise.
+       * elf32-s390.c (elf_s390_check_relocs): Likewise.
+       * elf32-sh.c (sh_elf_check_relocs): Likewise.
+       * elf32-v850.c (v850_elf_check_relocs): Likewise.
+       * elf32-vax.c (elf_vax_check_relocs): Likewise.
+       * elf32-xstormy16.c (xstormy16_elf_check_relocs): Likewise.
+       * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
+       * elf64-mmix.c (mmix_elf_check_relocs): Likewise.
+       * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
+       * elf64-s390.c (elf_s390_check_relocs): Likewise.
+       * elf64-x86-64.c (elf_s390_check_relocs): Likewise.
+       * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
+       * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
+       * elflink.c (bfd_elf_gc_record_vtinherit): Check for corrupt
+       VTENTRY entry.
+
+2019-04-11  Alan Modra  <amodra@gmail.com>
+
+       PR 24435
+       * elflink.c (elf_link_add_object_symbols): Don't read partial
+       dynamic entries from fuzzed objects.
+
+2019-04-11  Tamar Christina  <tamar.christina@arm.com>
+
+       PR ld/24302
+       * elfnn-aarch64.c (elfNN_aarch64_size_dynamic_sections): Don't emit
+       DT_TLSDESC_GOT and DT_TLSDESC_PLT when DF_BIND_NOW.
+       (elfNN_aarch64_finish_dynamic_sections): Don't write PLT if DF_BIND_NOW.
+
+2019-04-10  Michael Forney  <mforney@mforney.org>
+
+       PR 24427
+       * doc/chew.c (free_words): Correctly free "push_text" strings.
+
+2019-04-08  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * config.bfd: Remove i[3-7]86-*-kaos* and i[3-7]86-*-chaos targets.
+
+2019-04-08  Alan Modra  <amodra@gmail.com>
+
+       * configure.ac (elfxx_x86): Define and use.
+       * configure: Regenerate.
+
+2019-04-06  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * elf-linker-x86.h: New file.
+       * elf32-i386.c (elf_i386_convert_load_reloc): Use htab->params
+       to get x86-specific linker options.
+       * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
+       (elf_x86_64_check_relocs): Likewise.
+       (elf_x86_64_relocate_section): Likewise.
+       (elf_x86_64_link_setup_gnu_properties): Likewise.
+       * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Likewise.
+       (_bfd_x86_elf_link_setup_gnu_properties): Likewise.
+       (_bfd_elf_linker_x86_set_options): New function.
+       * elfxx-x86.h: Include "elf-linker-x86.h".
+       (elf_x86_link_hash_table): Add params.
+
+2019-04-03  Alan Modra  <amodra@gmail.com>
+
+       * coff-i386.c, * coff-x86_64.c, * coffgen.c, * dwarf2.c,
+       * elf-m10200.c, * elf.c, * elf32-arm.c, * elf32-bfin.c,
+       * elf32-csky.c, * elf32-m32r.c, * elf32-microblaze.c, * elf32-pru.c,
+       * elf32-rx.c, * elf32-xgate.c, * elf64-sparc.c, * elfnn-ia64.c,
+       * elfxx-riscv.c, * elfxx-sparc.c, * linker.c, * mach-o.c,
+       * pe-x86_64.c, * pei-x86_64.c, * plugin.c: Whitespace fixes.
+
+2019-04-02  Jim Wilson  <jimw@sifive.com>
+
+       PR 24389
+       * elfnn-riscv.c (_bfd_riscv_elf_merge_private_bfd_data): Move read of
+       ELF header flags to after check for ELF object file.  Loop through
+       sections looking for code sections, if none, then skip ABI checks.
+
+2019-03-30  Andrew Waterman  <andrew@sifive.com>
+
+       * elfnn-riscv.c (_bfd_riscv_relax_call): Only check ARCH_SIZE for
+       rd == X_RA case.
+
+2019-03-29  Max Filippov  <jcmvbkbc@gmail.com>
+
+       * elf32-xtensa.c (shrink_dynamic_reloc_sections): Add
+       info->export_dynamic to the conditional.
+
+2019-03-28  Alan Modra  <amodra@gmail.com>
+
+       PR 24392
+       * configure.ac: Invoke AC_CHECK_SIZEOF(int).
+       * configure: Regenerate.
+       * coffgen.c (coff_get_reloc_upper_bound): Replace gcc diagnostic
+       workaround with SIZEOF_LONG vs. SIZEOF_INT check.
+       * elf.c (_bfd_elf_get_reloc_upper_bound): Likewise.
+       * elf64-sparc.c (elf64_sparc_get_reloc_upper_bound): Likewise.
+       * mach-o.c (bfd_mach_o_get_reloc_upper_bound): Likewise.
+
+2019-03-21  Jim Wilson  <jimw@sifive.com>
+
+       PR 24365
+       * elfnn-riscv.c (riscv_elf_relocate_section): For STT_SECTION check,
+       verify sym non-NULL before using.  Add identical check using h.
+
+2019-03-21  Sudakshina Das  <sudi.das@arm.com>
+
+       * elf-bfd.h (struct elf_backend_data): Add argument to
+       merge_gnu_properties.
+       * elf-properties.c (elf_merge_gnu_properties): Add argument to
+       itself and while calling bed->merge_gnu_properties.
+       (elf_merge_gnu_property_list): Update the calls for
+       elf_merge_gnu_properties.
+       * elfnn-aarch64.c (elfNN_aarch64_merge_gnu_properties): Update handling
+       of --force-bti warning and add argument.
+       * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties): Add
+       warning.
+       * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Add argument.
+       * elfxx-x86.h (_bfd_x86_elf_merge_gnu_properties): Likewise in
+       declaration.
+
+2019-03-20  Sudakshina Das  <sudi.das@arm.com>
+
+       * elfxx-aarch64.c (_bfd_aarch64_elf_link_fixup_gnu_properties): Define.
+       * elfxx-aarch64.h (_bfd_aarch64_elf_link_fixup_gnu_properties): Declare.
+       (elf_backend_fixup_gnu_properties): Define for AArch64.
+
+2019-03-18  Alan Modra  <amodra@gmail.com>
+
+       PR 24355
+       * elf32-ppc.c (ppc_finish_symbols): Don't call write_glink_stub
+       for local iplt syms with ent->plt.offset == -1.  Remove ineffective
+       attempt at writing glink stubs only once.
+
+2019-03-16  Alan Modra  <amodra@gmail.com>
+
+       PR 24337
+       * elf.c (_bfd_elf_rela_local_sym): Revert last change.
+       (_bfd_elf_rel_local_sym): Likewise.
+       * elflink.c (elf_link_input_bfd): Use bfd_und_section for
+       section of symbols with unrecognized shndx.
+
+2019-03-15  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR ld/24267
+       * coffgen.c (_bfd_coff_section_already_linked): Skip discarded
+       section.
+       * cofflink.c (coff_link_add_symbols): Check for symbols defined
+       in discarded section.
+
+2019-03-15  Alan Modra  <amodra@gmail.com>
+
+       PR 24339
+       * elflink.c (elf_link_add_object_symbols): Bail out on a local
+       symbol after globals if elf_bad_symtab is not set.
+
+2019-03-15  Alan Modra  <amodra@gmail.com>
+
+       PR 24337
+       * elf.c (_bfd_elf_rela_local_sym): Don't segfault on NULL sec.
+       (_bfd_elf_rel_local_sym): Likewise.
+
+2019-03-15  Alan Modra  <amodra@gmail.com>
+
+       PR 24336
+       * elflink.c (elf_link_read_relocs_from_section): Handle fuzzed
+       object files with sh_size not a multiple of sh_entsize.
+
 2019-03-15  H.J. Lu  <hongjiu.lu@intel.com>
 
        PR ld/24338