+2017-12-06 Alan Modra <amodra@gmail.com>
+
+ * doc/header.sed: Trim trailing space when splitting lines.
+ * aix386-core.c, * aout-adobe.c, * aout-arm.c, * aout-cris.c,
+ * aout-ns32k.c, * aout-target.h, * aout-tic30.c, * aoutf1.h, * aoutx.h,
+ * arc-got.h, * arc-plt.def, * arc-plt.h, * archive.c, * archive64.c,
+ * archures.c, * armnetbsd.c, * bfd-in.h, * bfd.c, * bfdio.c, * binary.c,
+ * bout.c, * cache.c, * cisco-core.c, * coff-alpha.c, * coff-apollo.c,
+ * coff-arm.c, * coff-h8300.c, * coff-i386.c, * coff-i860.c,
+ * coff-i960.c, * coff-m68k.c, * coff-m88k.c, * coff-mcore.c,
+ * coff-mips.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c,
+ * coff-stgo32.c, * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c,
+ * coff-we32k.c, * coff-x86_64.c, * coff-z80.c, * coff-z8k.c,
+ * coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c,
+ * coffswap.h, * compress.c, * corefile.c, * cpu-alpha.c, * cpu-arm.c,
+ * cpu-avr.c, * cpu-bfin.c, * cpu-cr16.c, * cpu-cr16c.c, * cpu-crx.c,
+ * cpu-d10v.c, * cpu-frv.c, * cpu-ft32.c, * cpu-i370.c, * cpu-i960.c,
+ * cpu-ia64-opc.c, * cpu-ip2k.c, * cpu-lm32.c, * cpu-m32r.c,
+ * cpu-mcore.c, * cpu-microblaze.c, * cpu-mips.c, * cpu-moxie.c,
+ * cpu-mt.c, * cpu-nios2.c, * cpu-ns32k.c, * cpu-or1k.c, * cpu-powerpc.c,
+ * cpu-pru.c, * cpu-sh.c, * cpu-spu.c, * cpu-v850.c, * cpu-v850_rh850.c,
+ * cpu-xgate.c, * cpu-z80.c, * dwarf1.c, * dwarf2.c, * ecoff.c,
+ * ecofflink.c, * ecoffswap.h, * elf-bfd.h, * elf-eh-frame.c,
+ * elf-hppa.h, * elf-m10200.c, * elf-m10300.c, * elf-s390-common.c,
+ * elf-strtab.c, * elf-vxworks.c, * elf.c, * elf32-am33lin.c,
+ * elf32-arc.c, * elf32-arm.c, * elf32-avr.c, * elf32-avr.h,
+ * elf32-bfin.c, * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c,
+ * elf32-crx.c, * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c,
+ * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c, * elf32-ft32.c,
+ * elf32-h8300.c, * elf32-hppa.c, * elf32-i386.c, * elf32-i860.c,
+ * elf32-i960.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32c.c,
+ * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c, * elf32-m68hc1x.c,
+ * elf32-m68hc1x.h, * elf32-m68k.c, * elf32-m88k.c, * elf32-mcore.c,
+ * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c, * elf32-mips.c,
+ * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c,
+ * elf32-nds32.h, * elf32-nios2.c, * elf32-or1k.c, * elf32-pj.c,
+ * elf32-ppc.c, * elf32-ppc.h, * elf32-pru.c, * elf32-rl78.c,
+ * elf32-rx.c, * elf32-s390.c, * elf32-score.c, * elf32-score.h,
+ * elf32-score7.c, * elf32-sh-symbian.c, * elf32-sh.c, * elf32-sh64.c,
+ * elf32-sparc.c, * elf32-spu.c, * elf32-tic6x.c, * elf32-tilegx.c,
+ * elf32-tilegx.h, * elf32-tilepro.c, * elf32-tilepro.h, * elf32-v850.c,
+ * elf32-vax.c, * elf32-wasm32.c, * elf32-xc16x.c, * elf32-xgate.c,
+ * elf32-xgate.h, * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c,
+ * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c,
+ * elf64-ppc.c, * elf64-s390.c, * elf64-sh64.c, * elf64-sparc.c,
+ * elf64-tilegx.c, * elf64-tilegx.h, * elf64-x86-64.c, * elfcore.h,
+ * elflink.c, * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c,
+ * elfnn-riscv.c, * elfxx-aarch64.c, * elfxx-aarch64.h, * elfxx-ia64.c,
+ * elfxx-ia64.h, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-sparc.c,
+ * elfxx-tilegx.c, * elfxx-x86.c, * elfxx-x86.h, * freebsd.h, * hash.c,
+ * host-aout.c, * hp300hpux.c, * hppabsd-core.c, * hpux-core.c,
+ * i386aout.c, * i386linux.c, * i386lynx.c, * i386mach3.c, * i386msdos.c,
+ * i386netbsd.c, * ieee.c, * ihex.c, * irix-core.c, * libaout.h,
+ * libbfd-in.h, * libbfd.c, * libcoff-in.h, * libnlm.h, * libpei.h,
+ * libxcoff.h, * linker.c, * lynx-core.c, * m68k4knetbsd.c,
+ * m68klinux.c, * m68knetbsd.c, * m88kmach3.c, * mach-o-aarch64.c,
+ * mach-o-arm.c, * mach-o-i386.c, * mach-o-target.c, * mach-o-x86-64.c,
+ * mach-o.c, * mach-o.h, * merge.c, * mipsbsd.c, * mmo.c, * netbsd.h,
+ * netbsd-core.c, * newsos3.c, * nlm-target.h, * nlm32-ppc.c,
+ * nlm32-sparc.c, * nlmcode.h, * ns32k.h, * ns32knetbsd.c, * oasys.c,
+ * opncls.c, * pc532-mach.c, * pdp11.c, * pe-arm.c, * pe-i386.c,
+ * pe-mcore.c, * pe-mips.c, * pe-x86_64.c, * peXXigen.c, * pef.c,
+ * pef.h, * pei-arm.c, * pei-i386.c, * pei-mcore.c, * pei-x86_64.c,
+ * peicode.h, * plugin.c, * ppcboot.c, * ptrace-core.c, * reloc.c,
+ * riscix.c, * rs6000-core.c, * section.c, * som.c, * som.h,
+ * sparclinux.c, * sparcnetbsd.c, * srec.c, * stabs.c, * sunos.c,
+ * syms.c, * targets.c, * tekhex.c, * trad-core.c, * vax1knetbsd.c,
+ * vaxnetbsd.c, * verilog.c, * versados.c, * vms-alpha.c, * vms-lib.c,
+ * vms-misc.c, * wasm-module.c, * wasm-module.h, * xcofflink.c,
+ * xsym.c, * xsym.h: Whitespace fixes.
+ * bfd-in2.h, * libbfd.h, * libcoff.h: Regenerate.
+
+2017-12-06 Alan Modra <amodra@gmail.com>
+
+ * elf32-lm32.c (lm32_elf_check_relocs): Skip non-ALLOC sections.
+ * elf32-m32r.c (m32r_elf_check_relocs): Likewise.
+ * elf32-nds32.c (nds32_elf_check_relocs): Likewise.
+ * elf32-or1k.c (or1k_elf_check_relocs): Likewise.
+ * elf32-sh.c (sh_elf_check_relocs): Likewise.
+
+2017-12-06 Alan Modra <amodra@gmail.com>
+
+ * elf32-hppa.c (struct elf32_hppa_dyn_reloc_entry): Delete. Use
+ struct elf_dyn_relocs throughout file instead.
+ (elf32_hppa_adjust_dynamic_symbol): Comment tidy.
+ * elf32-lm32.c (struct elf_lm32_dyn_relocs): Delete. Use
+ struct elf_dyn_relocs throughout file instead.
+ (lm32_elf_adjust_dynamic_symbol): Use readonly_dynrelocs.
+ * elf32-m32r.c (struct elf_m32r_dyn_relocs): Delete. Use
+ struct elf_dyn_relocs throughout file instead.
+ (m32r_elf_adjust_dynamic_symbol): Use readonly_dynrelocs, but disable.
+ Disable -z no-copyreloc too.
+ * elf32-metag.c (struct elf_metag_dyn_reloc_entry): Delete. Use
+ struct elf_dyn_relocs throughout file instead.
+ (elf_metag_adjust_dynamic_symbol): Use readonly_dynrelocs.
+ * elf32-microblaze.c (struct elf32_mb_dyn_relocs): Delete. Use
+ struct elf_dyn_relocs throughout file instead.
+ (readonly_dynrelocs): New function.
+ (microblaze_elf_adjust_dynamic_symbol): Use it.
+ * elf32-nds32.c (struct elf_nds32_dyn_relocs): Delete. Use
+ struct elf_dyn_relocs throughout file instead.
+ (nds32_elf_adjust_dynamic_symbol): Use readonly_dynrelocs, but disable.
+ Disable -z no-copyreloc too.
+ * elf32-nios2.c (struct elf32_nios2_dyn_relocs): Delete. Use
+ struct elf_dyn_relocs throughout file instead.
+ * elf32-or1k.c (struct elf_or1k_dyn_relocs): Delete. Use
+ struct elf_dyn_relocs throughout file instead.
+ (or1k_elf_adjust_dynamic_symbol): Use readonly_dynrelocs.
+ * elf32-sh.c (struct elf_sh_dyn_relocs): Delete. Use
+ struct elf_dyn_relocs throughout file instead.
+ (sh_elf_adjust_dynamic_symbol): Use readonly_dynrelocs, but disable.
+ Disable -z no-copyreloc too.
+ * elf32-tilepro.c (struct tilepro_elf_dyn_relocs): Delete. Use
+ struct elf_dyn_relocs throughout file instead.
+ (tilepro_elf_adjust_dynamic_symbol): Use readonly_dynrelocs.
+ * elfnn-riscv.c (struct riscv_elf_dyn_relocs): Delete. Use
+ struct elf_dyn_relocs throughout file instead.
+ (riscv_elf_adjust_dynamic_symbol): Use readonly_dynrelocs.
+ * elfxx-sparc.c (struct _bfd_sparc_elf_dyn_relocs): Delete. Use
+ struct elf_dyn_relocs throughout file instead.
+ (_bfd_sparc_elf_adjust_dynamic_symbol): Use readonly_dynrelocs.
+ * elfxx-tilegx.c (struct tilegx_elf_dyn_relocs): Delete. Use
+ struct elf_dyn_relocs throughout file instead.
+ (tilegx_elf_adjust_dynamic_symbol): Use readonly_dynrelocs.
+ * elf32-s390.c (elf_s390_adjust_dynamic_symbol): Use readonly_dynrelocs.
+ * elf64-s390.c (elf_s390_adjust_dynamic_symbol): Use readonly_dynrelocs.
+
+2017-12-06 Alan Modra <amodra@gmail.com>
+
+ * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Comment tidy.
+ * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
+ * elfnn-aarch64.c (elfNN_aarch64_adjust_dynamic_symbol): Likewise.
+
+2017-12-04 Alan Modra <amodra@gmail.com>
+
+ * elfxx-x86.c (readonly_dynrelocs): New function.
+ (maybe_set_textrel): New function. Always prints via minfo and
+ correct "readonly" to "read-only" in warning message., replacing..
+ (_bfd_x86_elf_readonly_dynrelocs): ..this.
+ (_bfd_x86_elf_size_dynamic_sections): Correct "readonly" to
+ "read-only" in warning message. Formatting.
+ (_bfd_x86_elf_adjust_dynamic_symbol): Use readonly_dynrelocs.
+ * linker.c (bfd_link_hash_traverse): Comment typo fix.
+
+2017-12-01 H.J. Lu <hongjiu.lu@intel.com>
+
+ * elfxx-x86.c (_bfd_x86_elf_readonly_dynrelocs): Print symbol
+ for map file output.
+
+2017-12-01 Alan Modra <amodra@gmail.com>
+
+ * elf32-hppa.c (maybe_set_textrel): Print symbol for map file output.
+ * elf32-ppc.c (maybe_set_textrel): Likewise.
+ * elf64-ppc.c (maybe_set_textrel): Likewise.
+ * elf32-arm.c (readonly_dynrelocs): New function.
+ (maybe_set_textrel): New function, replacing..
+ (elf32_arm_readonly_dynrelocs): ..this.
+ * elf32-lm32.c (readonly_dynrelocs): New function.
+ (maybe_set_textrel): New function, replacing old version of..
+ (readonly_dynrelocs): ..this.
+ * elf32-m32r.c (readonly_dynrelocs): New function.
+ (maybe_set_textrel): New function, replacing old version of..
+ (readonly_dynrelocs): ..this.
+ * elf32-metag.c (readonly_dynrelocs): New function.
+ (maybe_set_textrel): New function, replacing old version of..
+ (readonly_dynrelocs): ..this.
+ * elf32-nds32.c: Delete unnecessary forward declarations.
+ (readonly_dynrelocs): New function.
+ (maybe_set_textrel): New function, replacing old version of..
+ (readonly_dynrelocs): ..this.
+ * elf32-or1k.c (readonly_dynrelocs): New function.
+ (maybe_set_textrel): New function, replacing old version of..
+ (readonly_dynrelocs): ..this.
+ * elf32-s390.c (readonly_dynrelocs): New function.
+ (maybe_set_textrel): New function, replacing old version of..
+ (readonly_dynrelocs): ..this.
+ * elf32-sh.c (readonly_dynrelocs): New function.
+ (maybe_set_textrel): New function, replacing old version of..
+ (readonly_dynrelocs): ..this.
+ * elf32-tic6x.c (readonly_dynrelocs): New function.
+ (maybe_set_textrel): New function, replacing..
+ (elf32_tic6x_readonly_dynrelocs): ..this.
+ * elf32-tilepro.c (readonly_dynrelocs): New function.
+ (maybe_set_textrel): New function, replacing old version of..
+ (readonly_dynrelocs): ..this.
+ * elf64-s390.c (readonly_dynrelocs): New function.
+ (maybe_set_textrel): New function, replacing old version of..
+ (readonly_dynrelocs): ..this.
+ * elfnn-aarch64.c (readonly_dynrelocs): New function.
+ (maybe_set_textrel): New function, replacing..
+ (aarch64_readonly_readonly_dynrelocs): ..this.
+ * elfnn-riscv.c (readonly_dynrelocs): New function.
+ (maybe_set_textrel): New function, replacing old version of..
+ (readonly_dynrelocs): ..this.
+ * elfxx-sparc.c (readonly_dynrelocs): New function.
+ (maybe_set_textrel): New function, replacing old version of..
+ (readonly_dynrelocs): ..this.
+ * elfxx-tilegx.c (readonly_dynrelocs): New function.
+ (maybe_set_textrel): New function, replacing old version of..
+ (readonly_dynrelocs): ..this.
+
+2017-12-01 Alan Modra <amodra@gmail.com>
+
+ PR 22533
+ * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Don't do anything
+ special with non_got_ref for weak aliases.
+ (elf32_hppa_check_relocs): Tweak setting of non_got_ref.
+ (elf32_hppa_adjust_dynamic_symbol): When initialising weak aliases,
+ don't uselessly copy non_got_ref. Clear dyn_relocs instead if
+ strong symbol is allocated in dynbss. Tidy comments.
+ (elf32_hppa_relocate_section): Comment fix.
+ * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Don't do anything
+ special with non_got_ref for weak aliases.
+ (ppc_elf_adjust_dynamic_symbol): When initialising weak aliases,
+ don't uselessly copy non_got_ref. Clear dyn_relocs instead if
+ strong symbol is allocated in dynbss. Tidy comments.
+ * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't do anything
+ special with non_got_ref for weak aliases.
+ (ppc64_elf_adjust_dynamic_symbol): When initialising weak aliases,
+ don't uselessly copy non_got_ref. Clear dyn_relocs instead if
+ strong symbol is allocated in dynbss. Tidy comments.
+
+2017-11-29 Nick Clifton <nickc@redhat.com>
+
+ PR 22509
+ * coffcode.h (coff_slurp_reloc_table): Check for a NULL symbol
+ pointer when processing relocs.
+
+2017-11-29 Stefan Stroe <stroestefan@gmail.com>
+
+ * po/Make-in (datadir): Define as @datadir@.
+ (localedir): Define as @localedir@.
+ (gnulocaledir, gettextsrcdir): Use @datarootdir@.
+
+2017-11-28 Nick Clifton <nickc@redhat.com>
+
+ PR 22507
+ * coffgen.c (_bfd_coff_read_string_table): Check for an excessive
+ size of the external string table.
+
+2017-11-28 Nick Clifton <nickc@redhat.com>
+
+ PR 22506
+ * reloc.c (reloc_offset_in_range): Rename to
+ bfd_reloc_offset_in_range and export.
+ (bfd_perform_relocation): Rename function invocation.
+ (bfd_install_relocation): Likewise.
+ (bfd_final_link_relocate): Likewise.
+ * bfd-in2.h: Regenerate.
+ * coff-arm.c (coff_arm_reloc): Use bfd_reloc_offset_in_range.
+ * coff-i386.c (coff_i386_reloc): Likewise.
+ * coff-i860.c (coff_i860_reloc): Likewise.
+ * coff-m68k.c (mk68kcoff_common_addend_special_fn): Likewise.
+ * coff-m88k.c (m88k_special_reloc): Likewise.
+ * coff-mips.c (mips_reflo_reloc): Likewise.
+ * coff-x86_64.c (coff_amd64_reloc): Likewise.
+
+2017-11-28 H.J. Lu <hongjiu.lu@intel.com>
+
+ * elf-m10300.c (mn10300_elf_check_relocs): Don't set
+ non_ir_ref_regular.
+ * elf32-arm.c (elf32_arm_check_relocs): Likewise.
+ * elf32-bfin.c (bfin_check_relocs): Likewise.
+ * elf32-cr16.c (cr16_elf_check_relocs): Likewise.
+ * elf32-cris.c (cris_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-i370.c (i370_elf_check_relocs): Likewise.
+ * elf32-i386.c (elf_i386_check_relocs): Likewise.
+ * elf32-iq2000.c (iq2000_elf_check_relocs): Likewise.
+ * elf32-lm32.c (lm32_elf_check_relocs): Likewise.
+ * elf32-m32c.c (m32c_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-microblaze.c (microblaze_elf_check_relocs): Likewise.
+ * elf32-moxie.c (moxie_elf_check_relocs): Likewise.
+ * elf32-msp430.c (elf32_msp430_check_relocs): Likewise.
+ * elf32-mt.c (mt_elf_check_relocs): Likewise.
+ * elf32-nios2.c (nios2_elf32_check_relocs): Likewise.
+ * elf32-or1k.c (or1k_elf_check_relocs): Likewise.
+ * elf32-ppc.c (ppc_elf_check_relocs): Likewise.
+ * elf32-rl78.c (rl78_elf_check_relocs): Likewise.
+ * elf32-s390.c (elf_s390_check_relocs): Likewise.
+ * elf32-score.c (s3_bfd_score_elf_check_relocs): Likewise.
+ * elf32-score7.c (s7_bfd_score_elf_check_relocs): Likewise.
+ * elf32-sh.c (sh_elf_check_relocs): Likewise.
+ * elf32-tic6x.c (elf32_tic6x_check_relocs): Likewise.
+ * elf32-tilepro.c (tilepro_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-aarch64.c (elf64_aarch64_check_relocs): Likewise.
+ * elf64-alpha.c (elf64_alpha_check_relocs): Likewise.
+ * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
+ * elf64-ia64-vms.c (elf64_ia64_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-sh64.c (sh_elf64_check_relocs): Likewise.
+ * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
+ * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Likewise.
+ * elfnn-ia64.c (elfNN_ia64_check_relocs): Likewise.
+ * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
+ * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
+ * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
+ * elfxx-tilegx.c (tilegx_elf_check_relocs): Likewise.
+
+2017-11-28 Alan Modra <amodra@gmail.com>
+
+ PR 22471
+ * elflink.c (_bfd_elf_merge_symbol): Allow weak symbols to override
+ early passes over linker script symbols.
+ * linker.c (_bfd_generic_link_add_one_symbol): Allow symbols to
+ override early passes over linker script symbols. Clear ldscript_def
+ on symbol definitions.
+
+2017-11-28 Alan Modra <amodra@gmail.com>
+
+ * elf64-mmix.c (bfd_elf64_bfd_copy_link_hash_symbol_type): Define.
+
+2017-11-28 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/22502
+ * elflink.c (_bfd_elf_merge_symbol): Also skip definition from
+ an IR object.
+ (elf_link_add_object_symbols): If linker plugin is enabled, set
+ non_ir_ref_regular on symbols referenced in regular objects so
+ that linker plugin will get the correct symbol resolution.
+
+2017-11-27 Szabolcs Nagy <szabolcs.nagy@arm.com>
+
+ PR ld/22263
+ * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Use
+ bfd_link_executable instead of bfd_link_pic for TLS.
+ (elfNN_aarch64_allocate_dynrelocs): Likewise.
+ (aarch64_can_relax_tls): Likewise.
+
+2017-11-27 Szabolcs Nagy <szabolcs.nagy@arm.com>
+
+ PR ld/22269
+ * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Use
+ UNDEFWEAK_NO_DYNAMIC_RELOC to avoid dynamic GOT relocs.
+ (elfNN_aarch64_allocate_dynrelocs): Likewise.
+
+2017-11-24 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR binutils/22444
+ * elf.c (elf_read_notes): Add an argument for note aligment.
+ (elf_parse_notes): Likewise.
+ (_bfd_elf_make_section_from_shdr): Pass section aligment to
+ elf_parse_notes.
+ (bfd_section_from_phdr): Pass segment aligment to elf_read_notes.
+ (elf_parse_notes): Add an argument for note aligment. Use
+ ELF_NOTE_DESC_OFFSET to get the offset of the note descriptor.
+ Use ELF_NOTE_NEXT_OFFSET to get the offset of the next note
+ entry.
+ (elf_read_notes): Add an argument for note aligment and pass it
+ to elf_parse_notes.
+
+2017-11-23 Alan Modra <amodra@gmail.com>
+
+ * elf32-hppa.c (pc_dynrelocs): Define.
+ (elf32_hppa_copy_indirect_symbol): Don't copy dyn_relocs to weakdefs.
+ (alias_readonly_dynrelocs): New function.
+ (elf32_hppa_adjust_dynamic_symbol): Don't clear non_got_ref to
+ indicate dyn_relocs should be discarded, discard them here.
+ Use alias_readonly_dynrelocs.
+ (allocate_dynrelocs): Don't test or clear non_got_ref.
+ (elf32_hppa_relocate_section): Simplify test for dynamic relocs.
+ * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Don't copy dyn_relocs
+ to weakdefs.
+ (alias_readonly_dynrelocs, pc_dynrelocs): New functions.
+ (ppc_elf_adjust_dynamic_symbol): Don't clear non_got_ref to
+ indicate dyn_relocs should be discarded, discard them here.
+ Use alias_readonly_dynrelocs.
+ (allocate_dynrelocs): Don't test or clear non_got_ref.
+ (ppc_elf_relocate_section): Simplify test for dynamic relocs.
+
+2017-11-23 Alan Modra <amodra@gmail.com>
+
+ * elf64-ppc.c (struct ppc_link_hash_entry): Delete weakref field.
+ (ppc64_elf_copy_indirect_symbol): Don't set weakref.
+ (alias_readonly_dynrelocs): Use u.alias rather than weakref.
+ (ppc64_elf_adjust_dynamic_symbol): Don't use
+ alias_readonly_dynrelocs for function symbols.
+
+2017-11-23 Alan Modra <amodra@gmail.com>
+
+ * elf-bfd.h (struct elf_link_hash_entry): Add is_weakalias.
+ Rename u.weakdef to u.alias and update comment.
+ (weakdef): New static inline function.
+ * elflink.c (bfd_elf_record_link_assignment) Test is_weakalias
+ rather than u.weakdef != NULL, and use weakdef function.
+ (_bfd_elf_adjust_dynamic_symbol): Likewise.
+ (_bfd_elf_fix_symbol_flags): Likewise. Clear is_weakalias on
+ all aliases if def has been overridden in a regular object, not
+ u.weakdef.
+ (elf_link_add_object_symbols): Delete new_weakdef flag. Test
+ is_weakalias and use weakdef. Set is_weakalias and circular
+ u.alias. Update comments.
+ (_bfd_elf_gc_mark_rsec): Test is_weakalias rather than
+ u.weakdef != NULL and use weakdef function.
+ * elf-m10300.c (_bfd_mn10300_elf_adjust_dynamic_symbol): Test
+ is_weakalias rather than u.weakdef != NULL and use weakdef
+ function. Assert that def is strong defined.
+ * elf32-arc.c (elf_arc_adjust_dynamic_symbol): Likewise.
+ * elf32-arm.c (elf32_arm_adjust_dynamic_symbol): Likewise.
+ * elf32-bfin.c (elf32_bfinfdpic_adjust_dynamic_symbol): Likewise.
+ (bfin_adjust_dynamic_symbol): Likewise.
+ * elf32-cr16.c (_bfd_cr16_elf_adjust_dynamic_symbol): Likewise.
+ * elf32-cris.c (elf_cris_adjust_dynamic_symbol): Likewise.
+ * elf32-frv.c (elf32_frvfdpic_adjust_dynamic_symbol): Likewise.
+ * elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Likewise.
+ * elf32-i370.c (i370_elf_adjust_dynamic_symbol): Likewise.
+ * elf32-lm32.c (lm32_elf_adjust_dynamic_symbol): Likewise.
+ * elf32-m32r.c (m32r_elf_adjust_dynamic_symbol): Likewise.
+ * elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Likewise.
+ * elf32-metag.c (elf_metag_adjust_dynamic_symbol): Likewise.
+ * elf32-microblaze.c (microblaze_elf_adjust_dynamic_symbol): Likewise.
+ * elf32-nds32.c (nds32_elf_adjust_dynamic_symbol): Likewise.
+ * elf32-nios2.c (nios2_elf32_adjust_dynamic_symbol): Likewise.
+ * elf32-or1k.c (or1k_elf_adjust_dynamic_symbol): Likewise.
+ * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Likewise.
+ * elf32-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
+ * elf32-score.c (s3_bfd_score_elf_adjust_dynamic_symbol): Likewise.
+ * elf32-score7.c (s7_bfd_score_elf_adjust_dynamic_symbol): Likewise.
+ * elf32-sh.c (sh_elf_adjust_dynamic_symbol): Likewise.
+ * elf32-tic6x.c (elf32_tic6x_adjust_dynamic_symbol): Likewise.
+ * elf32-tilepro.c (tilepro_elf_gc_mark_hook): Likewise.
+ (tilepro_elf_adjust_dynamic_symbol): Likewise.
+ * elf32-vax.c (elf_vax_adjust_dynamic_symbol): Likewise.
+ * elf32-xtensa.c (elf_xtensa_adjust_dynamic_symbol): Likewise.
+ * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Likewise.
+ * elf64-hppa.c (elf64_hppa_adjust_dynamic_symbol): Likewise.
+ * elf64-ia64-vms.c (elf64_ia64_adjust_dynamic_symbol): Likewise.
+ * elf64-ppc.c (ppc64_elf_gc_mark_hook): Likewise.
+ (ppc64_elf_adjust_dynamic_symbol): Likewise.
+ * elf64-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
+ * elf64-sh64.c (sh64_elf64_adjust_dynamic_symbol): Likewise.
+ * elfnn-aarch64.c (elfNN_aarch64_adjust_dynamic_symbol): Likewise.
+ * elfnn-ia64.c (elfNN_ia64_adjust_dynamic_symbol): Likewise.
+ * elfnn-riscv.c (riscv_elf_adjust_dynamic_symbol): Likewise.
+ * elfxx-mips.c (_bfd_mips_elf_adjust_dynamic_symbol): Likewise.
+ * elfxx-sparc.c (_bfd_sparc_elf_gc_mark_hook): Likewise.
+ (_bfd_sparc_elf_adjust_dynamic_symbol): Likewise.
+ * elfxx-tilegx.c (tilegx_elf_gc_mark_hook): Likewise.
+ (tilegx_elf_adjust_dynamic_symbol): Likewise.
+ * elfxx-x86.c (_bfd_x86_elf_adjust_dynamic_symbol): Likewise.
+
+2017-11-21 Alan Modra <amodra@gmail.com>
+
+ * elf-bfd.h (elf_symbol_from): Check for NULL symbol bfd.
+ * elfcode.h (elf_slurp_reloc_table_from_section): Add FIXME comment.
+
+2017-11-20 Nick Clifton <nickc@redhat.com>
+
+ PR 22450
+ * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Skip
+ objects without a GNU_PROPERTY note section when looking for a bfd
+ onto which notes can be accumulated.
+
+2017-11-20 Alan Modra <amodra@gmail.com>
+
+ PR 22451
+ PR 22460
+ * elf.c (_bfd_elf_init_reloc_shdr): Delete "sec_hdr" parameter
+ and leave rel_hdr->sh_flags zero. Update calls.
+ (bfd_elf_set_group_contents): Check input rel/rela SHF_GROUP
+ flag when !gas before adding rel/rela section to group. Set
+ output rel/rela SHF_GROUP flags.
+
+2017-11-18 Jim Wilson <jimw@sifive.com>
+
+ * elfnn-riscv.c (_bfd_riscv_relax_align): Add space between alignment
+ and to in error message.
+
+2017-11-17 H.J. Lu <hongjiu.lu@intel.com>
+
+ * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Pass
+ "%F%P:", instead of "%F:", to linker callback in case of error.
+
+2017-11-16 Nick Clifton <nickc@redhat.com>
+
+ PR 22421
+ * elf.c (elfcore_grok_netbsd_procinfo): Check that the note is big enough.
+ (elfcore_grok_openbsd_procinfo): Likewise.
+ (elfcore_grok_nto_status): Likewise.
+
+2017-11-16 Nick Clifton <nickc@redhat.com>
+
+ * merge.c (sec_merge_emit): Always create padding buffer. Add
+ asserts to make sure that the buffer is long enough.
+
+2017-11-15 Alan Modra <amodra@gmail.com>
+
+ * bfd.c (union _bfd_doprnt_args): Add "Bad".
+ (_bfd_doprnt): Handle more flags.
+ (_bfd_doprnt_scan): Likewise. Tidy setting of args array.
+ (error_handler_internal): Init args type to Bad.
+
+2017-11-14 Alan Modra <amodra@gmail.com>
+
+ PR 22431
+ * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Warn on discarding
+ non-empty dynamic section.
+ (ppc_build_one_stub): Take elf_gp from output bfd, not output
+ section owner.
+ (ppc_size_one_stub, ppc64_elf_next_toc_section): Likewise.
+
+2017-11-14 Alan Modra <amodra@gmail.com>
+
+ * elf64-ppc.c (ppc64_elf_size_stubs): Correct test for user
+ .eh_frame info.
+
+2017-11-13 Jan Beulich <jbeulich@suse.com>
+
+ * coff-tic80.c (COFF_ENCODE_ALIGNMENT, COFF_DECODE_ALIGNMENT):
+ Define.
+ * coffcode.h (coff_set_alignment_hook): Drop tic80 special case.
+ (coff_write_object_contents): Likewise. Issue diagnostic for too
+ large alignment.
+
+2017-11-12 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/22423
+ * elf.c (_bfd_elf_map_sections_to_segments): Remove PF_X from
+ PT_PHDR segment.
+
+2017-11-12 Alan Modra <amodra@gmail.com>
+
+ * elflink.c (elf_link_add_object_symbols): Ignore anything but
+ defined and defweak symbols when setting up weakdefs.
+
+2017-11-12 Alan Modra <amodra@gmail.com>
+
+ * elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Set non_got_ref
+ to keep dyn_relocs, clear to discard. Comment.
+ (allocate_dynrelocs): Always clear non_got_ref when clearing
+ dyn_relocs in non-pic case. Invert non_got_ref test. Also test
+ dynamic_adjusted and ELF_COMMON_DEF_P. Move code deleting
+ dyn_relocs on undefined syms to handle for non-pic too.
+ (elf32_hppa_relocate_section): Simplify test for non-pic dyn relocs.
+ * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Set non_got_ref
+ to keep dyn_relocs, clear to discard. Comment.
+ (allocate_dynrelocs): Always clear non_got_ref when clearing
+ dyn_relocs in non-pic case. Invert non_got_ref test. Also test
+ dynamic_adjusted and ELF_COMMON_DEF_P. Move code deleting
+ dyn_relocs on undefined syms to handle for non-pic too.
+ (ppc_elf_relocate_section): Simplify test for non-pic dyn relocs.
+ * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Discard
+ dyn_relocs here. Don't bother setting non_got_ref. Comment.
+ (allocate_dynrelocs): Delete special handling of non-pic ELFv2
+ ifuncs. Move code deleting dyn_relocs on undefined symbols to
+ handle for non-pic too. Don't test non_got_ref. Do test
+ dynamic_adjusted and ELF_COMMON_DEF_P.
+
+2017-11-08 Djordje Todorovic <djordje.todorovic@rt-rk.com>
+
+ * elf32-mips.c (elf32_mips_grok_psinfo): Extract core->pid.
+ * elf64-mips.c (elf64_mips_grok_psinfo): Likewise.
+ * elfn32-mips.c (elf32_mips_grok_psinfo): Likewise.
+
+2017-11-08 Djordje Todorovic <djordje.todorovic@rt-rk.com>
+
+ * elf32-mips.c (elf32_mips_write_core_note): New function.
+ (elf_backend_write_core_note): New macro.
+ * elf64-mips.c (elf64_mips_write_core_note): New function.
+ (elf_backend_write_core_note): New macro.
+ * elfn32-mips.c (elf32_mips_write_core_note): New function.
+ (elf_backend_write_core_note): New macro.
+
+2017-11-07 Alan Modra <amodra@gmail.com>
+
+ * elf64-ppc.c (ppc64_elf_build_stubs): Correct pluralization in
+ statistics message.
+
+2017-11-07 Alan Modra <amodra@gmail.com>
+
+ * sysdep.h: Formatting, comment fixes.
+ (gettext, ngettext): Redefine when ENABLE_NLS.
+ (ngettext, dngettext, dcngettext): Define when !ENABLE_NLS.
+ (_): Define using gettext.
+ (textdomain, bindtextdomain): Use safer "do nothing".
+ * hosts/alphavms.h (textdomain, bindtextdomain): Likewise.
+ (ngettext, dngettext, dcngettext): Define when !ENABLE_NLS.
+
+2017-11-05 Alan Modra <amodra@gmail.com>
+
+ PR 22397
+ * bfd.c (_bfd_doprnt_scan): Check args index before storing, not
+ after.
+
+2017-11-05 Alan Modra <amodra@gmail.com>
+
+ PR 22397
+ * bfd.c (union _bfd_doprnt_args): New.
+ (PRINT_TYPE): Add FIELD arg. Take value from args.
+ (_bfd_doprnt): Replace ap parameter with args. Adjust all
+ PRINT_TYPE invocations and reading of format args to suit.
+ Move "%%" handling out of switch handling args. Support
+ positional parameters.
+ (_bfd_doprnt_scan): New function.
+ (error_handler_internal): Call _bfd_doprnt_scan and read args.
+
+2017-11-04 Alan Modra <amodra@gmail.com>
+
+ * elf32-ppc.c (got_entries_needed, got_relocs_needed): New functions.
+ (allocate_dynrelocs, ppc_elf_size_dynamic_sections): Use them here.
+ (ppc_elf_relocate_section): Don't output a dynamic relocation
+ for IE GOT entries in an executable.
+ * elf64-ppc.c (allocate_got): Trim unnecessary TPREL relocs.
+ (ppc64_elf_size_dynamic_sections): Likewise.
+ (ppc64_elf_relocate_section): Likewise.
+
+2017-11-04 Alan Modra <amodra@gmail.com>
+
+ * elf32-ppc.c (readonly_dynrelocs): Delete info param. Update all
+ callers. Don't bother with SEC_ALLOC test. Return section pointer.
+ Move minfo call to..
+ (maybe_set_textrel): ..here.
+ * elf64-ppc.c (readonly_dynrelocs): Return section pointer.
+ (maybe_set_textrel): Call minfo to print textrel warning to map file.
+
+2017-11-04 Alan Modra <amodra@gmail.com>
+
+ * elf32-hppa.c (enum _tls_type): Move.
+ (struct elf32_hppa_link_hash_entry): Make tls_type a bitfield.
+ (elf32_hppa_check_relocs): Set DF_STATIC_TLS only for shared libraries.
+ Tidy tls_type handling. Set symbol tls_type for GOT_TLS_LDM too.
+ (got_entries_needed, got_relocs_needed): New functions.
+ (allocate_dynrelocs): Use them.
+ (elf32_hppa_size_dynamic_sections): Likewise.
+ (elf32_hppa_relocate_section): Delete bogus FIXME. Formatting.
+ Correct code emitting relocs on GD/IE got entries. Report an
+ error when a symbol has both normal and TLS GOT relocs.
+
+2017-11-04 Alan Modra <amodra@gmail.com>
+
+ PR 22394
+ * elf32-hppa.c (elf32_hppa_check_relocs): Don't create dyn_relocs
+ for plabels when non-pic.
+ (maybe_set_textrel): New function.
+ (readonly_dynrelocs): Move and rewrite.
+ (elf32_hppa_adjust_dynamic_symbol): Use it. Don't create copy
+ relocs when def_regular or -z nocopyreloc. Handle non_got_ref
+ for functions. Expand non_got_ref comments.
+ (elf32_hppa_size_dynamic_sections): Use maybe_set_textrel.
+
+2017-11-03 H.J. Lu <hongjiu.lu@intel.com>
+
+ * elf32-i386.c (elf_i386_check_relocs): Set plt.refcount to 1.
+ Don't use func_pointer_refcount. Don't set plt.refcount nor
+ non_got_ref for function pointer reference.
+ * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
+ * elfxx-x86.c (elf_x86_allocate_dynrelocs): Don't use
+ func_pointer_refcount.
+ (_bfd_x86_elf_copy_indirect_symbol): Don't copy
+ func_pointer_refcount.
+ (_bfd_x86_elf_hide_symbol): Don't use func_pointer_refcount.
+ * elfxx-x86.h (GENERATE_DYNAMIC_RELOCATION_P): Likewise.
+ (elf_x86_link_hash_entry): Remove func_pointer_refcount.
+
+2017-11-03 Mingi Cho <mgcho.minic@gmail.com>
+ Nick Clifton <nickc@redhat.com>
+
+ PR 22385
+ * coffgen.c (_bfd_coff_get_external_symbols): Check for an
+ overlarge raw syment count.
+ (coff_get_normalized_symtab): Likewise.
+
+2017-11-01 James Bowman <james.bowman@ftdichip.com>
+
+ * archures.c: Add bfd_mach_ft32b.
+ * cpu-ft32.c: Add arch_info_struct.
+ * elf32-ft32.c: Add R_FT32_RELAX, SC0, SC1,
+ DIFF32.
+ (ft32_elf_relocate_section): Add clauses for R_FT32_SC0, SC1,
+ DIFF32.
+ (ft32_reloc_shortable, elf32_ft32_is_diff_reloc)
+ (elf32_ft32_adjust_diff_reloc_value)
+ (elf32_ft32_adjust_reloc_if_spans_insn)
+ (elf32_ft32_relax_delete_bytes, elf32_ft32_relax_is_branch_target)
+ (ft32_elf_relax_section): New function.
+ * reloc.c: Add BFD_RELOC_FT32_RELAX, SC0, SC1, DIFF32.
+ * bfd-in2.h: Regenerate.
+ * libbfd.h: Regenerate.
+
+2017-11-01 Nick Clifton <nickc@redhat.com>
+
+ PR 22376
+ * coffcode.h (coff_slurp_line_table): Check for an excessively
+ large line number count.
+
+2017-11-01 Nick Clifton <nickc@redhat.com>
+
+ PR 22373
+ * peicode.h (pe_bfd_read_buildid): Revise check for invalid size
+ and offset in light of further possible bogus values.
+
+2017-11-01 Alan Modra <amodra@gmail.com>
+
+ PR 22374
+ * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't create a plt
+ entry when just a dynamic reloc can serve. Ensure no dynamic
+ relocations when UNDEFWEAK_NO_DYNAMIC_RELOC by setting non_got_ref.
+ Expand and move the non_got_ref comment.
+ * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
+
+2017-11-01 Nick Clifton <nickc@redhat.com>
+
+ PR 22369
+ * coffgen.c (_bfd_coff_free_symbols): Fail if called on a non-COFF
+ file.
+ * cofflink.c (coff_link_check_archive_element): Skip non-COFF
+ members of an archive.
+
+2017-10-31 Nick Clifton <nickc@redhat.com>
+
+ PR 22373
+ * peicode.h (pe_bfd_read_buildid): Check for invalid size and data
+ offset values.
+
+2017-10-30 Alan Modra <amodra@gmail.com>
+
+ * elf32-frv.c (ELF_TARGET_ID): Don't define for generic
+ elf target.
+
+ * elflink.c (elf_gc_sweep): Test elf_object_id in addition to
+ relocs_compatible.
+ (bfd_elf_gc_sections): Likewise.
+
+2017-10-30 Alan Modra <amodra@gmail.com>
+
+ PR 22269
+ * elf32-hppa.c (elf32_hppa_check_relocs): Move SEC_ALLOC test to
+ ensure non_got_ref is not set due to debug references.
+ (elf32_hppa_adjust_dynamic_symbol): Tidy plabel handling. Use
+ SYMBOL_CALLS_LOCAL and UNDEFWEAK_NO_DYNAMIC_RELOC when determining
+ need for a plt entry.
+ (allocate_dynrelocs): Similarly for got entries. Tidy code discarding
+ dynamic relocs when pic. Remove bogus code attempting to handle
+ commons.
+ (elf32_hppa_relocate_section): Similarly. Delete resolved_to_zero
+ and simplify.
+ (elf32_hppa_finish_dynamic_symbol): Use UNDEFWEAK_NO_DYNAMIC_RELOC
+ and SYMBOL_REFERENCES_LOCAL in GOT handling.
+
+2017-10-28 Alan Modra <amodra@gmail.com>
+
+ PR 22300
+ * elflink.c (_bfd_elf_merge_symbol): Remove relocs_compatible check.
+ * elf32-hppa.c (elf_backend_relocs_compatible): Define.
+ * elf32-ppc.c (elf_backend_relocs_compatible): Define.
+ * elf64-ppc.c (elf_backend_relocs_compatible): Define.
+
+2017-10-25 Alan Modra <amodra@gmail.com>
+
+ * archive.c (_bfd_compute_and_write_armap): Match "__gnu_lto_slim"
+ optionally prefixed with "_".
+ * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
+
+2017-10-24 Andrew Waterman <andrew@sifive.com>
+
+ * elfnn-riscv.c (_bfd_riscv_relax_lui): Don't relax to c.lui
+ when rd is x0.
+
+2017-10-24 Renlin Li <renlin.li@arm.com>
+
+ PR ld/21703
+ * elflink.c (_bfd_elf_merge_symbol): Handle multiple definition case.
+
+2017-10-23 Nick Clifton <nickc@redhat.com>
+
+ PR 22319
+ * elflink.c (elf_link_output_extsym): Keep global undefined
+ symbols if they have been marked as needed.
+
2017-10-23 Maciej W. Rozycki <macro@imgtec.com>
* elfn32-mips.c (mips_elf_n32_mkobject): New prototype and