x86: Lookup __tls_get_addr or ___tls_get_addr once

Instead of checking if a symbol is __tls_get_addr or ___tls_get_addr,
we check if there is a reference to __tls_get_addr or ___tls_get_addr
before starting relocation check.

	* elf32-i386.c (elf_i386_link_hash_entry): Change tls_get_addr
	to 1 bit.
	(elf_i386_link_hash_newfunc): Initialize tls_get_addr to 0.
	(elf_i386_check_tls_transition): Check tls_get_addr directly.
	(elf_i386_convert_load_reloc): Update tls_get_addr check.
	(elf_i386_link_check_relocs): New function.
	(bfd_elf32_bfd_link_check_relocs): New.
	* elf64-x86-64.c (elf_x86_64_link_hash_entry): Change tls_get_addr
	to 1 bit.
	(elf_x86_64_link_hash_newfunc): Initialize tls_get_addr to 0.
	(elf_x86_64_check_tls_transition): Check tls_get_addr directly.
	(elf_x86_64_convert_load_reloc): Update tls_get_addr check.
	(elf_x86_64_link_check_relocs): New function.
	(bfd_elf64_bfd_link_check_relocs): New.
	(bfd_elf32_bfd_link_check_relocs): Likewise.
2 files changed