_bfd_elf_get_link_hash_entry tidy

Replace the "Elf_Internal_Shdr *symtab_hdr" parameter with
"unsigned int ext_sym_start", making it a duplicate of the existing
get_link_hash_entry function.

Also remove unnecessary checks from get_ext_sym_hash_from_cookie and
find_merged_cie.  The sym_hashes and symbol index checks in
get_ext_sym_hash_from_cookie are duplicates of those done in
_bfd_elf_get_link_hash_entry, and there is no need to check for a
global symbol before calling _bfd_elf_get_link_hash_entry.  When
bad_symtab, local symbols will have a NULL sym_hashes entry.  Removing
these unnecessary checks gets rid of some cookie->locsyms references.

	PR 33530
	* elf-bfd.h (_bfd_elf_get_link_hash_entry): Update declaration.
	* elflink.c (_bfd_elf_get_link_hash_entry): Rename from
	get_link_hash_entry, adjusting all calls and deleting original
	function.
	(get_ext_sym_hash_from_cookie): Make "symndx" unsigned int.
	Remove unnecessary check on sym_hashes, symbol index and
	symbol binding.
	* elf-eh-frame.c (find_merged_cie): Remove similar unnecessary
	checks.
	* elf64-x86-64.c (elf_x86_64_scan_relocs): Adjust.
	* elfxx-x86.c (_bfd_x86_elf_check_relocs): Adjust.
	(_bfd_x86_elf_link_relax_section): Adjust.
5 files changed