elf: Verify that there is only one default version

When assigning the symbol version, verify that there is only one default
version.

bfd/

	PR ld/34550
	* elflink.c (_bfd_elf_link_assign_sym_version): Verify that there
	is only one default version.

ld/

	PR ld/34550
	* testsuite/ld-elf/pr34550.d: New test.
	* testsuite/ld-elf/pr34550.t: Likewise.
	* testsuite/ld-elf/pr34550a.s: Likewise.
	* testsuite/ld-elf/pr34550b.s: Likewise.

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
5 files changed