[dev.link] cmd/link: add loader support for recording ElfType for symbols
[dev.link] cmd/link: add loader support for recording ElfType for symbols

Add hooks in the loader for recording the ElfType of a symbol, as a
replacement for the sym.Symbol ElfType() and SetElfType() methods.
This symbol property is set only for symbols read from shared
libraries by ldshlibsyms.

Change-Id: I3a3c193c3718dcfb73a2364d6e19e0419dab5b41
Reviewed-on: https://go-review.googlesource.com/c/go/+/213420
Run-TryBot: Than McIntosh <4b2922593166fc595a9b1a408f34f5d3817fe9d2@google.com>
TryBot-Result: Gobot Gobot <66cb808b70d30c07676d5e946fee83fd561249e5@golang.org>
Reviewed-by: Cherry Zhang <d62e63aa42ce272d7b6a5055d97e942b33a34679@google.com>
Reviewed-by: Jeremy Faller <b3f594e10a9edcf5413cf1190121d45078c62290@golang.org>

nawawi/go,golang/go,golang/go,nawawi/go,CAFxX/go,nawawi/go,golang/go,CAFxX/go,golang/go,CAFxX/go,nawawi/go,nawawi/go,akutz/go,cloudflare/go,akutz/go,akutz/go,cloudflare/go,CAFxX/go,akutz/go,CAFxX/go,golang/go,nawawi/go,nawawi/go,golang/go,golang/go,akutz/go,akutz/go,CAFxX/go,cloudflare/go,akutz/go,cloudflare/go,golang/go,cloudflare/go,cloudflare/go,nawawi/go,akutz/go,cloudflare/go,CAFxX/go,cloudflare/go,CAFxX/go