+2018-11-09 Claudiu Zissulescu <claziss@synopsys.com>
+
+ * arc-got.h (arc_get_local_got_ents): Revamp it; use
+ elf_local_got_ents to store the local got list.
+ (get_got_entry_list_for_symbo): Restructure it.
+ * elf32-arc.c (elf_arc_relocate_section): Correct the call to
+ get_got_entry_list_for_symbol.
+
+2018-11-07 Nick Clifton <nickc@redhat.com>
+
+ * po/fr.po: Updated French translation.
+ * po/pt.po: Updated Portuguese translation.
+
+2018-11-06 Roman Bolshakov <r.bolshakov@yadro.com>
+ Saagar Jha <saagar@saagarjha.com>
+
+ * mach-o.h: Add new enums for BFD_MACH_O_PLATFORM_MACOS,
+ BFD_MACH_O_PLATFORM_IOS, BFD_MACH_O_PLATFORM_TVOS,
+ BFD_MACH_O_PLATFORM_WATCHOS, BFD_MACH_O_PLATFORM_BRIDGEOS,
+ BFD_MACH_O_TOOL_CLANG, BFD_MACH_O_TOOL_SWIFT, BFD_MACH_O_TOOL_LD.
+ (struct bfd_mach_o_note_command): New.
+ (struct bfd_mach_o_build_version_tool): New.
+ (struct bfd_mach_o_build_version_command): New.
+ (bfd_mach_o_read_version_min): Don't split version into
+ a few fields. Rename reserved to sdk.
+ * mach-o.c (bfd_mach_o_read_version_min): Don't split version into a
+ few fields. Rename reserved to sdk.
+ (bfd_mach_o_read_command): Handle LC_VERSION_MIN_TVOS, LC_NOTE,
+ LC_BUILD_VERSION.
+ (bfd_mach_o_read_note): New.
+ (bfd_mach_o_read_build_version): New.
+
+2018-11-07 Yoshinori Sato <ysato@users.sourceforge.jp>
+
+ * config.bfd: Add rx-*-linux.
+ * congigure.ac: Likewise.
+ * elf32-rx.c (rx_linux_object_p): New function.
+ (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME)
+ (elf_backend_object_p, elf32_bed): Define rx-*-linux.
+ * targets.c: Add rx_elf32_linux_le_vec.
+ * configure: Regenerate.
+
+2018-11-06 Romain Margheriti <lilrom13@gmail.com>
+
+ PR 23742
+ * mach-o.c (bfd_mach_o_read_command): Accept and ignore
+ BFD_MACH_O_LC_LINKER_OPTIONS and BFD_MACH_O_LC_BUILD_VERSION
+ commands.
+
+2018-11-02 Alan Modra <amodra@gmail.com>
+
+ PR 23850
+ * elf.c (bfd_section_from_shdr): Treat SHF_ALLOC SHT_REL* sections
+ in an executable or shared library as normal sections.
+
+2018-10-31 Renlin Li <renlin.li@arm.com>
+
+ * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Don't create got
+ section for Local Exec TLS model.
+
+2018-10-24 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/23818
+ * elflink.c (_bfd_elf_link_assign_sym_version): Hide symbols
+ defined in discarded input sections.
+
+2018-10-24 Alan Modra <amodra@gmail.com>
+
+ * elf32-arm.c (elf32_arm_size_stubs): Ignore as-needed libs that
+ were not needed.
+
+2018-10-23 Alan Modra <amodra@gmail.com>
+
+ PR 23806
+ * merge.c (_bfd_add_merge_section): Don't attempt to merge
+ sections with ridiculously large alignments.
+
+2018-10-23 Alan Modra <amodra@gmail.com>
+
+ PR 23805
+ * elflink.c (elf_link_input_bfd): Don't segfault on finding
+ STT_TLS symbols without any TLS sections. Instead, change the
+ symbol type to STT_NOTYPE.
+
+2018-10-23 Alan Modra <amodra@gmail.com>
+
+ PR 23804
+ * merge.c (_bfd_add_merge_section): Don't attempt to merge
+ sections where size is not a multiple of entsize.
+
+2018-10-20 Alan Modra <amodra@gmail.com>
+
+ PR 23788
+ * elf.c (section_match): Don't require a size match for SHT_SYMTAB
+ or SHT_STRTAB.
+
+2018-10-17 Alan Modra <amodra@gmail.com>
+
+ PR 23653
+ * elflink.c (_bfd_elf_link_create_dynstrtab): Match elf_object_id
+ too when choosing dynobj.
+
+2018-10-16 Alan Modra <amodra@gmail.com>
+
+ * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Simplify
+ PE_DEBUG_DATA size checks.
+
+2018-10-16 Alan Modra <amodra@gmail.com>
+
+ PR 23781
+ * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Free data
+ before returning.
+
+2018-10-16 Alan Modra <amodra@gmail.com>
+
+ PR 23534
+ * init.c (bfd_init): Return an unsigned int.
+ bfd-in2.h: Regenerate.
+
+2018-10-15 Alan Modra <amodra@gmail.com>
+
+ PR 23534
+ * init.c (BFD_INIT_MAGIC): Define.
+ (bfd_init): Return BFD_INIT_MAGIC.
+ bfd-in2.h: Regenerate.
+
+2018-10-13 Alan Modra <amodra@gmail.com>
+
+ PR 23770
+ PR 23425
+ * reloc.c (_bfd_clear_contents): Replace "location" param with
+ "buf" and "off". Bounds check "off". Return status.
+ * cofflink.c (_bfd_coff_generic_relocate_section): Update
+ _bfd_clear_contents call.
+ * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Likewise.
+ * elf32-arc.c (elf_arc_relocate_section): Likewise.
+ * elf32-i386.c (elf_i386_relocate_section): Likewise.
+ * elf32-metag.c (metag_final_link_relocate): Likewise.
+ * elf32-nds32.c (nds32_elf_get_relocated_section_contents): Likewise.
+ * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
+ * elf32-visium.c (visium_elf_relocate_section): Likewise.
+ * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
+ * elf64-x86-64.c *(elf_x86_64_relocate_section): Likewise.
+ * libbfd-in.h (_bfd_clear_contents): Update prototype.
+ * libbfd.h: Regenerate.
+
+2018-10-09 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
+
+ * elflink.c (elf_link_output_extsym): Do not place symbols into a
+ discarded .dynsym.
+
+2018-10-08 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/23428
+ * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Don't
+ add GNU_PROPERTY_X86_FEATURE_2_NEEDED to force program header
+ in non-code PT_LOAD segment.
+
+2018-10-08 Alan Modra <amodra@gmail.com>
+
+ * elf-nacl.c (nacl_modify_segment_map): Cope with header PT_LOAD
+ lacking sections.
+ * elf.c (_bfd_elf_map_sections_to_segments): Assume file and
+ program headers are required when info->load_phdrs. Reorganize
+ code handling program headers. Generate a mapping without
+ sections just for file and program headers when -z separate-code
+ would indicate they should be on a different page to the first
+ section.
+
+2018-10-08 Alan Modra <amodra@gmail.com>
+
+ * elf.c (assign_file_positions_for_load_sections): Set p_vaddr
+ from m->p_vaddr_offset for segments without sections. Invert
+ sign of p_vaddr_offset.
+ (rewrite_elf_program_header, copy_elf_program_header): Save
+ old segment p_vaddr to p_vaddr_offset. Invert sign of
+ p_vaddr_offset.
+
+2018-10-08 Alan Modra <amodra@gmail.com>
+
+ * elf.c (get_program_header_size): Don't count PT_INTERP if
+ .interp is empty.
+ (_bfd_elf_map_sections_to_segments): Don't create PT_INTERP if
+ .interp is empty.
+
+2018-10-08 Alan Modra <amodra@gmail.com>
+
+ * elf32-spu.c (spu_elf_modify_segment_map): Don't insert
+ overlays before segment containing headers.
+
+2018-10-08 Alan Modra <amodra@gmail.com>
+
+ * elf.c (make_mapping): Cope with zero size array at end of
+ struct elf_segment_map.
+ (_bfd_elf_map_sections_to_segments): Likewise.
+ (rewrite_elf_program_header, copy_elf_program_header): Likewise.
+ (_bfd_elf_map_sections_to_segments): Rename phdr_index to hdr_index.
+
+2018-10-05 Alan Modra <amodra@gmail.com>
+
+ * elf32-spu.c (spu_elf_create_sections): Make .note.spu_name
+ SHT_NOTE.
+
+2018-10-05 Richard Henderson <rth@twiddle.net>
+
+ * bfd-in2.h: Regenerated.
+ * elf32-or1k.c: (or1k_elf_howto_table): Fix formatting for
+ R_OR1K_PLT26, Add R_OR1K_PCREL_PG21, R_OR1K_GOT_PG21,
+ R_OR1K_TLS_GD_PG21, R_OR1K_TLS_LDM_PG21, R_OR1K_TLS_IE_PG21,
+ R_OR1K_LO13, R_OR1K_GOT_LO13, R_OR1K_TLS_GD_LO13, R_OR1K_TLS_LDM_LO13,
+ R_OR1K_TLS_IE_LO13, R_OR1K_SLO13, R_OR1K_PLTA26.
+ (or1k_reloc_map): Add BFD_RELOC_OR1K_PCREL_PG21,
+ BFD_RELOC_OR1K_GOT_PG21, BFD_RELOC_OR1K_TLS_GD_PG21,
+ BFD_RELOC_OR1K_TLS_LDM_PG21, BFD_RELOC_OR1K_TLS_IE_PG21,
+ BFD_RELOC_OR1K_LO13, BFD_RELOC_OR1K_GOT_LO13,
+ BFD_RELOC_OR1K_TLS_GD_LO13, BFD_RELOC_OR1K_TLS_GD_LO13,
+ BFD_RELOC_OR1K_TLS_LDM_LO13, BFD_RELOC_OR1K_TLS_IE_LO13,
+ BFD_RELOC_OR1K_SLO13, BFD_RELOC_OR1K_PLTA26.
+ (elf_or1k_link_hash_table): Add field saw_plta.
+ (or1k_final_link_relocate): Add value calculations for new relocations.
+ (or1k_elf_relocate_section): Add section relocations for new
+ relocations.
+ (or1k_write_plt_entry): New function.
+ (or1k_elf_finish_dynamic_sections): Add support for PLTA relocations
+ using new l.adrp instruction. Cleanup PLT relocation code generation.
+ * libbfd.h: Regenerated.
+ * reloc.c: Add BFD_RELOC_OR1K_PCREL_PG21, BFD_RELOC_OR1K_LO13,
+ BFD_RELOC_OR1K_SLO13, BFD_RELOC_OR1K_GOT_PG21, BFD_RELOC_OR1K_GOT_LO13,
+ BFD_RELOC_OR1K_PLTA26, BFD_RELOC_OR1K_TLS_GD_PG21,
+ BFD_RELOC_OR1K_TLS_GD_LO13, BFD_RELOC_OR1K_TLS_LDM_PG21,
+ BFD_RELOC_OR1K_TLS_LDM_LO13, BFD_RELOC_OR1K_TLS_IE_PG21,
+ BFD_RELOC_OR1K_TLS_IE_LO13.
+
+2018-10-05 Richard Henderson <rth@twiddle.net>
+
+ * elf32-or1k.c (or1k_elf_relocate_section): Add error for unknown
+ relocations. Add error for non zero addend with plt and got
+ relocations. Add error for got and plt references against dynamic, non
+ local, symbols. Add error when linking non shared liraries with
+ flag_pic.
+
+2018-10-05 Richard Henderson <rth@twiddle.net>
+ Stafford Horne <shorne@gmail.com>
+
+ * bfd-in2.h: Regenerated.
+ * elf32-or1k.c (N_ONES): New macro.
+ (or1k_elf_howto_table): Fix R_OR1K_PLT26 to complain on overflow.
+ Add definitions for R_OR1K_TLS_TPOFF, R_OR1K_TLS_DTPOFF,
+ R_OR1K_TLS_DTPMOD, R_OR1K_AHI16, R_OR1K_GOTOFF_AHI16,
+ R_OR1K_TLS_IE_AHI16, R_OR1K_TLS_LE_AHI16, R_OR1K_SLO16,
+ R_OR1K_GOTOFF_SLO16, R_OR1K_TLS_LE_SLO16.
+ (or1k_reloc_map): Add entries for BFD_RELOC_HI16_S,
+ BFD_RELOC_LO16_GOTOFF, BFD_RELOC_HI16_GOTOFF, BFD_RELOC_HI16_S_GOTOFF,
+ BFD_RELOC_OR1K_TLS_IE_AHI16, BFD_RELOC_OR1K_TLS_LE_AHI16,
+ BFD_RELOC_OR1K_SLO16, BFD_RELOC_OR1K_GOTOFF_SLO16,
+ BFD_RELOC_OR1K_TLS_LE_SLO16.
+ (or1k_reloc_type_lookup): Change search loop to start ad index 0 and
+ also check results before returning.
+ (or1k_reloc_name_lookup): Simplify loop to use R_OR1K_max as index
+ limit.
+ (or1k_final_link_relocate): New function.
+ (or1k_elf_relocate_section): Add support for new AHI and SLO
+ relocations. Use or1k_final_link_relocate instead of generic
+ _bfd_final_link_relocate.
+ (or1k_elf_check_relocs): Add support for new AHI and SLO relocations.
+ * reloc.c: Add new enums for BFD_RELOC_OR1K_SLO16,
+ BFD_RELOC_OR1K_GOTOFF_SLO16, BFD_RELOC_OR1K_TLS_IE_AHI16,
+ BFD_RELOC_OR1K_TLS_IE_AHI16, BFD_RELOC_OR1K_TLS_LE_AHI16,
+ BFD_RELOC_OR1K_TLS_LE_SLO16. Remove unused BFD_RELOC_OR1K_GOTOFF_HI16
+ and BFD_RELOC_OR1K_GOTOFF_LO16.
+ * libbfd.h: Regenerated.
+
+2018-10-04 Jim Wilson <jimw@sifive.com>
+
+ * elfnn-riscv.c (riscv_elf_size_dynamic_sections): In dynobj->sections
+ loop, handle htab->sdyntdata section.
+
+2018-10-04 Jose E. Marchesi <jose.marchesi@oracle.com>
+
+ * elf64-sparc.c (elf64_sparc_output_arch_syms): Do notcorrect the
+ impact of STT_REGISTER symbols in the dynsym sh_info here...
+ * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_sections): ...but
+ do it here.
+
+2018-10-03 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/23658
+ * elf.c (get_program_header_size): Put all adjacent SHT_NOTE
+ sections with the same section alignment into a single PT_NOTE
+ segment. Check SHT_NOTE section type instead of section name.
+ (_bfd_elf_map_sections_to_segments): Likewise.
+
+2018-10-03 Millan Wolff <mail@milianw.de>
+
+ PR 23715
+ * dwarf2.c (find_abstract_instance): Allow recursive invocations
+ of find_abstract_instance to override the name variable.
+
+2018-10-03 Nick Clifton <nickc@redhat.com>
+
+ * po/pt.po: Updated Portuguese translation.
+
+2018-10-01 Cupertino Miranda <cmiranda@synopsys.com>
+
+ * arc-got.h (relocate_fix_got_relocs_for_got_info): Changed. Take TLS
+ section alignment in consideration for this relocation. Fixed TCB_SIZE
+ offset size to include section alignment.
+ (get_got_entry_list_for_symbol): Changed.
+ * elf32-arc.c (FINAL_SECTSTART): Added this formula macro.
+ (ARC_TLS_DTPOFF) Updated reloc to use new created macro instead.
+ (arc_special_overflow_checks): Fixed TCB_SIZE offsize to include
+ section alignment.
+ (elf_arc_check_relocs): Changed.
+ (elf_arc_finish_dynamic_symbol) Return FALSE in case arc_htab is NULL.
+ (struct elf_arc_link_hash_entry): Moved and changed.
+ (elf_arc_link_hash_newfunc): Changed.
+ (arc_elf_link_hash_table_create): Removed old initializations.
+ (elf_arc_relocate_section, elf_arc_finish_dynamic_symbol): Changed.
+
+2018-09-28 H.J. Lu <hongjiu.lu@intel.com>
+
+ * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Use
+ elfclass instead of bed->s->elfclass.
+
+2018-09-27 Jim Wilson <jimw@sifive.com>
+
+ * elfnn-riscv.c (riscv_init_pcgp_relocs): Add explanatory comment.
+ (riscv_free_pcgp_relocs, riscv_record_pcgp_reloc): Likewise.
+ (riscv_find_pcgp_hi_reloc, riscv_reocrd_pcgp_lo_reloc): Likewise.
+ (riscv_find_pcgp_lo_reloc): Likewise.
+ (riscv_delete_pcgp_hi_reloc, riscv_use_pcgp_hi_reloc): Delete.
+ (riscv_delete_pcgp_lo_reloc): Likewise.
+ (_bfd_riscv_relax_pc): Don't call riscv_use_pcgp_hi_reloc. Replace
+ calls to riscv_delete_pcgp_lo_reloc and riscv_delete_pcgp_hi_reloc
+ with TRUE. Mark abfd arg as ATTRIBUTE_UNUSED.
+
+2018-09-25 Jim Wilson <jimw@sifive.com>
+
+ * elfnn-riscv.c (riscv_make_plt_header): New arg output_bfd. Change
+ return type to bfd_boolean. If EF_RISCV_RVE call _bfd_error_handler
+ and return FALSE. Return TRUE at end.
+ (riscv_make_plt_entry): Likewise.
+ (riscv_elf_finish_dynamic_symbol): Update call to riscv_make_plt_entry.
+ (riscv_elf_finish_dynamic_sections): Update call to
+ riscv_make_plt_header.
+
+2018-09-24 Jim Wilson <jimw@sifive.com>
+
+ * elfnn-riscv.c (_bfd_riscv_relax_pc) <R_RISCV_PCREL_LO12_I>: New local
+ hi_sec_off which is symbol address with addend subtracted. Use in
+ riscv_find_pcgp_hi_reloc and riscv_record_pcgp_lo_reloc calls.
+
+ * elfnn-riscv.c (riscv_resolve_pcrel_lo_relocs): Add check for reloc
+ overflow with addend. Use reloc_dangerous instead of reloc_overflow.
+ Add strings for the two errors handled here.
+ (riscv_elf_relocate_section) In case R_RISCV_PCREL_LO12_I, rewrite
+ comment. Only give error with addend when used with section symbol.
+ In case bfd_reloc_dangerous, update error string.
+
+2018-09-24 Jozef Lawrynowicz <jozef.l@mittosystems.com>
+
+ PR gdb/20948
+ * elf.c (_bfd_elf_write_object_contents): Return from function
+ early if abfd->direction == both_direction.
+
+2018-09-21 Simon Marchi <simon.marchi@ericsson.com>
+
+ * configure.ac: Check for fls.
+ * elf32-nds32.c (fls): Only define if !HAVE_FLS.
+ * config.in: Re-generate.
+ * configure: Re-generate.
+
+2018-09-20 Maciej W. Rozycki <macro@linux-mips.org>
+
+ * config.bfd <rs6000-*-aix5.[01], rs6000-*-aix[5-9]*>: Remove
+ duplicate `case' selectors.
+
+2018-09-20 Nelson Chu <nelson.chu1990@gmail.com>
+
+ * elf32-nds32.c (nds32_elf_relax_loadstore):
+ Remove the unused target features.
+ (bfd_elf32_nds32_set_target_option): Remove the unused parameters.
+ (nds32_elf_relax_piclo12, nds32_elf_relax_letlslo12,
+ nds32_elf_relax_letlsadd, nds32_elf_relax_letlsls,
+ nds32_elf_relax_pltgot_suff, nds32_elf_relax_got_suff
+ nds32_elf_relax_gotoff_suff, calculate_plt_memory_address,
+ calculate_plt_offset, calculate_got_memory_address,
+ nds32_elf_check_dup_relocs): Removed.
+ All callers changed.
+ * elf32-nds32.h: Remove the unused macros and defines.
+ (elf_nds32_link_hash_table): Remove the unused variable.
+ (bfd_elf32_nds32_set_target_option): Update prototype.
+ (nds32_elf_ex9_init): Removed.
+ * elf32-nds32.c (nds32_convert_32_to_16): Updated.
+ * elf32-nds32.c (HOWTO2, HOWTO3): Define new HOWTO macros
+ to initialize array nds32_elf_howto_table in any order
+ without lots of EMPTY_HOWTO.
+ (nds32_reloc_map): Updated.
+ * reloc.c: Add BFD_RELOC_NDS32_LSI.
+ * bfd-in2.h: Regenerated.
+ * bfd/libbfd.h: Regenerated.
+ * elf32-nds32.c (nds32_elf_relax_howto_table): Add R_NDS32_LSI.
+ (nds32_reloc_map): Likewise.
+ (nds32_elf_relax_flsi): New function.
+ (nds32_elf_relax_section): Support floating load/store relaxation.
+ * elf32-nds32.c (NDS32_GUARD_SEC_P, elf32_nds32_local_gp_offset):
+ New macro.
+ (struct elf_nds32_link_hash_entry): New `offset_to_gp' field.
+ (struct elf_nds32_obj_tdata): New `offset_to_gp' and `hdr_size' fields.
+ (elf32_nds32_allocate_local_sym_info, nds32_elf_relax_guard,
+ nds32_elf_is_target_special_symbol, nds32_elf_maybe_function_sym):
+ New functions.
+ (nds32_info_to_howto_rel): Add BFD_ASSERT.
+ (bfd_elf32_bfd_reloc_type_table_lookup, nds32_elf_link_hash_newfunc,
+ nds32_elf_link_hash_table_create, nds32_elf_relocate_section,
+ nds32_elf_relax_loadstore, nds32_elf_relax_lo12, nds32_relax_adjust_label,
+ bfd_elf32_nds32_set_target_option, nds32_fag_mark_relax): Updated.
+ (nds32_elf_final_sda_base): Improve it to find the better gp value.
+ (insert_nds32_elf_blank): Must consider `len' when inserting blanks.
+ * elf32-nds32.h (bfd_elf32_nds32_set_target_option): Update prototype.
+ (struct elf_nds32_link_hash_table): Add new variable `hyper_relax'.
+ * elf32-nds32.c (elf32_nds32_allocate_dynrelocs): New function.
+ (create_got_section): Likewise.
+ (allocate_dynrelocs, nds32_elf_size_dynamic_sections,
+ nds32_elf_relocate_section, nds32_elf_finish_dynamic_symbol): Updated.
+ (nds32_elf_check_relocs): Fix the issue that the shared library may
+ has TEXTREL entry in the dynamic section.
+ (nds32_elf_create_dynamic_sections): Enable to call readonly_dynrelocs
+ since the TEXTREL issue is fixed in the nds32_elf_check_relocs.
+ (nds32_elf_finish_dynamic_sections): Update and add DT_RELASZ
+ dynamic entry.
+ (calculate_offset): Remove the unused parameter `pic_ext_target' and
+ related codes.
+ All callers changed.
+ (elf_backend_dtrel_excludes_plt): Disable it temporarily since it
+ will cause some errors for our test cases.
+ * elf32-nds32.c (nds32_elf_merge_private_bfd_data): Allow to link the
+ generic object.
+ * reloc.c: Add TLS relocations.
+ * libbfd.h: Regenerated.
+ * bfd-in2.h: Regenerated.
+ * elf32-nds32.h (struct section_id_list_t): New.
+ (elf32_nds32_lookup_section_id, elf32_nds32_check_relax_group,
+ elf32_nds32_unify_relax_group, nds32_elf_unify_tls_model):
+ New prototypes.
+ (elf32_nds32_compute_jump_table_size, elf32_nds32_local_tlsdesc_gotent):
+ New macro.
+ (nds32_insertion_sort, bfd_elf32_nds32_set_target_option,
+ elf_nds32_link_hash_table): Updated.
+ * elf32-nds32.c (enum elf_nds32_tls_type): New.
+ (struct elf32_nds32_relax_group_t, struct relax_group_list_t): New.
+ (elf32_nds32_add_dynreloc, patch_tls_desc_to_ie, get_tls_type,
+ fls, ones32, list_insert, list_insert_sibling, dump_chain,
+ elf32_nds32_check_relax_group, elf32_nds32_lookup_section_id,
+ elf32_nds32_unify_relax_group, nds32_elf_unify_tls_model): New functions.
+ (elf_nds32_obj_tdata): Add new fields.
+ (elf32_nds32_relax_group_ptr, nds32_elf_local_tlsdesc_gotent): New macros.
+ (nds32_elf_howto_table): Add TLS relocations.
+ (nds32_reloc_map): Likewise.
+ (nds32_elf_copy_indirect_symbol, nds32_elf_size_dynamic_sections,
+ nds32_elf_finish_dynamic_symbol, elf32_nds32_allocate_local_sym_info,
+ nds32_elf_relocate_section, bfd_elf32_nds32_set_target_option,
+ nds32_elf_check_relocs, allocate_dynrelocs): Updated.
+ (nds32_elf_relax_section): Call nds32_elf_unify_tls_model.
+ (dtpoff_base): Rename it to `gottpof' and then update it.
+
+2018-09-20 Alan Modra <amodra@gmail.com>
+
+ PR 23685
+ * peXXigen.c (pe_print_edata): Correct export address table
+ overflow checks. Check dataoff against section size too.
+
+2018-09-20 Alan Modra <amodra@gmail.com>
+
+ PR 23686
+ * dwarf2.c (read_section): Error when attempting to malloc
+ "(bfd_size_type) -1".
+ * syms.c (_bfd_stab_section_find_nearest_line): Bounds check
+ function_name. Bounds check reloc address. Formatting. Ensure
+ .stabstr zero terminated.
+
+2018-09-18 Nick Clifton <nickc@redhat.com>
+
+ PR 23657
+ * elfcode.h (elf_swap_shdr_in): Generate a warning message if an
+ ELF section has contents and size larger than the file size.
+
+2018-09-14 Maciej W. Rozycki <macro@mips.com>
+
+ PR ld/21375
+ * elfxx-mips.h (_bfd_mips_elf_hide_symbol): New prototype.
+ (_bfd_mips_elf_linker_flags): Update prototype.
+ * elf32-mips.c (elf_backend_hide_symbol): New macro.
+ * elf64-mips.c (elf_backend_hide_symbol): Likewise.
+ * elfn32-mips.c (elf_backend_hide_symbol): Likewise.
+ * elfxx-mips.c (mips_elf_link_hash_table): Add
+ `use_absolute_zero' and `gnu_target' members.
+ (mips_elf_record_global_got_symbol): Call
+ `_bfd_mips_elf_hide_symbol' rather than
+ `_bfd_elf_link_hash_hide_symbol'.
+ (mips_use_local_got_p): Return FALSE if the symbol is absolute.
+ (mips_elf_obtain_contents): Reorder function.
+ (mips_elf_nullify_got_load): New function.
+ (mips_elf_calculate_relocation): Add `contents' parameter.
+ Nullify GOT loads or if it is not possible, then redirect GOT
+ relocations to the `__gnu_absolute_zero' symbol, for references
+ that are supposed to resolve to zero.
+ (mips_elf_define_absolute_zero): New function.
+ (_bfd_mips_elf_check_relocs): Prepare for arrangements made in
+ `mips_elf_calculate_relocation' for references made via the GOT
+ that are supposed to resolve to zero.
+ (_bfd_mips_elf_hide_symbol): New function.
+ (_bfd_mips_elf_linker_flags): Add the `gnu_target' parameter,
+ set the `gnu_target' member of the MIPS hash table.
+ (MIPS_LIBC_ABI_ABSOLUTE): New enumeration constant.
+ (_bfd_mips_post_process_headers): Use it.
+
+2018-09-14 Maciej W. Rozycki <macro@mips.com>
+
+ * elfxx-mips.c (mips_elf_store_contents): New function...
+ (mips_elf_perform_relocation): ... factored out from here.
+
+2018-09-14 Lifang Xia <lifang_xia@c-sky.com>
+
+ * elf32-csky.c (csky_elf_howto_table): Fill special_function of
+ R_CKCORE_PCREL32.
+ (csky_elf_relocate_section): Add R_CKCORE_PCREL32 process.
+
+2018-09-14 Alan Modra <amodra@gmail.com>
+
+ PR 23425
+ * reloc.c (bfd_generic_get_relocated_section_contents): Zero reloc
+ fields in debug sections when reloc is against an undefined symbol
+ and called from bfd_simple_get_relocated_section_contents or
+ similar.
+ * dwarf2.c (find_abstract_instance): Return true for zero offset
+ DW_FORM_ref_addr without returning values.
+
+2018-09-06 Alan Modra <amodra@gmail.com>
+
+ PR 23570
+ * elf32-avr.c (elf_avr_special_sections): New.
+ (elf_backend_special_sections): Define.
+
+2018-09-04 Jose E. Marchesi <jose.marchesi@oracle.com>
+
+ * elfxx-sparc.c (_bfd_sparc_elf_info_to_howto): Do not issue an
+ error when an invalid relocation is passed; this is already done
+ by `_bfd_sparc_elf_info_to_howto_ptr'.
+
+2018-09-04 Jose E. Marchesi <jose.marchesi@oracle.com>
+
+ * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Issue an
+ error when an invalid symbol index is retrieved in ELF64_R_SYM of
+ a relocation seen in an input file.
+
+2018-09-03 Jozef Lawrynowicz <jozef.l@mittosystems.com>
+ Alan Modra <amodra@gmail.com>
+
+ PR 23595
+ elf.c (copy_elf_program_header): When first segment contains
+ only the headers and SHT_NOBITS sections, use segment p_filesz
+ to calculate header and padding size. Use filepos of the first
+ section otherwise.
+
+2018-08-31 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/23600
+ * archures.c (bfd_arch_get_compatible): Allow an IR object with
+ unknown architecture.
+
+2018-08-31 Alan Modra <amodra@gmail.com>
+
+ * elf64-ppc.c (num_relocs_for_offset): New function.
+ (emit_relocs_for_offset): New function.
+ (use_global_in_relocs): New function, split out from..
+ (ppc_build_one_stub): ..here. Output relocations for notoc stubs.
+ (ppc_size_one_stub): Calculate reloc count for notoc stubs.
+ (ppc64_elf_size_stubs): Don't count undefined syms in stub_globals.
+
+2018-08-31 Alan Modra <amodra@gmail.com>
+
+ * reloc.c (BFD_RELOC_PPC64_REL16_HIGH, BFD_RELOC_PPC64_REL16_HIGHA),
+ (BFD_RELOC_PPC64_REL16_HIGHER, BFD_RELOC_PPC64_REL16_HIGHERA),
+ (BFD_RELOC_PPC64_REL16_HIGHEST, BFD_RELOC_PPC64_REL16_HIGHESTA):
+ Define.
+ * elf64-ppc.c (ppc64_elf_howto_raw): Add new REL16 howtos.
+ (ppc64_elf_reloc_type_lookup): Translate new REL16 relocs.
+ (ppc64_elf_check_relocs, ppc64_elf_relocate_section): Handle them.
+ * bfd-in2.h: Regenerate.
+ * libbfd.h: Regenerate.
+
+2018-08-31 Alan Modra <amodra@gmail.com>
+
+ * elf64-ppc.c: Correct _notoc stub comments.
+ (ppc_build_one_stub): Simplify output of branch for notoc
+ long branch stub. Don't include label offset of 8 bytes in
+ "off" calculation for notoc plt stub. Don't emit insns to get pc.
+ (build_offset): Emit insns to get pc here instead.
+ (size_offset): Add 4 extra insns.
+ (plt_stub_size): Adjust for "off" and size_offset changes.
+ (ppc_size_one_stub): Rearrange code into a switch, duplicating
+ some to better match ppc_build_one_stub.
+
+2018-08-29 Chenghua Xu <paul.hua.gm@gmail.com>
+
+ * archures.c (bfd_architecture): New machine
+ bfd_mach_mips_gs264e.
+ * bfd-in2.h (bfd_architecture): Likewise.
+ * cpu-mips.c (enum I_xxx): Likewise.
+ (arch_info_struct): Likewise.
+ * elfxx-mips.c (_bfd_elf_mips_mach): Handle
+ E_MIPS_MACH_GS264E.
+ (mips_set_isa_flags): Likewise.
+ (mips_mach_extensions): Map bfd_mach_mips_gs264e to
+ bfd_mach_mips_gs464e extension.
+
+2018-08-29 Chenghua Xu <paul.hua.gm@gmail.com>
+
+ * archures.c (bfd_architecture): New machine
+ bfd_mach_mips_gs464e.
+ * bfd-in2.h (bfd_architecture): Likewise.
+ * cpu-mips.c (enum I_xxx): Likewise.
+ (arch_info_struct): Likewise.
+ * elfxx-mips.c (_bfd_elf_mips_mach): Handle
+ E_MIPS_MACH_GS464E.
+ (mips_set_isa_flags): Likewise.
+ (mips_mach_extensions): Map bfd_mach_mips_gs464e to
+ bfd_mach_mips_gs464 extension.
+
+2018-08-29 Chenghua Xu <paul.hua.gm@gmail.com>
+
+ * archures.c (bfd_architecture): Rename
+ bfd_mach_mips_loongson_3a to bfd_mach_mips_gs464.
+ * bfd-in2.h (bfd_architecture): Likewise.
+ * cpu-mips.c (enum I_xxx): Likewise.
+ (arch_info_struct): Likewise.
+ * elfxx-mips.c (_bfd_elf_mips_mach): Likewise.
+ (mips_set_isa_flags): Likewise.
+ (mips_mach_extensions): Likewise.
+ (bfd_mips_isa_ext_mach): Likewise.
+ (bfd_mips_isa_ext): Likewise.
+ (print_mips_isa_ext): Delete AFL_EXT_LOONGSON_3A.
+
+2018-08-29 Chenghua Xu <paul.hua.gm@gmail.com>
+
+ * elfxx-mips.c (print_mips_ases): Add Loongson EXT2 extension.
+
+2018-08-29 Chenghua Xu <paul.hua.gm@gmail.com>
+
+ * elfxx-mips.c (infer_mips_abiflags): Use ases instead of
+ isa_ext for infer ABI flags.
+ (print_mips_ases): Add Loongson EXT extension.
+
+2018-08-29 Chenghua Xu <paul.hua.gm@gmail.com>
+
+ * elfxx-mips.c (print_mips_ases): Add CAM extension.
+
+2018-08-27 H.J. Lu <hongjiu.lu@intel.com>
+
+ * elfxx-x86.c (_bfd_x86_elf_parse_gnu_properties): Don't mask
+ out the GNU_PROPERTY_X86_UINT32_VALID bit.
+
+2018-08-25 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/23499
+ * elf.c (_bfd_elf_get_symbol_version_string): Return
+ _("<corrupt>") for corrupt symbol version info.
+
+2018-08-24 H.J. Lu <hongjiu.lu@intel.com>
+
+ * elfxx-x86.c (_bfd_x86_elf_parse_gnu_properties): Handle
+ X86_COMPAT_ISA_1_USED, X86_COMPAT_ISA_1_NEEDED,
+ X86_UINT32_AND_LO, X86_UINT32_AND_HI, X86_UINT32_OR_LO,
+ X86_UINT32_OR_HI, X86_UINT32_OR_AND_LO and X86_UINT32_OR_AND_HI
+ instead of X86_ISA_1_USED, X86_ISA_1_NEEDED and X86_FEATURE_1_AND.
+ (_bfd_x86_elf_merge_gnu_properties): Likewise.
+ (_bfd_x86_elf_link_setup_gnu_properties): Add X86_FEATURE_2_NEEDED
+ instead of X86_ISA_1_NEEDED.
+ (_bfd_x86_elf_link_fixup_gnu_properties): Handle
+ X86_COMPAT_ISA_1_USED, X86_COMPAT_ISA_1_NEEDED, X86_UINT32_AND_LO,
+ X86_UINT32_AND_HI, X86_UINT32_OR_LO, X86_UINT32_OR_HI,
+ X86_UINT32_OR_AND_LO and X86_UINT32_OR_AND_HI instead of
+ X86_ISA_1_USED, X86_ISA_1_NEEDED and X86_FEATURE_1_AND.
+
+2018-08-24 H.J. Lu <hongjiu.lu@intel.com>
+
+ * elfxx-x86.c (_bfd_x86_elf_parse_gnu_properties): Mask out the
+ GNU_PROPERTY_X86_UINT32_VALID bit.
+ (_bfd_x86_elf_link_fixup_gnu_properties): Set the
+ GNU_PROPERTY_X86_UINT32_VALID bit for non-relocatable output.
+
+2018-08-23 Zenith423 <zenith432@users.sourceforge.net>
+
+ PR 23460
+ * plugin.c (struct plugin_list_entry): New structure.
+ (plugin_list): New variable.
+ (try_load_plugin): Place opened plugins on a list. Ensure that
+ the refcount in the dynamic loader is kept at 1.
+
+2018-08-23 Alan Modra <amodra@gmail.com>
+
+ * elf64-ppc.c (ppc64_elf_relocate_section): Revise "call lacks
+ nop" error message.
+
+2018-08-23 Nick Clifton <nickc@redhat.com>
+
+ * elf64-hppa.c (elf_hppa_final_link_relocate): Replace unworkable
+ code with an assertion.
+
+2018-08-23 Nick Clifton <nickc@redhat.com>
+
+ PR 23061
+ * coffgen.c (coff_pointerize_aux): Add table_end parameter. Use
+ it to prevent walking off the end of the table.
+ (coff_get_normalized_symtab): Pass internal_end pointer to
+ coff_pointerize_aux.
+
+2018-08-23 Alan Modra <amodra@gmail.com>
+
+ * elf64-ppc.c (ppc64_elf_relocate_section): Don't miss clearing
+ unresolved_reloc on ppc_stub_plt_call_notoc.
+
+2018-08-22 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/23536
+ * development.sh (experimental): New.
+
+2018-08-22 Helge Deller <deller@gmx.de>
+ Nick Clifton <nickc@redhat.com>
+
+ * elf-hppa.h (elf_hppa_fake_sections): Use SHT_PARISC_UNWIND as
+ the section type of the .PARISC.unwind section on 64-bit binaries
+ and SHT_PROGBITS for 32-bit binaries. Add a comment about it.
+ Add comment about the sh_entsize value.
+
+2018-08-22 Rafeal Auler <rafaelauler@gmail.com>
+
+ PR 23560
+ * elfnn-aarch64.c (elfNN_aarch64_size_stubs): Always update the
+ stub's target, since it may have been changed after the layout.
+
+2018-08-21 John Darington <john@darrington.wattle.id.au>
+
+ * elf32-s12z.c (opru18_reloc): New function.
+ (elf_s12z_howto_table): Adjust Howto according to new knowledge.
+
2018-08-21 mephi42 <mephi42@gmail.com>
PR binutils/23315