[GOLD] Support setting DT_RELACOUNT late

PowerPC gold adds relative dynamic relocs in do_relax.  These aren't
accounted for in the value set in add_target_dynamic_tags, which is
called before do_relax.  Provide a way of setting DT_RELCOUNT and
DT_RELACOUNT at the point where .dynamic is written.

	* layout.cc (Layout::add_target_dynamic_tags): Add custom_relcount
	parameter.  Emit DT_RELCOUNT/RELACOUNT as a custom target handled
	dynamic tag if set.
	* layout.h(Layout::add_target_dynamic_tags): Update prototype.
	* aarch64.cc (Target_aarch64::do_finalize_sections): Adjust
	add_target_dynamic_tags call.
	* arm.cc (Target_arm::do_finalize_sections): Likewise.
	* i386.cc (Target_i386::do_finalize_sections): Likewise.
	* mips.cc (Target_mips::do_finalize_sections): Likewise.
	* s390.cc (Target_s390::do_finalize_sections): Likewise.
	* sparc.cc (Target_sparc::do_finalize_sections): Likewise.
	* tilegx.cc (Target_tilegx::do_finalize_sections): Likewise.
	* x86_64.cc (Target_x86_64::do_finalize_sections): Likewise.
	* powerpc.cc (Target_powerpc::do_finalize_sections): Likewise.
	(Target_powerpc::do_dynamic_tag_custom_value): New function.
11 files changed