X86-64: Allow copy relocs for building PIE

This patch allows copy relocs for non-GOT pc-relative relocation in PIE.

bfd/

	* elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Always
	allow copy relocs for building executables.
	(elf_x86_64_adjust_dynamic_symbol): Allocate copy relocs for
	PIE.
	(elf_x86_64_allocate_dynrelocs): For PIE, discard space for
	relocs against symbols which turn out to need copy relocs.
	(elf_x86_64_relocate_section): Don't copy a pc-relative
	relocation into the output file if the symbol needs copy reloc.

ld/testsuite/

	* ld-x86-64/copyreloc-lib.c: New file.
	* ld-x86-64/copyreloc-main.c: Likewise.
	* ld-x86-64/copyreloc-main.out: Likewise.
	* ld-x86-64/copyreloc-main1.rd: Likewise.
	* ld-x86-64/copyreloc-main2.rd: Likewise.

	* ld-x86-64/x86-64.exp: Run copyreloc tests.
powerpc gold, fix pr17566

Code stolen from arm.cc.

	PR 17566
	* powerpc.cc (Target_powerpc::Scan::local): Use add_local_section
	when adding dynamic relocations against section symbols.
Reformat elf_x86_64_create_dynamic_sections

	* elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Reformat.
Replace copyreloc-main.c with copyreloc-main.S

	* ld-x86-64/copyreloc-main.c: Removed.
	* ld-x86-64/copyreloc-main.S: New.
	* ld-x86-64/x86-64.exp: Replace copyreloc-main.c with
	copyreloc-main.S.
Automatic date update in version.in