cmd/link: abstract DWARF metadata symbol lookup
cmd/link: abstract DWARF metadata symbol lookup

The compiler passes a lot of DWARF metadata about functions to the
linker via symbols whose names are derived from the function's own
symbol name. We look up these symbols in several places. This is about
to get slightly more complex as we introduce ABIs as symbol versions,
so abstract this lookup pattern into a helper function.

For #27539.

Change-Id: Ic71f6b5dc6608a5a5f5f515808981e6d6f5d728e
Reviewed-on: https://go-review.googlesource.com/c/146858
Run-TryBot: Austin Clements <7ea35d812706d9213868749011af1ed4fa2f6aa0@google.com>
TryBot-Result: Gobot Gobot <66cb808b70d30c07676d5e946fee83fd561249e5@golang.org>
Reviewed-by: David Chase <ae171625adc8645b8b79b7e405a6da5aba5341e0@google.com>
Reviewed-by: Heschi Kreinick <e89ab2b172855aa0ad01c40c4d8a3535a61ac68a@google.com>

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