+2017-06-28 Maciej W. Rozycki <macro@imgtec.com>
+ Matthew Fortune <matthew.fortune@imgtec.com>
+
+ * archures.c (bfd_mach_mips_interaptiv_mr2): New macro.
+ * cpu-mips.c (I_interaptiv_mr2): New enum value.
+ (arch_info_struct): Add "mips:interaptiv-mr2" entry.
+ * elfxx-mips.c (_bfd_elf_mips_mach) <E_MIPS_MACH_IAMR2>: New
+ case.
+ (mips_set_isa_flags) <bfd_mach_mips_interaptiv_mr2>: Likewise.
+ (bfd_mips_isa_ext) <bfd_mach_mips_interaptiv_mr2>: Likewise.
+ (print_mips_isa_ext) <AFL_EXT_INTERAPTIV_MR2>: Likewise.
+ (mips_mach_extensions): Add `bfd_mach_mipsisa32r3' and
+ `bfd_mach_mips_interaptiv_mr2' entries.
+ * bfd-in2.h: Regenerate.
+
+2017-06-27 Nick Clifton <nickc@redhat.com>
+
+ * tekhex.c (pass_over): Revert accidental conversion of a local
+ array to a static array.
+
+2017-06-27 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
+
+ PR ld/13402
+ * elf32-avr.c (elf32_avr_adjust_diff_reloc_value): Adjust
+ reloc addend if necessary. Adjust diff only if
+ shrinked_insn_address < end_address.
+
+2017-06-27 Alan Modra <amodra@gmail.com>
+
+ PR binutils/21665
+ * libbfd.c (_bfd_generic_get_section_contents): Warning fix.
+ (_bfd_generic_get_section_contents_in_window): Likewise.
+
+2017-06-26 Kuan-Lin Chen <rufus@andestech.com>
+
+ * elfnn-riscv.c (perform_relocation): Support the new
+ R_RISCV_32_PCREL relocation.
+ (riscv_elf_relocate_section): Likewise.
+ * elfxx-riscv.c (howto_table): Likewise.
+ (riscv_reloc_map): Likewise.
+ * bfd-in2.h (BFD_RELOC_RISCV_32_PCREL): New relocation.
+ * libbfd.h: Regenerate.
+
+2017-06-27 Alan Modra <amodra@gmail.com>
+
+ PR binutils/21665
+ * libbfd.c (_bfd_generic_get_section_contents): Delete abort.
+ Use unsigned file pointer type, and remove cast.
+ * libbfd.c (_bfd_generic_get_section_contents_in_window): Likewise.
+ Add "count", not "sz".
+
+2017-06-26 Pedro Alves <palves@redhat.com>
+
+ PR binutils/21665
+ * libbfd.c (_bfd_generic_get_section_contents): Add "count", not
+ "sz".
+
+2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR binutils/21665
+ * libbfd.c (_bfd_generic_get_section_contents_in_window): Add
+ a missing line.
+
+2017-06-26 Maciej W. Rozycki <macro@imgtec.com>
+
+ * cpu-mips.c (arch_info_struct): Mark the 4010 32-bit.
+ * elfxx-mips.c (mips_set_isa_flags) <bfd_mach_mips4010>: Set
+ E_MIPS_ARCH_2 rather than E_MIPS_ARCH_3 in `e_flags'.
+ (mips_mach_extensions): Mark `bfd_mach_mips4010' as extending
+ `bfd_mach_mips6000' rather than `bfd_mach_mips4000'.
+
+2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR binutils/21665
+ * compress.c (bfd_get_full_section_contents): Don't check the
+ file size here.
+ * libbfd.c (_bfd_generic_get_section_contents): Check for and
+ reject a section whose size + offset is greater than the size
+ of the entire file.
+ (_bfd_generic_get_section_contents_in_window): Likewise.
+
+2017-06-26 Nick Clifton <nickc@redhat.com>
+
+ PR binutils/21670
+ * tekhex.c (getvalue): Check for the source pointer exceeding the
+ end pointer before the first byte is read.
+
+2017-06-26 Nick Clifton <nickc@redhat.com>
+
+ PR binutils/21665
+ * opncls.c (get_build_id): Check that the section is big enough
+ to contain the whole note.
+ * compress.c (bfd_get_full_section_contents): Check for and reject
+ a section whose size is greater than the size of the entire file.
+ * elf32-v850.c (v850_elf_copy_notes): Allow for the ouput to not
+ contain a notes section.
+
+2017-06-26 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
+
+ * elf64-s390.c (elf_s390_additional_program_headers): Add NULL
+ pointer checks.
+ (elf_s390_modify_segment_map): Likewise.
+ (bfd_elf_s390_set_options): Lisewise.
+
+2017-06-26 Alan Modra <amodra@gmail.com>
+
+ * elflink.c (_bfd_elf_link_create_dynstrtab): Don't make dynobj
+ a --just-syms bfd.
+ (_bfd_elf_size_group_sections): Skip --just-syms bfds.
+ (bfd_elf_size_dynamic_sections): Ignore .note.GNU-stack and
+ .preinit_array on --just-syms bfds.
+ (_bfd_elf_gc_mark_extra_sections): Skip --just-syms bfds.
+ (elf_gc_sweep, bfd_elf_parse_eh_frame_entries): Likewise.
+ (bfd_elf_gc_sections, bfd_elf_discard_info): Likewise.
+
+2017-06-25 Sergei Trofimovich <slyfox@gentoo.org>
+
+ * elf.c (find_link): Bounds check "hint".
+
+2017-06-24 Thomas Preud'homme <thomas.preudhomme@arm.com>
+
+ * elf32-arm.c (using_thumb_only): Update list of architectures in
+ BFD_ASSERT for which the logic is valid.
+ (using_thumb2_bl): Likewise.
+ (using_thumb2): Likewise and return true for ARMv8-R.
+ (arch_has_arm_nop): Likewise.
+ (tag_cpu_arch_combine): New v8r table for ARMv8-R Tag_CPU_arch
+ merging logic. Update commentis for value 15 of v8m_baseline,
+ v8m_mainline and v4t_plus_v6_m arrays. Use v8r array to decide
+ merging of value 15 of Tag_CPU_arch.
+
+2017-06-23 Jiong Wang <jiong.wang@arm.com>
+
+ * reloc.c (BFD_RELOC_AARCH64_ADR_GOTPAGE): Rename to
+ BFD_RELOC_AARCH64_ADR_GOT_PAGE
+ * bfd-in2.h: Regenerate.
+
+2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
+
+ * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Move
+ the error_alignment label forward. Properly align program
+ property note section.
+
+2017-06-22 Eric Christopher <echristo@gmail.com>
+
+ * elf32-arm.c (elf32_arm_final_link_relocate): Use labs rather than
+ abs to fix a truncation warning.
+
+2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
+
+ * elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Resolve
+ local undefined weak symbol to 0.
+ * elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Likewise.
+
+2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
+
+ * elf32-i386.c (elf_i386_merge_gnu_properties): If info->shstk
+ is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
+ (elf_i386_link_setup_gnu_properties): If info->shstk is set,
+ turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
+ * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): If
+ info->shstk is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
+ (elf_x86_64_link_setup_gnu_properties): If info->shstk is set,
+ turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
+
+2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
+
+ * elf32-i386.c (elf_i386_lazy_ibt_plt0_entry): New.
+ (elf_i386_lazy_ibt_plt_entry): Likewise.
+ (elf_i386_pic_lazy_ibt_plt0_entry): Likewise.
+ (elf_i386_non_lazy_ibt_plt_entry): Likewise.
+ (elf_i386_pic_non_lazy_ibt_plt_entry): Likewise.
+ (elf_i386_eh_frame_lazy_ibt_plt): Likewise.
+ (elf_i386_lazy_plt_layout): Likewise.
+ (elf_i386_non_lazy_plt_layout): Likewise.
+ (elf_i386_link_hash_entry): Add plt_second.
+ (elf_i386_link_hash_table): Add plt_second and
+ plt_second_eh_frame.
+ (elf_i386_allocate_dynrelocs): Use the second PLT if needed.
+ (elf_i386_size_dynamic_sections): Use .plt.got unwind info for
+ the second PLT. Check the second PLT.
+ (elf_i386_relocate_section): Use the second PLT to resolve
+ PLT reference if needed.
+ (elf_i386_finish_dynamic_symbol): Fill and use the second PLT if
+ needed.
+ (elf_i386_finish_dynamic_sections): Set sh_entsize on the
+ second PLT. Generate unwind info for the second PLT.
+ (elf_i386_plt_type): Add plt_second.
+ (elf_i386_get_synthetic_symtab): Support the second PLT.
+ (elf_i386_parse_gnu_properties): Support
+ GNU_PROPERTY_X86_FEATURE_1_AND.
+ (elf_i386_merge_gnu_properties): Support
+ GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
+ on GNU_PROPERTY_X86_FEATURE_1_IBT
+ (elf_i386_link_setup_gnu_properties): If info->ibt is set,
+ turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
+ for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
+ is set on all relocatable inputs.
+ * elf64-x86-64.c (elf_x86_64_lazy_ibt_plt_entry): New.
+ (elf_x32_lazy_ibt_plt_entry): Likewise.
+ (elf_x86_64_non_lazy_ibt_plt_entry): Likewise.
+ (elf_x32_non_lazy_ibt_plt_entry): Likewise.
+ (elf_x86_64_eh_frame_lazy_ibt_plt): Likewise.
+ (elf_x32_eh_frame_lazy_ibt_plt): Likewise.
+ (elf_x86_64_lazy_ibt_plt): Likewise.
+ (elf_x32_lazy_ibt_plt): Likewise.
+ (elf_x86_64_non_lazy_ibt_plt): Likewise.
+ (elf_x32_non_lazy_ibt_plt): Likewise.
+ (elf_x86_64_get_synthetic_symtab): Support the second PLT.
+ (elf_x86_64_parse_gnu_properties): Support
+ GNU_PROPERTY_X86_FEATURE_1_AND.
+ (elf_x86_64_merge_gnu_properties): Support
+ GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
+ on GNU_PROPERTY_X86_FEATURE_1_IBT
+ (elf_x86_64_link_setup_gnu_properties): If info->ibt is set,
+ turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
+ for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
+ is set on all relocatable inputs.
+
+2017-06-22 Nick Clifton <nickc@redhat.com>
+
+ PR binutils/21649
+ * som.c (setup_sections): NUL terminate the space_strings buffer.
+ Check that the space.name field does not index beyond the end of
+ the space_strings buffer.
+
+2017-06-21 Nick Clifton <nickc@redhat.com>
+
+ PR binutils/21646
+ * coff-sh.c (sh_reloc): Check for an out of range reloc.
+
+2017-06-21 Nick Clifton <nickc@redhat.com>
+
+ PR binutils/21639
+ * vms-misc.c (_bfd_vms_save_sized_string): Use unsigned int as
+ type of the size parameter.
+ (_bfd_vms_save_counted_string): Add second parameter - the maximum
+ length of the counted string.
+ * vms.h (_bfd_vms_save_sized_string): Update prototype.
+ (_bfd_vms_save_counted_string): Likewise.
+ * vms-alpha.c (_bfd_vms_slurp_eisd): Update calls to
+ _bfd_vms_save_counted_string.
+ (_bfd_vms_slurp_ehdr): Likewise.
+ (_bfd_vms_slurp_egsd): Likewise.
+ (Parse_module): Likewise.
+
+2017-06-21 Alan Modra <amodra@gmail.com>
+
+ * elf64-ppc.c (ppc64_elf_size_stubs): Test for localentry:0 plt
+ calls before tocsave calls.
+ (ppc64_elf_relocate_section): Allow localentry:0 plt calls without
+ following nop.
+
+2017-06-21 Nick Clifton <nickc@redhat.com>
+
+ PR binutils/21645
+ * reloc.c (bfd_generic_get_relocated_section_contents): Fail if
+ bfd_get_full_section_contents returns no contents.
+
+2017-06-21 Nick Clifton <nickc@redhat.com>
+
+ PR binutils/21638
+ * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an undersized
+ record.
+
+2017-06-21 Nick Clifton <nickc@redhat.com>
+
+ PR binutils/21637
+ * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an empty section
+ list.
+ (image_set_ptr): Likewise.
+ (alpha_vms_fix_sec_rel): Likewise.
+ (alpha_vms_slurp_relocs): Likewise.
+
+2017-06-21 Nick Clifton <nickc@redhat.com>
+
+ PR binutils/21633
+ * ieee.c (ieee_slurp_sections): Check for a NULL return from
+ read_id.
+ (ieee_archive_p): Likewise.
+ (ieee_object_p): Likewise.
+
+2017-06-21 Nick Clifton <nickc@redhat.com>
+
+ PR binutils/21640
+ * elf.c (setup_group): Zero the group section pointer list after
+ allocation so that loops can be caught. Check for NULL pointers
+ when processing a group list.
+
+2017-06-20 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
+
+ * elf-s390.h: New file.
+ * elf64-s390.c (struct elf_s390_link_hash_table): Add params
+ field.
+ (elf_s390_additional_program_headers): New function.
+ (elf_s390_modify_segment_map): New function.
+ (bfd_elf_s390_set_options): New function.
+ (elf_backend_additional_program_headers)
+ (elf_backend_modify_segment_map): Add macro definitions.
+
+2017-06-19 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/21626
+ * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Check
+ the DYNAMIC bit instead of bfd_count_sections.
+
+2017-06-19 Nick Clifton <nickc@redhat.com>
+
+ PR binutils/21618
+ * vms-alpha.c (evax_bfd_print_emh): Check for insufficient record
+ length.
+ (evax_bfd_print_eeom): Likewise.
+ (evax_bfd_print_egsd): Check for an overlarge record length.
+ (evax_bfd_print_etir): Likewise.
+
+2017-06-19 Nick Clifton <nickc@redhat.com>
+
+ PR binutils/21612
+ * libieee.h (struct common_header_type): Add end_p field.
+ * ieee.c (this_byte_and_next): Do not advance input_p beyond
+ end_p.
+ (read_id): Check for a length that exceeds the remaining bytes in
+ the input buffer.
+ (ieee_seek): Initialise end_p.
+ (ieee_archive_p): Likewise.
+ (ieee_object_p): Likewise.
+
+2017-06-19 Nick Clifton <nickc@redhat.com>
+
+ PR binutils/21611
+ * vms-alpha.c (_bfd_vms_slurp_eihs): Check for invalid offset
+ before reading the EIHS structure entries.
+
+2017-06-19 Nick Clifton <nickc@redhat.com>
+
+ PR binutils/21615
+ * vms-alpha.c (_bfd_vms_slurp_egsd): Use unsigned int for
+ gsd_size. Check that there are enough bytes remaining to read the
+ type and size of the next egsd. Check that the size of the egsd
+ does not exceed the size of the record.
+
+2017-06-19 Alan Modra <amodra@gmail.com>
+
+ * config.bfd: Correct targ_underscore for cris.
+
+2017-06-18 Alan Modra <amodra@gmail.com>
+
+ * config.bfd: Correct targ_underscore for epiphany, ip2k,
+ m32c, mn10200, pru, rl78, rx, crisv32 and v850.
+
+2017-06-16 Nick Clifton <nickc@redhat.com>
+
+ * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Do not fail if the
+ bucketlist is empty because there are no symbols to add to the
+ list.
+
+2017-06-16 Alan Modra <amodra@gmail.com>
+
+ PR ld/20022
+ PR ld/21557
+ PR ld/21562
+ PR ld/21571
+ * targets.c (struct bfd_target): Add _bfd_define_start_stop.
+ (BFD_JUMP_TABLE_LINK): Likewise.
+ * elf-bfd.h (bfd_elf_define_start_stop): Declare.
+ * elflink.c (_bfd_elf_gc_mark_rsec): Update comment.
+ (bfd_elf_define_start_stop): New function.
+ * linker.c (bfd_generic_define_start_stop): New function.
+ * coff64-rs6000.c (rs6000_xcoff64_vec, rs6000_xcoff64_aix_vec): Init
+ new field.
+ * aout-adobe.c (aout_32_bfd_define_start_stop): Define.
+ * aout-target.h (MY_bfd_define_start_stop): Define.
+ * aout-tic30.c (MY_bfd_define_start_stop): Define.
+ * binary.c (binary_bfd_define_start_stop): Define.
+ * bout.c (b_out_bfd_define_start_stop): Define.
+ * coff-alpha.c (_bfd_ecoff_bfd_define_start_stop): Define.
+ * coff-mips.c (_bfd_ecoff_bfd_define_start_stop): Define.
+ * coff-rs6000.c (_bfd_xcoff_bfd_define_start_stop): Define.
+ * coffcode.h (coff_bfd_define_start_stop): Define.
+ * elfxx-target.h (bfd_elfNN_bfd_define_start_stop): Define.
+ * i386msdos.c (msdos_bfd_define_start_stop): Define.
+ * i386os9k.c (os9k_bfd_define_start_stop): Define.
+ * ieee.c (ieee_bfd_define_start_stop): Define.
+ * ihex.c (ihex_bfd_define_start_stop): Define.
+ * libbfd-in.h (_bfd_nolink_bfd_define_start_stop): Define.
+ * mach-o-target.c (bfd_mach_o_bfd_define_start_stop): Define.
+ * mmo.c (mmo_bfd_define_start_stop): Define.
+ * nlm-target.h (nlm_bfd_define_start_stop): Define.
+ * oasys.c (oasys_bfd_define_start_stop): Define.
+ * pef.c (bfd_pef_bfd_define_start_stop): Define.
+ * plugin.c (bfd_plugin_bfd_define_start_stop): Define.
+ * ppcboot.c (ppcboot_bfd_define_start_stop): Define.
+ * som.c (som_bfd_define_start_stop): Define.
+ * srec.c (srec_bfd_define_start_stop): Define.
+ * tekhex.c (tekhex_bfd_define_start_stop): Define.
+ * versados.c (versados_bfd_define_start_stop): Define.
+ * vms-alpha.c (vms_bfd_define_start_stop): Define.
+ (alpha_vms_bfd_define_start_stop): Define.
+ * xsym.c (bfd_sym_bfd_define_start_stop): Define.
+ * bfd-in2.h: Regenerate.
+ * libbfd.h: Regenerate.
+
+2017-06-16 Jiong Wang <jiong.wang@arm.com>
+
+ * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use
+ SYMBOL_REFERENCES_LOCAL.
+
+2017-06-15 Jiong Wang <jiong.wang@arm.com>
+
+ PR ld/21532
+ * elfnn-aarch64.c (ELIMINATE_COPY_RELOCS): Set to 1.
+ (elfNN_aarch64_final_link_relocate): Also propagate relocations to
+ runtime for if there needs copy relocation elimination.
+ (need_copy_relocation_p): New function. Return true for symbol with
+ pc-relative references and if it's against read-only sections.
+ (elfNN_aarch64_adjust_dynamic_symbol): Use need_copy_relocation_p.
+ (elfNN_aarch64_check_relocs): Allocate dynrelocs for relocation types
+ that are related with accessing external objects.
+ (elfNN_aarch64_gc_sweep_hook): Sync the relocation types with the change
+ in elfNN_aarch64_check_relocs.
+
+2017-06-15 Nick Clifton <nickc@redhat.com>
+
+ PR binutils/21582
+ * ieee.c (ieee_object_p): Use a static buffer to avoid compiler
+ bugs.
+ PR binutils/21581
+ (ieee_archive_p): Likewise.
+
2017-06-15 Nick Clifton <nickc@redhat.com>
PR binutils/21579