+
+ PR binutils/21589
+ * vms-alpha.c (_bfd_vms_get_value): Add an extra parameter - the
+ maximum value for the ascic pointer. Check that name processing
+ does not read beyond this value.
+ (_bfd_vms_slurp_etir): Add checks for attempts to read beyond the
+ end of etir record.
+
+
+ PR binutils/21591
+ * versados.c (versados_mkobject): Zero the allocated tdata structure.
+ (process_otr): Check for an invalid offset in the otr structure.
+
+
+ * config.bfd (epiphany-*-elf): Accept epiphany-*-*.
+
+
+ PR ld/20022
+ PR ld/21557
+ PR ld/21562
+ PR ld/21571
+ * elf-bfd.h (elf_link_hash_entry): Add start_stop. Change the
+ vtable field to a union.
+ (_bfd_elf_is_start_stop): Removed.
+ * elf32-i386.c (elf_i386_convert_load_reloc): Also check for
+ __start_SECNAME and __stop_SECNAME symbols.
+ * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
+ * elflink.c (_bfd_elf_is_start_stop): Removed.
+ (_bfd_elf_gc_mark_rsec): Check start_stop instead of calling
+ _bfd_elf_is_start_stop.
+ (elf_gc_propagate_vtable_entries_used): Skip __start_SECNAME and
+ __stop_SECNAME symbols. Updated.
+ (elf_gc_smash_unused_vtentry_relocs): Likewise.
+ (bfd_elf_gc_record_vtinherit): Likewise.
+ (bfd_elf_gc_record_vtentry): Likewise.
+
+
+ PR ld/21524
+ * elflink.c (elf_link_adjust_relocs): Generate an error when
+ encountering a reloc against a symbol removed by garbage
+ collection.
+
+
+ * elf-bfd.h (elf_backend_data): Add struct bfd_link_info *
+ to merge_gnu_properties.
+ * elf-properties.c (elf_merge_gnu_properties): Add struct
+ bfd_link_info * and pass it to merge_gnu_properties.
+ (elf_merge_gnu_property_list): Add struct bfd_link_info *
+ and pass it to elf_merge_gnu_properties.
+ (_bfd_elf_link_setup_gnu_properties): Pass info to
+ elf_merge_gnu_property_list.
+ * elf32-i386.c (elf_i386_merge_gnu_properties): Add struct
+ bfd_link_info *.
+ * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): Likewise.
+
+
+ PR 21564
+ * binary.c (binary_set_section_contents): Scale lma by octets
+ per byte to set filepos.
+
+
+ * elf32-arc.c (elf_arc_check_relocs): Fixed conditions to generate
+ dynamic sections.
+
+
+ * elf32-arc.c (elf_arc_size_dynamic_sections): Changed condition to
+ require TEXTREL.
+
+
+ * arc-got.h (relocate_fix_got_relocs_for_got_info): Added TCB_SIZE to
+ patched section contents for TLS IE reloc.
+ * elf32-arc.c: Remove TCB_SIZE preprocessor macro.
+
+
+ * elf32-arc.c (elf_arc_relocate_section): Added "call" to
+ RELOC_FOR_GLOBAL_SYMBOL macro.
+
+
+ * elf32-arc.c (elf_arc_relocate_section): Small refactor and condition
+ changes.
+
+
+ * config/tc-arc.c (md_undefined_symbol): Changed.
+ * config/tc-arc.h (DYNAMIC_STRUCT_NAME): Removed.
+
+
+ * elf32-arc.c (elf_arc_relocate_section): Fixed reassign of indirect
+ symbols.
+
+
+ * elf32-arc.c (elf_arc_check_relocs): Added condition to disable
+ warning and "Bad value" for local symbols ARC_32 or ARC_32_ME relocs.
+
+
+ * elf32-arc.c (ADD_RELA): Changed to only work when dynamic
+ object is created.
+
+
+ * elf32-arm.c (elf32_arm_merge_eabi_attributes): Remove assertion
+ that the input bfd has Tag_FP_ARCH non-zero if Tag_ABI_HardFP_use
+ is non-zero. Add clarifying comments.
+
+
+ * elf32-i386.c (elf_i386_check_relocs): Set local IFUNC symbol
+ name. Use local IFUNC symbol name string to report unsupported
+ non-PIC call to IFUNC function.
+ (elf_i386_relocate_section): Dump local IFUNC name with minfo
+ when generating R_386_IRELATIVE relocation.
+ (elf_i386_finish_dynamic_symbol): Likewise.
+ * elf_x86_64_check_relocs (elf_x86_64_check_relocs): Set local
+ IFUNC symbol name.
+ (elf_x86_64_relocate_section): Dump local IFUNC name with minfo
+ when generating R_X86_64_IRELATIVE relocation.
+ (elf_x86_64_finish_dynamic_symbol): Likewise.
+
+
+ * elf.c (setup_group): Make sure BFD sections are created for all
+ group sections in the input file when processing SHF_GROUP
+ sections.
+ (bfd_section_from_shdr): Avoid duplicating logic already
+ implemented in `setup_group'.
+
+
+ PR binutils/21546
+ * peXXigen.c (pe_print_idata): Use the address of the first thunk
+ if the hint address is zero.
+
+
+ PR ld/19579
+ * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Check
+ ELF_COMMON_DEF_P for common symbols.
+
+
+ * elf.c (_bfd_elf_make_section_from_shdr): Don't initially mark
+ SEC_GROUP sections as SEC_EXCLUDE.
+ (bfd_elf_set_group_contents): Replace use of abort with an assert.
+ (assign_section_numbers): Use resolve_section_groups flag instead
+ of relocatable link type.
+ (_bfd_elf_init_private_section_data): Use resolve_section_groups
+ flag instead of checking the final_link flag for part of the
+ checks in here. Fix white space as a result.
+ * elflink.c (elf_link_input_bfd): Use resolve_section_groups flag
+ instead of relocatable link type.
+ (bfd_elf_final_link): Likewise.
+
+
+ * elfxx-mips.c (_bfd_mips_elf_relocate_section): Remove unused
+ variable `bed'.
+ * elf32-score.c (score_elf_final_link_relocate): Likewise.
+ (s3_bfd_score_elf_check_relocs): Likewise.
+ * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
+ (score_elf_final_link_relocate): Likewise.
+ (s7_bfd_score_elf_check_relocs): Likewise.
+
+
+ * elflink.c (init_reloc_cookie_rels): Remove unused variable
+ `bed'.
+
+
+ * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Subtract `count'
+ from `reloc_count' rather than decrementing it.
+ * elf.c (bfd_section_from_shdr): Multiply the adjustment to
+ `reloc_count' by `int_rels_per_ext_rel'.
+ * elf32-score.c (score_elf_final_link_relocate): Do not multiply
+ `reloc_count' by `int_rels_per_ext_rel' for last relocation
+ entry determination.
+ (s3_bfd_score_elf_check_relocs): Likewise.
+ * elf32-score7.c (score_elf_final_link_relocate): Likewise.
+ (s7_bfd_score_elf_relocate_section): Likewise.
+ (s7_bfd_score_elf_check_relocs): Likewise.
+ * elf64-mips.c (mips_elf64_get_reloc_upper_bound): Remove
+ prototype and function.
+ (mips_elf64_slurp_one_reloc_table): Do not update `reloc_count'.
+ (mips_elf64_slurp_reloc_table): Assert that `reloc_count' is
+ triple rather than once the sum of REL and RELA relocation entry
+ counts.
+ (bfd_elf64_get_reloc_upper_bound): Remove macro.
+ * elflink.c (_bfd_elf_link_read_relocs): Do not multiply
+ `reloc_count' by `int_rels_per_ext_rel' for internal relocation
+ storage allocation size determination.
+ (elf_link_input_bfd): Multiply `.ctors' and `.dtors' section's
+ size by `int_rels_per_ext_rel'. Do not multiply `reloc_count'
+ by `int_rels_per_ext_rel' for last relocation entry
+ determination.
+ (bfd_elf_final_link): Do not multiply `reloc_count' by
+ `int_rels_per_ext_rel' for internal relocation storage
+ allocation size determination.
+ (init_reloc_cookie_rels): Do not multiply `reloc_count' by
+ `int_rels_per_ext_rel' for last relocation entry determination.
+ (elf_gc_smash_unused_vtentry_relocs): Likewise.
+ * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
+ (_bfd_mips_elf_relocate_section): Likewise.
+
+
+ PR 21529
+ * linker.c (_bfd_generic_link_output_symbols): Handle BSF_GNU_UNIQUE.
+
+
+ * elf.c (elfcore_grok_freebsd_psinfo): Use ELF header class to
+ determine structure sizes.
+ (elfcore_grok_freebsd_prstatus): Likewise.
+
+
+ * elf64-ppc.c (struct ppc_link_hash_table): Add has_plt_localentry0.
+ (ppc64_elf_merge_symbol_attribute): Merge localentry bits from
+ dynamic objects.
+ (is_elfv2_localentry0): New function.
+ (ppc64_elf_tls_setup): Default params->plt_localentry0.
+ (plt_stub_size): Adjust size for tls_get_addr_opt stub.
+ (build_tls_get_addr_stub): Use a simpler stub when r2 is not saved.
+ (ppc64_elf_size_stubs): Leave stub_type as ppc_stub_plt_call for
+ optimized localentry:0 stubs.
+ (ppc64_elf_build_stubs): Save r2 in ELFv2 __glink_PLTresolve.
+ (ppc64_elf_relocate_section): Leave nop unchanged for optimized
+ localentry:0 stubs.
+ (ppc64_elf_finish_dynamic_sections): Set PPC64_OPT_LOCALENTRY in
+ DT_PPC64_OPT.
+ * elf64-ppc.h (struct ppc64_elf_params): Add plt_localentry0.
+
+
+ PR ld/21523
+ * elf32-arm.c (elf32_arm_final_link_relocate): Install an absolute
+ value when processing the R_ARM_THM_ALU_PREL_11_0 reloc.
+
+
+ * cpu-arc.c (arc_compatible): New function.
+
+
+ * cpu-arc.c (arch_info_struct): Remove duplicate ARC600 entry.
+
+
+ PR binutils/21519
+ * bfdio.c (bfd_get_file_size): New function.
+ * bfd-in2.h: Regenerated.
+
+
+ * elf32-arc.c (arc_elf_merge_attributes): Add fall through
+ comments.
+
+
+ * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Use
+ dynobj instead of htab->elf.dynobj.
+
+
+ * elf64-mips.c (mips_elf64_canonicalize_reloc): Remove prototype
+ and function.
+ (mips_elf64_canonicalize_dynamic_reloc): Likewise.
+ (mips_elf64_slurp_one_reloc_table): Set `reloc_count' to the
+ actual number of internal relocations retrieved. Adjust
+ function description.
+ (bfd_elf64_canonicalize_reloc): Remove macro.
+ (bfd_elf64_canonicalize_dynamic_reloc): Likewise.
+
+
+ * archures.c (bfd_mach_sparc_v9m8): Define.
+ (bfd_mach_sparc_v8plusm8): Likewise.
+ (bfd_mach_sparc_v9_p): Adjust to M8.
+ (bfd_mach_sparc_64bit_p): Likewise.
+ * aoutx.h (machine_type): Handle bfd_mach_sparc_v9m8 and
+ bfd_mach_sparc_v8plusm8.
+ * bfd-in2.h: Regenerated.
+ * cpu-sparc.c (arch_info_struct): Entries for sparc:v9m8 and
+ sparc:v8plusm8.
+ * elfxx-sparc.c (_bfd_sparc_elf_object_p): Handle
+ bfd_mach_sparc_v8plusm8 and bfd_mach_sparc_v9m8 using the new hw
+ capabilities ONADDSUB, ONMUL, ONDIV, DICTUNP, FPCPSHL, RLE and
+ SHA3.
+ * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
+ bfd_mach_sparc_v8plusm8.
+
+
+ * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't keep
+ debug and special sections when no non-note alloc sections in an
+ object are kept.
+
+
+ * arc-got.h: Don't compare boolean values against TRUE or FALSE.
+ * elf-m10300.c: Likewise.
+ * elf.c: Likewise.
+ * elf32-arc.c: Likewise.
+ * elf32-bfin.c: Likewise.
+ * elf32-m68k.c: Likewise.
+ * elf32-nds32.c: Likewise.
+ * elf32-tilepro.c: Likewise.
+ * elflink.c: Likewise.
+ * elfnn-aarch64.c: Likewise.
+ * elfnn-riscv.c: Likewise.
+ * elfxx-tilegx.c: Likewise.
+ * mach-o.c: Likewise.
+ * peXXigen.c: Likewise.
+ * vms-alpha.c: Likewise.
+ * vms-lib.c: Likewise.
+
+
+ PR ld/20882
+ * elflink.c (elf_gc_mark_debug_section): New function.
+ (_bfd_elf_gc_mark_extra_sections): Mark any debug sections
+ referenced by kept debug sections.
+
+
+ * elf-m10300.c: Rename occurrences of non_ir_ref.
+ * elf32-arm.c: Likewise.
+ * elf32-bfin.c: Likewise.
+ * elf32-cr16.c: Likewise.
+ * elf32-cris.c: Likewise.
+ * elf32-d10v.c: Likewise.
+ * elf32-dlx.c: Likewise.
+ * elf32-fr30.c: Likewise.
+ * elf32-frv.c: Likewise.
+ * elf32-hppa.c: Likewise.
+ * elf32-i370.c: Likewise.
+ * elf32-i386.c: Likewise.
+ * elf32-iq2000.c: Likewise.
+ * elf32-lm32.c: Likewise.
+ * elf32-m32c.c: Likewise.
+ * elf32-m32r.c: Likewise.
+ * elf32-m68hc1x.c: Likewise.
+ * elf32-m68k.c: Likewise.
+ * elf32-mcore.c: Likewise.
+ * elf32-metag.c: Likewise.
+ * elf32-microblaze.c: Likewise.
+ * elf32-moxie.c: Likewise.
+ * elf32-msp430.c: Likewise.
+ * elf32-mt.c: Likewise.
+ * elf32-nios2.c: Likewise.
+ * elf32-or1k.c: Likewise.
+ * elf32-ppc.c: Likewise.
+ * elf32-rl78.c: Likewise.
+ * elf32-s390.c: Likewise.
+ * elf32-score.c: Likewise.
+ * elf32-score7.c: Likewise.
+ * elf32-sh.c: Likewise.
+ * elf32-tic6x.c: Likewise.
+ * elf32-tilepro.c: Likewise.
+ * elf32-v850.c: Likewise.
+ * elf32-vax.c: Likewise.
+ * elf32-xstormy16.c: Likewise.
+ * elf32-xtensa.c: Likewise.
+ * elf64-alpha.c: Likewise.
+ * elf64-hppa.c: Likewise.
+ * elf64-ia64-vms.c: Likewise.
+ * elf64-mmix.c: Likewise.
+ * elf64-ppc.c: Likewise.
+ * elf64-s390.c: Likewise.
+ * elf64-sh64.c: Likewise.
+ * elf64-x86-64.c: 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-tilegx.c: Likewise.
+ * linker.c: Likewise.
+
+
+ * elf64-ppc.c (add_symbol_adjust): Transfer non_ir_ref_dynamic.
+ * elflink.c (elf_link_add_object_symbols): Update to use
+ non_ir_ref_dynamic.
+ (elf_link_input_bfd): Test non_ir_ref_dynamic in addition to
+ non_ir_ref.
+ * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
+
+
+ * elfxx-mips.c (print_mips_ases): Handle MIPS16e2 ASE.
+
+
+ * elf32-i386.c (elf_i386_parse_gnu_properties): Merge
+ GNU_PROPERTY_X86_ISA_1_USED and GNU_PROPERTY_X86_ISA_1_NEEDED
+ properties.
+ * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
+
+
+ * elf64-x86-64.c (elf_x86_64_link_hash_entry): Rename plt_bnd
+ to plt_second.
+ (elf_x86_64_link_hash_table): Rename plt_bnd/plt_bnd_eh_frame
+ to plt_second/plt_second_eh_frame.
+ (elf_x86_64_link_hash_newfunc): Updated.
+ (elf_x86_64_allocate_dynrelocs): Likewise.
+ (elf_x86_64_size_dynamic_sections): Likewise.
+ (elf_x86_64_relocate_section): Likewise.
+ (elf_x86_64_finish_dynamic_symbol): Likewise.
+ (elf_x86_64_finish_dynamic_sections): Likewise.
+ (elf_x86_64_plt_type): Rename plt_bnd to plt_second.
+ (elf_x86_64_get_synthetic_symtab): Updated. Also scan the
+ .plt.sec section.
+ (elf_backend_setup_gnu_properties): Updated. Create the
+ .plt.sec section instead of the .plt.sec section.
+
+
+ * elf32-i386.c (elf_i386_allocate_dynrelocs): Partially revert
+ commit 25070364b0ce33eed46aa5d78ebebbec6accec7e.
+ * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewse.
+
+
+ * elf64-sparc.c (elf64_sparc_set_reloc): New function.
+ (bfd_elf64_set_reloc): Define.
+ (elf64_sparc_write_relocs): Use `canon_reloc_count'.
+
+
+ * targets.c (BFD_JUMP_TABLE_RELOCS): Add NAME##_set_reloc.
+ (struct bfd_target): New field _bfd_set_reloc.
+ * bfd.c (bfd_set_reloc): Call backend _set_bfd.
+ * reloc.c (_bfd_generic_set_reloc): New function.
+ * coffcode.h (coff_set_reloc): Define to _bfd_generic_set_reloc.
+ * nlm-target.h (nlm_set_reloc): Likewise.
+ * coff-rs6000.c (_bfd_xcoff_set_reloc): Likewise.
+ * aout-tic30.c (MY_set_reloc): Likewise.
+ * aout-target.h (MY_set_reloc): Likewise.
+ * elfxx-target.h (bfd_elfNN_set_reloc): Likewise.
+ * coff-alpha.c (_bfd_ecoff_set_reloc): Likewise.
+ * mach-o-target.c (bfd_mach_o_set_reloc): Likewise.
+ * vms-alpha.c (alpha_vms_set_reloc): Likewise.
+ * aout-adobe.c (aout_32_set_reloc): Likewise.
+ * bout.c (b_out_set_reloc): Likewise.
+ * coff-mips.c (_bfd_ecoff_set_reloc): Likewise.
+ * i386os9k.c (aout_32_set_reloc): Likewise.
+ * ieee.c (ieee_set_reloc): Likewise.
+ * oasys.c (oasys_set_reloc): Likewise.
+ * som.c (som_set_reloc): Likewise.
+ * versados.c (versados_set_reloc): Likewise.
+ * coff64-rs6000.c (rs6000_xcoff64_vec): Add
+ _bfd_generic_set_reloc.
+ (rs6000_xcoff64_aix_vec): LIkewise.
+ * libbfd.c (_bfd_norelocs_set_reloc): New function.
+ * libbfd-in.h: Prototype for _bfd_norelocs_set_reloc.
+ * i386msdos.c (msdos_set_reloc): Define to
+ _bfd_norelocs_set_reloc.
+ * elfcode.h (elf_set_reloc): Define.
+ * bfd-in2.h: Regenerated.
+
+
+ PR ld/21481
+ * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Use .plt.bnd
+ for IFUNC function address.
+
+
+ * elf32-arc.c (FEATURE_LIST_NAME): Define.
+ (CONFLICT_LIST): Likewise.
+ (opcode/arc-attrs.h): Include.
+ (arc_elf_print_private_bfd_data): Print OSABI v4 flag.
+ (arc_extract_features): New file.
+ (arc_stralloc): Likewise.
+ (arc_elf_merge_attributes): Likewise.
+ (arc_elf_merge_private_bfd_data): Use object attributes.
+ (bfd_arc_get_mach_from_attributes): New function.
+ (arc_elf_object_p): Use object attributes.
+ (arc_elf_final_write_processing): Likewise.
+ (elf32_arc_obj_attrs_arg_type): New function.
+ (elf32_arc_obj_attrs_handle_unknown): Likewise.
+ (elf32_arc_section_from_shdr): Likewise.
+ (elf_backend_obj_attrs_vendor): Define.
+ (elf_backend_obj_attrs_section): Likewise.
+ (elf_backend_obj_attrs_arg_type): Likewise.
+ (elf_backend_obj_attrs_section_type): Likewise.
+ (elf_backend_obj_attrs_handle_unknown): Likewise.
+ (elf_backend_section_from_shdr): Likewise.
+
+
+ PR ld/21458
+ * elf32-arm.c (elf32_arm_final_link_relocate): Set the bottom bit
+ of the value when resolving a R_ARM_THM_ALU_PREL_11_0 relocation
+ and the destination is a Thumb symbol.
+
+
+ * elf32-i386.c (elf_i386_get_synthetic_symtab): Add missing
+ initializer to silence GCC 4.2.
+ * lf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
+
+
+ * elf64-x86-64.c (PLT_ENTRY_SIZE): Renamed to ...
+ (LAZY_PLT_ENTRY_SIZE): This.
+ (NON_LAZY_PLT_ENTRY_SIZE): New.
+ (elf_x86_64_plt0_entry): Renamed to ...
+ (elf_x86_64_lazy_plt0_entry): This.
+ (elf_x86_64_plt_entry): Renamed to ...
+ (elf_x86_64_lazy_plt_entry): This.
+ (elf_x86_64_bnd_plt0_entry): Renamed to ...
+ (elf_x86_64_lazy_bnd_plt0_entry): This.
+ (elf_x86_64_legacy_plt_entry): Removed.
+ (elf_x86_64_bnd_plt_entry): Renamed to ...
+ (elf_x86_64_lazy_bnd_plt_entry): This.
+ (elf_x86_64_legacy_plt2_entry): Renamed to ...
+ (elf_x86_64_non_lazy_plt_entry): This.
+ (elf_x86_64_bnd_plt2_entry): Renamed to ...
+ (elf_x86_64_non_lazy_bnd_plt_entry): This.
+ (elf_x86_64_eh_frame_plt): Renamed to ...
+ (elf_x86_64_eh_frame_lazy_plt): This.
+ (elf_x86_64_eh_frame_bnd_plt): Renamed to ...
+ (elf_x86_64_eh_frame_lazy_bnd_plt): This.
+ (elf_x86_64_eh_frame_plt_got): Renamed to ...
+ (elf_x86_64_eh_frame_non_lazy_plt): This.
+ (elf_x86_64_lazy_plt_layout): New.
+ (elf_x86_64_non_lazy_plt_layout): Likewise.
+ (elf_x86_64_plt_layout): Likewise.
+ (elf_x86_64_backend_data): Remove PLT layout information. Add
+ os for target system.
+ (GET_PLT_ENTRY_SIZE): Removed.
+ (elf_x86_64_lazy_plt): New.
+ (elf_x86_64_non_lazy_plt): Likewise.
+ (elf_x86_64_lazy_bnd_plt): Likewise.
+ (elf_x86_64_non_lazy_bnd_plt): Likewise.
+ (elf_x86-64_arch_bed): Updated.
+ (elf_x86_64_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
+ (elf_x86_64_create_dynamic_sections): Removed.
+ (elf_x86_64_check_relocs): Don't check elf.dynobj. Don't call
+ _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
+ (elf_x86-64_adjust_dynamic_symbol): Updated.
+ (elf_x86_64_allocate_dynrelocs): Updated. Pass 0 as PLT header
+ size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
+ size for PLT0 if there is no PLT0. Get plt_entry_size from
+ non_lazy_plt for non-lazy PLT entries.
+ (elf_x86_64_size_dynamic_sections): Updated. Get plt_entry_size
+ from non_lazy_plt for non-lazy PLT entries.
+ (elf_x86-64_relocate_section): Updated. Properly get PLT index
+ if there is no PLT0.
+ (elf_x86_64_finish_dynamic_symbol): Updated. Fill the first slot
+ in the PLT entry with generic PLT layout. Fill the non-lazy PLT
+ entries with non-lazy PLT layout. Don't fill the second and third
+ slots in the PLT entry if there is no PLT0.
+ (elf_x86_64_finish_dynamic_sections): Updated. Don't fill PLT0
+ if there is no PLT0. Set sh_entsize on the .plt.got section.
+ (compare_relocs): New.
+ (elf_x86_64_plt_type): Likewise.
+ (elf_x86_64_plt): Likewise.
+ (elf_x86_64_nacl_plt): New. Forward declaration.
+ (elf_x86_64_get_plt_sym_val): Removed.
+ (elf_x86_64_get_synthetic_symtab): Rewrite to check PLT sections
+ against all dynamic relocations.
+ (elf_x86_64_link_setup_gnu_properties): New function.
+ (elf_backend_create_dynamic_sections): Updated.
+ (elf_backend_setup_gnu_properties): New.
+ (elf_x86_64_nacl_plt): New.
+ (elf_x86_64_nacl_arch_bed): Updated.
+
+
+ * elf32-i386.c (PLT_ENTRY_SIZE): Renamed to ...
+ (LAZY_PLT_ENTRY_SIZE): This.
+ (NON_LAZY_PLT_ENTRY_SIZE): New.
+ (elf_i386_plt0_entry): Renamed to ...
+ (elf_i386_lazy_plt0_entry): This.
+ (elf_i386_plt_entry): Renamed to ...
+ (elf_i386_lazy_plt_entry): This.
+ (elf_i386_pic_plt0_entry): Renamed to ...
+ (elf_i386_pic_lazy_plt0_entry): This.
+ (elf_i386_pic_plt_entry): Renamed to ...
+ (elf_i386_pic_lazy_plt_entry): This.
+ (elf_i386_got_plt_entry): Renamed to ...
+ (elf_i386_non_lazy_plt_entry): This.
+ (elf_i386_pic_got_plt_entry): Renamed to ...
+ (elf_i386_pic_non_lazy_plt_entry): This.
+ (elf_i386_eh_frame_plt): Renamed to ...
+ (elf_i386_eh_frame_lazy_plt): This.
+ (elf_i386_eh_frame_plt_got): Renamed to ...
+ (elf_i386_eh_frame_non_lazy_plt): This.
+ (elf_i386_plt_layout): Renamed to ...
+ (elf_i386_lazy_plt_layout): This. Remove eh_frame_plt_got and
+ eh_frame_plt_got_size.
+ (elf_i386_non_lazy_plt_layout): New.
+ (elf_i386_plt_layout): Likewise.
+ (elf_i386_non_lazy_plt): Likewise.
+ (GET_PLT_ENTRY_SIZE): Removed.
+ (elf_i386_plt): Renamed to ...
+ (elf_i386_lazy_plt): This.
+ (elf_i386_backend_data): Remove plt. Rename is_vxworks to os.
+ (elf_i386_arch_bed): Updated.
+ (elf_i386_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
+ (elf_i386_create_dynamic_sections): Removed.
+ (elf_i386_check_relocs): Don't check elf.dynobj. Don't call
+ _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
+ (elf_i386_adjust_dynamic_symbol): Updated.
+ (elf_i386_allocate_dynrelocs): Updated. Pass 0 as PLT header
+ size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
+ size for PLT0 if there is no PLT0.
+ (elf_i386_size_dynamic_sections): Updated. Check whether GOT
+ output section is discarded only if GOT isn't empty.
+ (elf_i386_relocate_section): Updated. Properly get PLT index
+ if there is no PLT0.
+ (elf_i386_finish_dynamic_symbol): Updated. Don't fill the
+ second and third slots in the PLT entry if there is no PLT0.
+ (elf_i386_finish_dynamic_sections): Updated. Don't fill PLT0
+ if there is no PLT0. Set sh_entsize on the .plt.got section.
+ (elf_i386_nacl_plt): Forward declaration.
+ (elf_i386_get_plt_sym_val): Removed.
+ (elf_i386_get_synthetic_symtab): Rewrite to check PLT sections
+ against all dynamic relocations.
+ (elf_i386_link_setup_gnu_properties): New function.
+ (elf_backend_create_dynamic_sections): Updated.
+ (elf_backend_setup_gnu_properties): New.
+ (elf_i386_nacl_plt): Updated.
+ (elf_i386_nacl_arch_bed): Likewise.
+ (elf_i386_vxworks_arch_bed): Likewise.
+
+
+ * elflink.c (elf_output_implib): Remove executable flag from import
+ library bfd.
+ * elf32-arm.c (elf32_arm_filter_implib_symbols): Assert that the import
+ library is a relocatable object file.
+
+
+ PR ld/21404
+ * elf32-avr.c (avr_should_move_sym): New function.
+ (avr_should_reduce_sym_size): Likewise.
+ (avr_should_increase_sym_size): Likewise.
+ (elf32_avr_relax_delete_bytes): Adjust symbol values
+ and sizes by calling new functions.
+
+
+ * config.bfd (riscv32-*): Enable rv64.
+
+
+ PR 21384
+ * elflink.c (bfd_elf_link_mark_dynamic_symbol): Test h->non_elf
+ rather than h->root.type == bfd_link_hash_new.
+ (bfd_elf_record_link_assignment): Similarly, call
+ bfd_elf_link_mark_dynamic_symbol when h->non_elf.
+
+
+ PR 21432
+ * reloc.c (reloc_offset_in_range): New function.
+ (bfd_perform_relocation, bfd_install_relocation): Use it.
+ (_bfd_final_link_relocate): Likewise.
+
+
+ * elf32-i386.c (elf_i386_allocate_dynrelocs): Check plt_got
+ before using .plt.got.
+ * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
+
+
+ * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Use "="
+ instead of "+=" to update 0.
+
+
+ * elf32-i386.c (elf_i386_create_dynamic_sections): Create the
+ .plt.got section here.
+ (elf_i386_check_relocs): Don't create the .plt.got section.
+ * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Create
+ the .plt.got and .plt.bnd sections here.
+ (elf_x86_64_check_relocs): Don't create the .plt.got nor
+ .plt.bnd sections.
+
+
+ * elf64-x86-64.c (elf_x86_64_link_hash_entry): Remove
+ has_bnd_reloc.
+ (elf_x86_64_link_hash_newfunc): Don't clear has_bnd_reloc.
+ (elf_x86_64_copy_indirect_symbol): Don't copy has_bnd_reloc.
+ (elf_x86_64_check_relocs): Don't set has_bnd_reloc.
+ (elf_x86_64_finish_dynamic_symbol): Check bndplt instead of
+ has_bnd_reloc.
+
+
+ * elf-bfd.h (elf_backend_data): Change setup_gnu_properties
+ to return bfd *.
+ (_bfd_elf_link_setup_gnu_properties): Return bfd *.
+ * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Return
+ the first relocatable ELF input with GNU properties.
+
+
+ * elf32-i386.c (elf_i386_finish_dynamic_sections): Simplify
+ VxWorks for non-PIC.
+
+
+ * elf-bfd.h (struct elf_backend_data): Make asection param of
+ elf_backend_eh_frame_address_size const.
+ (_bfd_elf_eh_frame_address_size): Likewise.
+ * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): Likewise.
+ * elf32-msp430.c (elf32_msp430_eh_frame_address_size): Likewise.
+ * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): Likewise.
+ * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Likewise.
+ * elf-eh-frame.c (_bfd_elf_eh_frame_address_size): Likewise.
+ (next_cie_fde_offset): Constify params.
+ (offset_adjust, adjust_eh_frame_local_symbols): Likewise.
+
+
+ * elf-bfd.h (struct eh_cie_fde): Add aug_str_len and aug_data_len.
+ (_bfd_elf_adjust_eh_frame_global_symbol): Declare.
+ * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Set aug_str_len and
+ aug_data_len.
+ (offset_adjust): New function.
+ (_bfd_elf_adjust_eh_frame_global_symbol): Likewise.
+ (adjust_eh_frame_local_symbols): Likewise.
+ (_bfd_elf_discard_section_eh_frame): Call adjust_eh_frame_local_symbols
+ after changing anything. Return true if anything changed.
+ * elflink.c (bfd_elf_discard_info): If .eh_frame changed, call
+ _bfd_elf_adjust_eh_frame_global_symbol for globals.
+
+
+ * elflink.c (_bfd_elf_link_hash_hide_symbol): Clear dynstr_index
+ when force_local.
+
+
+ * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
+ (ppc_elf_select_plt_layout, ppc_elf_tls_setup): Use it.
+ (ppc_elf_adjust_dynamic_symbol, allocate_dynrelocs): Likewise.
+ (ppc_elf_relocate_section): Likewise. Delete silly optimisation
+ for undef and undefweak dyn_relocs.
+ * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
+ (ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup): Use it.
+ (allocate_got, allocate_dynrelocs): Likewise.
+ (ppc64_elf_relocate_section): Likewise.
+
+
+ * elf32-i386.c (elf_i386_size_dynamic_sections): Alwasys add
+ DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rel.plt section.
+ * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Alwasys
+ add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rela.plt section.
+
+
+ PR binutils/21434
+ * reloc.c (bfd_perform_relocation): Check for a negative address
+ in the reloc.
+
+
+ PR ld/21334
+ * elf-bfd.h (elf_backend_data): Add `always_renumber_dynsyms'
+ member.
+ * elfxx-target.h [!elf_backend_always_renumber_dynsyms]
+ (elf_backend_always_renumber_dynsyms): Define.
+ (elfNN_bed): Initialize `always_renumber_dynsyms' member.
+ * elfxx-mips.h (elf_backend_always_renumber_dynsyms): Define.
+ * elflink.c (bfd_elf_size_dynamic_sections): Also call
+ `_bfd_elf_link_renumber_dynsyms' if the backend has requested
+ it.
+ (bfd_elf_size_dynsym_hash_dynstr): Likewise.
+
+
+ * elflink.c (bfd_elf_size_dynamic_sections): Only call
+ `_bfd_elf_link_renumber_dynsyms' after section GC if dynamic
+ sections have been created.
+
+
+ PR binutils/21431
+ * compress.c (bfd_init_section_compress_status): Check the return
+ value from bfd_malloc.
+
+
+ * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add
+ no_finish_dynamic_symbol.
+ (elf_x86_64_link_hash_newfunc): Set no_finish_dynamic_symbol to
+ 0.
+ (elf_x86_64_allocate_dynrelocs): If a symbol isn't undefined
+ weak symbol, don't make it dynamic.
+ (elf_x86_64_relocate_section): If a symbol isn't dynamic in PIC,
+ set no_finish_dynamic_symbol and generate R_X86_64_RELATIVE
+ relocation for GOT reference.
+ (elf_x86_64_finish_dynamic_symbol): Abort if
+ no_finish_dynamic_symbol isn't 0.
+
+
+ PR ld/21402
+ * elf32-i386.c (elf_i386_allocate_dynrelocs): If a symbol isn't
+ undefined weak symbol, don't make it dynamic.
+ (elf_i386_relocate_section): If a symbol isn't dynamic in PIC,
+ set no_finish_dynamic_symbol and generate R_386_RELATIVE
+ relocation for R_386_GOT32.
+
+
+ PR ld/21425
+ * elf32-i386.c (ELF_MAXPAGESIZE): Set to 0x1000 for VxWorks.
+
+
+ PR 21414
+ * section.c (GLOBAL_SYM_INIT): Make available in bfd.h.
+ * elf.c (lcomm_sym): New.
+ (_bfd_elf_large_com_section): Use lcomm_sym section symbol.
+ * bfd-in2.h: Regenerate.
+
+
+ PR 21412
+ * elf-bfd.h (struct elf_backend_data <get_reloc_section>): Change
+ parameters and comment.
+ (_bfd_elf_get_reloc_section): Delete.
+ (_bfd_elf_plt_get_reloc_section): Declare.
+ * elf.c (_bfd_elf_plt_get_reloc_section, elf_get_reloc_section):
+ New functions. Don't blindly skip over assumed .rel/.rela prefix.
+ Extracted from..
+ (_bfd_elf_get_reloc_section): ..here. Delete.
+ (assign_section_numbers): Call elf_get_reloc_section.
+ * elf64-ppc.c (elf_backend_get_reloc_section): Define.
+ * elfxx-target.h (elf_backend_get_reloc_section): Update.
+
+
+ PR 21409
+ * dwarf2.c (_bfd_dwarf2_find_nearest_line): Don't segfault when
+ no symbols.
+
+
+ PR ld/21402
+ * elf32-i386.c (elf_i386_link_hash_entry): Add
+ no_finish_dynamic_symbol.
+ (elf_i386_link_hash_newfunc): Set no_finish_dynamic_symbol to 0.
+ (elf_i386_allocate_dynrelocs): If a symbol isn't undefined weak
+ symbol, don't make it dynamic in PIE.
+ (elf_i386_relocate_section): If a symbol isn't dynamic in PIE,
+ set no_finish_dynamic_symbol and generate R_386_RELATIVE
+ relocation for R_386_GOT32
+ (elf_i386_finish_dynamic_symbol): Abort if no_finish_dynamic_symbol
+ isn't 0.
+
+
+ PR ld/19617
+ PR ld/21086
+ * elflink.c (elf_link_add_object_symbols): Require
+ --no-dynamic-linker with -E/--dynamic-list when creating
+ dynamic sections.
+
+
+ * elflink.c (_bfd_elf_symbol_refs_local_p): Always return TRUE
+ if forced local.
+
+
+ * elfxx-mips.c (_bfd_mips_elf_final_link): Reorder comment about
+ dynamic symbol sorting.
+
+
+ PR ld/21382
+ * elflink.c (elf_link_add_object_symbols): Preserve
+ dynamic_ref_after_ir_def when restoring the symbol table for
+ unneeded dynamic object.
+
+
+ PR ld/21401
+ * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't abort
+ on on undefined IFUNC symbol in the second PLT.
+
+
+ * peXXigen.c (pe_print_reloc): Correct chunk_end.
+
+
+ * elflink.c (_bfd_elf_adjust_dynamic_symbol): Hide undefweak
+ or make dynamic for info->dynamic_undefined_weak 0 and 1.
+ * elf32-ppc.c:Formatting.
+ (ensure_undefweak_dynamic): Don't make dynamic when
+ info->dynamic_undefined_weak is zero.
+ (allocate_dynrelocs): Discard undefweak dyn_relocs for
+ info->dynamic_undefined_weak. Discard undef dyn_relocs when
+ not default visibility. Discard undef and undefweak
+ dyn_relocs earlier.
+ (ppc_elf_relocate_section): Adjust to suit.
+ * elf64-ppc.c: Formatting.
+ (ensure_undefweak_dynamic): Don't make dynamic when
+ info->dynamic_undefined_weak is zero.
+ (allocate_dynrelocs): Discard undefweak dyn_relocs for
+ info->dynamic_undefined_weak. Discard them earlier.
+
+
+ PR ld/21389
+ * elflink.c (bfd_elf_size_dynamic_sections): Get soname index
+ before generating the version definition section.
+
+
+ * elflink.c (_bfd_elf_merge_symbol): Undo dynamic linking
+ state when a regular object file defines a symbol with
+ incompatible type to that defined by an earlier shared lib.
+
+
+ * coffcode.h: Wrap some overly long _bfd_error_handler args.
+ * elf.c: Likewise.
+ * elf32-arm.c: Likewise.
+ * elf32-i386.c: Likewise.
+ * elf32-mep.c: Likewise.
+ * elf64-ia64-vms.c: Likewise.
+ * elf64-x86-64.c: Likewise.
+ * elflink.c: Likewise.
+ * elfnn-ia64.c: Likewise.
+ * elfxx-mips.c: Likewise.
+
+
+ * aoutx.h: Use %B and %A in error messages throughout file.
+ * aout-cris.c: Likewise.
+ * archive.c: Likewise.
+ * binary.c: Likewise.
+ * coff-rs6000.c: Likewise.
+ * coff-tic4x.c: Likewise.
+ * coffcode.h: Likewise.
+ * coffgen.c: Likewise.
+ * cofflink.c: Likewise.
+ * coffswap.h: Likewise.
+ * cpu-arm.c: Likewise.
+ * elf-eh-frame.c: Likewise.
+ * elf-m10300.c: Likewise.
+ * elf.c: Likewise.
+ * elf32-arc.c: Likewise.
+ * elf32-arm.c: Likewise.
+ * elf32-bfin.c: Likewise.
+ * elf32-frv.c: Likewise.
+ * elf32-iq2000.c: Likewise.
+ * elf32-m32c.c: Likewise.
+ * elf32-microblaze.c: Likewise.
+ * elf32-nds32.c: Likewise.
+ * elf32-rl78.c: Likewise.
+ * elf32-rx.c: Likewise.
+ * elf32-score.c: Likewise.
+ * elf32-score7.c: Likewise.
+ * elf32-sh64.c: Likewise.
+ * elf32-v850.c: Likewise.
+ * elf32-vax.c: Likewise.
+ * elf32-visium.c: Likewise.
+ * elf64-ia64-vms.c: Likewise.
+ * elf64-mmix.c: Likewise.
+ * elf64-sh64.c: Likewise.
+ * elfcode.h: Likewise.
+ * elfnn-aarch64.c: Likewise.
+ * elfnn-ia64.c: Likewise.
+ * elfxx-mips.c: Likewise.
+ * hpux-core.c: Likewise.
+ * ieee.c: Likewise.
+ * ihex.c: Likewise.
+ * linker.c: Likewise.
+ * merge.c: Likewise.
+ * mmo.c: Likewise.
+ * oasys.c: Likewise.
+ * pdp11.c: Likewise.
+ * peXXigen.c: Likewise.
+ * rs6000-core.c: Likewise.
+ * vms-alpha.c: Likewise.
+ * xcofflink.c: Likewise.
+
+
+ * bfd.c (PRINT_TYPE): Define.
+ (_doprnt): New function.
+ (error_handler_internal): Use _doprnt.
+ * coff-arm.c: Put %A and %B arguments to _bfd_error_handler
+ calls in their natural order, throughout file.
+ * coff-mcore.c: Likewise.
+ * coff-ppc.c: Likewise.
+ * coff-tic80.c: Likewise.
+ * cofflink.c: Likewise.
+ * elf-s390-common.c: Likewise.
+ * elf.c: Likewise.
+ * elf32-arm.c: Likewise.
+ * elf32-i386.c: Likewise.
+ * elf32-m32r.c: Likewise.
+ * elf32-msp430.c: Likewise.
+ * elf32-spu.c: Likewise.
+ * elf64-ia64-vms.c: Likewise.
+ * elf64-sparc.c: Likewise.
+ * elf64-x86-64.c: Likewise.
+ * elflink.c: Likewise.
+ * elfnn-aarch64.c: Likewise.
+ * elfnn-ia64.c: Likewise.
+ * elfxx-mips.c: Likewise.
+
+
+ * elf32-arm.c (arm_type_of_stub): Supply missing args to "long
+ branch veneers" error. Fix double space and format message.
+ * elf32-avr.c (avr_add_stub): Do not pass NULL as %B arg.
+ * elf64-ppc.c (tocsave_find): Supply missing %B arg.
+
+
+ * bfd-in2.h: Regenerate.
+
+
+ * elf-properties.c (_bfd_elf_parse_gnu_properties): Remove the
+ extra `\n' in warning/error messages.
+ * elf32-i386.c (elf_i386_parse_gnu_properties): Likewise.
+ * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
+
+
+ * elf-properties.c (_bfd_elf_parse_gnu_properties): Ignore
+ processor-specific properties with generic ELF target vector.
+
+
+ * elf32-sparc.c (elf_backend_fixup_symbol): New.
+ * elf64-sparc.c (elf_backend_fixup_symbol): New.
+ * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
+ (_bfd_sparc_elf_link_hash_entry): Add has_got_reloc and
+ has_non_got_reloc.
+ (link_hash_newfunc): Initialize has_got_reloc and
+ has_non_got_reloc.
+ (_bfd_sparc_elf_size_dynamic_sections): Set interp to .interp
+ section.
+ (_bfd_sparc_elf_copy_indirect_symbol): Copy has_got_reloc and
+ has_non_got_reloc.
+ (_bfd_sparc_elf_check_relocs): Set has_got_reloc and
+ has_non_got_reloc.
+ (_bfd_sparc_elf_fixup_symbol): New function.
+ (allocate_dynrelocs): Don't allocate space for dynamic
+ relocations and discard relocations against resolved undefined
+ weak symbols in executable. Don't make resolved undefined weak
+ symbols in executable dynamic. Keep dynamic non-GOT/non-PLT
+ relocation against undefined weak symbols in PIE.
+ (_bfd_sparc_elf_relocate_section): Don't generate dynamic
+ relocations against resolved undefined weak symbols in PIE
+ (_bfd_sparc_elf_finish_dynamic_symbol): Keep PLT/GOT entries
+ without ynamic PLT/GOT relocations for resolved undefined weak
+ symbols.
+ Don't generate dynamic relocation against resolved undefined
+ weak symbol in executable.
+ (pie_finish_undefweak_symbol): New function.
+ (_bfd_sparc_elf_finish_dynamic_sections): Call
+ pie_finish_undefweak_symbol on all symbols in PIE.
+ * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add interp.
+ (_bfd_sparc_elf_fixup_symbol): New function.
+
+
+ * config.bfd: Remove ns32k from obsolete list.
+
+
+ PR 21287
+ * elf.c (special_sections_f): Match .fini_array and .fini_array.*.
+ (special_sections_i): Likewise for .init_array.
+ (special_sections_p): Likewise for .preinit_array.
+
+
+ PR ld/19579
+ PR ld/21306
+ * elf32-s390.c (elf_s390_finish_dynamic_symbol): Check
+ ELF_COMMON_DEF_P for common symbols.
+ * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
+ * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
+ * elflink.c (_bfd_elf_merge_symbol): Revert commits
+ 202ac193bbbecc96a4978d1ac3d17148253f9b01 and
+ 07492f668d2173da7a2bda3707ff0985e0f460b6.
+
+
+ * opncls.c (bfd_get_debug_link_info): Rename to...
+ (bfd_get_debug_link_info_1): ... this. Change type of second
+ parameter to void pointer. Adjust.
+ (bfd_get_debug_link_info): Reimplement on top of
+ bfd_get_debug_link_info_1.
+ (separate_debug_file_exists, separate_alt_debug_file_exists):
+ Change type of second parameter to void pointer. Adjust.
+ (get_func_type, check_func_type): Change type of second parameter
+ to void pointer.
+ (find_separate_debug_file): Add 'func_data' parameter. Pass it to
+ the callback functions instead of passing the address of a local.
+ (bfd_follow_gnu_debuglink): Pass address of unsigned long local to
+ find_separate_debug_file.
+ (get_alt_debug_link_info_shim): Change type of second parameter to
+ void pointer. Adjust.
+ (bfd_follow_gnu_debugaltlink): Adjust to pass NULL to
+ find_separate_debug_file.
+ (get_build_id_name, bfd_boolean check_build_id_file): Change type
+ of second parameter to void pointer. Adjust.
+ (bfd_follow_build_id_debuglink): Pass address of bfd_build_id
+ pointer local to find_separate_debug_file.
+
+2017-04-07 Tristan Gingold <gingold@gingold-Precision-7510>
+
+ * coffgen.c (_bfd_coff_gc_mark_hook): Handle PE weak
+ external symbols with a definition.
+ (_bfd_coff_gc_mark_extra_sections): Fix typo.
+
+
+ * po/SRC-POTFILES.in: Regenerate.
+
+
+ * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Support ELFv2 PLT
+ reference counting.
+
+
+ (_bfd_XXi_swap_aouthdr_out): For clarity, use defines rather than
+ numbers for DataDirectory entry indicies passed to
+ add_data_entry().
+
+
+ * elf.c (get_program_header_size): Add a GNU_MBIND segment for
+ each GNU_MBIND section and align GNU_MBIND section to page size.
+ (_bfd_elf_map_sections_to_segments): Create a GNU_MBIND
+ segment for each GNU_MBIND section.
+ (_bfd_elf_init_private_section_data): Copy sh_info from input
+ for GNU_MBIND section.
+
+
+ * elfnn-riscv.c (GP_NAME): Delete.
+ (riscv_global_pointer_value): Change GP_NAME to RISCV_GP_SYMBOL.
+ (_bfd_riscv_relax_lui): Likewise.
+
+
+ PR binutils/21342
+ * elflink.c (_bfd_elf_define_linkage_sym): Prevent null pointer
+ dereference.
+ (bfd_elf_final_link): Only initialize the extended symbol index
+ section if there are extended symbol tables to list.
+
+
+ * Makefile.am (BFD32_BACKENDS): Add elf-properties.lo.
+ (BFD32_BACKENDS_CFILES): Add elf-properties.c.
+ * configure.ac (elf): Add elf-properties.lo.
+ * Makefile.in: Regenerated.
+ * configure: Likewise.
+ * elf-bfd.h (elf_property_kind): New.
+ (elf_property): Likewise.
+ (elf_property_list): Likewise.
+ (elf_properties): Likewise.
+ (_bfd_elf_parse_gnu_properties): Likewise.
+ (_bfd_elf_get_property): Likewise.
+ (_bfd_elf_link_setup_gnu_properties): Likewise.
+ (elf_backend_data): Add parse_gnu_properties, merge_gnu_properties
+ and setup_gnu_properties.
+ (elf_obj_tdata): Add properties.
+ * elf-properties.c: New file.
+ * elf32-i386.c (elf_i386_parse_gnu_properties): New.
+ (elf_i386_merge_gnu_properties): Likewise.
+ (elf_backend_parse_gnu_properties): Likewise.
+ (elf_backend_merge_gnu_properties): Likewise.
+ * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
+ (elf_x86_64_merge_gnu_properties): Likewise.
+ (elf_backend_parse_gnu_properties): Likewise.
+ (elf_backend_merge_gnu_properties): Likewise.
+ * elfxx-target.h (elf_backend_merge_gnu_properties): Likewise.
+ (elf_backend_parse_gnu_properties): Likewise.
+ (elf_backend_setup_gnu_properties): Likewise.
+ (elfNN_bed): Add elf_backend_parse_gnu_properties,
+ elf_backend_merge_gnu_properties and
+ elf_backend_setup_gnu_properties.
+
+
+ * elf32-wasm32.c: Add relocation code, two relocs.
+ * reloc.c: Add wasm32 relocations.
+ * libbfd.h: Regenerate.
+ * bfd-in2.h: Regenerate.
+ * bfd/po/bfd.pot: Regenerate.
+
+
+ PR binutils/18025
+ * coff-bfd.h (struct coff_section_data): Add new fields:
+ saved_bias and bias.
+ * coffgen.c (coff_find_nearest_line_with_names): Cache the bias
+ computed for PE binaries.
+ * dwarf2.c (scan_unit_for_symbols): Only warn once about each
+ missing abbrev.
+
+
+ PR ld/16044
+ * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Adjust BFD_ASSERT
+ to handle a local symbol with a hash-symbol-entry; without PLT.
+ Add BFD_ASSERT for an incidental case with GOT entry present.
+ (cris_elf_check_relocs): Increment PLT refcount only if the symbol
+ isn't forced-or-set local.
+
+
+ * wasm-module.c: New file to support WebAssembly modules.
+ * wasm-module.h: New file to support WebAssembly modules.
+ * doc/webassembly.texi: Start documenting wasm-module.c.
+ * config.bfd: Add wasm_vec.
+ * targets.c: Likewise.
+ * configure.ac: Likewise.
+ * Makefile.am: Add entries for wasm-module.c.
+ * Makefile.in: Regenerate.
+ * configure: Regenerate.
+ * po/SRC-POTFILES.in: Regenerate.
+
+
+ * cpu-wasm32.c: New file to support wasm32 architecture.
+ * elf32-wasm32.c: New file to support wasm32 architecture.
+ * Makefile.am: Add wasm32 architecture.
+ * archures.c: Likewise.
+ * config.bfd: Likewise.
+ * configure.ac: Likewise.
+ * targets.c: Likewise.
+ * Makefile.in: Regenerate.
+ * bfd-in2.h: Regenerate.
+ * configure: Regenerate.
+ * po/SRC-POTFILES.in: Regenerate.
+
+
+ PR 21266
+ * elf64-ppc.c (compare_symbols): Stabilize sort.
+
+
+ * elf64-ppc.c (struct ppc_link_hash_table): Add
+ local_ifunc_resolver and maybe_local_ifunc_resolver.
+ (ppc_build_one_stub): Set flags on emitting dynamic
+ relocation to ifunc.
+ (ppc64_elf_relocate_section): Likewise.
+ (ppc64_elf_finish_dynamic_symbol): Likewise.
+ (ppc64_elf_finish_dynamic_sections): Error on DT_TEXTREL with
+ local dynamic relocs to ifuncs.
+ * elf32-ppc.c (struct ppc_elf_link_hash_table): Add
+ local_ifunc_resolver and maybe_local_ifunc_resolver.
+ (ppc_elf_relocate_section): Set flag on emitting dynamic
+ relocation to ifuncs.
+ (ppc_elf_finish_dynamic_symbol): Likewise.
+ (ppc_elf_finish_dynamic_sections): Error on DT_TEXTREL with local
+ dynamic relocs to ifuncs.
+
+
+ PR binutils/21202
+ * reloc.c (BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC): Rename to
+ BFD_RELOC_AARCH64_TLSDESC_LD64_LO12.
+ (BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC): Rename to
+ BFD_RELOC_AARCH64_TLSDESC_ADD_LO12.
+ * bfd-in2.h: Regenerate.
+ * libbfd.h: Regenerate.
+ * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Update reloc
+ names.
+ (IS_AARCH64_TLSDESC_RELOC): Likewise.
+ (elfNN_aarch64_howto_table): Likewise.
+ (aarch64_tls_transition_without_check): Likewise.
+ (aarch64_reloc_got_type): Likewise.
+ (elfNN_aarch64_final_link_relocate): Likewise.
+ (elfNN_aarch64_tls_relax): Likewise.
+ (elfNN_aarch64_relocate_section): Likewise.
+ (elfNN_aarch64_gc_sweep_hook): Likewise.
+ (elfNN_aarch64_check_relocs): Likewise.
+ * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
+ (_bfd_aarch64_elf_resolve_relocation): Likewise.
+
* elf32-ppc.c: Remove ATTRIBUTE_UNUSED throughout when function